mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 03:10:35 +00:00
Add actor IRI and remote interaction URL to WebFinger response
This commit is contained in:
parent
5d61e5955b
commit
aa962c6ee9
1 changed files with 10 additions and 0 deletions
|
@ -92,6 +92,7 @@ func WebfingerQuery(ctx *context.Context) {
|
||||||
|
|
||||||
aliases := []string{
|
aliases := []string{
|
||||||
u.HTMLURL(),
|
u.HTMLURL(),
|
||||||
|
appURL.String() + "api/v1/activitypub/user/" + strings.ToLower(u.Name),
|
||||||
}
|
}
|
||||||
if !u.KeepEmailPrivate {
|
if !u.KeepEmailPrivate {
|
||||||
aliases = append(aliases, fmt.Sprintf("mailto:%s", u.Email))
|
aliases = append(aliases, fmt.Sprintf("mailto:%s", u.Email))
|
||||||
|
@ -107,6 +108,15 @@ func WebfingerQuery(ctx *context.Context) {
|
||||||
Rel: "http://webfinger.net/rel/avatar",
|
Rel: "http://webfinger.net/rel/avatar",
|
||||||
Href: u.AvatarLink(),
|
Href: u.AvatarLink(),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Rel: "self",
|
||||||
|
Type: "application/activity+json",
|
||||||
|
Href: appURL.String() + "api/v1/activitypub/user/" + strings.ToLower(u.Name),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Rel: "http://ostatus.org/schema/1.0/subscribe",
|
||||||
|
Href: appURL.String() + "api/v1/authorize_interaction?uri={uri}",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, &webfingerJRD{
|
ctx.JSON(http.StatusOK, &webfingerJRD{
|
||||||
|
|
Loading…
Reference in a new issue