Talk panel arguments sorted differently
This commit is contained in:
parent
7a52498939
commit
5aa51f7e8a
@ -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"
|
||||
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user