Changeset

2913:3fb4f72b3dfd

mod_inject_ecaps2: Check for unset presence
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 07 Mar 2018 20:47:27 +0100
parents 2912:6e5bd5d8a5e2
children 2914:0d2d4d5bb5f5
files mod_inject_ecaps2/mod_inject_ecaps2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_inject_ecaps2/mod_inject_ecaps2.lua	Wed Mar 07 20:17:56 2018 +0100
+++ b/mod_inject_ecaps2/mod_inject_ecaps2.lua	Wed Mar 07 20:47:27 2018 +0100
@@ -62,7 +62,7 @@
 local function caps_handler(event)
 	local origin = event.origin;
 
-	if origin.presence:get_child("c", "urn:xmpp:caps") then
+	if origin.presence == nil or origin.presence:get_child("c", "urn:xmpp:caps") then
 		return;
 	end