mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Linting
This commit is contained in:
parent
21ec1709e0
commit
0518309586
|
|
@ -292,7 +292,10 @@ func (a *KeyInternalAPI) uploadDeviceKeys(ctx context.Context, req *api.PerformU
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.emitDeviceKeyChanges(existingKeys, keysToStore)
|
err := a.emitDeviceKeyChanges(existingKeys, keysToStore)
|
||||||
|
if err != nil {
|
||||||
|
util.GetLogger(ctx).Errorf("Failed to emitDeviceKeyChanges: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *KeyInternalAPI) uploadOneTimeKeys(ctx context.Context, req *api.PerformUploadKeysRequest, res *api.PerformUploadKeysResponse) {
|
func (a *KeyInternalAPI) uploadOneTimeKeys(ctx context.Context, req *api.PerformUploadKeysRequest, res *api.PerformUploadKeysResponse) {
|
||||||
|
|
@ -334,7 +337,7 @@ func (a *KeyInternalAPI) uploadOneTimeKeys(ctx context.Context, req *api.Perform
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *KeyInternalAPI) emitDeviceKeyChanges(existing, new []api.DeviceKeys) {
|
func (a *KeyInternalAPI) emitDeviceKeyChanges(existing, new []api.DeviceKeys) error {
|
||||||
// find keys in new that are not in existing
|
// find keys in new that are not in existing
|
||||||
var keysAdded []api.DeviceKeys
|
var keysAdded []api.DeviceKeys
|
||||||
for _, newKey := range new {
|
for _, newKey := range new {
|
||||||
|
|
@ -349,5 +352,5 @@ func (a *KeyInternalAPI) emitDeviceKeyChanges(existing, new []api.DeviceKeys) {
|
||||||
keysAdded = append(keysAdded, newKey)
|
keysAdded = append(keysAdded, newKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.Producer.ProduceKeyChanges(keysAdded)
|
return a.Producer.ProduceKeyChanges(keysAdded)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ type OutputKeyChangeEventConsumer struct {
|
||||||
db storage.Database
|
db storage.Database
|
||||||
serverName gomatrixserverlib.ServerName // our server name
|
serverName gomatrixserverlib.ServerName // our server name
|
||||||
currentStateAPI currentstateAPI.CurrentStateInternalAPI
|
currentStateAPI currentstateAPI.CurrentStateInternalAPI
|
||||||
keyAPI api.KeyInternalAPI
|
// keyAPI api.KeyInternalAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOutputKeyChangeEventConsumer creates a new OutputKeyChangeEventConsumer.
|
// NewOutputKeyChangeEventConsumer creates a new OutputKeyChangeEventConsumer.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue