From ec9e9df9c7cb152c83fc3a2adf40228443cf1799 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(-) 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