fix: summary message, stats back, admin cancel/back buttons, keyword added confirmation, notifications logging

This commit is contained in:
2026-06-17 13:18:33 +02:00
parent c48706ac9c
commit b59a2ab922
3 changed files with 70 additions and 12 deletions
+8 -1
View File
@@ -79,7 +79,14 @@ async def scheduler_task(pool: object, bot: ExtBot) -> None:
if initial_loaded:
notify_fields = {**fields, "keyword": keyword}
for tg_id in telegram_ids:
await notify_new_ad(bot, tg_id, notify_fields)
msg_id_val = await notify_new_ad(bot, tg_id, notify_fields)
if msg_id_val:
user_row = await pool.fetchrow("SELECT id FROM users WHERE telegram_id = $1", tg_id)
if user_row:
try:
await log_notification(pool, str(user_row["id"]), ad_uuid, msg_id_val)
except Exception:
logger.exception("Failed to log new ad notification")
new_count += 1
else:
ad_uuid = str(existing["id"])