From 8ee4c0f71e3ca2ca6bc259e7fe7a7b85dfbebf07 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 4 Aug 2020 12:14:18 +0100 Subject: [PATCH] Always set invite_room_state else synapse rejects invites --- roomserver/internal/perform_invite.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roomserver/internal/perform_invite.go b/roomserver/internal/perform_invite.go index 4600bec0b..3feb404e4 100644 --- a/roomserver/internal/perform_invite.go +++ b/roomserver/internal/perform_invite.go @@ -171,6 +171,12 @@ func (r *RoomserverInternalAPI) processInviteEvent( if err = event.SetUnsignedField("invite_room_state", irs); err != nil { return nil, err } + } else { + log.WithError(ierr).Error("failed to build invite stripped state") + // still set the field else synapse deployments don't process the invite + if err = event.SetUnsignedField("invite_room_state", struct{}{}); err != nil { + return nil, err + } } }