From 37ed52cfd99f2a2f669884caa2438529a0b0d057 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 26 Apr 2024 16:19:31 +0200 Subject: [PATCH] start add NormalizedFederatedUri to user --- models/user/user.go | 3 +++ services/federation/federation_service.go | 1 + 2 files changed, 4 insertions(+) diff --git a/models/user/user.go b/models/user/user.go index 322854e56b..0a48f25176 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -132,6 +132,9 @@ type User struct { AvatarEmail string `xorm:"NOT NULL"` UseCustomAvatar bool + // For federation + NormalizedFederatedUri string + // Counters NumFollowers int NumFollowing int `xorm:"NOT NULL DEFAULT 0"` diff --git a/services/federation/federation_service.go b/services/federation/federation_service.go index f7ceed044b..3de5e8e1ba 100644 --- a/services/federation/federation_service.go +++ b/services/federation/federation_service.go @@ -199,6 +199,7 @@ func CreateUserFromAP(ctx context.Context, personID forgefed.PersonID, federatio LoginName: loginName, Type: user.UserTypeRemoteUser, IsAdmin: false, + NormalizedFederatedUri: personID.AsURI(), } federatedUser := user.FederatedUser{ ExternalID: personID.ID,