aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--federationapi/routing/devices.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/federationapi/routing/devices.go b/federationapi/routing/devices.go
index 1a092645..2f9da1f2 100644
--- a/federationapi/routing/devices.go
+++ b/federationapi/routing/devices.go
@@ -85,6 +85,9 @@ func GetUserDevices(
if targetKey, ok := targetUser[gomatrixserverlib.KeyID(dev.DeviceID)]; ok {
for sourceUserID, forSourceUser := range targetKey {
for sourceKeyID, sourceKey := range forSourceUser {
+ if device.Keys.Signatures == nil {
+ device.Keys.Signatures = map[string]map[gomatrixserverlib.KeyID]gomatrixserverlib.Base64Bytes{}
+ }
if _, ok := device.Keys.Signatures[sourceUserID]; !ok {
device.Keys.Signatures[sourceUserID] = map[gomatrixserverlib.KeyID]gomatrixserverlib.Base64Bytes{}
}