From 24792e09b551a1f20e50400daf7ebc20067bda41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B4=87=E5=B3=B0=20=E6=9C=94=E8=8F=AF?= Date: Sun, 17 Nov 2024 18:01:47 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20=E3=83=AA=E3=82=A2=E3=82=AF=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=81=AE=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E3=81=ABblockingReactionUserService.checkBlo?= =?UTF-8?q?cked=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/ReactionService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 6f9fe53937..72c027233a 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -30,6 +30,7 @@ import { trackPromise } from '@/misc/promise-tracker.js'; import { isQuote, isRenote } from '@/misc/is-renote.js'; import { ReactionsBufferingService } from '@/core/ReactionsBufferingService.js'; import { PER_NOTE_REACTION_USER_PAIR_CACHE_MAX } from '@/const.js'; +import { BlockingReactionUserService } from '@/core/BlockingReactionUserService.js'; const FALLBACK = '\u2764'; @@ -91,6 +92,7 @@ export class ReactionService { private userEntityService: UserEntityService, private noteEntityService: NoteEntityService, private userBlockingService: UserBlockingService, + private blockingReactionUserService: BlockingReactionUserService, private reactionsBufferingService: ReactionsBufferingService, private idService: IdService, private featuredService: FeaturedService, @@ -107,7 +109,8 @@ export class ReactionService { // Check blocking if (note.userId !== user.id) { const blocked = await this.userBlockingService.checkBlocked(note.userId, user.id); - if (blocked) { + const reactionBlocked = await this.blockingReactionUserService.checkBlocked(note.userId, user.id); + if (blocked || reactionBlocked) { throw new IdentifiableError('e70412a4-7197-4726-8e74-f3e0deb92aa7'); } }