Diff

mod_cache_c2s_caps/mod_cache_c2s_caps.lua @ 3464:13b394b0db82

mod_cache_c2s_caps: Fail to load if module:send_iq() is not available
author Matthew Wild <mwild1@gmail.com>
date Thu, 14 Feb 2019 17:06:16 +0000
parent 3456:b85622b577ad
child 3475:820c891a54cc
line wrap: on
line diff
--- a/mod_cache_c2s_caps/mod_cache_c2s_caps.lua	Wed Feb 13 15:52:58 2019 +0100
+++ b/mod_cache_c2s_caps/mod_cache_c2s_caps.lua	Thu Feb 14 17:06:16 2019 +0000
@@ -8,6 +8,8 @@
 -- Some clients (*ahem* poezio…) don’t include the @node in their result iq.
 local iq_node_map = {}
 
+assert(module.send_iq, "This module is not compatible with this version of Prosody.");
+
 local function iq_result_handler(event)
 	local origin, stanza = event.origin, event.stanza;