From 5aa51f7e8a0234320fddf8b76c0aac5953a1f13e Mon Sep 17 00:00:00 2001 From: Davte Date: Mon, 3 Dec 2018 17:33:04 +0100 Subject: [PATCH] Talk panel arguments sorted differently --- davtelepot/__init__.py | 2 +- davtelepot/admin_tools.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index c9feb86..629908d 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -7,7 +7,7 @@ __author__ = "Davide Testa" __email__ = "davte@libero.it" __credits__ = "Marco Origlia" __license__ = "GNU General Public License v3.0" -__version__ = "1.4.21" +__version__ = "1.4.22" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/admin_tools.py b/davtelepot/admin_tools.py index 5172177..dc2a46e 100644 --- a/davtelepot/admin_tools.py +++ b/davtelepot/admin_tools.py @@ -156,10 +156,13 @@ async def _forward_to(update, bot, sender, addressee, is_admin=False): return -def get_talk_panel(text, bot, update): +def get_talk_panel(update, bot, text=''): """Return text and reply markup of talk panel. - Get 'user_id' as string, username as string or void string for main menu. + `text` may be: + - `user_id` as string + - `username` as string + - `''` (empty string) for main menu (default) """ users = [] if len(text): @@ -300,7 +303,7 @@ async def _talk_command(update, bot): bot, ['talk'] ) - text, reply_markup = get_talk_panel(text, bot, update) + text, reply_markup = get_talk_panel(update, bot, text) return dict( text=text, parse_mode='HTML',