Skip to content

Commit

Permalink
fix(webhook): middleware return
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Sep 26, 2024
1 parent 29022ae commit 659db3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/el-bot/node/server/webhook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ export function createWebhooks(app: BotServer, options: WebhooksOptions) {
console.dir(payload)
})

const middleware = createNodeMiddleware(webhooks)
const middleware = createNodeMiddleware(webhooks, options.octokit.middlewareOptions)
app.use(async (ctx, next) => {
await middleware(ctx.env.incoming, ctx.env.outgoing)
if (await middleware(ctx.env.incoming, ctx.env.outgoing))
return
await next()
})
}
2 changes: 1 addition & 1 deletion packages/el-bot/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "el-bot",
"type": "module",
"version": "1.0.0-beta.11",
"version": "1.0.0-beta.12",
"description": "A quick qq bot framework for mirai.",
"author": {
"name": "云游君",
Expand Down

0 comments on commit 659db3a

Please sign in to comment.