diff options
author | Richard van der Hoff <richard@matrix.org> | 2016-07-20 15:25:40 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2016-07-20 16:41:03 +0100 |
commit | ec041b335ecb20008609c8603338ab8c586615be (patch) | |
tree | da75b0e19c90c7213022266f6b421a2bce5e7e96 /synapse/storage/client_ips.py | |
parent | More doc-comments (diff) | |
download | synapse-ec041b335ecb20008609c8603338ab8c586615be.tar.xz |
Record device_id in client_ips
Record the device_id when we add a client ip; it's somewhat redundant as we could get it via the access_token, but it will make querying rather easier.
Diffstat (limited to 'synapse/storage/client_ips.py')
-rw-r--r-- | synapse/storage/client_ips.py | 3 |
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, |