plugins/carbons.lua

changeset 285
99737531734c
parent 277
0d34cd815a93
child 286
04b6c060ff01
equal deleted inserted replaced
284:c78d1780f1d2 285:99737531734c
47 end); 47 end);
48 48
49 stream:hook("message", function(stanza) 49 stream:hook("message", function(stanza)
50 local carbon_dir = stanza:get_child(nil, xmlns_carbons); 50 local carbon_dir = stanza:get_child(nil, xmlns_carbons);
51 if stanza.attr.from == my_bare and carbon_dir then 51 if stanza.attr.from == my_bare and carbon_dir then
52 carbon_dir = carbon_dir and carbon_dir.name; 52 carbon_dir = carbon_dir.name;
53 local fwd = stanza:get_child("forwarded", xmlns_forward); 53 local fwd = stanza:get_child("forwarded", xmlns_forward);
54 local fwd_stanza = fwd and fwd:get_child("message", "jabber:client"); 54 local fwd_stanza = fwd and fwd:get_child("message", "jabber:client");
55 if fwd_stanza then 55 if fwd_stanza then
56 return stream:event("carbon", { 56 return stream:event("carbon", {
57 dir = carbon_dir, 57 dir = carbon_dir,

mercurial