diff --git a/gajim/common/connection.py b/gajim/common/connection.py index e143d69be..99b4c9353 100644 --- a/gajim/common/connection.py +++ b/gajim/common/connection.py @@ -1638,9 +1638,6 @@ class Connection(CommonConnection, ConnectionHandlers): self.connection = con nbxmpp.features.getRegInfo(con, self._hostname) - def getRoster(self): - return self.get_module('Roster') - def send_agent_status(self, agent, ptype): if not app.account_is_connected(self.name): return diff --git a/gajim/common/modules/gateway.py b/gajim/common/modules/gateway.py index 26b74daf2..9e433b28b 100644 --- a/gajim/common/modules/gateway.py +++ b/gajim/common/modules/gateway.py @@ -33,7 +33,7 @@ class Gateway(BaseModule): self._con.connection.SendAndCallForResponse( iq, self._on_unsubscribe_result) - self._con.getRoster().del_item(agent) + self._con.get_module('Roster').del_item(agent) def _on_unsubscribe_result(self, stanza): if not nbxmpp.isResultNode(stanza): diff --git a/gajim/common/modules/presence.py b/gajim/common/modules/presence.py index d9ea98c1e..f49a6692a 100644 --- a/gajim/common/modules/presence.py +++ b/gajim/common/modules/presence.py @@ -305,15 +305,15 @@ class Presence(BaseModule): if not app.account_is_connected(self._account): return if remove_auth: - self._con.getRoster().del_item(jid) + self._con.get_module('Roster').del_item(jid) jid_list = app.config.get_per('contacts') for j in jid_list: if j.startswith(jid): app.config.del_per('contacts', j) else: self._log.info('Unsubscribe from %s', jid) - self._con.getRoster().unsubscribe(jid) - self._con.getRoster().set_item(jid) + self._con.get_module('Roster').unsubscribe(jid) + self._con.get_module('Roster').set_item(jid) def subscribe(self, jid, msg=None, name='', groups=None, auto_auth=False): if not app.account_is_connected(self._account):