aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-02-25 00:07:38 +0000
committerMatthew Wild <mwild1@gmail.com>2011-02-25 00:07:38 +0000
commit1370dd825c4e38407c67636ab6f947a722457444 (patch)
tree3af8e71ecacb86a5392832d40c2ee6125924d4c4 /plugins/mod_pep.lua
parent81d4287169cae382f98d98d1bc9cc7bc8819f11a (diff)
downloadprosody-1370dd825c4e38407c67636ab6f947a722457444.tar.gz
prosody-1370dd825c4e38407c67636ab6f947a722457444.zip
mod_pep: Fix comparison between incoming hash and the cached hash for a JID, fixes repeated PEP events on presence (fixes #225)
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 9ff6cac2..bd6f4b29 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -124,7 +124,7 @@ module:hook("presence/bare", function(event)
local recipient = stanza.attr.from;
local current = recipients[user] and recipients[user][recipient];
local hash = get_caps_hash_from_presence(stanza, current);
- if current == hash then return; end
+ if current == hash or (current and current == hash_map[hash]) then return; end
if not hash then
if recipients[user] then recipients[user][recipient] = nil; end
else