mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-04-08 04:43:39 +00:00
strip out empty roomd deltas
This commit is contained in:
parent
85bce11964
commit
75b91ac9e5
1 changed files with 6 additions and 0 deletions
|
@ -856,6 +856,12 @@ func (d *Database) addRoomDeltaToResponse(
|
|||
return err
|
||||
}
|
||||
|
||||
// XXX: should we ever get this far if we have no recent events or state in this room?
|
||||
// in practice we do for peeks, but possibly not joins?
|
||||
if len(recentEvents) == 0 && len(delta.stateEvents) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch delta.membership {
|
||||
case gomatrixserverlib.Join:
|
||||
jr := types.NewJoinResponse()
|
||||
|
|
Loading…
Reference in a new issue