mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
9f1648328f
See issue #89 Using get_roster will now return the same types of values as Iq.send. If a timeout occurs, then the event 'roster_timeout' will be fired. A successful call to get_roster will also raise the 'roster_received' event. To ensure that the get_roster call was successful, here is a pattern to follow: def __init__(self, ...): ... self.add_event_handler('session_start', self.session_start) self.add_event_handler('roster_timeout', self.roster_timeout) self.add_event_handler('roster_received', self.roster_received) def session_start(self, e): self.send_presence() self.get_roster() def roster_timeout(self, e): # Optionally increase the timeout period self.get_roster(timeout=self.response_timeout * 2) def roster_received(self, iq): # Do stuff, roster has been initialized. ... |
||
---|---|---|
.. | ||
__init__.py | ||
live_multiple_streams.py | ||
live_test.py | ||
test_events.py | ||
test_jid.py | ||
test_stanza_base.py | ||
test_stanza_element.py | ||
test_stanza_error.py | ||
test_stanza_gmail.py | ||
test_stanza_iq.py | ||
test_stanza_message.py | ||
test_stanza_presence.py | ||
test_stanza_roster.py | ||
test_stanza_xep_0004.py | ||
test_stanza_xep_0009.py | ||
test_stanza_xep_0030.py | ||
test_stanza_xep_0033.py | ||
test_stanza_xep_0050.py | ||
test_stanza_xep_0059.py | ||
test_stanza_xep_0060.py | ||
test_stanza_xep_0085.py | ||
test_stream.py | ||
test_stream_exceptions.py | ||
test_stream_handlers.py | ||
test_stream_presence.py | ||
test_stream_roster.py | ||
test_stream_xep_0030.py | ||
test_stream_xep_0050.py | ||
test_stream_xep_0059.py | ||
test_stream_xep_0085.py | ||
test_stream_xep_0092.py | ||
test_stream_xep_0128.py | ||
test_stream_xep_0249.py | ||
test_tostring.py |