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