summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-31 11:36:32 +0100
committerErik Johnston <erik@matrix.org>2017-03-31 11:36:32 +0100
commit9d0170ac6cb54f5fe86cf1a5121d688772a544f0 (patch)
treeeca835556d3ca8c99e33dbd0fd4d133d74d201fc /synapse
parentAdd a brief list of commands to docs (diff)
downloadsynapse-9d0170ac6cb54f5fe86cf1a5121d688772a544f0.tar.xz
Fix up presence
Diffstat (limited to '')
-rw-r--r--synapse/handlers/presence.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index ac6d1107bf..9e14760659 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -546,12 +546,14 @@ class PresenceHandler(object):
                 updates.append(prev_state.copy_and_replace(
                     last_user_sync_ts=time_now_ms,
                 ))
+
+            if not is_syncing:
                 process_presence.discard(user_id)
 
             if updates:
                 yield self._update_states(updates)
 
-            self.external_process_last_updated_ms[process_id] = self.clock.time_msec()
+            self.external_process_last_updated_ms[process_id] = time_now_ms
 
     @defer.inlineCallbacks
     def update_external_syncs_clear(self, process_id):