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