Skip to content

Commit

Permalink
feat(qq): add ws endpoint replace (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
bili-22 authored Jan 8, 2024
1 parent 6390012 commit 912a801
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adapters/qq/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export class WsClient<C extends Context = Context> extends Adapter.WsClient<C, Q

async prepare() {
await this.bot.getAccessToken()
const { url } = await this.bot.groupHttp.get(`/gateway`)
let { url } = await this.bot.groupHttp.get(`/gateway`)
url = url.replace('api.sgroup.qq.com', new URL(this.bot.config.endpoint).host)
this.bot.logger.debug('url: %s', url)
return this.bot.groupHttp.ws(url)
}
Expand Down

0 comments on commit 912a801

Please sign in to comment.