aboutsummaryrefslogtreecommitdiff
path: root/src/mod_disco.erl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2015-04-26 16:22:09 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2015-04-26 16:22:09 +0200
commit50f35f1b0747ba9616392b9f8011b68cda7bfa5b (patch)
tree99bd27c3549c0f5341ca87f8634cfcd15687261c /src/mod_disco.erl
parentFix validating function for iqdisc (diff)
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.
Diffstat (limited to '')
-rw-r--r--src/mod_disco.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_disco.erl b/src/mod_disco.erl
index 40f0f8e06..4231df68d 100644
--- a/src/mod_disco.erl
+++ b/src/mod_disco.erl
@@ -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,