display poll in attachments for posts (no actions are available, yet)

This commit is contained in:
Manuel Cortez 2019-02-26 16:41:30 -06:00
parent 55eaa85979
commit b6ce1f62e0

View File

@ -72,6 +72,9 @@ def add_attachment(attachment):
elif attachment["type"] == "audio_message": elif attachment["type"] == "audio_message":
msg = "{0}".format(" ".join(render_audio_message(attachment["audio_message"]))) msg = "{0}".format(" ".join(render_audio_message(attachment["audio_message"])))
tpe = _("Voice message") tpe = _("Voice message")
elif attachment["type"] == "poll":
tpe = _("Poll")
msg = attachment["poll"]["question"]
else: else:
print(attachment) print(attachment)
return [tpe, msg] return [tpe, msg]