aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/error.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/error.lua b/util/error.lua
index c2b7d149..0fe6cfa2 100644
--- a/util/error.lua
+++ b/util/error.lua
@@ -96,7 +96,8 @@ local function from_stanza(stanza, context)
local error_tag = stanza:get_child("error");
context = context or {};
context.stanza = stanza;
- context.by = error_tag.attr.by;
+ context.by = error_tag.attr.by or stanza.attr.from;
+
return setmetatable({
type = error_type or "cancel";
condition = condition or "undefined-condition";