Fix streaming position in multiroom feature (#47)

This commit is contained in:
PiotrKozimor 2022-11-02 15:48:00 +01:00 committed by GitHub
parent 49a93736ee
commit a7984645e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -505,7 +505,7 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi.
func(snapshot storage.DatabaseTransaction) types.StreamPosition {
return rp.streams.MultiRoomStreamProvider.IncrementalSync(
syncReq.Context, snapshot, syncReq,
syncReq.Since.PresencePosition, rp.Notifier.CurrentPosition().PresencePosition,
syncReq.Since.MultiRoomDataPosition, rp.Notifier.CurrentPosition().MultiRoomDataPosition,
)
},
),

View file

@ -410,7 +410,8 @@ func (r *Response) HasUpdates() bool {
len(r.Rooms.Peek) > 0 ||
len(r.ToDevice.Events) > 0 ||
len(r.DeviceLists.Changed) > 0 ||
len(r.DeviceLists.Left) > 0)
len(r.DeviceLists.Left) > 0) ||
len(r.MultiRoom) > 0
}
// NewResponse creates an empty response with initialised maps.