Skip to content
Snippets Groups Projects
Commit 13f6af23 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Gateways: Remove not needed code

parent a51612f7
No related branches found
No related tags found
No related merge requests found
...@@ -70,9 +70,6 @@ def __init__(self, name): ...@@ -70,9 +70,6 @@ def __init__(self, name):
self.pep = {} self.pep = {}
# Remember where we are in the register agent process
self.agent_registrations = {}
self.roster_supported = True self.roster_supported = True
self.avatar_conversion = False self.avatar_conversion = False
......
...@@ -252,12 +252,6 @@ def _subscribe_received(self, _con, _stanza, properties): ...@@ -252,12 +252,6 @@ def _subscribe_received(self, _con, _stanza, properties):
properties.jid, is_transport, properties.jid, is_transport,
auto_auth, properties.nickname) auto_auth, properties.nickname)
if is_transport and fjid in self._con.agent_registrations:
self._con.agent_registrations[fjid]['sub_received'] = True
if not self._con.agent_registrations[fjid]['roster_push']:
# We'll reply after roster push result
raise nbxmpp.NodeProcessed
if auto_auth or jid in self.jids_for_auto_auth: if auto_auth or jid in self.jids_for_auto_auth:
self.send_presence(fjid, 'subscribed') self.send_presence(fjid, 'subscribed')
self._log.info('Auto respond with subscribed: %s', jid) self._log.info('Auto respond with subscribed: %s', jid)
......
...@@ -58,9 +58,6 @@ def register_agent(self, agent, form, is_form, success_cb, error_cb): ...@@ -58,9 +58,6 @@ def register_agent(self, agent, form, is_form, success_cb, error_cb):
'success_cb': weak_success_cb, 'success_cb': weak_success_cb,
'error_cb': weak_error_cb}) 'error_cb': weak_error_cb})
self.agent_registrations[agent] = {'roster_push': False,
'sub_received': False}
def _register_agent_response(self, _nbxmpp_client, stanza, agent, def _register_agent_response(self, _nbxmpp_client, stanza, agent,
success_cb, error_cb): success_cb, error_cb):
if not nbxmpp.isResultNode(stanza): if not nbxmpp.isResultNode(stanza):
...@@ -75,10 +72,6 @@ def _register_agent_response(self, _nbxmpp_client, stanza, agent, ...@@ -75,10 +72,6 @@ def _register_agent_response(self, _nbxmpp_client, stanza, agent,
self._con.get_module('Presence').subscribe(agent, auto_auth=True) self._con.get_module('Presence').subscribe(agent, auto_auth=True)
self.agent_registrations[agent]['roster_push'] = True
if self.agent_registrations[agent]['sub_received']:
self._con.get_module('Presence').subscribed(agent)
if success_cb() is not None: if success_cb() is not None:
success_cb()() success_cb()()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment