Comparison

plugins/mod_message.lua @ 7718:c58075c4d375

mod_message, mod_carbons: Adjust event hook priorities to negative (core modules should do this to make overriding from other modules easier)
author Kim Alvefur <zash@zash.se>
date Thu, 17 Nov 2016 22:38:46 +0100
parent 5776:bd0ff8ae98a8
child 7956:beaeafedc2d7
comparison
equal deleted inserted replaced
7716:779a9ef6b4fd 7718:c58075c4d375
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");