Show error dialogs when attempting to send audio messages to banned or blocked users

This commit is contained in:
2019-12-20 08:09:11 -06:00
parent 1d96a4807b
commit d286674cee
5 changed files with 23 additions and 18 deletions

View File

@@ -322,6 +322,7 @@ class Controller(object):
pub.subscribe(self.user_typing, "user-typing")
pub.subscribe(self.get_chat, "order-sent-message")
pub.subscribe(self.create_timeline, "create-timeline")
pub.subscribe(self.api_error, "api-error")
def disconnect_events(self):
log.debug("Disconnecting some events...")
@@ -394,6 +395,10 @@ class Controller(object):
buffer.tab.text.SetFocus()
buffer.attachments_to_be_sent = attachments_list
def api_error(self, code):
""" Display an understandable error dialog to users. """
commonMessages.vk_error(code)
def download(self, url, filename):
""" Download a file to te current user's computer.
@ url: The URl from where the file can be directly accessed.