From 1c53f533b09008be2ed26e3ffccc31c2609cc566 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 26 Sep 2020 18:09:10 +0200 Subject: util.stanza: Support Application-Specific Conditions in util.error --- util/stanza.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util/stanza.lua') 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 -- cgit v1.2.3