From 420ee15433aa2adcbc020875003c3d15c067b03e Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 28 Feb 2020 14:46:03 +0000 Subject: [PATCH 1/3] Kick CI --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 801d0e3ca..49f9ca840 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,4 @@ discussion should happen in There's plenty still to do to make Dendrite usable! We're tracking progress in a [project board](https://github.com/matrix-org/dendrite/projects/2). + From 6460b3725d1d468c8f3353b99797661cfaf539e3 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 28 Feb 2020 14:54:51 +0000 Subject: [PATCH 2/3] Make sure PDUs and EDUs in transaction don't marshal to null (#876) --- federationsender/queue/destinationqueue.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/federationsender/queue/destinationqueue.go b/federationsender/queue/destinationqueue.go index c0afe3be2..f412cb19b 100644 --- a/federationsender/queue/destinationqueue.go +++ b/federationsender/queue/destinationqueue.go @@ -102,7 +102,10 @@ func (oq *destinationQueue) next() *gomatrixserverlib.Transaction { return nil } - var t gomatrixserverlib.Transaction + t := gomatrixserverlib.Transaction{ + PDUs: []gomatrixserverlib.Event{}, + EDUs: []gomatrixserverlib.EDU{}, + } now := gomatrixserverlib.AsTimestamp(time.Now()) t.TransactionID = gomatrixserverlib.TransactionID(fmt.Sprintf("%d-%d", now, oq.sentCounter)) t.Origin = oq.origin From 72565f2eeb8988af90590c90c5c8560186db9d62 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 28 Feb 2020 15:06:16 +0000 Subject: [PATCH 3/3] Fix bug in devices endpoint (#877) --- clientapi/auth/authtypes/device.go | 1 + clientapi/auth/storage/devices/postgres/devices_table.go | 2 +- clientapi/auth/storage/devices/sqlite3/devices_table.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clientapi/auth/authtypes/device.go b/clientapi/auth/authtypes/device.go index 930ab3956..299eff036 100644 --- a/clientapi/auth/authtypes/device.go +++ b/clientapi/auth/authtypes/device.go @@ -26,4 +26,5 @@ type Device struct { // associated with access tokens. SessionID int64 // TODO: display name, last used timestamp, keys, etc + DisplayName string } diff --git a/clientapi/auth/storage/devices/postgres/devices_table.go b/clientapi/auth/storage/devices/postgres/devices_table.go index 349bf1ef7..6cae3743e 100644 --- a/clientapi/auth/storage/devices/postgres/devices_table.go +++ b/clientapi/auth/storage/devices/postgres/devices_table.go @@ -230,7 +230,7 @@ func (s *devicesStatements) selectDevicesByLocalpart( for rows.Next() { var dev authtypes.Device - err = rows.Scan(&dev.ID) + err = rows.Scan(&dev.ID, &dev.DisplayName) if err != nil { return devices, err } diff --git a/clientapi/auth/storage/devices/sqlite3/devices_table.go b/clientapi/auth/storage/devices/sqlite3/devices_table.go index dc88890d3..f69810b7d 100644 --- a/clientapi/auth/storage/devices/sqlite3/devices_table.go +++ b/clientapi/auth/storage/devices/sqlite3/devices_table.go @@ -231,7 +231,7 @@ func (s *devicesStatements) selectDevicesByLocalpart( for rows.Next() { var dev authtypes.Device - err = rows.Scan(&dev.ID) + err = rows.Scan(&dev.ID, &dev.DisplayName) if err != nil { return devices, err }