提交 ce562d96 编写于 作者: E Erik Johnston 提交者: GitHub

Don't add empty room entries to sync responses (#312)

上级 6d15aec8
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册