fix: summary message, stats back, admin cancel/back buttons, keyword added confirmation, notifications logging
This commit is contained in:
+8
-1
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user