From 9c4bfba01b370151dd3309bb49d6adfdaf99a3bb Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 15 Nov 2021 11:56:53 +0000 Subject: [PATCH] Try to match by type/state key tuple rather than event ID --- federationsender/internal/perform.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/federationsender/internal/perform.go b/federationsender/internal/perform.go index f358c2ea..cdc80c5c 100644 --- a/federationsender/internal/perform.go +++ b/federationsender/internal/perform.go @@ -262,7 +262,10 @@ func (r *FederationSenderInternalAPI) performJoinUsingServer( // Find the membership event. var joinEvent *gomatrixserverlib.Event for _, stateEvent := range respState.StateEvents { - if stateEvent.EventID() == event.EventID() { + if stateEvent.Type() != gomatrixserverlib.MRoomMember { + continue + } + if stateEvent.StateKeyEquals(*event.StateKey()) { joinEvent = event break }