summary refs log tree commit diff
path: root/synapse/push/pusherpool.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-11 14:48:20 +0000
committerErik Johnston <erik@matrix.org>2016-03-11 14:48:20 +0000
commitb5afe6bc3853d56c4d7044a293ea1bd2d40d94a7 (patch)
treed86aee969a8881a2319db7168d8978ae4c351aba /synapse/push/pusherpool.py
parentMerge pull request #640 from matrix-org/erikj/keyclient_host (diff)
parentmore pep8 (diff)
downloadsynapse-b5afe6bc3853d56c4d7044a293ea1bd2d40d94a7.tar.xz
Merge pull request #641 from matrix-org/dbkr/fix_change_password
Fix logout on password change
Diffstat (limited to 'synapse/push/pusherpool.py')
-rw-r--r--synapse/push/pusherpool.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py
index 772a095f8b..0b463c6fdb 100644
--- a/synapse/push/pusherpool.py
+++ b/synapse/push/pusherpool.py
@@ -92,14 +92,14 @@ class PusherPool:
                 yield self.remove_pusher(p['app_id'], p['pushkey'], p['user_name'])
 
     @defer.inlineCallbacks
-    def remove_pushers_by_user(self, user_id):
+    def remove_pushers_by_user(self, user_id, except_token_ids=[]):
         all = yield self.store.get_all_pushers()
         logger.info(
-            "Removing all pushers for user %s",
-            user_id,
+            "Removing all pushers for user %s except access tokens ids %r",
+            user_id, except_token_ids
         )
         for p in all:
-            if p['user_name'] == user_id:
+            if p['user_name'] == user_id and p['access_token'] not in except_token_ids:
                 logger.info(
                     "Removing pusher for app id %s, pushkey %s, user %s",
                     p['app_id'], p['pushkey'], p['user_name']