Adapted some files to changes present in renderers

This commit is contained in:
2018-12-06 17:34:48 -06:00
parent d0de4ac677
commit 4a83edf3bc
4 changed files with 6 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ import os
import requests
import re
import logging
from sessionmanager import session
from sessionmanager import renderers
log = logging.getLogger("utils")
url_re = re.compile("(?:\w+://|www\.)[^ ,.?!#%=+][^ ]*")
bad_chars = '\'\\.,[](){}:;"'
@@ -76,7 +76,7 @@ def add_attachment(attachment):
msg = u"{0}".format(attachment["video"]["title"],)
tpe = _(u"Video")
elif attachment["type"] == "audio":
msg = u"{0}".format(" ".join(session.compose_audio(attachment["audio"])))
msg = u"{0}".format(" ".join(session.render_audio(attachment["audio"])))
tpe = _(u"Audio")
elif attachment["type"] == "doc":
if attachment["doc"].has_key("preview") and attachment["doc"]["preview"].has_key("audio_msg"):