Skip to content

Commit

Permalink
fix(kook): ensure send session.content, fix #202
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Dec 23, 2023
1 parent ae058ac commit 678d78f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adapters/kook/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export class KookMessageEncoder<C extends Context = Context> extends MessageEnco
if (!result.msg_id) return
const session = this.bot.session()
session.type = 'send'
// https://github.com/satorijs/satori/issues/202
// KOOK does not return the message content in the response
session.content = ''
session.messageId = result.msg_id
session.timestamp = result.timestamp
this.results.push(session.event.message)
Expand Down
1 change: 1 addition & 0 deletions adapters/zulip/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class ZulipMessageEncoder<C extends Context = Context> extends MessageEnc
headers: form.getHeaders(),
})
const session = this.bot.session()
session.content = this.buffer
session.messageId = id.toString()
session.userId = this.bot.selfId
session.channelId = this.session.channelId
Expand Down

0 comments on commit 678d78f

Please sign in to comment.