mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 23:42:28 +00:00
start add NormalizedFederatedUri to user
This commit is contained in:
parent
f687f79ed0
commit
37ed52cfd9
|
@ -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"`
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue