@@ -747,7 +747,7 @@ def sendChatAction(self,
747747 def answerInlineQuery (self ,
748748 inline_query_id ,
749749 results ,
750- cache_time = None ,
750+ cache_time = 300 ,
751751 is_personal = None ,
752752 next_offset = None ,
753753 switch_pm_text = None ,
@@ -801,7 +801,7 @@ def answerInlineQuery(self,
801801 data ['cache_time' ] = int (cache_time )
802802 if is_personal :
803803 data ['is_personal' ] = bool (is_personal )
804- if next_offset :
804+ if next_offset or next_offset == '' :
805805 data ['next_offset' ] = next_offset
806806 if switch_pm_text :
807807 data ['switch_pm_text' ] = switch_pm_text
@@ -935,7 +935,7 @@ def unbanChatMember(self,
935935 def answerCallbackQuery (self ,
936936 callback_query_id ,
937937 text = None ,
938- show_alert = None ):
938+ show_alert = False ):
939939 """Use this method to send answers to callback queries sent from inline
940940 keyboards. The answer will be displayed to the user as a notification
941941 at the top of the chat screen or as an alert.
@@ -1161,7 +1161,7 @@ def getUpdates(self,
11611161 data ['offset' ] = offset
11621162 if limit :
11631163 data ['limit' ] = limit
1164- if timeout :
1164+ if timeout or timeout == 0 :
11651165 data ['timeout' ] = timeout
11661166
11671167 result = request .post (url , data , network_delay = network_delay )
@@ -1195,7 +1195,7 @@ def setWebhook(self,
11951195 url = '%s/setWebhook' % self .base_url
11961196
11971197 data = {}
1198- if webhook_url :
1198+ if webhook_url or webhook_url == '' :
11991199 data ['url' ] = webhook_url
12001200 if certificate :
12011201 data ['certificate' ] = certificate
0 commit comments