mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 05:12:46 +00:00
Fix 'Invited user can reject invite over federation several times' (#1341)
This commit is contained in:
parent
c60270eea3
commit
55498c8deb
4 changed files with 19 additions and 1 deletions
|
@ -139,6 +139,14 @@ func (s *inviteEventsStatements) SelectInviteEventsInRange(
|
|||
return nil, nil, err
|
||||
}
|
||||
|
||||
// if we have seen this room before, it has a higher stream position and hence takes priority
|
||||
// because the query is ORDER BY id DESC so drop them
|
||||
_, isRetired := retired[roomID]
|
||||
_, isInvited := result[roomID]
|
||||
if isRetired || isInvited {
|
||||
continue
|
||||
}
|
||||
|
||||
var event gomatrixserverlib.HeaderedEvent
|
||||
if err := json.Unmarshal(eventJSON, &event); err != nil {
|
||||
return nil, nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue