diff 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
line wrap: on
line diff
--- a/mod_bob/mod_bob.lua	Mon Jan 30 15:07:31 2023 +0000
+++ b/mod_bob/mod_bob.lua	Fri Feb 10 12:13:47 2023 +0000
@@ -122,7 +122,7 @@
 local function iq_handler(event)
 	local stanza, origin = event.stanza, event.origin;
 	local tag = stanza.tags[1];
-	if tag.name ~= "data" or tag.attr.xmlns ~= "urn:xmpp:bob" then
+	if not tag or tag.name ~= "data" or tag.attr.xmlns ~= "urn:xmpp:bob" then
 		return nil;
 	end
 	local log = origin.log or module._log;