mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Use #roster record instead of direct tuple
This commit is contained in:
parent
cc0aa707c4
commit
369fefd5a8
@ -49,6 +49,7 @@
|
|||||||
|
|
||||||
-include("ejabberd.hrl").
|
-include("ejabberd.hrl").
|
||||||
-include("jlib.hrl").
|
-include("jlib.hrl").
|
||||||
|
-include("mod_roster.hrl").
|
||||||
|
|
||||||
start(Host, Opts) ->
|
start(Host, Opts) ->
|
||||||
ejabberd_local:refresh_iq_handlers(),
|
ejabberd_local:refresh_iq_handlers(),
|
||||||
@ -327,7 +328,7 @@ get_sm_items(empty, From, To, _Node, _Lang) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
is_presence_subscribed(#jid{luser=User, lserver=Server}, #jid{luser=LUser, lserver=LServer}) ->
|
is_presence_subscribed(#jid{luser=User, lserver=Server}, #jid{luser=LUser, lserver=LServer}) ->
|
||||||
lists:any(fun({roster, _, _, {TUser, TServer, _}, _, S, _, _, _, _}) ->
|
lists:any(fun(#roster{jid = {TUser, TServer, _}, subscription = S}) ->
|
||||||
if
|
if
|
||||||
LUser == TUser, LServer == TServer, S/=none ->
|
LUser == TUser, LServer == TServer, S/=none ->
|
||||||
true;
|
true;
|
||||||
|
Loading…
Reference in New Issue
Block a user