diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index a9faa3127091..105e68353fc9 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -743,9 +743,7 @@ def on_POST(self, request, room_id, event_id, txn_id=None): # Redact any m.replace relations of this event relation_chunk = yield self.store.get_relations_for_event( - event_id, - relation_type="m.replace", - event_type="m.room.message", + event_id, relation_type="m.replace", event_type="m.room.message" ) relation_ids = relation_chunk.to_dict() diff --git a/tests/rest/client/v2_alpha/test_relations.py b/tests/rest/client/v2_alpha/test_relations.py index c452cd965ab8..6a07ff802704 100644 --- a/tests/rest/client/v2_alpha/test_relations.py +++ b/tests/rest/client/v2_alpha/test_relations.py @@ -535,7 +535,8 @@ def test_aggregation_redaction_redacts_edits(self): # Redact the original request, channel = self.make_request( "PUT", - "/rooms/%s/redact/%s/%s" % (self.room, self.parent_id, "some_transaction_id"), + "/rooms/%s/redact/%s/%s" + % (self.room, self.parent_id, "some_transaction_id"), access_token=self.user_token, ) self.render(request) @@ -545,7 +546,8 @@ def test_aggregation_redaction_redacts_edits(self): # Try to check for remaining m.replace relations request, channel = self.make_request( "GET", - "/_matrix/client/unstable/rooms/%s/relations/%s/m.replace/m.room.message" % (self.room, self.parent_id), + "/_matrix/client/unstable/rooms/%s/relations/%s/m.replace/m.room.message" + % (self.room, self.parent_id), access_token=self.user_token, ) self.render(request)