mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Don't store invites in sync API that aren't relevant to local users (#2439)
This commit is contained in:
parent
79da75d483
commit
a443d1e5f3
1 changed files with 5 additions and 3 deletions
|
@ -347,9 +347,11 @@ func (s *OutputRoomEventConsumer) onNewInviteEvent(
|
|||
ctx context.Context, msg api.OutputNewInviteEvent,
|
||||
) {
|
||||
if msg.Event.StateKey() == nil {
|
||||
log.WithFields(log.Fields{
|
||||
"event": string(msg.Event.JSON()),
|
||||
}).Panicf("roomserver output log: invite has no state key")
|
||||
return
|
||||
}
|
||||
if _, serverName, err := gomatrixserverlib.SplitID('@', *msg.Event.StateKey()); err != nil {
|
||||
return
|
||||
} else if serverName != s.cfg.Matrix.ServerName {
|
||||
return
|
||||
}
|
||||
pduPos, err := s.db.AddInviteEvent(ctx, msg.Event)
|
||||
|
|
Loading…
Reference in a new issue