From b6ce1f62e046788f47eab41babe71ffc29733b5d Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Tue, 26 Feb 2019 16:41:30 -0600 Subject: [PATCH] display poll in attachments for posts (no actions are available, yet) --- src/sessionmanager/renderers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sessionmanager/renderers.py b/src/sessionmanager/renderers.py index 3e592be..af397a2 100644 --- a/src/sessionmanager/renderers.py +++ b/src/sessionmanager/renderers.py @@ -72,6 +72,9 @@ def add_attachment(attachment): elif attachment["type"] == "audio_message": msg = "{0}".format(" ".join(render_audio_message(attachment["audio_message"]))) tpe = _("Voice message") + elif attachment["type"] == "poll": + tpe = _("Poll") + msg = attachment["poll"]["question"] else: print(attachment) return [tpe, msg]