comparison plugins/mod_message.lua @ 7719:17c7e3ac47f7

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 17 Nov 2016 23:20:41 +0100
parents c58075c4d375
children beaeafedc2d7
comparison
equal deleted inserted replaced
7717:9c8eb0239eef 7719:17c7e3ac47f7
71 if session and session.send(stanza) then 71 if session and session.send(stanza) then
72 return true; 72 return true;
73 else -- resource not online 73 else -- resource not online
74 return process_to_bare(jid_bare(stanza.attr.to), origin, stanza); 74 return process_to_bare(jid_bare(stanza.attr.to), origin, stanza);
75 end 75 end
76 end); 76 end, -1);
77 77
78 module:hook("message/bare", function(data) 78 module:hook("message/bare", function(data)
79 -- message to bare JID recieved 79 -- message to bare JID recieved
80 local origin, stanza = data.origin, data.stanza; 80 local origin, stanza = data.origin, data.stanza;
81 81
82 return process_to_bare(stanza.attr.to or (origin.username..'@'..origin.host), origin, stanza); 82 return process_to_bare(stanza.attr.to or (origin.username..'@'..origin.host), origin, stanza);
83 end); 83 end, -1);
84 84
85 module:add_feature("msgoffline"); 85 module:add_feature("msgoffline");