Bugs fixed

This commit is contained in:
Davte 2018-11-25 00:49:18 +01:00
parent 54e81f57df
commit 269f167be5
2 changed files with 20 additions and 4 deletions

View File

@ -7,7 +7,7 @@ __author__ = "Davide Testa"
__email__ = "davte@libero.it" __email__ = "davte@libero.it"
__credits__ = "Marco Origlia" __credits__ = "Marco Origlia"
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "1.4.9" __version__ = "1.4.10"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

@ -311,6 +311,8 @@ async def _talk_button(update, bot):
text=bot.get_message( text=bot.get_message(
'talk', 'user_warning', 'talk', 'user_warning',
update=update update=update
).format(
u=get_user(admin_record)
) )
) )
await bot.send_message( await bot.send_message(
@ -318,6 +320,8 @@ async def _talk_button(update, bot):
text=bot.get_message( text=bot.get_message(
'talk', 'admin_warning', 'talk', 'admin_warning',
update=update update=update
).format(
u=get_user(user_record)
), ),
reply_markup=make_inline_keyboard( reply_markup=make_inline_keyboard(
[ [
@ -335,10 +339,22 @@ async def _talk_button(update, bot):
bot.set_custom_parser( bot.set_custom_parser(
await async_wrapper( await async_wrapper(
_forward_to, _forward_to,
bot=bot bot=bot,
sender=user_record['telegram_id'],
addressee=admin_record['telegram_id'],
is_admin=False
), ),
user_telegram_id=user_record['telegram_id'], user_record['telegram_id']
admin_telegram_id=admin_record['telegram_id'], )
bot.set_custom_parser(
await async_wrapper(
_forward_to,
bot=bot,
sender=admin_record['telegram_id'],
addressee=user_record['telegram_id'],
is_admin=True
),
admin_record['telegram_id']
) )
elif command == 'stop': elif command == 'stop':
with bot.db as db: with bot.db as db: