mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-18 07:40:53 +01:00
Don't add empty room entries to sync responses (#312)
This commit is contained in:
parent
6d15aec8d3
commit
ce562d96f6
1 changed files with 5 additions and 0 deletions
|
@ -411,6 +411,11 @@ func (d *SyncServerDatabase) addRoomDeltaToResponse(
|
||||||
recentEvents := streamEventsToEvents(recentStreamEvents)
|
recentEvents := streamEventsToEvents(recentStreamEvents)
|
||||||
delta.stateEvents = removeDuplicates(delta.stateEvents, recentEvents) // roll back
|
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 {
|
switch delta.membership {
|
||||||
case "join":
|
case "join":
|
||||||
jr := types.NewJoinResponse()
|
jr := types.NewJoinResponse()
|
||||||
|
|
Loading…
Reference in a new issue