[omemo] Adapt to Gajim changes
This commit is contained in:
@@ -340,11 +340,13 @@ class OMEMO(BaseModule):
|
|||||||
def is_contact_in_roster(self, jid):
|
def is_contact_in_roster(self, jid):
|
||||||
if jid == self._own_jid:
|
if jid == self._own_jid:
|
||||||
return True
|
return True
|
||||||
# TODO:
|
|
||||||
contact = app.contacts.get_first_contact_from_jid(self._account, jid)
|
roster_item = self._con.get_module('Roster').get_item(jid)
|
||||||
if contact is None:
|
if roster_item is None:
|
||||||
return False
|
return False
|
||||||
return contact.sub == 'both'
|
|
||||||
|
contact = self._con.get_module('Contacts').get_contact(jid)
|
||||||
|
return contact.subscription == 'both'
|
||||||
|
|
||||||
def on_muc_disco_update(self, event):
|
def on_muc_disco_update(self, event):
|
||||||
self._check_if_omemo_capable(event.jid)
|
self._check_if_omemo_capable(event.jid)
|
||||||
|
|||||||
Reference in New Issue
Block a user