aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/stanza.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index a8a417ab..7d45d444 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -455,12 +455,12 @@ local function error_reply(orig, error_type, condition, error_message, error_by)
end
local t = reply(orig);
t.attr.type = "error";
- if t.attr.from == error_by then
- error_by = nil;
- end
if type(error_type) == "table" then -- an util.error or similar object
error_type, condition, error_message = error_type.type, error_type.condition, error_type.text;
end
+ if t.attr.from == error_by then
+ error_by = nil;
+ end
t:tag("error", {type = error_type, by = error_by}) --COMPAT: Some day xmlns:stanzas goes here
:tag(condition, xmpp_stanzas_attr):up();
if error_message then t:text_tag("text", error_message, xmpp_stanzas_attr); end