Remove getRoster() helper method
This commit is contained in:
parent
2e50ac5205
commit
02915163dc
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue