Pass account to plugins when encrypting a file
This commit is contained in:
parent
30a20e16d2
commit
62b210a9e5
2 changed files with 3 additions and 3 deletions
gajim
|
@ -167,7 +167,7 @@ class HTTPUpload:
|
||||||
return
|
return
|
||||||
|
|
||||||
if encryption is not None:
|
if encryption is not None:
|
||||||
app.interface.encrypt_file(file, self._request_slot)
|
app.interface.encrypt_file(file, self._account, self._request_slot)
|
||||||
else:
|
else:
|
||||||
self._request_slot(file)
|
self._request_slot(file)
|
||||||
|
|
||||||
|
|
|
@ -1136,13 +1136,13 @@ class Interface:
|
||||||
chat_control.session,
|
chat_control.session,
|
||||||
groupchat)
|
groupchat)
|
||||||
|
|
||||||
def encrypt_file(self, file, callback):
|
def encrypt_file(self, file, account, callback):
|
||||||
app.nec.push_incoming_event(HTTPUploadProgressEvent(
|
app.nec.push_incoming_event(HTTPUploadProgressEvent(
|
||||||
None, status='encrypt', file=file))
|
None, status='encrypt', file=file))
|
||||||
encryption = file.encryption
|
encryption = file.encryption
|
||||||
plugin = app.plugin_manager.encryption_plugins[encryption]
|
plugin = app.plugin_manager.encryption_plugins[encryption]
|
||||||
if hasattr(plugin, 'encrypt_file'):
|
if hasattr(plugin, 'encrypt_file'):
|
||||||
plugin.encrypt_file(file, None, callback)
|
plugin.encrypt_file(file, account, callback)
|
||||||
else:
|
else:
|
||||||
app.nec.push_incoming_event(HTTPUploadProgressEvent(
|
app.nec.push_incoming_event(HTTPUploadProgressEvent(
|
||||||
None, status='close', file=file))
|
None, status='close', file=file))
|
||||||
|
|
Loading…
Add table
Reference in a new issue