25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Merge pull request #352 from weiss/no-last-pep-duplicates

Don't duplicate last published PEP items
This commit is contained in:
Evgeny Khramtsov 2014-11-25 14:19:53 +03:00
commit 6279c3fd8d
2 changed files with 12 additions and 4 deletions

View File

@ -1179,8 +1179,12 @@ presence_probe(#jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}, _Pid)
%% ignore presence_probe from my other ressources %% ignore presence_probe from my other ressources
%% to not get duplicated last items %% to not get duplicated last items
ok; ok;
presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = Host} = JID, _Pid) -> presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = S} = JID, _Pid) ->
presence(Host, {presence, U, S, [R], JID}). 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) -> presence(ServerHost, Presence) ->
SendLoop = case SendLoop = case

View File

@ -830,8 +830,12 @@ presence_probe(#jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}, _Pid)
%% ignore presence_probe from my other ressources %% ignore presence_probe from my other ressources
%% to not get duplicated last items %% to not get duplicated last items
ok; ok;
presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = Host} = JID, _Pid) -> presence_probe(#jid{luser = U, lserver = S, lresource = R}, #jid{lserver = S} = JID, _Pid) ->
presence(Host, {presence, U, S, [R], JID}). 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) -> presence(ServerHost, Presence) ->
SendLoop = case SendLoop = case