Mercurial > prosody-modules
comparison mod_cloud_notify/mod_cloud_notify.lua @ 2670:6e01878103c0
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.
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Thu, 06 Apr 2017 02:12:14 +0200 |
parents | e6d243ed88ca |
children | d89ab70808f6 |
comparison
equal
deleted
inserted
replaced
2669:e6d243ed88ca | 2670:6e01878103c0 |
---|---|
106 local from = stanza.attr.from; | 106 local from = stanza.attr.from; |
107 local user_push_services = push_store:get(node); | 107 local user_push_services = push_store:get(node); |
108 | 108 |
109 for push_identifier, _ in pairs(user_push_services) do | 109 for push_identifier, _ in pairs(user_push_services) do |
110 if hashes.sha256(push_identifier, true) == stanza.attr.id then | 110 if hashes.sha256(push_identifier, true) == stanza.attr.id then |
111 if user_push_services[push_identifier] and user_push_services[push_identifier].jid == from and push_errors[push_identifier] then | 111 if user_push_services[push_identifier] and user_push_services[push_identifier].jid == from and push_errors[push_identifier] > 0 then |
112 push_errors[push_identifier] = 0; | 112 push_errors[push_identifier] = 0; |
113 module:log("debug", "Push succeeded, error count for identifier '%s' is now at %s", push_identifier, tostring(push_errors[push_identifier])); | 113 module:log("debug", "Push succeeded, error count for identifier '%s' is now at %s", push_identifier, tostring(push_errors[push_identifier])); |
114 end | 114 end |
115 end | 115 end |
116 end | 116 end |