mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
* added init option for component namespace
This commit is contained in:
parent
a22100bb38
commit
1fa1f7dcc6
1 changed files with 5 additions and 2 deletions
|
@ -50,9 +50,12 @@ except ImportError:
|
||||||
class ComponentXMPP(basexmpp, XMLStream):
|
class ComponentXMPP(basexmpp, XMLStream):
|
||||||
"""SleekXMPP's client class. Use only for good, not evil."""
|
"""SleekXMPP's client class. Use only for good, not evil."""
|
||||||
|
|
||||||
def __init__(self, jid, secret, host, port, plugin_config = {}, plugin_whitelist=[]):
|
def __init__(self, jid, secret, host, port, plugin_config = {}, plugin_whitelist=[], use_jc_ns=False):
|
||||||
XMLStream.__init__(self)
|
XMLStream.__init__(self)
|
||||||
self.default_ns = 'jabber:component:accept'
|
if use_jc_ns:
|
||||||
|
self.default_ns = 'jabber:client'
|
||||||
|
else:
|
||||||
|
self.default_ns = 'jabber:component:accept'
|
||||||
basexmpp.__init__(self)
|
basexmpp.__init__(self)
|
||||||
self.auto_authorize = None
|
self.auto_authorize = None
|
||||||
self.stream_header = "<stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' to='%s'>" % jid
|
self.stream_header = "<stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' to='%s'>" % jid
|
||||||
|
|
Loading…
Reference in a new issue