diff options
Diffstat (limited to 'sleekxmpp/componentxmpp.py')
-rw-r--r-- | sleekxmpp/componentxmpp.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 44f82e96..4b229a6f 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -49,8 +49,13 @@ class ComponentXMPP(BaseXMPP): Defaults to ``False``. """ - def __init__(self, jid, secret, host=None, port=None, - plugin_config={}, plugin_whitelist=[], use_jc_ns=False): + def __init__(self, jid, secret, host=None, port=None, plugin_config=None, plugin_whitelist=None, use_jc_ns=False): + + if not plugin_whitelist: + plugin_whitelist = [] + if not plugin_config: + plugin_config = {} + if use_jc_ns: default_ns = 'jabber:client' else: @@ -123,12 +128,6 @@ class ComponentXMPP(BaseXMPP): """ if xml.tag.startswith('{jabber:client}'): xml.tag = xml.tag.replace('jabber:client', self.default_ns) - - # The incoming_filter call is only made on top level stanza - # elements. So we manually continue filtering on sub-elements. - for sub in xml: - self.incoming_filter(sub) - return xml def start_stream_handler(self, xml): @@ -158,8 +157,8 @@ class ComponentXMPP(BaseXMPP): """ self.session_bind_event.set() self.session_started_event.set() - self.event("session_bind", self.boundjid, direct=True) - self.event("session_start") + self.event('session_bind', self.boundjid, direct=True) + self.event('session_start') def _handle_probe(self, pres): self.roster[pres['to']][pres['from']].handle_probe(pres) |