0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-17 17:53:50 +01:00

Actually make the 'read' flag correct

This commit is contained in:
David Baker 2016-05-23 18:48:02 +01:00
parent a24bc5b2dc
commit b791a530da

View file

@ -81,10 +81,9 @@ class NotificationsServlet(RestServlet):
receipt = receipts_by_room[pa["room_id"]] receipt = receipts_by_room[pa["room_id"]]
returned_pa["read"] = ( returned_pa["read"] = (
pa["topological_ordering"] > receipt["topological_ordering"] receipt["topological_ordering"] >= pa["topological_ordering"] or (
or ( receipt["topological_ordering"] == pa["topological_ordering"] and
pa["topological_ordering"] == receipt["topological_ordering"] receipt["stream_ordering"] >= pa["stream_ordering"]
and pa["stream_ordering"] > receipt["stream_ordering"]
) )
) )
returned_push_actions.append(returned_pa) returned_push_actions.append(returned_pa)