Mercurial > prosody-modules
comparison mod_inject_ecaps2/mod_inject_ecaps2.lua @ 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 | 415455faccae |
children | ce946d9d982e |
comparison
equal
deleted
inserted
replaced
2912:6e5bd5d8a5e2 | 2913:3fb4f72b3dfd |
---|---|
60 end | 60 end |
61 | 61 |
62 local function caps_handler(event) | 62 local function caps_handler(event) |
63 local origin = event.origin; | 63 local origin = event.origin; |
64 | 64 |
65 if origin.presence:get_child("c", "urn:xmpp:caps") then | 65 if origin.presence == nil or origin.presence:get_child("c", "urn:xmpp:caps") then |
66 return; | 66 return; |
67 end | 67 end |
68 | 68 |
69 local disco_info = origin.caps_cache; | 69 local disco_info = origin.caps_cache; |
70 if disco_info == nil then | 70 if disco_info == nil then |