mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-04 03:37:27 +00:00
add profile link to aliases
This commit is contained in:
parent
e0bb796aff
commit
f1168f0165
1 changed files with 5 additions and 2 deletions
|
@ -140,6 +140,7 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const subject = `acct:${user.username}@${this.config.host}`;
|
const subject = `acct:${user.username}@${this.config.host}`;
|
||||||
|
const profileLink = `${this.config.url}/@${user.username}`;
|
||||||
const self = {
|
const self = {
|
||||||
rel: 'self',
|
rel: 'self',
|
||||||
type: 'application/activity+json',
|
type: 'application/activity+json',
|
||||||
|
@ -148,7 +149,7 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
|
||||||
const profilePage = {
|
const profilePage = {
|
||||||
rel: 'http://webfinger.net/rel/profile-page',
|
rel: 'http://webfinger.net/rel/profile-page',
|
||||||
type: 'text/html',
|
type: 'text/html',
|
||||||
href: `${this.config.url}/@${user.username}`,
|
href: profileLink,
|
||||||
};
|
};
|
||||||
const subscribe = {
|
const subscribe = {
|
||||||
rel: 'http://ostatus.org/schema/1.0/subscribe',
|
rel: 'http://ostatus.org/schema/1.0/subscribe',
|
||||||
|
@ -164,12 +165,14 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
|
||||||
{ element: 'Subject', value: subject },
|
{ element: 'Subject', value: subject },
|
||||||
{ element: 'Link', attributes: self },
|
{ element: 'Link', attributes: self },
|
||||||
{ element: 'Link', attributes: profilePage },
|
{ element: 'Link', attributes: profilePage },
|
||||||
{ element: 'Link', attributes: subscribe });
|
{ element: 'Link', attributes: subscribe },
|
||||||
|
{ element: 'Alias', attributes: profileLink });
|
||||||
} else {
|
} else {
|
||||||
reply.type(jrd);
|
reply.type(jrd);
|
||||||
return {
|
return {
|
||||||
subject,
|
subject,
|
||||||
links: [self, profilePage, subscribe],
|
links: [self, profilePage, subscribe],
|
||||||
|
aliases: [profileLink],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue