25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix service disco handling for bare account JIDs

Don't swap the sending and receiving JIDs while checking whether the
client that requested service discovery information for a bare account
JID is a subscribed contact.
This commit is contained in:
Holger Weiss 2015-04-26 16:22:09 +02:00
parent 9c85cb5f25
commit 50f35f1b07

View File

@ -357,13 +357,13 @@ is_presence_subscribed(#jid{luser = User,
#jid{luser = LUser, lserver = LServer}) ->
lists:any(fun (#roster{jid = {TUser, TServer, _},
subscription = S}) ->
if LUser == TUser, LServer == TServer, S /= none ->
if User == TUser, Server == TServer, S /= none ->
true;
true -> false
end
end,
ejabberd_hooks:run_fold(roster_get, Server, [],
[{User, Server}]))
ejabberd_hooks:run_fold(roster_get, LServer, [],
[{LUser, LServer}]))
orelse User == LUser andalso Server == LServer.
process_sm_iq_info(From, To,