diff options
author | Lance Stout <lancestout@gmail.com> | 2011-08-06 00:44:32 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-08-06 00:44:32 -0700 |
commit | e83fae3a6fed7dd143aa6fed0673ff46340ea953 (patch) | |
tree | 70908999ae511b150ff90d9b98c5d65edf686fb3 /sleekxmpp/basexmpp.py | |
parent | 5be5b8c02bea7cef40046ec29c513e669399633a (diff) | |
download | slixmpp-e83fae3a6fed7dd143aa6fed0673ff46340ea953.tar.gz slixmpp-e83fae3a6fed7dd143aa6fed0673ff46340ea953.tar.bz2 slixmpp-e83fae3a6fed7dd143aa6fed0673ff46340ea953.tar.xz slixmpp-e83fae3a6fed7dd143aa6fed0673ff46340ea953.zip |
Save the stream ID when the stream starts.
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r-- | sleekxmpp/basexmpp.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index 816f2fcc..7c131250 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -138,6 +138,17 @@ class BaseXMPP(XMLStream): register_stanza_plugin(Message, Nick) register_stanza_plugin(Message, HTMLIM) + def start_stream_handler(self, xml): + """ + Save the stream ID once the streams have been established. + + Overrides XMLStream.start_stream_handler. + + Arguments: + xml -- The incoming stream's root element. + """ + self.stream_id = xml.get('id', '') + def process(self, *args, **kwargs): """ Overrides XMLStream.process. |