diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-05-07 11:35:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 10:35:23 +0100 |
commit | d9b8d274949df7356e880a67d3aac1b25613ab1f (patch) | |
tree | 8f2af8762b9e13eec493e288c9a7b6c5c55892bb /synapse/handlers | |
parent | Improve per-block CPU and DB usage metrics (#7426) (diff) | |
download | synapse-d9b8d274949df7356e880a67d3aac1b25613ab1f.tar.xz |
Add a configuration setting for the dummy event threshold (#7422)
Add dummy_events_threshold which allows configuring the number of forward extremities a room needs for Synapse to send forward extremities in it.
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/message.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index a324f09340..a622a600b4 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -419,6 +419,8 @@ class EventCreationHandler(object): self._ephemeral_events_enabled = hs.config.enable_ephemeral_messages + self._dummy_events_threshold = hs.config.dummy_events_threshold + @defer.inlineCallbacks def create_event( self, @@ -1085,7 +1087,7 @@ class EventCreationHandler(object): """ self._expire_rooms_to_exclude_from_dummy_event_insertion() room_ids = await self.store.get_rooms_with_many_extremities( - min_count=10, + min_count=self._dummy_events_threshold, limit=5, room_id_filter=self._rooms_to_exclude_from_dummy_event_insertion.keys(), ) |