Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 5f235fe

Browse files
committed
Additional test case.
1 parent 116a4c8 commit 5f235fe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/rest/client/test_relations.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,24 @@ def assert_annotations(bundled_aggregations: JsonDict) -> None:
984984

985985
self._test_bundled_aggregations(RelationTypes.ANNOTATION, assert_annotations, 7)
986986

987+
def test_annotation_to_annotation(self) -> None:
988+
"""Any relation to an annotation should be ignored."""
989+
channel = self._send_relation(RelationTypes.ANNOTATION, "m.reaction", "a")
990+
event_id = channel.json_body["event_id"]
991+
self._send_relation(
992+
RelationTypes.ANNOTATION, "m.reaction", "b", parent_id=event_id
993+
)
994+
995+
# Fetch the initial annotation event to see if it has bundled aggregations.
996+
channel = self.make_request(
997+
"GET",
998+
f"/_matrix/client/v3/rooms/{self.room}/event/{event_id}",
999+
access_token=self.user_token,
1000+
)
1001+
self.assertEquals(200, channel.code, channel.json_body)
1002+
# The first annotationt should not have any bundled aggregations.
1003+
self.assertNotIn("m.relations", channel.json_body["unsigned"])
1004+
9871005
def test_reference(self) -> None:
9881006
"""
9891007
Test that references get correctly bundled.

0 commit comments

Comments
 (0)