Try to match by type/state key tuple rather than event ID

This commit is contained in:
Neil Alexander 2021-11-15 11:56:53 +00:00
parent 19ee1a4f38
commit 9c4bfba01b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -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
}