Tidy up roster_received event and callbacks.

This commit is contained in:
Lance Stout 2012-04-07 17:30:25 -04:00
parent 7734aee7ad
commit 7391288668

View file

@ -223,12 +223,12 @@ class ClientXMPP(BaseXMPP):
iq['roster']['ver'] = self.client_roster.version iq['roster']['ver'] = self.client_roster.version
if not block and callback is None: if not block and callback is None:
callback = lambda resp: self._handle_roster(resp, request=True) callback = lambda resp: self._handle_roster(resp)
response = iq.send(block, timeout, callback) response = iq.send(block, timeout, callback)
self.event('roster_received', response)
if block: if block:
self.event('roster_received', response)
self._handle_roster(response) self._handle_roster(response)
return response return response