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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user