From 779a37c4ae0f9442c46e1dd847153c4d46f36088 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Apr 2018 07:27:18 +0900 Subject: [PATCH] Visibility support --- src/remote/activitypub/act/create/note.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/remote/activitypub/act/create/note.ts b/src/remote/activitypub/act/create/note.ts index 253478b6f..88e3a875a 100644 --- a/src/remote/activitypub/act/create/note.ts +++ b/src/remote/activitypub/act/create/note.ts @@ -28,6 +28,11 @@ export default async function createNote(resolver: Resolver, actor: IRemoteUser, log(`Creating the Note: ${note.id}`); + //#region Visibility + let visibility = 'public'; + if (note.cc.length == 0) visibility = 'private'; + //#endergion + //#region 添付メディア const media = []; if ('attachment' in note && note.attachment != null) { @@ -74,6 +79,7 @@ export default async function createNote(resolver: Resolver, actor: IRemoteUser, text: window.document.body.textContent, viaMobile: false, geo: undefined, + visibility, uri: note.id }); }