summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2016-07-20 17:38:45 +0100
committerGitHub <noreply@github.com>2016-07-20 17:38:45 +0100
commite9e3eaa67dd7a36e0328cc5c88808d9cc13c1b55 (patch)
tree5ea9e9ac753f7f6d0b2d7820b213cb8e7846c13a /synapse/storage
parentDon't explode if we have no snapshots yet (diff)
parentRecord device_id in client_ips (diff)
downloadsynapse-e9e3eaa67dd7a36e0328cc5c88808d9cc13c1b55.tar.xz
Merge pull request #938 from matrix-org/rav/add_device_id_to_client_ips
Record device_id in client_ips
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/client_ips.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/client_ips.py b/synapse/storage/client_ips.py
index a90990e006..74330a8ddf 100644
--- a/synapse/storage/client_ips.py
+++ b/synapse/storage/client_ips.py
@@ -35,7 +35,7 @@ class ClientIpStore(SQLBaseStore):
         super(ClientIpStore, self).__init__(hs)
 
     @defer.inlineCallbacks
-    def insert_client_ip(self, user, access_token, ip, user_agent):
+    def insert_client_ip(self, user, access_token, ip, user_agent, device_id):
         now = int(self._clock.time_msec())
         key = (user.to_string(), access_token, ip)
 
@@ -59,6 +59,7 @@ class ClientIpStore(SQLBaseStore):
                 "access_token": access_token,
                 "ip": ip,
                 "user_agent": user_agent,
+                "device_id": device_id,
             },
             values={
                 "last_seen": now,