Skip to content

Commit

Permalink
remove changes concerned to bug with telegram username
Browse files Browse the repository at this point in the history
  • Loading branch information
Zh-Andrew committed Jul 15, 2023
1 parent 42814eb commit 27cf86a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/bot/handlers/ask_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,11 @@ async def select_contact_type(
) -> AskQuestionStates:
"""Type of contact field handler."""
query = update.callback_query
await query.answer()
contact_type = query.data
context.user_data["contact_type"] = contact_type
if contact_type == "TELEGRAM":
if not query.message.chat.username:
await query.bot.answer_callback_query(
query.id,
"У вас в настройках не указан username,"
" пожалуйста, либо зайдите в настройки вашего"
" telegram аккаунта придумайте и введите username,"
" либо выберите другую форму связи.",
show_alert=True,
)
context.user_data["contact"] = "@" + query.message.chat.username
await query.answer()
await query.edit_message_text(
THANKS_FOR_THE_QUESTION, reply_markup=assistance_keyboard_markup
)
Expand Down

0 comments on commit 27cf86a

Please sign in to comment.