From 2b6f45e4c13f3299cf09f0faf2ae179b268725d0 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 1 Jun 2009 23:44:55 +0000 Subject: [PATCH] Update some calls from jlib:make_jid to exmpp_jid:make SVN Revision: 2139 --- src/ejabberd_commands.erl | 2 +- src/mod_roster.erl | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 3a94712fe..67096fb9d 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -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. diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 709174c69..9d18dd071 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -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.