Skip to content

Commit

Permalink
fix(core): take negative message id into account
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Sep 1, 2020
1 parent a16a8cc commit 03a10ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/koishi-core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 03a10ba

Please sign in to comment.