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:
message = update.effective_message
text_list = message.text.split()
if text_list[0].lower() not in self.command:
return None
filter_result = self.filters(update)
if filter_result:
return text_list[1:], filter_result
else:
return False
if message.text:
text_list = message.text.split()
if text_list[0].lower() not in self.command:
return None
filter_result = self.filters(update)
if filter_result:
return text_list[1:], filter_result
else:
return False
def collect_additional_context(self, context, update, dispatcher, check_result):
context.args = check_result[0]