Currently in order to compute the next_batch token for the /sync
response we start from an initial value (zero), and compare it with the
ordering of the new events to get the maximum value. If there are no new
events to compare with the returned value is zero. This process is
repeated for the room and the presence key.
To fix this we use the current since parameter (if present) as a
starting point instead of zero.
Also the max_ordering variable in presence was renamed to presence_key
to better reflect its usage since the timestamp is used as a next_batch
identifier for presence and not the event ordering.
Currently in order to compute the next_batch token for the /sync response we start from an initial value (zero), and compare it with the ordering of the new events to get the maximum value. If there are no new events to compare with the returned value is zero. This process is repeated for the room and the presence key.
To fix this we use the current since parameter (if present) as a starting point instead of zero.
Also the
max_ordering
variable in presence was renamed topresence_key
to better reflect its usage since the timestamp is used as a next_batch identifier for presence and not the event ordering.