diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2021-03-19 16:11:08 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2021-03-19 16:11:08 +0100 |
commit | 0b56481caafc56c2e624d4b6506c91fc3913615e (patch) | |
tree | 526530f2539181a6933f5b97ed36bfe6ac30f325 /synapse/app | |
parent | Move support for MSC3026 behind an experimental flag (diff) | |
download | synapse-0b56481caafc56c2e624d4b6506c91fc3913615e.tar.xz |
Fix lint
Diffstat (limited to 'synapse/app')
-rw-r--r-- | synapse/app/generic_worker.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index 207d5ccd02..caef394e1d 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -441,12 +441,12 @@ class GenericWorkerPresence(BasePresenceHandler): PresenceState.ONLINE, PresenceState.UNAVAILABLE, PresenceState.OFFLINE, + PresenceState.BUSY, ) - if self._busy_presence_enabled: - valid_presence += (PresenceState.BUSY,) - - if presence not in valid_presence: + if presence not in valid_presence or ( + presence == PresenceState.BUSY and not self._busy_presence_enabled + ): raise SynapseError(400, "Invalid presence state") user_id = target_user.to_string() |