25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +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 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;
deny -> false
end.

View File

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