Skip to content

Commit

Permalink
fix(kaiheila): fix breaking edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 2, 2021
1 parent dfede39 commit bc18170
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/adapter-kaiheila/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export class KaiheilaBot extends Bot {
} else {
params.channelId = channelId
session.subtype = 'group'
// FIXME this is incorrect but to workarournd ctx.group()
session.groupId = 'unknown'
path = '/message/create'
}

Expand Down
1 change: 1 addition & 0 deletions packages/adapter-kaiheila/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default class WsClient extends Adapter.WsClient<'kaiheila'> {
}
let trials = 0
function send() {
if (!bot.socket) return
if (trials >= 2) {
return bot.socket.close(1013)
}
Expand Down

0 comments on commit bc18170

Please sign in to comment.