aboutsummaryrefslogtreecommitdiffstats
path: root/util/stanza.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/stanza.lua')
-rw-r--r--util/stanza.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index 3d0d5002..9bcf3747 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -473,6 +473,11 @@ local function error_reply(orig, error_type, condition, error_message, error_by)
end
t:up();
if error_message then t:text_tag("text", error_message, xmpp_stanzas_attr); end
+ if extra and is_stanza(extra.tag) then
+ t:add_child(extra.tag);
+ elseif extra and extra.namespace and extra.condition then
+ t:tag(extra.condition, { xmlns = extra.namespace }):up();
+ end
return t; -- stanza ready for adding app-specific errors
end