diff options
author | Kim Alvefur <zash@zash.se> | 2020-09-26 17:26:31 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-09-26 17:26:31 +0200 |
commit | 27273548aec77ac761a23426a31a089283506750 (patch) | |
tree | 2721a67a00a2adf70129199dd6e42affac3d452d /util/stanza.lua | |
parent | 05a3d574dce37d28621bfd35703b2a2283cfd1bd (diff) | |
download | prosody-27273548aec77ac761a23426a31a089283506750.tar.gz prosody-27273548aec77ac761a23426a31a089283506750.zip |
util.stanza: Support getting 'by' from util.error object
Diffstat (limited to 'util/stanza.lua')
-rw-r--r-- | util/stanza.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/stanza.lua b/util/stanza.lua index 7d45d444..3c415f20 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -456,6 +456,9 @@ local function error_reply(orig, error_type, condition, error_message, error_by) local t = reply(orig); t.attr.type = "error"; if type(error_type) == "table" then -- an util.error or similar object + if type(error_type.extra) == "table" then + if type(error_type.extra.by) == "string" then error_by = error_type.extra.by; end + end error_type, condition, error_message = error_type.type, error_type.condition, error_type.text; end if t.attr.from == error_by then |