# HG changeset patch # User Kim Alvefur # Date 1313887810 -7200 # Node ID 2fa4d58349c89a9f0a06a529d94039b25b667472 # Parent 7ec6df0e0ed0f3e2857c87faeb8bf1fcffc07cd3 plugins.pubsub2room: Hook pubsub events directly on the stream. diff -r 7ec6df0e0ed0 -r 2fa4d58349c8 plugins/pubsub2room.lua --- a/plugins/pubsub2room.lua Wed Jul 20 01:16:34 2011 +0200 +++ b/plugins/pubsub2room.lua Sun Aug 21 02:50:10 2011 +0200 @@ -43,10 +43,10 @@ function riddim.plugins.pubsub2room(bot) local bare_jid = require "util.jid".bare; - bot:add_plugin("pubsub"); + bot.stream:add_plugin("pubsub"); local config = bot.config.pubsub2room; - bot:hook("pubsub/event", function(event) + bot.stream:hook("pubsub/event", function(event) local conf = config[event.from .. "#" .. event.node]; local room = bot.rooms[conf.room]; local data = st.stanza(""):tag("id"):text(event.item.attr.id);