Convert replication code to async/await. (#7987)

This commit is contained in:
Patrick Cloke 2020-08-03 07:12:55 -04:00 committed by GitHub
parent db5970ac6d
commit 3b415e23a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 29 additions and 38 deletions

View file

@ -50,7 +50,7 @@ class ReplicationBumpPresenceActiveTime(ReplicationEndpoint):
self._presence_handler = hs.get_presence_handler()
@staticmethod
def _serialize_payload(user_id):
async def _serialize_payload(user_id):
return {}
async def _handle_request(self, request, user_id):
@ -92,7 +92,7 @@ class ReplicationPresenceSetState(ReplicationEndpoint):
self._presence_handler = hs.get_presence_handler()
@staticmethod
def _serialize_payload(user_id, state, ignore_status_msg=False):
async def _serialize_payload(user_id, state, ignore_status_msg=False):
return {
"state": state,
"ignore_status_msg": ignore_status_msg,