mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-18 07:52:56 +01:00
Use tuple comparison
Hopefully easier to read
This commit is contained in:
parent
602c84cd9c
commit
0acdd0f1ea
1 changed files with 3 additions and 4 deletions
|
@ -82,10 +82,9 @@ class NotificationsServlet(RestServlet):
|
||||||
receipt = receipts_by_room[pa["room_id"]]
|
receipt = receipts_by_room[pa["room_id"]]
|
||||||
|
|
||||||
returned_pa["read"] = (
|
returned_pa["read"] = (
|
||||||
receipt["topological_ordering"] >= pa["topological_ordering"] or (
|
receipt["topological_ordering"], receipt["stream_ordering"]
|
||||||
receipt["topological_ordering"] == pa["topological_ordering"] and
|
) >= (
|
||||||
receipt["stream_ordering"] >= pa["stream_ordering"]
|
pa["topological_ordering"], pa["stream_ordering"]
|
||||||
)
|
|
||||||
)
|
)
|
||||||
returned_push_actions.append(returned_pa)
|
returned_push_actions.append(returned_pa)
|
||||||
next_token = pa["stream_ordering"]
|
next_token = pa["stream_ordering"]
|
||||||
|
|
Loading…
Reference in a new issue