Fixed activity pub discoverability bug
This commit is contained in:
@@ -292,7 +292,7 @@ export default function ProfilePage() {
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
style={{ color: 'var(--accent)' }}
|
style={{ color: 'var(--accent)' }}
|
||||||
>
|
>
|
||||||
{user.movedTo.replace('https://', '').replace('/users/', '/@')}
|
{user.movedTo.replace('https://', '').replace('/api/users/', '/@').replace('/users/', '/@')}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export interface ActivityPubActor {
|
|||||||
* Convert a Synapsis user to an ActivityPub Actor
|
* Convert a Synapsis user to an ActivityPub Actor
|
||||||
*/
|
*/
|
||||||
export function userToActor(user: User, nodeDomain: string): ActivityPubActor {
|
export function userToActor(user: User, nodeDomain: string): ActivityPubActor {
|
||||||
const actorUrl = `https://${nodeDomain}/users/${user.handle}`;
|
const actorUrl = `https://${nodeDomain}/api/users/${user.handle}`;
|
||||||
|
|
||||||
const actor: ActivityPubActor = {
|
const actor: ActivityPubActor = {
|
||||||
'@context': [
|
'@context': [
|
||||||
@@ -114,12 +114,12 @@ export function userToActor(user: User, nodeDomain: string): ActivityPubActor {
|
|||||||
* Get the actor URL for a user
|
* Get the actor URL for a user
|
||||||
*/
|
*/
|
||||||
export function getActorUrl(handle: string, nodeDomain: string): string {
|
export function getActorUrl(handle: string, nodeDomain: string): string {
|
||||||
return `https://${nodeDomain}/users/${handle}`;
|
return `https://${nodeDomain}/api/users/${handle}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the inbox URL for a user
|
* Get the inbox URL for a user
|
||||||
*/
|
*/
|
||||||
export function getInboxUrl(handle: string, nodeDomain: string): string {
|
export function getInboxUrl(handle: string, nodeDomain: string): string {
|
||||||
return `https://${nodeDomain}/users/${handle}/inbox`;
|
return `https://${nodeDomain}/api/users/${handle}/inbox`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function generateWebFingerResponse(
|
|||||||
handle: string,
|
handle: string,
|
||||||
nodeDomain: string
|
nodeDomain: string
|
||||||
): WebFingerResponse {
|
): WebFingerResponse {
|
||||||
const actorUrl = `https://${nodeDomain}/users/${handle}`;
|
const actorUrl = `https://${nodeDomain}/api/users/${handle}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
subject: `acct:${handle}@${nodeDomain}`,
|
subject: `acct:${handle}@${nodeDomain}`,
|
||||||
@@ -39,7 +39,7 @@ export function generateWebFingerResponse(
|
|||||||
{
|
{
|
||||||
rel: 'http://webfinger.net/rel/profile-page',
|
rel: 'http://webfinger.net/rel/profile-page',
|
||||||
type: 'text/html',
|
type: 'text/html',
|
||||||
href: actorUrl,
|
href: `https://${nodeDomain}/${handle}`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user