mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua
changeset 5058 62480053c87b
parent 4655 8231774f5bfd
child 5059 3b609eaf0db5
--- a/mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua	Fri Sep 23 22:40:54 2022 +0100
+++ b/mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua	Fri Sep 23 22:41:15 2022 +0100
@@ -52,6 +52,8 @@
 		return false;
 	end
 
+	module:log("debug", "Encrypted push notifications enabled");
+
 	event.push_info.encryption = {
 		algorithm = algorithm;
 		key_base64 = key_base64;
@@ -60,7 +62,10 @@
 
 function handle_push(event)
 	local encryption = event.push_info.encryption;
-	if not encryption then return; end
+	if not encryption then
+		module:log("debug", "Encryption not enabled for this notification");
+		return;
+	end
 
 	if encryption.algorithm ~= "aes-128-gcm" then
 		event.reason = "Unsupported encryption algorithm: "..tostring(encryption.algorithm);