plugins/pubsub2room.lua

changeset 99
072509afc701
parent 88
b7f628541981
child 104
8202cdfb99b4
equal deleted inserted replaced
98:1f365028aae1 99:072509afc701
70 -- FIXME When to unsubscribe? 70 -- FIXME When to unsubscribe?
71 bot:hook("started", function() 71 bot:hook("started", function()
72 local jid = bare_jid(bot.stream.jid); 72 local jid = bare_jid(bot.stream.jid);
73 for hostnode in pairs(config) do 73 for hostnode in pairs(config) do
74 local host, node = hostnode:match("^([^#]+)#(.*)"); 74 local host, node = hostnode:match("^([^#]+)#(.*)");
75 bot.stream.pubsub:subscribe(host, node, jid, print); 75 bot.stream.pubsub(host, node):subscribe(jid, print);
76 end 76 end
77 end); 77 end);
78 end 78 end

mercurial