mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Run Black. (#5482)
This commit is contained in:
parent
7dcf984075
commit
32e7c9e7f2
376 changed files with 9142 additions and 10388 deletions
|
@ -51,7 +51,7 @@ class NotificationsServlet(RestServlet):
|
|||
)
|
||||
|
||||
receipts_by_room = yield self.store.get_receipts_for_user_with_orderings(
|
||||
user_id, 'm.read'
|
||||
user_id, "m.read"
|
||||
)
|
||||
|
||||
notif_event_ids = [pa["event_id"] for pa in push_actions]
|
||||
|
@ -67,11 +67,13 @@ class NotificationsServlet(RestServlet):
|
|||
"profile_tag": pa["profile_tag"],
|
||||
"actions": pa["actions"],
|
||||
"ts": pa["received_ts"],
|
||||
"event": (yield self._event_serializer.serialize_event(
|
||||
notif_events[pa["event_id"]],
|
||||
self.clock.time_msec(),
|
||||
event_format=format_event_for_client_v2_without_room_id,
|
||||
)),
|
||||
"event": (
|
||||
yield self._event_serializer.serialize_event(
|
||||
notif_events[pa["event_id"]],
|
||||
self.clock.time_msec(),
|
||||
event_format=format_event_for_client_v2_without_room_id,
|
||||
)
|
||||
),
|
||||
}
|
||||
|
||||
if pa["room_id"] not in receipts_by_room:
|
||||
|
@ -80,17 +82,15 @@ class NotificationsServlet(RestServlet):
|
|||
receipt = receipts_by_room[pa["room_id"]]
|
||||
|
||||
returned_pa["read"] = (
|
||||
receipt["topological_ordering"], receipt["stream_ordering"]
|
||||
) >= (
|
||||
pa["topological_ordering"], pa["stream_ordering"]
|
||||
)
|
||||
receipt["topological_ordering"],
|
||||
receipt["stream_ordering"],
|
||||
) >= (pa["topological_ordering"], pa["stream_ordering"])
|
||||
returned_push_actions.append(returned_pa)
|
||||
next_token = str(pa["stream_ordering"])
|
||||
|
||||
defer.returnValue((200, {
|
||||
"notifications": returned_push_actions,
|
||||
"next_token": next_token,
|
||||
}))
|
||||
defer.returnValue(
|
||||
(200, {"notifications": returned_push_actions, "next_token": next_token})
|
||||
)
|
||||
|
||||
|
||||
def register_servlets(hs, http_server):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue