From e24c415fa8f1d04c324e3cb84a00efb5c07d629e Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Wed, 9 Feb 2022 11:11:59 +0100 Subject: [PATCH] Remove delete() so we also query signingkeys --- keyserver/internal/internal.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/keyserver/internal/internal.go b/keyserver/internal/internal.go index 52b411d1f..2536c1f76 100644 --- a/keyserver/internal/internal.go +++ b/keyserver/internal/internal.go @@ -19,7 +19,6 @@ import ( "context" "encoding/json" "fmt" - "strings" "sync" "time" @@ -284,14 +283,8 @@ func (a *KeyInternalAPI) QueryKeys(ctx context.Context, req *api.QueryKeysReques res.DeviceKeys[userID][dk.DeviceID] = dk.KeyJSON } } else { - // this makes "uploading signed devices gets propagated over federation" pass (well..) - // removing the domainToDeviceKeys completely makes two different devicelist tests fail. - // 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...) - } + 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 // 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 } @@ -461,7 +453,6 @@ func (a *KeyInternalAPI) queryRemoteKeysOnServer( for userID, deviceIDs := range devKeys { if len(deviceIDs) == 0 { 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