mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix inline_query_handler not work.
This commit is contained in:
parent
47624a556e
commit
7ac246b801
@ -1260,8 +1260,8 @@ class TeleBot:
|
||||
def _notify_command_handlers(self, handlers, new_messages):
|
||||
for message in new_messages:
|
||||
# if message has next step handler, dont exec command handlers
|
||||
if (isinstance(message, types.CallbackQuery)) or \
|
||||
(isinstance(message, types.Message) and (message.chat.id not in self.message_subscribers_next_step)):
|
||||
if hasattr(message, 'chat') and message.chat and (message.chat.id in self.message_subscribers_next_step):
|
||||
continue
|
||||
for message_handler in handlers:
|
||||
if self._test_message_handler(message_handler, message):
|
||||
self._exec_task(message_handler['function'], message)
|
||||
|
@ -201,7 +201,8 @@ class TestTeleBot:
|
||||
def test_send_audio_dis_noti(self):
|
||||
file_data = open('./test_data/record.mp3', 'rb')
|
||||
tb = telebot.TeleBot(TOKEN)
|
||||
ret_msg = tb.send_audio(CHAT_ID, file_data, 1, performer='eternnoir', title='pyTelegram', disable_notification=True)
|
||||
ret_msg = tb.send_audio(CHAT_ID, file_data, 1, performer='eternnoir', title='pyTelegram',
|
||||
disable_notification=True)
|
||||
assert ret_msg.content_type == 'audio'
|
||||
assert ret_msg.audio.performer == 'eternnoir'
|
||||
assert ret_msg.audio.title == 'pyTelegram'
|
||||
|
Loading…
Reference in New Issue
Block a user