Commit e7ac1ccf authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Adapt to link handler changes in Gajim

parent e577b42c
......@@ -33,6 +33,7 @@ from gi.repository import GLib
from gajim.common import app
from gajim.common import configpaths
from gajim.common.const import URIType
from gajim.plugins.plugins_i18n import _
from gajim.gtk.dialogs import ErrorDialog, YesNoDialog
......@@ -70,11 +71,11 @@ class FileDecryption:
self.plugin = plugin
self.window = None
def hyperlink_handler(self, url, kind, instance, window):
if ERROR or kind != 'url':
def hyperlink_handler(self, uri, instance, window):
if ERROR or uri.type != URIType.WEB:
self.window = window
urlparts = urlparse(url)
urlparts = urlparse(
file = File(urlparts.geturl(), instance.account)
if urlparts.scheme not in ['https', 'aesgcm'] or not urlparts.netloc:
......@@ -211,9 +211,9 @@ class OmemoPlugin(GajimPlugin):
self.get_omemo(account).encrypt_message(conn, obj, callback, False)
def _file_decryption(self, url, kind, instance, window):
def _file_decryption(self, uri, instance, window):
url, kind, instance, window)
uri, instance, window)
def encrypt_file(self, file, _account, callback):
thread = threading.Thread(target=self._encrypt_file_thread,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment