comparison mod_carbons/mod_carbons.lua @ 511:928fe4d91333

mod_storage_mongodb: (un)lock globals around require; only auth if we need to
author James Callahan <james@chatid.com>
date Mon, 19 Dec 2011 10:40:28 +1100
parents 59e80326f2b3
children 6fa8436f8ee3
comparison
equal deleted inserted replaced
509:bf2ad6d6c778 511:928fe4d91333
80 to = full_jid, 80 to = full_jid,
81 type = orig_type, 81 type = orig_type,
82 } 82 }
83 :tag("forwarded", { xmlns = xmlns_forward }) 83 :tag("forwarded", { xmlns = xmlns_forward })
84 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons }):up() 84 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons }):up()
85 :add_child(msg); 85 :add_child(msg);
86 core_post_stanza(origin, fwd); 86 core_post_stanza(origin, fwd);
87 end 87 end
88 end 88 end
89 end 89 end
90 end 90 end
95 end 95 end
96 96
97 -- Stanzas sent by local clients 97 -- Stanzas sent by local clients
98 module:hook("pre-message/bare", c2s_message_handler, 1); 98 module:hook("pre-message/bare", c2s_message_handler, 1);
99 module:hook("pre-message/full", c2s_message_handler, 1); 99 module:hook("pre-message/full", c2s_message_handler, 1);
100 -- Stanszas to local clients 100 -- Stanzas to local clients
101 module:hook("message/bare", message_handler, 1); 101 module:hook("message/bare", message_handler, 1);
102 module:hook("message/full", message_handler, 1); 102 module:hook("message/full", message_handler, 1);
103 103
104 module:add_feature(xmlns_carbons); 104 module:add_feature(xmlns_carbons);