client: Only run sync specific tasks if there's a new sync token.

This commit is contained in:
Damir Jelić 2019-07-03 17:46:38 +02:00
parent 85993b16a6
commit 22ee14e7b9

View File

@ -320,6 +320,11 @@ class PanClient(AsyncClient):
if self.index:
await self.index.commit_events()
if self.last_sync_token == self.next_batch:
return
self.last_sync_token = self.next_batch
self.pan_store.save_token(self.server_name, self.user_id, self.next_batch)
for room_id, room_info in response.rooms.join.items():