mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
bugfix: ensure we don't append nothing else we can end up with null arrays
Caught by element-web cypress tests, which consistently failed.
This commit is contained in:
parent
c063352508
commit
3c964de004
@ -53,10 +53,12 @@ func (r *AccountDataRequest) AppendLive(ctx context.Context, res *Response, extC
|
||||
if err != nil {
|
||||
logger.Err(err).Str("user", extCtx.UserID).Str("room", update.RoomID()).Msg("failed to fetch room account data")
|
||||
} else {
|
||||
if len(roomAccountData) > 0 { // else we can end up with `null` not `[]`
|
||||
roomToMsgs[update.RoomID()] = accountEventsAsJSON(roomAccountData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(globalMsgs) == 0 && len(roomToMsgs) == 0 {
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user