Use [] not null when there are no devices
MODIFY
federationapi/routing/devices.go
federationapi/routing/devices.go
@@ -40,6 +40,7 @@ func GetUserDevices(
response := gomatrixserverlib.RespUserDevices{
UserID: userID,
StreamID: res.StreamID,
+ Devices: []gomatrixserverlib.RespUserDevice{},
}
for _, dev := range res.Devices {

Use [] not null when there are no devices (#1480)