Support null answer to callback queries
This commit is contained in:
parent
9c008d5923
commit
4b27b26467
@ -7,7 +7,7 @@ __author__ = "Davide Testa"
|
||||
__email__ = "davide@davte.it"
|
||||
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
||||
__license__ = "GNU General Public License v3.0"
|
||||
__version__ = "2.0.8"
|
||||
__version__ = "2.0.9"
|
||||
__maintainer__ = "Davide Testa"
|
||||
__contact__ = "t.me/davte"
|
||||
|
||||
|
@ -541,6 +541,8 @@ class Bot(TelegramBot, ObjectWithDatabase):
|
||||
user_record=user_record
|
||||
)
|
||||
break
|
||||
if type(answer) is None:
|
||||
answer = ''
|
||||
if type(answer) is str:
|
||||
answer = dict(text=answer)
|
||||
assert type(answer) is dict, "Invalid callback query answer."
|
||||
|
Loading…
x
Reference in New Issue
Block a user