Accept both updates and raw_updates in maintenance exception criteria
This commit is contained in:
parent
12cca835b9
commit
1b4532e2cd
@ -11,7 +11,7 @@ __author__ = "Davide Testa"
|
||||
__email__ = "davide@davte.it"
|
||||
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
||||
__license__ = "GNU General Public License v3.0"
|
||||
__version__ = "2.6.1"
|
||||
__version__ = "2.6.2"
|
||||
__maintainer__ = "Davide Testa"
|
||||
__contact__ = "t.me/davte"
|
||||
|
||||
|
@ -789,9 +789,10 @@ def get_maintenance_exception_criterion(bot, allowed_command):
|
||||
"""
|
||||
|
||||
def criterion(update):
|
||||
if 'message' not in update:
|
||||
return False
|
||||
if 'message' in update:
|
||||
update = update['message']
|
||||
if 'text' not in update:
|
||||
return False
|
||||
text = get_cleaned_text(update, bot, [])
|
||||
if (
|
||||
'from' not in update
|
||||
|
Loading…
x
Reference in New Issue
Block a user