From 1114d2d04668656c5812d46fcfa437f65db6f6ba Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 30 May 2017 20:52:22 +0100 Subject: mod_welcome: Return the pointer to the root of the stanza, fixes a bug similar to #922. --- plugins/mod_welcome.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mod_welcome.lua') diff --git a/plugins/mod_welcome.lua b/plugins/mod_welcome.lua index e498f0b3..c4ebaf30 100644 --- a/plugins/mod_welcome.lua +++ b/plugins/mod_welcome.lua @@ -14,8 +14,8 @@ local st = require "util.stanza"; module:hook("user-registered", function (user) local welcome_stanza = - st.message({ to = user.username.."@"..user.host, from = host }) - :tag("body"):text(welcome_text:gsub("$(%w+)", user)); + st.message({ to = user.username.."@"..user.host, from = host }, + welcome_text:gsub("$(%w+)", user)); module:send(welcome_stanza); module:log("debug", "Welcomed user %s@%s", user.username, user.host); end); -- cgit v1.2.3