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
This commit is contained in:
Neil Alexander 2020-06-19 13:29:27 +01:00 committed by GitHub
parent 72444e4a4f
commit 7f26b0cd13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 336 additions and 65 deletions

View file

@ -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,
})
}

View file

@ -37,6 +37,7 @@ func JoinRoomByIDOrAlias(
joinReq := roomserverAPI.PerformJoinRequest{
RoomIDOrAlias: roomIDOrAlias,
UserID: device.UserID,
Content: map[string]interface{}{},
}
joinRes := roomserverAPI.PerformJoinResponse{}