Include stream ordering in the unsigned event dict

This commit is contained in:
Nick Mills-Barrett 2024-03-08 17:01:27 +00:00 committed by Tulir Asokan
parent 535e97da7b
commit 966a886b36

View File

@ -505,6 +505,11 @@ def serialize_event(
):
d["unsigned"]["transaction_id"] = txn_id
# Beeper: include internal stream ordering as HS order unsigned hint
stream_ordering = getattr(e.internal_metadata, "stream_ordering", None)
if stream_ordering:
d["unsigned"]["com.beeper.hs.order"] = stream_ordering
# invite_room_state and knock_room_state are a list of stripped room state events
# that are meant to provide metadata about a room to an invitee/knocker. They are
# intended to only be included in specific circumstances, such as down sync, and