mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 04:15:03 -04:00
Move support for MSC3026 behind an experimental flag
This commit is contained in:
parent
405aeb0b2c
commit
066c703729
3 changed files with 18 additions and 3 deletions
|
@ -302,6 +302,8 @@ class GenericWorkerPresence(BasePresenceHandler):
|
|||
self.send_stop_syncing, UPDATE_SYNCING_USERS_MS
|
||||
)
|
||||
|
||||
self._busy_presence_enabled = hs.config.experimental.msc3026_enabled
|
||||
|
||||
hs.get_reactor().addSystemEventTrigger(
|
||||
"before",
|
||||
"shutdown",
|
||||
|
@ -439,8 +441,11 @@ 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:
|
||||
raise SynapseError(400, "Invalid presence state")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue