Skip to content

Commit

Permalink
fix plugin/auto_reply: Use original msg.date instead of msgdate
Browse files Browse the repository at this point in the history
msgdate may be modified, and thus would result in mistake
  • Loading branch information
91khr committed Dec 19, 2023
1 parent 6b526f8 commit 6629d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/auto_reply/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 6629d27

Please sign in to comment.