Changeset

3368:76fc915647ab

mod_bob: Don’t try to access XHTML-IM when it isn’t present.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 04 Nov 2018 18:38:06 +0100
parents 3367:a83eed629d4b
children 3369:fca95f1b8870
files mod_bob/mod_bob.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_bob/mod_bob.lua	Mon Oct 29 01:33:14 2018 +0100
+++ b/mod_bob/mod_bob.lua	Sun Nov 04 18:38:06 2018 +0100
@@ -87,6 +87,9 @@
 
 	-- Find and query all of the cids not already cached.
 	local tag = stanza:get_child("html", "http://jabber.org/protocol/xhtml-im");
+	if not tag then
+		return;
+	end
 	for body in tag:childtags("body", "http://www.w3.org/1999/xhtml") do
 		find_images(body, jid, room_jid, log);
 	end