Skip to content

Commit

Permalink
feat(telegram): support blockquote (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
idranme committed May 27, 2024
1 parent ac6d150 commit 27d7fa9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions adapters/telegram/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,14 @@ export class TelegramMessageEncoder<C extends Context = Context> extends Message
await this.flush()
this.mode = 'default'
} else if (type === 'quote') {
await this.flush()
this.payload.reply_to_message_id = attrs.id
if ('id' in attrs) {
await this.flush()
this.payload.reply_to_message_id = attrs.id
} else {
this.payload.caption += '<blockquote>'
await this.render(children)
this.payload.caption += '</blockquote>'
}
} else if (type === 'button') {
const last = this.lastRow()
last.push(this.decodeButton(
Expand Down

0 comments on commit 27d7fa9

Please sign in to comment.