diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-08 11:33:30 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-08 11:33:30 +0100 |
commit | 1a815fb04f1d17286be27379dd7463936606bd3a (patch) | |
tree | 435e4b9cb2b00cf5936b91ed273c285e8baff302 /synapse/handlers/typing.py | |
parent | Merge pull request #850 from matrix-org/erikj/gc_threshold (diff) | |
download | synapse-1a815fb04f1d17286be27379dd7463936606bd3a.tar.xz |
Don't hit DB for noop replications queries
Diffstat (limited to 'synapse/handlers/typing.py')
-rw-r--r-- | synapse/handlers/typing.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 861b8f7989..5589296c09 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -221,6 +221,9 @@ class TypingHandler(object): def get_all_typing_updates(self, last_id, current_id): # TODO: Work out a way to do this without scanning the entire state. + if last_id == current_id: + return [] + rows = [] for room_id, serial in self._room_serials.items(): if last_id < serial and serial <= current_id: |