# HG changeset patch # User Matthew Wild # Date 1663969275 -3600 # Node ID 62480053c87bafddf74f9e8218f50b1fc367f8dc # Parent 00e8cc6860cb3bb66871064463a65bbcf7a5b6a3 mod_cloud_notify_encrypted: Additional debug logging when enabling/skipping diff -r 00e8cc6860cb -r 62480053c87b mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua --- 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);