Commit 18299a2f authored by Pietro Albini's avatar Pietro Albini

Include the links included in the post in Telegram

parent 1d3f210d
......@@ -85,7 +85,16 @@ class PostComponent(botogram.Component):
if data["status"] != "sent":
continue
bot.chat(channel).send(data["text"])
message = data["text"]
try:
link = data["media"]["expanded_link"]
except KeyError:
pass
else:
if link:
message += "\n\n%s" % link
bot.chat(channel).send(message)
# This will delete the update if the message was sent to the
# channel or there was an error with it
......
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