Commit 92e27970 authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

[omemo] Adapt to Gajim changes

parent 765a660c
Pipeline #8394 passed with stage
in 1 minute and 45 seconds
......@@ -82,8 +82,9 @@ class DeviceManager:
def get_devices_for_encryption(self, jid):
devices_for_encryption = []
if app.contacts.get_groupchat_contact(self._account, jid) is not None:
client = app.get_client(self._account)
contact = client.get_module('Contacts').get_contact(jid)
if contact.is_groupchat:
devices_for_encryption = self._get_devices_for_muc_encryption(jid)
devices_for_encryption = self._get_devices_for_encryption(jid)
......@@ -21,7 +21,6 @@ from pathlib import Path
from nbxmpp.namespaces import Namespace
from nbxmpp.protocol import NodeProcessed
from nbxmpp.protocol import JID
from nbxmpp.errors import StanzaError
from nbxmpp.const import PresenceType
from nbxmpp.const import Affiliation
......@@ -257,16 +256,14 @@ class OMEMO(BaseModule):
'trust': GajimTrust[]})
def _process_muc_message(self, properties):
room_jid = properties.jid.bare
resource = properties.jid.resource
if properties.muc_ofrom is not None:
# History Message from MUC
return properties.muc_ofrom.bare
contact = app.contacts.get_gc_contact(self._account, room_jid, resource)
if contact is not None:
return JID.from_string(contact.jid).bare
contact = self._con.get_module('Contacts').get_contact(properties.jid)
if contact.real_jid is not None:
return contact.real_jid.bare'Groupchat: Last resort trying to find SID in DB')
from_jid =
Markdown is supported
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