Show error dialogs when attempting to send audio messages to banned or blocked users
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user