Sun, 20 May 2018 01:57:58 +0200
riddim.plugins.pubsub2room: Return early from extractor if no stanza given
plugins/pubsub2room.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/pubsub2room.lua Sun May 20 01:49:58 2018 +0200 +++ b/plugins/pubsub2room.lua Sun May 20 01:57:58 2018 +0200 @@ -36,7 +36,8 @@ }; local function new_extractor(stanza, data) - return stanza and setmetatable({ stanza = stanza, data = data }, extractor_mt) or nil; + if not stanza then return nil end + return setmetatable({ stanza = stanza, data = data }, extractor_mt); end local last_message_time = 0;