Skip to content

Commit

Permalink
fix: forwardMessages yagop#1215
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoshouzi authored Jul 15, 2024
1 parent f40b421 commit ac82d63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ class TelegramBot extends EventEmitter {
}
}

_fixMessageIds(obj) {
const messageIds = obj.message_ids;
if (messageIds && typeof messageIds !== 'string') {
obj.message_ids = stringify(messageIds);
}
}

/**
* Fix 'reply_parameters' parameter by making it JSON-serialized, as
* required by the Telegram Bot API
Expand Down Expand Up @@ -288,6 +295,7 @@ class TelegramBot extends EventEmitter {
this._fixReplyMarkup(options.form);
this._fixEntitiesField(options.form);
this._fixReplyParameters(options.form);
this._fixMessageIds(options.form);
}
if (options.qs) {
this._fixReplyMarkup(options.qs);
Expand Down

0 comments on commit ac82d63

Please sign in to comment.