Fixed activity pub discoverability bug

This commit is contained in:
AskIt
2026-01-23 04:44:38 +01:00
parent a6e0ef2278
commit cef7dbba72
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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>
+3 -3
View File
@@ -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`;
}
+2 -2
View File
@@ -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}`,
},
],
};