diff --git a/wallamanta/helpers.py b/wallamanta/helpers.py index 5e33244..9f36b11 100644 --- a/wallamanta/helpers.py +++ b/wallamanta/helpers.py @@ -164,13 +164,14 @@ def send_article(article, product): #keyboard = [[InlineKeyboardButton("Ir al anuncio", url=f"https://es.wallapop.com/item/{article['web_slug']}")]] #InlineKeyboardButton("Listar productos", callback_data="list")] #markup = InlineKeyboardMarkup(keyboard) + keyboard = {'inline_keyboard':[[{'text':'Ir al anuncio','url':f'https://es.wallapop.com/item/{article["web_slug"]}'}]]} files = { 'chat_id': (None, product['telegram_user_id']), 'photo': open(f"/app/data/images/products/{article['id']}_composed.png", 'rb'), 'caption': (None, text), 'parse_mode': (None, ParseMode.MARKDOWN_V2), - 'reply_markup': (None, '{"inline_keyboard":[[{"text":"","url":"https://google.com"}]]}'), + 'reply_markup': (None, keyboard), } response = requests.post(f'https://api.telegram.org/bot{constants.TELEGRAM_TOKEN}/sendPhoto', files=files)