diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-02-16 21:11:27 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2020-02-16 21:11:27 +0900 |
| commit | 40d4dc0474d3bc7bf06f521d79ffef0d095336f3 (patch) | |
| tree | 757c7a562498ca5dc6a9c2b85fae0c94329585e3 /src/services/note | |
| parent | Resolve #5958 (diff) | |
| download | sharkey-40d4dc0474d3bc7bf06f521d79ffef0d095336f3.tar.gz sharkey-40d4dc0474d3bc7bf06f521d79ffef0d095336f3.tar.bz2 sharkey-40d4dc0474d3bc7bf06f521d79ffef0d095336f3.zip | |
Refactor
Diffstat (limited to 'src/services/note')
| -rw-r--r-- | src/services/note/create.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/services/note/create.ts b/src/services/note/create.ts index a904e5e252..3426083e30 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -112,17 +112,17 @@ export default async (user: User, data: Option, silent = false) => new Promise<N if (data.localOnly == null) data.localOnly = false; // サイレンス - if (user.isSilenced && data.visibility == 'public') { + if (user.isSilenced && data.visibility === 'public') { data.visibility = 'home'; } // Renote対象が「ホームまたは全体」以外の公開範囲ならreject - if (data.renote && data.renote.visibility != 'public' && data.renote.visibility != 'home' && data.renote.userId !== user.id) { + if (data.renote && data.renote.visibility !== 'public' && data.renote.visibility !== 'home' && data.renote.userId !== user.id) { return rej('Renote target is not public or home'); } // Renote対象がpublicではないならhomeにする - if (data.renote && data.renote.visibility != 'public' && data.visibility == 'public') { + if (data.renote && data.renote.visibility !== 'public' && data.visibility === 'public') { data.visibility = 'home'; } @@ -132,7 +132,7 @@ export default async (user: User, data: Option, silent = false) => new Promise<N } // 返信対象がpublicではないならhomeにする - if (data.reply && data.reply.visibility != 'public' && data.visibility == 'public') { + if (data.reply && data.reply.visibility !== 'public' && data.visibility === 'public') { data.visibility = 'home'; } |