2 |
2 |
3 local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; |
3 local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; |
4 local xmlns_pubsub_event = xmlns_pubsub.."#event"; |
4 local xmlns_pubsub_event = xmlns_pubsub.."#event"; |
5 |
5 |
6 function verse.plugins.pep(stream) |
6 function verse.plugins.pep(stream) |
|
7 stream:add_plugin("disco"); |
7 stream:add_plugin("pubsub"); |
8 stream:add_plugin("pubsub"); |
8 stream.pep = {}; |
9 stream.pep = {}; |
9 |
10 |
10 stream:hook("pubsub/event", function(event) |
11 stream:hook("pubsub/event", function(event) |
11 return stream:event("pep/"..event.node, { from = event.from, item = event.item.tags[1] } ); |
12 return stream:event("pep/"..event.node, { from = event.from, item = event.item.tags[1] } ); |