mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Remove delete() so we also query signingkeys
This commit is contained in:
parent
b505ea2b65
commit
e24c415fa8
|
|
@ -19,7 +19,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -284,14 +283,8 @@ func (a *KeyInternalAPI) QueryKeys(ctx context.Context, req *api.QueryKeysReques
|
||||||
res.DeviceKeys[userID][dk.DeviceID] = dk.KeyJSON
|
res.DeviceKeys[userID][dk.DeviceID] = dk.KeyJSON
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// this makes "uploading signed devices gets propagated over federation" pass (well..)
|
domainToDeviceKeys[domain] = make(map[string][]string)
|
||||||
// removing the domainToDeviceKeys completely makes two different devicelist tests fail.
|
domainToDeviceKeys[domain][userID] = append(domainToDeviceKeys[domain][userID], deviceIDs...)
|
||||||
// figure out a way to make all three tests happy
|
|
||||||
if !strings.Contains(userID, "13:localhost") {
|
|
||||||
logrus.Debugf("adding %s for %s to domainToDeviceKeys", domain, userID)
|
|
||||||
domainToDeviceKeys[domain] = make(map[string][]string)
|
|
||||||
domainToDeviceKeys[domain][userID] = append(domainToDeviceKeys[domain][userID], deviceIDs...)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// work out if our cross-signing request for this user was
|
// work out if our cross-signing request for this user was
|
||||||
// satisfied, if not add them to the list of things to fetch
|
// satisfied, if not add them to the list of things to fetch
|
||||||
|
|
@ -374,7 +367,6 @@ func (a *KeyInternalAPI) remoteKeysFromDatabase(
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logrus.Debugf("fetchRemote: %+v", fetchRemote)
|
|
||||||
return fetchRemote
|
return fetchRemote
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -461,7 +453,6 @@ func (a *KeyInternalAPI) queryRemoteKeysOnServer(
|
||||||
for userID, deviceIDs := range devKeys {
|
for userID, deviceIDs := range devKeys {
|
||||||
if len(deviceIDs) == 0 {
|
if len(deviceIDs) == 0 {
|
||||||
userIDsForAllDevices[userID] = struct{}{}
|
userIDsForAllDevices[userID] = struct{}{}
|
||||||
delete(devKeys, userID)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for cross-signing keys, it's probably easier just to hit /keys/query if we aren't already doing
|
// for cross-signing keys, it's probably easier just to hit /keys/query if we aren't already doing
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue