plugins/pubsub2room.lua

changeset 141
be0754cc0ede
parent 139
6de453570270
child 142
211fa13c7ca2
--- a/plugins/pubsub2room.lua	Sun May 20 02:16:48 2018 +0200
+++ b/plugins/pubsub2room.lua	Sun May 20 03:13:23 2018 +0200
@@ -50,6 +50,7 @@
 	local config = bot.config.pubsub2room;
 	bot.stream:hook("pubsub/event", function(event)
 		local conf = config[event.from .. "#" .. event.node];
+		if not conf then return end
 		local room = bot.rooms[conf.room];
 		local data = st.stanza(""):tag("id"):text(event.item.attr.id);
 		local entry = event.item and new_extractor(event.item.tags[1], data)

mercurial