mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-24 04:10:37 -04:00
Fix lint
This commit is contained in:
parent
066c703729
commit
0b56481caa
2 changed files with 10 additions and 11 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue