mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Extend device_devices table (#1471)
* Add last_used_ts and IP to database * Add migrations * Rename column Prepare statements * Add interface method and implement it Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Rename struct fields * Add user_agent to database * Add userAgent to registration calls * Add missing "IF NOT EXISTS" * use txn writer * Add UserAgent to Device Co-authored-by: Kegsay <kegan@matrix.org>
This commit is contained in:
parent
c4c8bfd027
commit
1cd525ef0d
12 changed files with 154 additions and 24 deletions
|
@ -192,6 +192,10 @@ type PerformDeviceCreationRequest struct {
|
|||
DeviceID *string
|
||||
// optional: if nil no display name will be associated with this device.
|
||||
DeviceDisplayName *string
|
||||
// IP address of this device
|
||||
IPAddr string
|
||||
// Useragent for this device
|
||||
UserAgent string
|
||||
}
|
||||
|
||||
// PerformDeviceCreationResponse is the response for PerformDeviceCreation
|
||||
|
@ -222,6 +226,9 @@ type Device struct {
|
|||
// associated with access tokens.
|
||||
SessionID int64
|
||||
DisplayName string
|
||||
LastSeenTS int64
|
||||
LastSeenIP string
|
||||
UserAgent string
|
||||
}
|
||||
|
||||
// Account represents a Matrix account on this home server.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue