Don't go round in circles

This commit is contained in:
Erik Johnston 2017-05-31 11:55:13 +01:00
parent eeb2f9e546
commit 42137efde7

View file

@ -66,8 +66,8 @@ class UserDirectoyHandler(object):
yield self._handle_deltas(deltas)
max_stream_id = deltas[-1]["stream_id"]
yield self.store.update_user_directory_stream_pos(max_stream_id)
self.pos = deltas[-1]["stream_id"]
yield self.store.update_user_directory_stream_pos(self.pos)
@defer.inlineCallbacks
def _handle_room(self, room_id):
@ -208,8 +208,6 @@ class UserDirectoyHandler(object):
if event:
hist_vis = event.content.get(key_name, None)
logger.info("prev: %r, new: %r", prev_hist_vis, hist_vis)
if hist_vis == public_value and prev_hist_vis != public_value:
defer.returnValue(True)
elif hist_vis != public_value and prev_hist_vis == public_value: