From 3dfc7c63587b8e9a968ee4b462a5212ad3ca63e9 Mon Sep 17 00:00:00 2001 From: Joan Date: Tue, 4 Jul 2023 15:02:53 +0200 Subject: [PATCH] Added category and fixed format for messages --- wallamanta/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wallamanta/helpers.py b/wallamanta/helpers.py index 997b80f..ec83cc8 100644 --- a/wallamanta/helpers.py +++ b/wallamanta/helpers.py @@ -135,8 +135,7 @@ async def send_article(article, product): found_by = f"*🔍 Encontrado por la búsqueda de:* {telegram_escape_characters(product['product_name'])}" created_at = f"*📅 Fecha de publicación:* {telegram_escape_characters(get_publish_date(article))}" modified_at = f"*📅 Fecha de modificación:* {telegram_escape_characters(get_modified_date(article))}" - location = f"📍 *Lugar:* {telegram_escape_characters(article['location']['city'])} ({telegram_escape_characters(article['location']['postal_code'])}) - {telegram_escape_characters(article['location']['country_code'])})" - location = telegram_escape_characters(location) + location = f"📍 *Lugar:* {telegram_escape_characters(article['location']['city'])} {telegram_escape_characters('(' + article['location']['postal_code']) + ')' } {telegram_escape_characters('- (' + article['location']['country_code']) + ')'}" if article['shipping']['user_allows_shipping']: user_ships = f"📦 *Envío:* ✅" else: @@ -299,6 +298,7 @@ def send_to_nr(article, product): "product_name": product['product_name'], "telegram_user_id": product['telegram_user_id'], "telegram_name": walladb.get_user(product['telegram_user_id']), + "category_id": article['category_id'], "seller_id": article['seller_id'], "environment": constants.NR_ENV }