mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Only load members of newly joined rooms (#2389)
* Only load members of newly joined rooms * Comment that the query is prepared at runtime Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
c6ea2c9ff2
commit
2a5b8e0306
7 changed files with 102 additions and 9 deletions
|
@ -67,9 +67,8 @@ func (p *PresenceStreamProvider) IncrementalSync(
|
|||
// add newly joined rooms user presences
|
||||
newlyJoined := joinedRooms(req.Response, req.Device.UserID)
|
||||
if len(newlyJoined) > 0 {
|
||||
// TODO: This refreshes all lists and is quite expensive
|
||||
// The notifier should update the lists itself
|
||||
if err = p.notifier.Load(ctx, p.DB); err != nil {
|
||||
// TODO: Check if this is working better than before.
|
||||
if err = p.notifier.LoadRooms(ctx, p.DB, newlyJoined); err != nil {
|
||||
req.Log.WithError(err).Error("unable to refresh notifier lists")
|
||||
return from
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue