aboutsummaryrefslogtreecommitdiff
path: root/userapi
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-08-10 12:38:33 +0100
committerGitHub <noreply@github.com>2020-08-10 12:38:33 +0100
commitfdabba1851c489d801ea4029bce9dec7d415b2df (patch)
tree5dcc8e999aafc36a3f6b3d37d93ea12adc180dcb /userapi
parent58998e98746c7d8610fa1e1c3c11de0445393454 (diff)
bugfix: when a user's key changes, don't notify everyone on the server (#1253)
* bugfix: when a user's key changes, don't notify everyone on the server Instead just notify the users you share a room with. * Update whitelist
Diffstat (limited to 'userapi')
-rw-r--r--userapi/internal/api.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/userapi/internal/api.go b/userapi/internal/api.go
index b9d18822..f58c7113 100644
--- a/userapi/internal/api.go
+++ b/userapi/internal/api.go
@@ -31,6 +31,7 @@ import (
"github.com/matrix-org/dendrite/userapi/storage/devices"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
+ "github.com/sirupsen/logrus"
)
type UserInternalAPI struct {
@@ -98,6 +99,11 @@ func (a *UserInternalAPI) PerformAccountCreation(ctx context.Context, req *api.P
return nil
}
func (a *UserInternalAPI) PerformDeviceCreation(ctx context.Context, req *api.PerformDeviceCreationRequest, res *api.PerformDeviceCreationResponse) error {
+ util.GetLogger(ctx).WithFields(logrus.Fields{
+ "localpart": req.Localpart,
+ "device_id": req.DeviceID,
+ "display_name": req.DeviceDisplayName,
+ }).Info("PerformDeviceCreation")
dev, err := a.DeviceDB.CreateDevice(ctx, req.Localpart, req.DeviceID, req.AccessToken, req.DeviceDisplayName)
if err != nil {
return err