mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 11:13:12 -06:00
More limiting
This commit is contained in:
parent
f5a14eb144
commit
f1277cc7c3
|
|
@ -72,6 +72,7 @@ func (p *PresenceStreamProvider) IncrementalSync(
|
|||
req.Log.WithError(err).Error("unable to refresh notifier lists")
|
||||
return from
|
||||
}
|
||||
NewlyJoinedLoop:
|
||||
for _, roomID := range newlyJoined {
|
||||
roomUsers := p.notifier.JoinedUsers(roomID)
|
||||
for i := range roomUsers {
|
||||
|
|
@ -86,6 +87,9 @@ func (p *PresenceStreamProvider) IncrementalSync(
|
|||
req.Log.WithError(err).Error("unable to query presence for user")
|
||||
return from
|
||||
}
|
||||
if len(presences) > req.Filter.Presence.Limit {
|
||||
break NewlyJoinedLoop
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue