Software /
code /
prosody
Diff
util/xmppstream.lua @ 3927:1b57e83266f0
util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 21 Dec 2010 14:44:13 +0000 |
parent | 3708:2dcb86c7cee7 |
child | 3987:8fbf57722368 |
child | 4275:5305a665bdd4 |
line wrap: on
line diff
--- a/util/xmppstream.lua Tue Dec 21 05:05:20 2010 +0000 +++ b/util/xmppstream.lua Tue Dec 21 14:44:13 2010 +0000 @@ -45,7 +45,10 @@ local cb_handlestanza = stream_callbacks.handlestanza; local stream_ns = stream_callbacks.stream_ns or xmlns_streams; - local stream_tag = stream_ns..ns_separator..(stream_callbacks.stream_tag or "stream"); + local stream_tag = stream_callbacks.stream_tag or "stream"; + if stream_ns ~= "" then + stream_tag = stream_ns..ns_separator..stream_tag; + end local stream_error_tag = stream_ns..ns_separator..(stream_callbacks.error_tag or "error"); local stream_default_ns = stream_callbacks.default_ns;