Philipp Hörist pushed to branch mainwindow at gajim / gajim


Commits:
3aeb6ed3 by lovetox at 2021-02-27T11:53:19+01:00
Fix subscription check

- - - - -


2 changed files:

- gajim/common/modules/contacts.py
- gajim/common/modules/receipts.py


Changes:

=====================================
gajim/common/modules/contacts.py
=====================================
@@ -216,7 +216,7 @@ def _get_roster_attr(self, attr):
         item = self._module('Roster').get_item(self._jid)
         if item is None:
             return None
-        return getattr(item, attr)
+        return item.get(attr)
 
     @property
     def is_in_roster(self):


=====================================
gajim/common/modules/receipts.py
=====================================
@@ -98,8 +98,8 @@ def _should_answer(self, properties):
         if properties.is_muc_pm:
             return True
 
-        contact = self._get_contact(properties.jid)
-        if contact.sub not in ('to', 'none'):
+        contact = self._get_contact(properties.jid.bare)
+        if contact.subscription not in ('to', 'none'):
             return True
         return False
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/3aeb6ed321395460482934bc32095ebbb885d717

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/3aeb6ed321395460482934bc32095ebbb885d717
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to