From 869391261f0a6906cd00e9e8e0671a6dbc94bfe2 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Fri, 2 Feb 2024 20:33:04 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=83=89=E3=83=AC=E3=83=BC=E3=83=88=E3=83=AA=E3=83=9F?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=82=92=E8=A7=A3=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/ReversiService.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/backend/src/core/ReversiService.ts b/packages/backend/src/core/ReversiService.ts index 9531bbb001..41aa1ba328 100644 --- a/packages/backend/src/core/ReversiService.ts +++ b/packages/backend/src/core/ReversiService.ts @@ -613,13 +613,6 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit { if (!game.isStarted || game.isEnded) return; if ((game.user1Id !== user.id) && (game.user2Id !== user.id)) return; - const lastReactedAt = await this.redisClient.get(`reversi:game:lastReactedAt:${game.id}:${user.id}`); - - if (lastReactedAt && (Date.now() - parseInt(lastReactedAt, 10) < 3000)) { - // レートリミット(3秒) - return; - } - let _reaction = '❤️'; const custom = reaction.match(isCustomEmojiRegexp); @@ -639,8 +632,6 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit { userId: user.id, reaction: _reaction, }); - - this.redisClient.setex(`reversi:game:lastReactedAt:${game.id}:${user.id}`, 60 * 60, Date.now().toString()); } @bindThis