Skip to content
Snippets Groups Projects
Commit b6dee2ad authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Merge branch 'master' into 'master'

Version 0.4.2

See merge request !10
parents f6e76280 f535297c
No related branches found
No related tags found
No related merge requests found
...@@ -282,13 +282,10 @@ class Base(object): ...@@ -282,13 +282,10 @@ class Base(object):
account = self.chat_control.account account = self.chat_control.account
for plugin in gajim.plugin_manager.active_plugins: for plugin in gajim.plugin_manager.active_plugins:
if type(plugin).__name__ == 'OmemoPlugin': if type(plugin).__name__ == 'OmemoPlugin':
omemo = plugin state = plugin.get_omemo_state(account)
break log.info('Encryption is: ' +
if omemo: str(state.encryption.is_active(jid)))
state = omemo.get_omemo_state(account) return state.encryption.is_active(jid)
log.info('Encryption is: ' +
str(state.encryption.is_active(jid)))
return state.encryption.is_active(jid)
log.info('Encryption is: False / OMEMO not found') log.info('Encryption is: False / OMEMO not found')
return False return False
...@@ -381,8 +378,12 @@ class Base(object): ...@@ -381,8 +378,12 @@ class Base(object):
return return
def upload_complete(response_code): def upload_complete(response_code):
if response_code == 0: if isinstance(response_code, str):
return # Upload was aborted # We got a error Message
ErrorDialog(
_('Error'), response_code,
transient_for=self.chat_control.parent_win.window)
return
if response_code >= 200 and response_code < 300: if response_code >= 200 and response_code < 300:
log.info("Upload completed successfully") log.info("Upload completed successfully")
xhtml = None xhtml = None
...@@ -478,15 +479,10 @@ class Base(object): ...@@ -478,15 +479,10 @@ class Base(object):
transfer = urllib2.urlopen(request, timeout=30) transfer = urllib2.urlopen(request, timeout=30)
log.debug("urllib2 upload request done, response code: " + str(transfer.getcode())) log.debug("urllib2 upload request done, response code: " + str(transfer.getcode()))
return transfer.getcode() return transfer.getcode()
except UploadAbortedException: except Exception as error:
log.info("Upload aborted") gobject.idle_add(progress_window.close_dialog)
except: log.exception('Error')
progress_window.close_dialog() return str(error)
ErrorDialog(_('Could not upload file'),
_('Got unexpected exception while uploading file (see error log for more information)'),
transient_for=self.chat_control.parent_win.window)
raise # fill error log with useful information
return 0
log.info("Uploading file to '%s'..." % str(put.getData())) log.info("Uploading file to '%s'..." % str(put.getData()))
log.info("Please download from '%s' later..." % str(get.getData())) log.info("Please download from '%s' later..." % str(get.getData()))
......
[info] [info]
name: HttpUpload name: HttpUpload
short_name: httpupload short_name: httpupload
version: 0.4.1 version: 0.4.2
description: This plugin is designed to send a file to a contact or muc by using httpupload.<br/> description: This plugin is designed to send a file to a contact or muc by using httpupload.<br/>
Your server must support <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<br/> Your server must support <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<br/>
Conversations supported this.<br/> Conversations supported this.<br/>
...@@ -10,6 +10,6 @@ description: This plugin is designed to send a file to a contact or muc by using ...@@ -10,6 +10,6 @@ description: This plugin is designed to send a file to a contact or muc by using
If the receiving side doesn't support this, only a text message containing the link to the image is send. If the receiving side doesn't support this, only a text message containing the link to the image is send.
authors: Thilo Molitor <thilo@eightysoft.de> authors: Thilo Molitor <thilo@eightysoft.de>
Philipp Hörist <philipp@hoerist.com> Philipp Hörist <philipp@hoerist.com>
homepage: https://trac-plugins.gajim.org/wiki/HttpUploadPlugin homepage: https://dev.gajim.org/gajim/gajim-plugins/wikis/HttpUploadPlugin
min_gajim_version: 0.16.5 min_gajim_version: 0.16.5
max_gajim_version: 0.16.9 max_gajim_version: 0.16.9
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment