Philipp Hörist pushed to branch master at gajim / gajim
Commits:
dfa65e9e by Philipp Hörist at 2019-11-10T19:36:26Z
Fix open-link action
param is a string array
- - - - -
85a59711 by Philipp Hörist at 2019-11-10T19:38:20Z
Presence: Correctly detect presences from contacts not in the roster
- - - - -
2 changed files:
- gajim/app_actions.py
- gajim/common/modules/presence.py
Changes:
=====================================
gajim/app_actions.py
=====================================
@@ -356,7 +356,7 @@ def open_mail(_action, param):
def open_link(_action, param):
- account, uri = param.get_string()
+ account, uri = param.get_strv()
helpers.open_uri(uri, account=account)
=====================================
gajim/common/modules/presence.py
=====================================
@@ -63,7 +63,13 @@ class Presence(BaseModule):
def _presence_received(self, _con, stanza, properties):
if properties.from_muc:
- # Already handled in MUC module
+ # MUC occupant presences are already handled in MUC module
+ return
+
+ muc = self._con.get_module('MUC').get_manager().get(properties.jid)
+ if muc is not None:
+ # Presence from the MUC itself, used for MUC avatar
+ # handled in VCardAvatars module
return
self._log.info('Received from %s', properties.jid)
@@ -86,9 +92,9 @@ class Presence(BaseModule):
show=properties.show.value))
return
- contacts = app.contacts.get_jid_list(self._account)
- if (properties.jid.getBare() not in contacts and
- not properties.is_self_bare):
+ jid = properties.jid.getBare()
+ roster_item = self._con.get_module('Roster').get_item(jid)
+ if not properties.is_self_bare and roster_item is None:
# Handle only presence from roster contacts
self._log.warning('Unknown presence received')
self._log.warning(stanza)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/8f299caa387aa6d6420e7b75cd99cccaf3796423...85a59711fd1feac1fde1aeb55d25315ef2b708aa
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/8f299caa387aa6d6420e7b75cd99cccaf3796423...85a59711fd1feac1fde1aeb55d25315ef2b708aa
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