mod_sms_clickatell/mod_sms_clickatell.lua
changeset 2891 65082d91950e
parent 2878 178b8abf8283
child 3357 e8d6f602f382
--- a/mod_sms_clickatell/mod_sms_clickatell.lua	Tue Feb 20 17:30:17 2018 +0100
+++ b/mod_sms_clickatell/mod_sms_clickatell.lua	Sat Feb 17 08:42:10 2018 +0100
@@ -150,7 +150,7 @@
 function dmsg(jid, msg)
 	module:log("debug", msg or "nil");
 	if jid ~= nil then
-		send_stanza(st.message({to=jid, from=component_host, type='chat'}):tag("body"):text(msg or "nil"):up());
+		send_stanza(st.message({to=jid, from=component_host, type='chat'}, msg or "nil"));
 	end
 end
 
@@ -498,7 +498,7 @@
 	-- Now parse the message
 	if stanza.attr.to == component_host then
 		-- Messages directly to the component jget echoed
-		origin.send(st.message({to=stanza.attr.from, from=component_host, type='chat'}):tag("body"):text(msg.body):up());
+		origin.send(st.message({to=stanza.attr.from, from=component_host, type='chat'}, msg.body));
 	elseif users[from_bjid].data.roster[to.node] ~= nil then
 		-- If message contains a body, send message to SMS Test User
 		if msg.body ~= nil then