diff options
author | Erik Johnston <erik@matrix.org> | 2019-05-20 14:52:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-20 14:52:29 +0100 |
commit | edef6d29ae15bf4e0ad96f9797ba56ee9766d253 (patch) | |
tree | 73756630082cc6c03accc2127edddda272a41348 /synapse/events/utils.py | |
parent | Merge pull request #5209 from matrix-org/erikj/reactions_base (diff) | |
parent | Newsfile (diff) | |
download | synapse-edef6d29ae15bf4e0ad96f9797ba56ee9766d253.tar.xz |
Merge pull request #5211 from matrix-org/erikj/fixup_reaction_constants
Rename relation types to match MSC
Diffstat (limited to 'synapse/events/utils.py')
-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, } |