From bc8235b20929fd74602496d5f43a731ce03e018f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sat, 24 Aug 2024 21:54:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/entities/notify.ts | 3 +-- src/onebot/index.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/entities/notify.ts b/src/core/entities/notify.ts index 48a488bf..4743a8fd 100644 --- a/src/core/entities/notify.ts +++ b/src/core/entities/notify.ts @@ -41,8 +41,7 @@ export enum GroupInviteType { BYDISCUSSMEMBER } export interface GroupNotify { - time: number; // 自己添加的字段,时间戳,毫秒, 用于判断收到短时间内收到重复的notify - seq: string; // 唯一标识符,转成数字再除以1000应该就是时间戳? + seq: string; // 通知序列号 type: GroupNotifyMsgType; status: GroupNotifyMsgStatus; group: { groupCode: string; groupName: string }; diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 531e4483..5740bb59 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -327,7 +327,6 @@ export class NapCatOneBot11Adapter { GroupNotifyMsgType.CANCEL_ADMIN_NOTIFY_ADMIN, ].includes(notifies[0]?.type)) { for (const notify of notifies) { - notify.time = Date.now(); const notifyTime = parseInt(notify.seq) / 1000 / 1000; // log(`群通知时间${notifyTime}`, `启动时间${this.bootTime}`); if (notifyTime < this.bootTime) {