mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 11:46:22 -04:00
SYN-48: Track User-Agents as well as IPs for client devices.
This commit is contained in:
parent
0fdf308874
commit
f7d80930f2
4 changed files with 20 additions and 5 deletions
|
@ -294,13 +294,15 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
|
||||
defer.returnValue(self.min_token)
|
||||
|
||||
def insert_client_ip(self, user, access_token, ip):
|
||||
def insert_client_ip(self, user, access_token, ip, user_agent):
|
||||
return self._simple_insert(
|
||||
"user_ips",
|
||||
{
|
||||
"user": user.to_string(),
|
||||
"access_token": access_token,
|
||||
"ip": ip
|
||||
"ip": ip,
|
||||
"user_agent": user_agent,
|
||||
"last_used": int(self._clock.time()),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue