diff options
author | Erik Johnston <erik@matrix.org> | 2019-02-27 13:53:46 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-02-27 13:53:46 +0000 |
commit | 1e315017d3c0dcde20e781fb3c87bc0e54c53cd1 (patch) | |
tree | aa557adaf68e7fbeee7e3296ad89e79f0c867aa3 /synapse/replication/slave/storage | |
parent | Merge pull request #4749 from matrix-org/erikj/replication_connection_backoff (diff) | |
download | synapse-1e315017d3c0dcde20e781fb3c87bc0e54c53cd1.tar.xz |
When presence is enabled don't send over replication
Diffstat (limited to 'synapse/replication/slave/storage')
-rw-r--r-- | synapse/replication/slave/storage/presence.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/replication/slave/storage/presence.py b/synapse/replication/slave/storage/presence.py index 92447b00d4..9e530defe0 100644 --- a/synapse/replication/slave/storage/presence.py +++ b/synapse/replication/slave/storage/presence.py @@ -54,8 +54,11 @@ class SlavedPresenceStore(BaseSlavedStore): def stream_positions(self): result = super(SlavedPresenceStore, self).stream_positions() - position = self._presence_id_gen.get_current_token() - result["presence"] = position + + if self.hs.config.use_presence: + position = self._presence_id_gen.get_current_token() + result["presence"] = position + return result def process_replication_rows(self, stream_name, token, rows): |