diff --git a/bot/bot.py b/bot/bot.py index 8960dae..c5c9bec 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -103,6 +103,7 @@ def find_amazon_link(update: Update, context: CallbackContext) -> None: user, chat, chat_id, message_id = update.message.from_user, update.message.chat, update.message.chat_id, update.message.message_id amazon_url_with_referer, original_message = extract_amazon_url_with_referer(msg) + original_message = f"\n\nMensaje original: {original_message}" if original_message != '' else '' if amazon_url_with_referer: logging.info(f"Link sent by {user} - {msg}") @@ -139,7 +140,7 @@ def find_amazon_link(update: Update, context: CallbackContext) -> None: helpers.create_image(product_id, product_data.price) keyboard = [[InlineKeyboardButton("Ir a Amazon", url=f"{amazon_url_with_referer}")]] markup = InlineKeyboardMarkup(keyboard) - context.bot.send_photo(chat_id=chat_id, photo=open(f"/app/data/images/products/{product_id}_composed.png", 'rb'), caption=f"URL enviada por @{user['username']}: \n\n{product_data.title}\n\nMensaje original: {original_message}", reply_markup=markup) + context.bot.send_photo(chat_id=chat_id, photo=open(f"/app/data/images/products/{product_id}_composed.png", 'rb'), caption=f"URL enviada por @{user['username']}: \n\n{product_data.title}{original_message}", reply_markup=markup) def main() -> None: