This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments