diff options
author | andrew do <dohandrew@protonmail.com> | 2022-05-04 04:26:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 11:26:11 +0000 |
commit | 01e625513afbd9645ff642810d559f96fab13278 (patch) | |
tree | ac37613e8f0c2564c4cfef3ee12ad591097daefa /synapse/handlers | |
parent | Fixes to the formatting of README.rst (#12627) (diff) | |
download | synapse-01e625513afbd9645ff642810d559f96fab13278.tar.xz |
remove constantly lib use and switch to enums. (#12624)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/events.py | 2 | ||||
-rw-r--r-- | synapse/handlers/federation.py | 4 | ||||
-rw-r--r-- | synapse/handlers/federation_event.py | 2 | ||||
-rw-r--r-- | synapse/handlers/message.py | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py index 5b94b00bc3..82a5aac3dd 100644 --- a/synapse/handlers/events.py +++ b/synapse/handlers/events.py @@ -164,7 +164,7 @@ class EventHandler: event. """ redact_behaviour = ( - EventRedactBehaviour.AS_IS if show_redacted else EventRedactBehaviour.REDACT + EventRedactBehaviour.as_is if show_redacted else EventRedactBehaviour.redact ) event = await self.store.get_event( event_id, check_room_id=room_id, redact_behaviour=redact_behaviour diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index d2ba70a814..38dc5b1f6e 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -316,7 +316,7 @@ class FederationHandler: events_to_check = await self.store.get_events_as_list( event_ids_to_check, - redact_behaviour=EventRedactBehaviour.AS_IS, + redact_behaviour=EventRedactBehaviour.as_is, get_prev_content=False, ) @@ -1494,7 +1494,7 @@ class FederationHandler: events = await self.store.get_events_as_list( batch, - redact_behaviour=EventRedactBehaviour.AS_IS, + redact_behaviour=EventRedactBehaviour.as_is, allow_rejected=True, ) for event in events: diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py index 693b544286..6cf927e4ff 100644 --- a/synapse/handlers/federation_event.py +++ b/synapse/handlers/federation_event.py @@ -860,7 +860,7 @@ class FederationEventHandler: evs = await self._store.get_events( list(state_map.values()), get_prev_content=False, - redact_behaviour=EventRedactBehaviour.AS_IS, + redact_behaviour=EventRedactBehaviour.as_is, ) event_map.update(evs) diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 1b092e900e..95a89ac01f 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -1407,7 +1407,7 @@ class EventCreationHandler: original_event = await self.store.get_event( event.redacts, - redact_behaviour=EventRedactBehaviour.AS_IS, + redact_behaviour=EventRedactBehaviour.as_is, get_prev_content=False, allow_rejected=False, allow_none=True, @@ -1504,7 +1504,7 @@ class EventCreationHandler: original_event = await self.store.get_event( event.redacts, - redact_behaviour=EventRedactBehaviour.AS_IS, + redact_behaviour=EventRedactBehaviour.as_is, get_prev_content=False, allow_rejected=False, allow_none=True, |