mod_cloud_notify/mod_cloud_notify.lua
changeset 2674 6e01878103c0
parent 2673 e6d243ed88ca
child 2716 d89ab70808f6
--- a/mod_cloud_notify/mod_cloud_notify.lua	Thu Apr 06 01:41:36 2017 +0200
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Thu Apr 06 02:12:14 2017 +0200
@@ -108,7 +108,7 @@
 
 	for push_identifier, _ in pairs(user_push_services) do
 		if hashes.sha256(push_identifier, true) == stanza.attr.id then
-			if user_push_services[push_identifier] and user_push_services[push_identifier].jid == from and push_errors[push_identifier] then
+			if user_push_services[push_identifier] and user_push_services[push_identifier].jid == from and push_errors[push_identifier] > 0 then
 				push_errors[push_identifier] = 0;
 				module:log("debug", "Push succeeded, error count for identifier '%s' is now at %s", push_identifier, tostring(push_errors[push_identifier]));
 			end