mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua
changeset 4333 2a5164162708
parent 4331 beb3342f1137
child 4334 e655581173be
--- a/mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua	Wed Jan 13 14:09:18 2021 +0000
+++ b/mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua	Wed Jan 13 14:15:38 2021 +0000
@@ -18,7 +18,7 @@
 module:hook("account-disco-info", account_disco_info);
 
 function handle_register(event)
-	local encrypt = event.stanza:get_child("encrypt", xmlns_push_encrypt);
+	local encrypt = event.stanza:get_child("enable", xmlns_push):get_child("encrypt", xmlns_push_encrypt);
 	if not encrypt then return; end
 
 	local algorithm = encrypt.attr.alg;