25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +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
%% 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

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
%% 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