comparison mod_bob/mod_bob.lua @ 5163:41fbed2de482

mod_bob: Fix traceback when iq has no payload (thanks meaz)
author Matthew Wild <mwild1@gmail.com>
date Fri, 10 Feb 2023 12:13:47 +0000
parents 76fc915647ab
children
comparison
equal deleted inserted replaced
5162:243c156074d3 5163:41fbed2de482
120 end 120 end
121 121
122 local function iq_handler(event) 122 local function iq_handler(event)
123 local stanza, origin = event.stanza, event.origin; 123 local stanza, origin = event.stanza, event.origin;
124 local tag = stanza.tags[1]; 124 local tag = stanza.tags[1];
125 if tag.name ~= "data" or tag.attr.xmlns ~= "urn:xmpp:bob" then 125 if not tag or tag.name ~= "data" or tag.attr.xmlns ~= "urn:xmpp:bob" then
126 return nil; 126 return nil;
127 end 127 end
128 local log = origin.log or module._log; 128 local log = origin.log or module._log;
129 local cid = tag.attr.cid; 129 local cid = tag.attr.cid;
130 if not cid then 130 if not cid then