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:
parent
9c85cb5f25
commit
50f35f1b07
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user