From c5073b33ef3cf29c2e1ff2ab1054082b917fa258 Mon Sep 17 00:00:00 2001 From: mei23 Date: Sun, 12 Aug 2018 18:56:29 +0900 Subject: [PATCH] Fix ActivityPub followers/specified detection --- src/remote/activitypub/models/note.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 85a8f89bc..dbad63ea4 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -69,12 +69,13 @@ export async function createNote(value: any, resolver?: Resolver, silent = false if (!note.to.includes('https://www.w3.org/ns/activitystreams#Public')) { if (note.cc.includes('https://www.w3.org/ns/activitystreams#Public')) { visibility = 'home'; + } else if (note.to.includes(`${actor.uri}/followers`)) { // TODO: person.followerと照合するべき? + visibility = 'followers'; } else { visibility = 'specified'; visibleUsers = await Promise.all(note.to.map(uri => resolvePerson(uri))); } } - if (note.cc.length == 0) visibility = 'followers'; //#endergion // 添付メディア