start add NormalizedFederatedUri to user

This commit is contained in:
Michael Jerger 2024-04-26 16:19:31 +02:00
parent f687f79ed0
commit 37ed52cfd9
2 changed files with 4 additions and 0 deletions

View file

@ -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"`

View file

@ -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,