mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-01-05 11:40:51 -05:00
Newsfile
This commit is contained in:
parent
b54b03f9e1
commit
a80e6b53f9
1
changelog.d/5183.misc
Normal file
1
changelog.d/5183.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Allow client event serialization to be async.
|
@ -200,7 +200,7 @@ class SyncRestServlet(RestServlet):
|
|||||||
event_formatter,
|
event_formatter,
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
defer.returnValue({
|
||||||
"account_data": {"events": sync_result.account_data},
|
"account_data": {"events": sync_result.account_data},
|
||||||
"to_device": {"events": sync_result.to_device},
|
"to_device": {"events": sync_result.to_device},
|
||||||
"device_lists": {
|
"device_lists": {
|
||||||
@ -222,7 +222,7 @@ class SyncRestServlet(RestServlet):
|
|||||||
},
|
},
|
||||||
"device_one_time_keys_count": sync_result.device_one_time_keys_count,
|
"device_one_time_keys_count": sync_result.device_one_time_keys_count,
|
||||||
"next_batch": sync_result.next_batch.to_string(),
|
"next_batch": sync_result.next_batch.to_string(),
|
||||||
}
|
})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def encode_presence(events, time_now):
|
def encode_presence(events, time_now):
|
||||||
@ -266,7 +266,7 @@ class SyncRestServlet(RestServlet):
|
|||||||
event_formatter=event_formatter,
|
event_formatter=event_formatter,
|
||||||
)
|
)
|
||||||
|
|
||||||
return joined
|
defer.returnValue(joined)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def encode_invited(self, rooms, time_now, token_id, event_formatter):
|
def encode_invited(self, rooms, time_now, token_id, event_formatter):
|
||||||
@ -302,7 +302,7 @@ class SyncRestServlet(RestServlet):
|
|||||||
"invite_state": {"events": invited_state}
|
"invite_state": {"events": invited_state}
|
||||||
}
|
}
|
||||||
|
|
||||||
return invited
|
defer.returnValue(invited)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def encode_archived(self, rooms, time_now, token_id, event_fields, event_formatter):
|
def encode_archived(self, rooms, time_now, token_id, event_fields, event_formatter):
|
||||||
@ -332,7 +332,7 @@ class SyncRestServlet(RestServlet):
|
|||||||
event_formatter=event_formatter,
|
event_formatter=event_formatter,
|
||||||
)
|
)
|
||||||
|
|
||||||
return joined
|
defer.returnValue(joined)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def encode_room(
|
def encode_room(
|
||||||
@ -398,7 +398,7 @@ class SyncRestServlet(RestServlet):
|
|||||||
result["unread_notifications"] = room.unread_notifications
|
result["unread_notifications"] = room.unread_notifications
|
||||||
result["summary"] = room.summary
|
result["summary"] = room.summary
|
||||||
|
|
||||||
return result
|
defer.returnValue(result)
|
||||||
|
|
||||||
|
|
||||||
def register_servlets(hs, http_server):
|
def register_servlets(hs, http_server):
|
||||||
|
Loading…
Reference in New Issue
Block a user