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

main
Kegsay 2020-10-06 11:05:15 +01:00 committed by GitHub
parent bf90db5b60
commit 1eaf7aa27e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ func GetUserDevices(
response := gomatrixserverlib.RespUserDevices{ response := gomatrixserverlib.RespUserDevices{
UserID: userID, UserID: userID,
StreamID: res.StreamID, StreamID: res.StreamID,
Devices: []gomatrixserverlib.RespUserDevice{},
} }
for _, dev := range res.Devices { for _, dev := range res.Devices {