diff --git a/adapters/dingtalk/src/http.ts b/adapters/dingtalk/src/http.ts index 0ea945d9..09b3a588 100644 --- a/adapters/dingtalk/src/http.ts +++ b/adapters/dingtalk/src/http.ts @@ -18,6 +18,7 @@ export class HttpServer extends Adapter) { await bot.refreshToken() await bot.getLogin() + bot.online() // https://open.dingtalk.com/document/orgapp/receive-message this.ctx.server.post('/dingtalk', async (ctx) => { diff --git a/adapters/dingtalk/src/internal.ts b/adapters/dingtalk/src/internal.ts index b79ae8b4..aa7984b1 100644 --- a/adapters/dingtalk/src/internal.ts +++ b/adapters/dingtalk/src/internal.ts @@ -34,7 +34,7 @@ export class Internal { config.params = { ...config.params, access_token: this.bot.token } } try { - return await quester(method, url, config) + return (await quester(method, url, config)).data } catch (error) { if (!Quester.Error.is(error) || !error.response) throw error throw new Error(`[${error.response.status}] ${JSON.stringify(error.response.data)}`) diff --git a/adapters/dingtalk/src/ws.ts b/adapters/dingtalk/src/ws.ts index e72ffa51..a1af57af 100644 --- a/adapters/dingtalk/src/ws.ts +++ b/adapters/dingtalk/src/ws.ts @@ -6,6 +6,7 @@ export class WsClient extends Adapter.WsClient