changeset 3209:5b02241a254e

mod_omemo_all_access: Log error when used with incompatible mod_pep
author Matthew Wild <mwild1@gmail.com>
date Fri, 03 Aug 2018 11:24:36 +0100 (2018-08-03)
parents e55172ce68d4
children 9505282ad24f
files mod_omemo_all_access/mod_omemo_all_access.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_omemo_all_access/mod_omemo_all_access.lua	Thu Aug 02 03:35:36 2018 +0200
+++ b/mod_omemo_all_access/mod_omemo_all_access.lua	Fri Aug 03 11:24:36 2018 +0100
@@ -12,6 +12,11 @@
 local mod_pep = module:depends"pep";
 local pep_data = mod_pep.module.save().data;
 
+if not pep_data then
+	module:log("error", "This module is not compatible with your version of mod_pep");
+	return false;
+end
+
 local function on_account_disco_info(event)
 	(event.reply or event.stanza):tag("feature", {var=disco_feature_namespace}):up();
 end