Skip to content

Commit c5c350d

Browse files
committed
fix actor uri
1 parent 124add3 commit c5c350d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/daemon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const handleProfileUpdate = async (entity: ApEntity) => {
231231
{ identifier: entity.id },
232232
"followers",
233233
new Update({
234-
id: new URL(`${config.activitypub.baseUrl}/ap/users/${entity.id}#update-${Date.now()}`),
234+
id: new URL(`${config.activitypub.baseUrl}/ap/acct/${entity.id}#update-${Date.now()}`),
235235
actor: ctx.getActorUri(entity.id),
236236
object: person,
237237
tos: [PUBLIC_COLLECTION],

src/federation.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ federation.setNodeInfoDispatcher("/ap/nodeinfo/2.1", async (ctx) => {
197197
})
198198

199199
federation
200-
.setInboxListeners("/ap/users/{identifier}/inbox", "/ap/inbox")
200+
.setInboxListeners("/ap/acct/{identifier}/inbox", "/ap/inbox")
201201
.on(Follow, async (ctx, follow) => {
202202

203203
const object = ctx.parseUri(follow.objectId);
@@ -557,7 +557,7 @@ export const buildPerson = async (ctx: Context<unknown>, identifier: string): Pr
557557

558558
// id・inbox・publicKey等の必須プロパティはbuildPerson内で設定している(静的解析の誤検知)
559559
// eslint-disable-next-line @fedify/lint/actor-id-required
560-
federation.setActorDispatcher("/ap/users/{identifier}", async (ctx, identifier) => {
560+
federation.setActorDispatcher("/ap/acct/{identifier}", async (ctx, identifier) => {
561561
return await buildPerson(ctx, identifier);
562562
}).setKeyPairsDispatcher(async (ctx, identifier) => {
563563

@@ -593,7 +593,7 @@ federation.setActorDispatcher("/ap/users/{identifier}", async (ctx, identifier)
593593

594594
// Mastodon等のUI表示用の最小実装。投稿の列挙は今のところ提供しない。
595595
federation.setOutboxDispatcher(
596-
"/ap/users/{identifier}/outbox",
596+
"/ap/acct/{identifier}/outbox",
597597
async (ctx, identifier) => {
598598
const users = await db.select().from(apEntity).where(eq(apEntity.id, identifier)).limit(1);
599599
if (users.length === 0) return null;
@@ -602,7 +602,7 @@ federation.setOutboxDispatcher(
602602
);
603603

604604
federation.setFollowersDispatcher(
605-
"/ap/users/{identifier}/followers",
605+
"/ap/acct/{identifier}/followers",
606606
async (ctx, identifier) => {
607607
const entity = await db.select().from(apEntity)
608608
.where(eq(apEntity.id, identifier)).limit(1).then(res => res[0]);
@@ -629,7 +629,7 @@ federation.setFollowersDispatcher(
629629

630630
federation.setObjectDispatcher(
631631
Note,
632-
"/ap/users/{identifier}/posts/{+id}",
632+
"/ap/acct/{identifier}/posts/{+id}",
633633
async (ctx, values) => {
634634

635635
const entity = await db.select().from(apEntity).where(eq(apEntity.id, values.identifier)).limit(1);

0 commit comments

Comments
 (0)