do not make a DM visible if user is mentioned but not a recipient

This commit is contained in:
Jacob Hall 2025-02-21 13:33:36 -05:00
parent 187c98e5ac
commit 21eff6df66
No known key found for this signature in database

View file

@ -213,7 +213,6 @@ export class QueryService {
.orWhere('note.userId = :meId')
// または 自分宛て
.orWhere(':meIdAsList <@ note.visibleUserIds')
.orWhere(':meIdAsList <@ note.mentions')
.orWhere(new Brackets(qb => {
qb
// または フォロワー宛ての投稿であり、
@ -223,7 +222,8 @@ export class QueryService {
// 自分がフォロワーである
.where(`note.userId IN (${ followingQuery.getQuery() })`)
// または 自分の投稿へのリプライ
.orWhere('note.replyUserId = :meId');
.orWhere('note.replyUserId = :meId')
.orWhere(':meIdAsList <@ note.mentions');
}));
}));
}));