mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-17 03:01:35 +02:00
models/user: add function to return APActor signing key ID
This commit is contained in:
parent
9b63609828
commit
ea18810697
1 changed files with 5 additions and 0 deletions
|
@ -320,6 +320,11 @@ func (u *User) APActorID() string {
|
|||
return fmt.Sprintf("%vapi/v1/activitypub/user-id/%v", setting.AppURL, url.PathEscape(fmt.Sprintf("%v", u.ID)))
|
||||
}
|
||||
|
||||
// APActorKeyID returns the ID of the user's public key
|
||||
func (u *User) APActorKeyID() string {
|
||||
return u.APActorID() + "#main-key"
|
||||
}
|
||||
|
||||
// OrganisationLink returns the organization sub page link.
|
||||
func (u *User) OrganisationLink() string {
|
||||
return setting.AppSubURL + "/org/" + url.PathEscape(u.Name)
|
||||
|
|
Loading…
Add table
Reference in a new issue