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,