Skip to content

Commit

Permalink
fix: use this.ctx instead of bot.ctx to supress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 29, 2024
1 parent 8217e1f commit 5c0b8d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adapters/dingtalk/src/http.ts
Expand Up @@ -20,7 +20,7 @@ export class HttpServer<C extends Context = Context> extends Adapter<C, Dingtalk
await bot.getLogin()

// https://open.dingtalk.com/document/orgapp/receive-message
bot.ctx.server.post('/dingtalk', async (ctx) => {
this.ctx.server.post('/dingtalk', async (ctx) => {
const timestamp = ctx.get('timestamp')
const sign = ctx.get('sign')

Expand Down
2 changes: 1 addition & 1 deletion adapters/slack/src/http.ts
Expand Up @@ -11,7 +11,7 @@ export class HttpServer<C extends Context = Context> extends Adapter<C, SlackBot
async connect(bot: SlackBot<C, SlackBot.Config & HttpServer.Config>) {
const { signing } = bot.config
await bot.getLogin()
bot.ctx.server.post('/slack', async (ctx) => {
this.ctx.server.post('/slack', async (ctx) => {
const timestamp = ctx.request.header['x-slack-request-timestamp'].toString()
const signature = ctx.request.header['x-slack-signature'].toString()
const requestBody = ctx.request.rawBody
Expand Down

0 comments on commit 5c0b8d6

Please sign in to comment.