diff options
author | Kim Alvefur <zash@zash.se> | 2020-09-26 18:09:10 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-09-26 18:09:10 +0200 |
commit | 1c53f533b09008be2ed26e3ffccc31c2609cc566 (patch) | |
tree | dee52ffe239a67fec2c369374320904f2cbfbf1f /util | |
parent | 8c0efc9e55d0980e2ce5872da325724aeaec5dba (diff) | |
download | prosody-1c53f533b09008be2ed26e3ffccc31c2609cc566.tar.gz prosody-1c53f533b09008be2ed26e3ffccc31c2609cc566.zip |
util.stanza: Support Application-Specific Conditions in util.error
Diffstat (limited to 'util')
-rw-r--r-- | util/stanza.lua | 5 |
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 |