util/stanza.lua
changeset 11087 4d12a6785531
parent 11086 c26599a78fae
child 11088 5e09a3389adb
--- a/util/stanza.lua	Sat Sep 26 17:18:17 2020 +0200
+++ b/util/stanza.lua	Sat Sep 26 17:26:31 2020 +0200
@@ -456,6 +456,9 @@
 	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