# HG changeset patch # User tmolitor # Date 1491437534 -7200 # Node ID 6e01878103c0e907759f5179db9c480d8f215117 # Parent e6d243ed88ca9b1b97ed7e9e2a819fc889c90de0 mod_smacks: Ignore user when writing or reading session_cache on prosody 0.9 At least under some circumstances it seems that session.username is nil when a user tries to resume his session in prosody 0.9. The username is not relevant when no limiting is done (limiting the number of entries in the session cache is only possible in prosody 0.10), so this commit removes the usage of the username when accessing the prosody 0.9 session cache. diff -r e6d243ed88ca -r 6e01878103c0 mod_cloud_notify/mod_cloud_notify.lua --- 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 diff -r e6d243ed88ca -r 6e01878103c0 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Thu Apr 06 01:41:36 2017 +0200 +++ b/mod_smacks/mod_smacks.lua Thu Apr 06 02:12:14 2017 +0200 @@ -49,8 +49,8 @@ if not cache then local store = {}; return { - get = function(user, key) return store[user.."@"..key]; end; - set = function(user, key, value) store[user.."@"..key] = value; end; + get = function(user, key) return store[key]; end; + set = function(user, key, value) store[key] = value; end; }; end