From e78619025ffe205fa6b0895c2a2120d3a9e81978 Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Fri, 10 Nov 2017 18:58:50 +0100 Subject: [PATCH] Properly answer callbacks --- app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 7a015bd..cf6962a 100644 --- a/app.py +++ b/app.py @@ -254,6 +254,8 @@ async def cmd_actie(message): async def callback_status(query, _, args): + await query.answer() + token = USER_TOKENS.get(query.from_user.id) if not token: msg = messages.stranger_message(message.from_user.first_name) @@ -279,10 +281,11 @@ async def callback_status(query, _, args): await query.message.edit(msg, parse_mode='HTML', reply_markup=json.dumps(reply_markup), disable_web_page_preview=True) - await query.answer() async def callback_tasks(query, _, args): + await query.answer() + token = USER_TOKENS.get(query.from_user.id) if not token: msg = messages.stranger_message(message.from_user.first_name) @@ -291,7 +294,6 @@ async def callback_tasks(query, _, args): group_id = VIA_GROUPS.get(query.message.chat.id) if not group_id: - await query.answer() return user_id = int(args[0])