mod_cache_c2s_caps: Fail to load if module:send_iq() is not available
authorMatthew Wild <mwild1@gmail.com>
Thu, 14 Feb 2019 17:06:16 +0000
changeset 3468 13b394b0db82
parent 3467 2aaf93d2b219
child 3469 468082a9913c
mod_cache_c2s_caps: Fail to load if module:send_iq() is not available
mod_cache_c2s_caps/mod_cache_c2s_caps.lua
--- 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;