# This function just dumps /sync blobs in the event queue as a raw event. # ALL handling is deferred to handlers. # ... Except updating the since token. That's important to do here to guarantee that it never calls with the same token twice. async def sync(self): blob=await self.request(params={'timeout':30000,'since':self.since}) self.since=blob['next_batch'] self.event_queue.put(Event('m.sync',None,blob))