aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_welcome.lua
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-05-30 20:52:22 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-05-30 20:52:22 +0100
commit1114d2d04668656c5812d46fcfa437f65db6f6ba (patch)
tree68bf64562e892cd1c56cf2955ba27bc1039e0af5 /plugins/mod_welcome.lua
parent313691a960f4ae5de54d52ba960a16cf33c6058d (diff)
downloadprosody-1114d2d04668656c5812d46fcfa437f65db6f6ba.tar.gz
prosody-1114d2d04668656c5812d46fcfa437f65db6f6ba.zip
mod_welcome: Return the pointer to the root of the stanza, fixes a bug similar to #922.
Diffstat (limited to 'plugins/mod_welcome.lua')
-rw-r--r--plugins/mod_welcome.lua4
1 files 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);