From 6629d273b3e7ef609eaf8ac7ae87dfd6a281c8f8 Mon Sep 17 00:00:00 2001 From: Virginia Senioria <24869594+91khr@users.noreply.github.com> Date: Wed, 20 Dec 2023 03:07:26 +0800 Subject: [PATCH] fix plugin/auto_reply: Use original msg.date instead of msgdate msgdate may be modified, and thus would result in mistake --- src/plugins/auto_reply/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/auto_reply/index.ts b/src/plugins/auto_reply/index.ts index 0394b22..69d0713 100644 --- a/src/plugins/auto_reply/index.ts +++ b/src/plugins/auto_reply/index.ts @@ -111,7 +111,7 @@ const handleReply = async (app: App, msg: Message) => { msg.chat.id, getSample(rep).replaceAll(/\${(\w*)}/g, (_, s: string) => vars[s]) ); - usrdb.last_reply[msg.chat.id] = msgdate.unix(); + usrdb.last_reply[msg.chat.id] = msg.date; }; const init: PluginInit = (init_app) => {