mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Don't work out invite room state in federation API
This commit is contained in:
parent
a82bce9b7b
commit
5a17fb3dbb
|
|
@ -113,16 +113,6 @@ func Invite(
|
||||||
string(cfg.Matrix.ServerName), cfg.Matrix.KeyID, cfg.Matrix.PrivateKey,
|
string(cfg.Matrix.ServerName), cfg.Matrix.KeyID, cfg.Matrix.PrivateKey,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Try parsing invite states one by one. This allows us to drop only the invite
|
|
||||||
// states that are invalid rather than dropping all of them in one go.
|
|
||||||
inviteStates := []gomatrixserverlib.InviteV2StrippedState{}
|
|
||||||
for _, isj := range intermediate.InviteRoomState {
|
|
||||||
var inviteState gomatrixserverlib.InviteV2StrippedState
|
|
||||||
if err = json.Unmarshal(isj, &inviteState); err == nil {
|
|
||||||
inviteStates = append(inviteStates, inviteState)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the invite event to the roomserver.
|
// Add the invite event to the roomserver.
|
||||||
if err = producer.SendInvite(
|
if err = producer.SendInvite(
|
||||||
httpReq.Context(),
|
httpReq.Context(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue