# HG changeset patch # User Kim Alvefur # Date 1526778803 -7200 # Node ID be0754cc0ede936603a77807c471bbb1d563e182 # Parent 4aa787757235db6b0edb3821582832d47e7caa7e riddim.plugins.pubsub2room: Return early in case of unconfigured pubsub event diff -r 4aa787757235 -r be0754cc0ede plugins/pubsub2room.lua --- 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)