Add missing message.text check in PrefixHandler check_update (#1375)

* Add missing message.text check in PrefixHandler check_update

* Remove message length check
This commit is contained in:
Jasmin Bom 2019-04-05 12:59:50 +02:00 committed by GitHub
parent 2ed4cbd26d
commit 474ff8ae41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,14 +332,15 @@ class PrefixHandler(CommandHandler):
if isinstance(update, Update) and update.effective_message: if isinstance(update, Update) and update.effective_message:
message = update.effective_message message = update.effective_message
text_list = message.text.split() if message.text:
if text_list[0].lower() not in self.command: text_list = message.text.split()
return None if text_list[0].lower() not in self.command:
filter_result = self.filters(update) return None
if filter_result: filter_result = self.filters(update)
return text_list[1:], filter_result if filter_result:
else: return text_list[1:], filter_result
return False else:
return False
def collect_additional_context(self, context, update, dispatcher, check_result): def collect_additional_context(self, context, update, dispatcher, check_result):
context.args = check_result[0] context.args = check_result[0]