Never filter out a user's own membership when using LL (#2887)

This commit is contained in:
Erik Johnston 2022-11-22 21:38:27 +00:00 committed by GitHub
parent 7ad87eace3
commit 31f56ac3f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -588,7 +588,7 @@ func (p *PDUStreamProvider) lazyLoadMembers(
isGappedIncremental := limited && incremental isGappedIncremental := limited && incremental
// We want this users membership event, keep it in the list // We want this users membership event, keep it in the list
stateKey := *event.StateKey() stateKey := *event.StateKey()
if _, ok := timelineUsers[stateKey]; ok || isGappedIncremental { if _, ok := timelineUsers[stateKey]; ok || isGappedIncremental || stateKey == device.UserID {
newStateEvents = append(newStateEvents, event) newStateEvents = append(newStateEvents, event)
if !stateFilter.IncludeRedundantMembers { if !stateFilter.IncludeRedundantMembers {
p.lazyLoadCache.StoreLazyLoadedUser(device, roomID, stateKey, event.EventID()) p.lazyLoadCache.StoreLazyLoadedUser(device, roomID, stateKey, event.EventID())