1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

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"` AvatarEmail string `xorm:"NOT NULL"`
UseCustomAvatar bool UseCustomAvatar bool
// For federation
NormalizedFederatedUri string
// Counters // Counters
NumFollowers int NumFollowers int
NumFollowing int `xorm:"NOT NULL DEFAULT 0"` NumFollowing int `xorm:"NOT NULL DEFAULT 0"`

View file

@ -199,6 +199,7 @@ func CreateUserFromAP(ctx context.Context, personID forgefed.PersonID, federatio
LoginName: loginName, LoginName: loginName,
Type: user.UserTypeRemoteUser, Type: user.UserTypeRemoteUser,
IsAdmin: false, IsAdmin: false,
NormalizedFederatedUri: personID.AsURI(),
} }
federatedUser := user.FederatedUser{ federatedUser := user.FederatedUser{
ExternalID: personID.ID, ExternalID: personID.ID,