mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-14 02:13:10 -06:00
Don't add empty room entries to sync responses
This commit is contained in:
parent
5a6a950ee8
commit
9398756906
|
|
@ -411,6 +411,11 @@ func (d *SyncServerDatabase) addRoomDeltaToResponse(
|
|||
recentEvents := streamEventsToEvents(recentStreamEvents)
|
||||
delta.stateEvents = removeDuplicates(delta.stateEvents, recentEvents) // roll back
|
||||
|
||||
// Don't bother appending empty room entries
|
||||
if len(recentEvents) == 0 && len(delta.stateEvents) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch delta.membership {
|
||||
case "join":
|
||||
jr := types.NewJoinResponse()
|
||||
|
|
|
|||
Loading…
Reference in a new issue