summaryrefslogtreecommitdiff
path: root/src/models/note.ts
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-01-29 17:34:43 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-01-29 17:34:43 +0900
commit2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1 (patch)
treebbefc668c1b611d1ad083bf7fed49381ed70ce14 /src/models/note.ts
parentSort tasks by topological ordering (diff)
downloadmisskey-2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1.tar.gz
misskey-2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1.tar.bz2
misskey-2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1.zip
リプライ/メンションされていれば非フォロワーへのフォロワー限定でも参照可能に (#4033)
* 非メンション/リプライ投稿がmentionsにあるかどうかはvisibilityと関係ないので削除 * リプライ/メンションされていれば非フォロワーでも参照可能に
Diffstat (limited to 'src/models/note.ts')
-rw-r--r--src/models/note.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/models/note.ts b/src/models/note.ts
index 8ca65bb423..a872eb7696 100644
--- a/src/models/note.ts
+++ b/src/models/note.ts
@@ -140,6 +140,12 @@ export const hideNote = async (packedNote: any, meId: mongo.ObjectID) => {
hide = true;
} else if (meId.equals(packedNote.userId)) {
hide = false;
+ } else if (packedNote.reply && meId.equals(packedNote.reply.userId)) {
+ // 自分の投稿に対するリプライ
+ hide = false;
+ } else if (packedNote.mentions && packedNote.mentions.some((id: any) => meId.equals(id))) {
+ // 自分へのメンション
+ hide = false;
} else {
// フォロワーかどうか
const following = await Following.findOne({