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):
account = self.chat_control.account
for plugin in gajim.plugin_manager.active_plugins:
if type(plugin).__name__ == 'OmemoPlugin':
omemo = plugin
break
if omemo:
state = omemo.get_omemo_state(account)
log.info('Encryption is: ' +
str(state.encryption.is_active(jid)))
return state.encryption.is_active(jid)
state = plugin.get_omemo_state(account)
log.info('Encryption is: ' +
str(state.encryption.is_active(jid)))
return state.encryption.is_active(jid)
log.info('Encryption is: False / OMEMO not found')
return False
......@@ -381,8 +378,12 @@ class Base(object):
return
def upload_complete(response_code):
if response_code == 0:
return # Upload was aborted
if isinstance(response_code, str):
# 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:
log.info("Upload completed successfully")
xhtml = None
......@@ -478,15 +479,10 @@ class Base(object):
transfer = urllib2.urlopen(request, timeout=30)
log.debug("urllib2 upload request done, response code: " + str(transfer.getcode()))
return transfer.getcode()
except UploadAbortedException:
log.info("Upload aborted")
except:
progress_window.close_dialog()
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
except Exception as error:
gobject.idle_add(progress_window.close_dialog)
log.exception('Error')
return str(error)
log.info("Uploading file to '%s'..." % str(put.getData()))
log.info("Please download from '%s' later..." % str(get.getData()))
......
[info]
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/>
Your server must support <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<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
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>
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
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