From 03a10baed4a17441dd23964f13076f318c811464 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Tue, 1 Sep 2020 12:20:50 +0800 Subject: [PATCH] fix(core): take negative message id into account --- packages/koishi-core/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/koishi-core/src/app.ts b/packages/koishi-core/src/app.ts index af7300ed38..375d7a0b38 100644 --- a/packages/koishi-core/src/app.ts +++ b/packages/koishi-core/src/app.ts @@ -145,7 +145,7 @@ export class App extends Context { let capture: RegExpMatchArray, atSelf = false // eslint-disable-next-line no-cond-assign - if (capture = message.match(/^\[CQ:reply,id=(\d+)\]/)) { + if (capture = message.match(/^\[CQ:reply,id=(-?\d+)\]/)) { session.$reply = +capture[1] message = message.slice(capture[0].length) }