Skip to content

Commit

Permalink
fix: cannot send file, fix #45 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
soundofautumn authored Aug 13, 2024
1 parent c289053 commit bad1dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bot/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class OneBotMessageEncoder<C extends Context = Context> extends MessageEn
await this.render(children)
// https://github.com/koishijs/koishi-plugin-adapter-onebot/issues/23
if (attrs.href) this.text(`(${attrs.href})`)
} else if (['video', 'audio', 'image', 'img'].includes(type)) {
} else if (['video', 'audio', 'image', 'img', 'file'].includes(type)) {
if (type === 'video' || type === 'audio') await this.flush()
if (type === 'audio') type = 'record'
if (type === 'img') type = 'image'
Expand Down

0 comments on commit bad1dbe

Please sign in to comment.