diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-06-19 13:29:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 13:29:27 +0100 |
commit | 7f26b0cd13534ba235c2bf0a7220d3462ca8e9da (patch) | |
tree | 5e7728365d7cbb7d5366b704717397639ea92ad8 /clientapi | |
parent | 72444e4a4f31b70dfb7ddd875ef874f637699dce (diff) |
Bind build support, further Yggdrasil demo updates (#1152)
* Add gobind builds for Yggdrasil demo
* Massage client API a bit
* Fix build
* Fix gobind build
* Fix gobind client API setup
* Tweaks
* Tweaks
* Update sytest-whitelist, add comment
* Default to sending push rules on initial sync
Diffstat (limited to 'clientapi')
-rw-r--r-- | clientapi/routing/device.go | 9 | ||||
-rw-r--r-- | clientapi/routing/joinroom.go | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/clientapi/routing/device.go b/clientapi/routing/device.go index 403937c9..51a15a88 100644 --- a/clientapi/routing/device.go +++ b/clientapi/routing/device.go @@ -26,9 +26,12 @@ import ( "github.com/matrix-org/util" ) +// https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-devices type deviceJSON struct { - DeviceID string `json:"device_id"` - UserID string `json:"user_id"` + DeviceID string `json:"device_id"` + DisplayName string `json:"display_name"` + LastSeenIP string `json:"last_seen_ip"` + LastSeenTS uint64 `json:"last_seen_ts"` } type devicesJSON struct { @@ -70,7 +73,6 @@ func GetDeviceByID( Code: http.StatusOK, JSON: deviceJSON{ DeviceID: dev.ID, - UserID: dev.UserID, }, } } @@ -98,7 +100,6 @@ func GetDevicesByLocalpart( for _, dev := range deviceList { res.Devices = append(res.Devices, deviceJSON{ DeviceID: dev.ID, - UserID: dev.UserID, }) } diff --git a/clientapi/routing/joinroom.go b/clientapi/routing/joinroom.go index 3871e4d4..db890d03 100644 --- a/clientapi/routing/joinroom.go +++ b/clientapi/routing/joinroom.go @@ -37,6 +37,7 @@ func JoinRoomByIDOrAlias( joinReq := roomserverAPI.PerformJoinRequest{ RoomIDOrAlias: roomIDOrAlias, UserID: device.UserID, + Content: map[string]interface{}{}, } joinRes := roomserverAPI.PerformJoinResponse{} |