Skip to content

Commit

Permalink
ダイレクト投稿もスパム対策の条件式に追加
Browse files Browse the repository at this point in the history
  • Loading branch information
EbiseLutica committed Feb 19, 2024
1 parent db66c21 commit 882924f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/backend/src/core/NoteCreateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ export class NoteCreateService implements OnApplicationShutdown {
// ローカル宛てのメンション、リプライ、引用ノートの発行元が、ローカルユーザーにフォローされていない場合は投稿を拒否する
const willCauseNotification = mentionedUsers.filter(u => u.host === null).length > 0 ||
(data.reply != null && data.reply.userHost === null) ||
(this.isQuote(data) && data.renote.userHost === null);
(this.isQuote(data) && data.renote.userHost === null) ||
(data.visibility === 'specified' && data.visibleUsers != null && data.visibleUsers.some(u => u.host === null));

if (user.host != null && willCauseNotification) {
const userEntity = await this.usersRepository.findOneBy({ id: user.id });
Expand Down

0 comments on commit 882924f

Please sign in to comment.