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

Update some calls from jlib:make_jid to exmpp_jid:make

SVN Revision: 2139
This commit is contained in:
Badlop 2009-06-01 23:44:55 +00:00
parent 332de67fe2
commit 2b6f45e4c1
2 changed files with 6 additions and 4 deletions

View File

@ -394,7 +394,7 @@ get_md5(AccountPass) ->
check_access(Access, User, Server) -> check_access(Access, User, Server) ->
%% Check this user has access permission %% Check this user has access permission
case acl:match_rule(Server, Access, jlib:make_jid(User, Server, "")) of case acl:match_rule(Server, Access, exmpp_jid:make(User, Server, "")) of
allow -> true; allow -> true;
deny -> false deny -> false
end. end.

View File

@ -707,7 +707,7 @@ remove_user(User, Server)
%% Both or To, send a "unsubscribe" presence stanza. %% Both or To, send a "unsubscribe" presence stanza.
send_unsubscription_to_rosteritems(LUser, LServer) -> send_unsubscription_to_rosteritems(LUser, LServer) ->
RosterItems = get_user_roster([], {LUser, LServer}), RosterItems = get_user_roster([], {LUser, LServer}),
From = jlib:make_jid({LUser, LServer, ""}), From = exmpp_jid:make(LUser, LServer, ""),
lists:foreach(fun(RosterItem) -> lists:foreach(fun(RosterItem) ->
send_unsubscribing_presence(From, RosterItem) send_unsubscribing_presence(From, RosterItem)
end, end,
@ -725,16 +725,18 @@ send_unsubscribing_presence(From, Item) ->
from -> true; from -> true;
_ -> false _ -> false
end, end,
{INode, IDom, IRes} = Item#roster.jid,
SendToJID = exmpp_jid:make(INode, IDom, IRes),
if IsTo -> if IsTo ->
send_presence_type( send_presence_type(
jlib:jid_remove_resource(From), jlib:jid_remove_resource(From),
jlib:make_jid(Item#roster.jid), "unsubscribe"); SendToJID, "unsubscribe");
true -> ok true -> ok
end, end,
if IsFrom -> if IsFrom ->
send_presence_type( send_presence_type(
jlib:jid_remove_resource(From), jlib:jid_remove_resource(From),
jlib:make_jid(Item#roster.jid), "unsubscribed"); SendToJID, "unsubscribed");
true -> ok true -> ok
end, end,
ok. ok.