mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-17 03:01:35 +02:00
models/user: return server actor for APServer user ID
This commit is contained in:
parent
c5e5fcc192
commit
a03133e728
1 changed files with 4 additions and 0 deletions
|
@ -313,6 +313,10 @@ func (u *User) HTMLURL() string {
|
|||
|
||||
// APActorID returns the IRI to the api endpoint of the user
|
||||
func (u *User) APActorID() string {
|
||||
if u.ID == APActorUserID {
|
||||
return fmt.Sprintf("%vapi/v1/activitypub/actor", setting.AppURL)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%vapi/v1/activitypub/user-id/%v", setting.AppURL, url.PathEscape(fmt.Sprintf("%v", u.ID)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue