diff options
author | Evgeny Khramtsov <xramtsov@gmail.com> | 2014-11-25 14:19:53 +0300 |
---|---|---|
committer | Evgeny Khramtsov <xramtsov@gmail.com> | 2014-11-25 14:19:53 +0300 |
commit | 6279c3fd8d46e5ecfb953b5f41550647773f7613 (patch) | |
tree | 58028956c4745f001c3a85a3b33311155e6c00fd /src | |
parent | b85357d280d8f53a45cc2b4bf4477661763bb6b0 (diff) | |
parent | 84c227e6aec21274427e0b230d33d38cecb53f0b (diff) |
Merge pull request #352 from weiss/no-last-pep-duplicates
Don't duplicate last published PEP items
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_pubsub.erl | 8 | ||||
-rw-r--r-- | src/mod_pubsub_odbc.erl | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index e6437199b..8ba28e051 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -1179,8 +1179,12 @@ presence_probe(#jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}, _Pid) %% ignore presence_probe from my other ressources %% to not get duplicated last items ok; -presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = Host} = JID, _Pid) -> - presence(Host, {presence, U, S, [R], JID}). +presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = S} = JID, _Pid) -> + presence(S, {presence, U, S, [R], JID}); +presence_probe(_Host, _JID, _Pid) -> + %% ignore presence_probe from remote contacts, + %% those are handled via caps_update + ok. presence(ServerHost, Presence) -> SendLoop = case diff --git a/src/mod_pubsub_odbc.erl b/src/mod_pubsub_odbc.erl index e2b357f03..30016c24a 100644 --- a/src/mod_pubsub_odbc.erl +++ b/src/mod_pubsub_odbc.erl @@ -830,8 +830,12 @@ presence_probe(#jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}, _Pid) %% ignore presence_probe from my other ressources %% to not get duplicated last items ok; -presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = Host} = JID, _Pid) -> - presence(Host, {presence, U, S, [R], JID}). +presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = S} = JID, _Pid) -> + presence(S, {presence, U, S, [R], JID}); +presence_probe(_Host, _JID, _Pid) -> + %% ignore presence_probe from remote contacts, + %% those are handled via caps_update + ok. presence(ServerHost, Presence) -> SendLoop = case |