Commit 44db94cb authored by Pietro Albini's avatar Pietro Albini

Fix link not showing in Telegram - again

parent 18299a2f
......@@ -235,9 +235,16 @@ class PostComponent(botogram.Component):
# If the post should be published now, publish it instantly
if action == "now":
bot.chat(channel).send(
res["updates"][0]["text"]
)
message = res["updates"][0]["text"]
try:
link = res["updates"][0]["media"]["expanded_link"]
except KeyError:
pass
else:
if link:
message += "\n\n%s" % link
bot.chat(channel).send(message)
else:
post_id = res["updates"][0]["id"]
self.db.update(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment