models/user: add function to return APActor signing key ID

This commit is contained in:
famfo 2025-02-23 02:59:13 +01:00
parent 9b63609828
commit ea18810697
No known key found for this signature in database

View file

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