diff options
author | Erik Johnston <erik@matrix.org> | 2019-05-20 14:31:19 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-05-20 14:31:19 +0100 |
commit | 1dff859d6aed58561a2b5913e5c9b897bbd3599c (patch) | |
tree | bc5a1b853370da63a0d9e090e67a3433aec0c321 /synapse/events | |
parent | Merge pull request #5209 from matrix-org/erikj/reactions_base (diff) | |
download | synapse-1dff859d6aed58561a2b5913e5c9b897bbd3599c.tar.xz |
Rename relation types to match MSC
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py index bf3c8f8dc1..27a2a9ef98 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -355,7 +355,7 @@ class EventClientSerializer(object): event_id, ) references = yield self.store.get_relations_for_event( - event_id, RelationTypes.REFERENCES, direction="f", + event_id, RelationTypes.REFERENCE, direction="f", ) if annotations.chunk: @@ -364,7 +364,7 @@ class EventClientSerializer(object): if references.chunk: r = serialized_event["unsigned"].setdefault("m.relations", {}) - r[RelationTypes.REFERENCES] = references.to_dict() + r[RelationTypes.REFERENCE] = references.to_dict() edit = None if event.type == EventTypes.Message: @@ -382,7 +382,7 @@ class EventClientSerializer(object): serialized_event["content"].pop("m.relates_to", None) r = serialized_event["unsigned"].setdefault("m.relations", {}) - r[RelationTypes.REPLACES] = { + r[RelationTypes.REPLACE] = { "event_id": edit.event_id, } |