summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-12-03 19:19:45 +0000
committerGitHub <noreply@github.com>2019-12-03 19:19:45 +0000
commit54dd5dc12b0ac5c48303144c4a73ce3822209488 (patch)
tree50df8025be2caac9a957a920caf73c0b4c01e392 /synapse/config/server.py
parentwrite some docs for the quarantine_media api (#6458) (diff)
downloadsynapse-54dd5dc12b0ac5c48303144c4a73ce3822209488.tar.xz
Add ephemeral messages support (MSC2228) (#6409)
Implement part [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228). The parts that differ are:

* the feature is hidden behind a configuration flag (`enable_ephemeral_messages`)
* self-destruction doesn't happen for state events
* only implement support for the `m.self_destruct_after` field (not the `m.self_destruct` one)
* doesn't send synthetic redactions to clients because for this specific case we consider the clients to be able to destroy an event themselves, instead we just censor it (by pruning its JSON) in the database
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 7a9d711669..837fbe1582 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -490,6 +490,8 @@ class ServerConfig(Config):
             "cleanup_extremities_with_dummy_events", True
         )
 
+        self.enable_ephemeral_messages = config.get("enable_ephemeral_messages", False)
+
     def has_tls_listener(self) -> bool:
         return any(l["tls"] for l in self.listeners)