mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 21:54:10 -04:00
Implement MSC3890: Remotely silence local notifications (#14775)
This commit is contained in:
parent
52ae80dd1a
commit
54cd90ea60
5 changed files with 29 additions and 2 deletions
|
@ -17,6 +17,7 @@ from typing import Any, Optional
|
|||
import attr
|
||||
|
||||
from synapse.api.room_versions import KNOWN_ROOM_VERSIONS, RoomVersions
|
||||
from synapse.config import ConfigError
|
||||
from synapse.config._base import Config
|
||||
from synapse.types import JsonDict
|
||||
|
||||
|
@ -93,6 +94,9 @@ class ExperimentalConfig(Config):
|
|||
# MSC2815 (allow room moderators to view redacted event content)
|
||||
self.msc2815_enabled: bool = experimental.get("msc2815_enabled", False)
|
||||
|
||||
# MSC3391: Removing account data.
|
||||
self.msc3391_enabled = experimental.get("msc3391_enabled", False)
|
||||
|
||||
# MSC3773: Thread notifications
|
||||
self.msc3773_enabled: bool = experimental.get("msc3773_enabled", False)
|
||||
|
||||
|
@ -127,6 +131,17 @@ class ExperimentalConfig(Config):
|
|||
"msc3886_endpoint", None
|
||||
)
|
||||
|
||||
# MSC3890: Remotely silence local notifications
|
||||
# Note: This option requires "experimental_features.msc3391_enabled" to be
|
||||
# set to "true", in order to communicate account data deletions to clients.
|
||||
self.msc3890_enabled: bool = experimental.get("msc3890_enabled", False)
|
||||
if self.msc3890_enabled and not self.msc3391_enabled:
|
||||
raise ConfigError(
|
||||
"Option 'experimental_features.msc3391' must be set to 'true' to "
|
||||
"enable 'experimental_features.msc3890'. MSC3391 functionality is "
|
||||
"required to communicate account data deletions to clients."
|
||||
)
|
||||
|
||||
# MSC3912: Relation-based redactions.
|
||||
self.msc3912_enabled: bool = experimental.get("msc3912_enabled", False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue