Update tostring methods.

Will now always show top-level namespace, unless it is the same
as the stream's default namespace. Also added the XMPP stream
namespace to the namespace map as 'stream'.
This commit is contained in:
Lance Stout
2011-01-27 18:05:05 -05:00
parent cd800d636a
commit bd9bf3f1c7
5 changed files with 43 additions and 15 deletions

View File

@@ -106,6 +106,7 @@ class BaseXMPP(XMLStream):
self.default_ns = default_ns
self.stream_ns = 'http://etherx.jabber.org/streams'
self.namespace_map[self.stream_ns] = 'stream'
self.boundjid = JID("")
@@ -119,6 +120,8 @@ class BaseXMPP(XMLStream):
self.sentpresence = False
self.stanza = sleekxmpp.stanza
self.register_handler(
Callback('IM',
MatchXPath('{%s}message/{%s}body' % (self.default_ns,