From 0634755e6b1ce26900b9f5b01218884894416192 Mon Sep 17 00:00:00 2001 From: Jose Lago Date: Wed, 17 Jun 2026 12:41:23 +0200 Subject: [PATCH] fix: cancel shows main menu greeting instead of 'Cancelled.' --- worker/src/bot.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/worker/src/bot.py b/worker/src/bot.py index a06ec52..d0a0117 100644 --- a/worker/src/bot.py +++ b/worker/src/bot.py @@ -532,10 +532,16 @@ async def _handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) - elif action == "cancel": context.user_data.clear() kb = _main_menu_keyboard() + name = update.effective_user.first_name or "there" # type: ignore[union-attr] try: - await query.edit_message_text("Cancelled.", reply_markup=kb, parse_mode="HTML") + await query.edit_message_text( + f"Hello {name}! I'll notify you about new willhaben listings.", + parse_mode="HTML", reply_markup=kb) except Exception: - await context.bot.send_message(chat_id=chat_id or user["telegram_id"], text="Cancelled.", reply_markup=kb) + await context.bot.send_message( + chat_id=chat_id or user["telegram_id"], + text=f"Hello {name}! I'll notify you about new willhaben listings.", + parse_mode="HTML", reply_markup=kb) # ════════════════════════════════════════════════════════════════════ # ADD KEYWORD FLOW