Display audio attachments in chat messages properly

This commit is contained in:
Manuel Cortez 2018-12-06 17:56:22 -06:00
parent 4a83edf3bc
commit 5d804b2d8e
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,6 @@ import wx
import languageHandler
import widgetUtils
import messages
import utils
import player
import output
import selector
@ -16,11 +15,11 @@ import attach
from pubsub import pub
from vk.exceptions import VkAPIError
from wxUI.tabs import home
from sessionmanager import session, renderers
from sessionmanager import session, renderers, utils
from mysc.thread_utils import call_threaded
from mysc import upload
from wxUI import commonMessages, menus
from utils import add_attachment
from sessionmanager.utils import add_attachment
log = logging.getLogger("controller.buffers")

View File

@ -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.render_audio(attachment["audio"])))
msg = u"{0}".format(" ".join(renderers.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"):