From 3909d9d0780c8ad123e3bdf4cc8d460a83033502 Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Fri, 5 Aug 2022 07:58:39 +0200 Subject: [PATCH] Bypass lazyLoadCache if we're doing an initial sync --- syncapi/streams/stream_pdu.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/syncapi/streams/stream_pdu.go b/syncapi/streams/stream_pdu.go index 1003208fd..088c1a7ca 100644 --- a/syncapi/streams/stream_pdu.go +++ b/syncapi/streams/stream_pdu.go @@ -497,6 +497,11 @@ func (p *PDUStreamProvider) lazyLoadMembers( } // Add all users the client doesn't know about yet to a list for _, event := range timelineEvents { + // If we're doing an initial sync, add all users to the state events, bypassing the cache + if !incremental { + timelineUsers[event.Sender()] = struct{}{} + continue + } // Membership is not yet cached, add it to the list if _, ok := p.lazyLoadCache.IsLazyLoadedUserCached(device, roomID, event.Sender()); !ok { timelineUsers[event.Sender()] = struct{}{}