mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Return user_id and stream_id in federated devices query (#1040)
This commit is contained in:
parent
f0e0a6668f
commit
773d5bb9f9
1 changed files with 10 additions and 2 deletions
|
@ -23,7 +23,9 @@ import (
|
|||
)
|
||||
|
||||
type userDevicesResponse struct {
|
||||
Devices []authtypes.Device `json:"devices"`
|
||||
UserID string `json:"user_id"`
|
||||
StreamID int `json:"stream_id"`
|
||||
Devices []authtypes.Device `json:"devices"`
|
||||
}
|
||||
|
||||
// GetUserDevices for the given user id
|
||||
|
@ -48,6 +50,12 @@ func GetUserDevices(
|
|||
|
||||
return util.JSONResponse{
|
||||
Code: 200,
|
||||
JSON: userDevicesResponse{devs},
|
||||
// TODO: we should return an incrementing stream ID each time the device
|
||||
// list changes for delta changes to be recognised
|
||||
JSON: userDevicesResponse{
|
||||
UserID: userID,
|
||||
StreamID: 0,
|
||||
Devices: devs,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue