diff mod_alias/mod_alias.lua @ 2887:65082d91950e

Many modules: Simplify st.message(…):tag("body"):text(…):up() into st.message(…, …)
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 17 Feb 2018 08:42:10 +0100
parents 0c3ba5ff7a3b
children
line wrap: on
line diff
--- a/mod_alias/mod_alias.lua	Tue Feb 20 17:30:17 2018 +0100
+++ b/mod_alias/mod_alias.lua	Sat Feb 17 08:42:10 2018 +0100
@@ -26,7 +26,7 @@
 			local error_message = alias_response:gsub("%$([%w_]+)", function (v)
 					return replacements[v] or nil;
 				end);
-			local message = st.message{ type = "chat", from = alias, to = event.stanza.attr.from }:tag("body"):text(error_message);
+			local message = st.message({ type = "chat", from = alias, to = event.stanza.attr.from }, error_message);
 			module:send(message);
 			return event.origin.send(st.error_reply(event.stanza, "cancel", "gone", error_message));
 		end