Skip to content

Commit

Permalink
Merge pull request #2128 from Badiboy/master
Browse files Browse the repository at this point in the history
Bugfix: fix link_preview_options passing for Telebot
  • Loading branch information
Badiboy authored Jan 14, 2024
2 parents 4ccd083 + eaa64bb commit 7e5523b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telebot/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def send_message(
method_url = r'sendMessage'
payload = {'chat_id': str(chat_id), 'text': text}
if link_preview_options is not None:
payload['link_preview'] = link_preview_options.to_json()
payload['link_preview_options'] = link_preview_options.to_json()
if reply_markup:
payload['reply_markup'] = _convert_markup(reply_markup)
if parse_mode:
Expand Down Expand Up @@ -1304,7 +1304,7 @@ def edit_message_text(token, text, chat_id=None, message_id=None, inline_message
if reply_markup:
payload['reply_markup'] = _convert_markup(reply_markup)
if link_preview_options is not None:
payload['link_preview'] = link_preview_options.to_json()
payload['link_preview_options'] = link_preview_options.to_json()
return _make_request(token, method_url, params=payload, method='post')


Expand Down

0 comments on commit 7e5523b

Please sign in to comment.