summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authormei23 <m@m544.net>2018-08-12 18:56:29 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-08-12 20:37:35 +0900
commitc5073b33ef3cf29c2e1ff2ab1054082b917fa258 (patch)
tree57c6c9f67e5162c161d5ce68d35aef6e29fc7633 /src/remote
parentfix(package): update ts-node to version 7.0.1 (diff)
downloadsharkey-c5073b33ef3cf29c2e1ff2ab1054082b917fa258.tar.gz
sharkey-c5073b33ef3cf29c2e1ff2ab1054082b917fa258.tar.bz2
sharkey-c5073b33ef3cf29c2e1ff2ab1054082b917fa258.zip
Fix ActivityPub followers/specified detection
Diffstat (limited to 'src/remote')
-rw-r--r--src/remote/activitypub/models/note.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts
index 85a8f89bc8..dbad63ea42 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
// 添付メディア