Don't hit DB for noop replications queries

This commit is contained in:
Erik Johnston 2016-06-08 11:33:30 +01:00
parent e0fda29f94
commit 1a815fb04f
5 changed files with 15 additions and 0 deletions

View file

@ -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: