From 447d3818f51ef719289488d87763653442065607 Mon Sep 17 00:00:00 2001 From: Karim Gemayel Date: Mon, 1 Jun 2009 16:26:00 +0000 Subject: [PATCH] API renaming : make_jid -> make SVN Revision: 2119 --- src/ejabberd_c2s.erl | 20 ++++++------- src/ejabberd_s2s.erl | 4 +-- src/ejabberd_s2s_in.erl | 2 +- src/ejabberd_sm.erl | 4 +-- src/ejabberd_system_monitor.erl | 2 +- src/jd2ejd.erl | 10 +++---- src/jlib.erl | 2 +- src/mod_announce.erl | 14 ++++----- src/mod_caps.erl | 2 +- src/mod_configure.erl | 2 +- src/mod_irc/mod_irc_connection.erl | 48 +++++++++++++++--------------- src/mod_muc/mod_muc_room.erl | 8 ++--- src/mod_privacy.erl | 8 ++--- src/mod_privacy_odbc.erl | 8 ++--- src/mod_pubsub/mod_pubsub.erl | 16 +++++----- src/mod_pubsub/node_flat.erl | 2 +- src/mod_pubsub/node_hometree.erl | 2 +- src/mod_pubsub/node_pep.erl | 2 +- src/mod_register.erl | 14 ++++----- src/mod_roster.erl | 26 ++++++++-------- src/mod_roster_odbc.erl | 26 ++++++++-------- src/mod_service_log.erl | 4 +-- src/mod_shared_roster.erl | 20 ++++++------- src/web/ejabberd_http_poll.erl | 4 +-- src/web/ejabberd_web_admin.erl | 4 +-- 25 files changed, 127 insertions(+), 127 deletions(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 6183af374..477aeffc0 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -241,7 +241,7 @@ wait_for_stream({xmlstreamstart, #xmlel{ns = NS} = Opening}, StateData) -> true -> Lang = exmpp_stream:get_lang(Opening), change_shaper(StateData, - exmpp_jid:make_jid(ServerB)), + exmpp_jid:make(ServerB)), case exmpp_stream:get_version(Opening) of {1, 0} -> send_element(StateData, Header), @@ -401,7 +401,7 @@ wait_for_auth({xmlstreamelement, El}, StateData) -> fsm_next_state(wait_for_auth, StateData); {auth, _ID, set, {U, P, D, R}} -> try - JID = exmpp_jid:make_jid(U, StateData#state.server, R), + JID = exmpp_jid:make(U, StateData#state.server, R), UBinary = exmpp_jid:lnode(JID), case acl:match_rule(ServerString, StateData#state.access, JID) of @@ -421,7 +421,7 @@ wait_for_auth({xmlstreamelement, El}, StateData) -> Info = [{ip, StateData#state.ip}, {conn, Conn}, {auth_module, AuthModule}], ejabberd_sm:open_session( - SID, exmpp_jid:make_jid(U, StateData#state.server, R), Info), + SID, exmpp_jid:make(U, StateData#state.server, R), Info), Res = exmpp_server_legacy_auth:success(El), send_element(StateData, Res), change_shaper(StateData, JID), @@ -692,7 +692,7 @@ wait_for_bind({xmlstreamelement, El}, StateData) -> Resource -> Resource end, - JID = exmpp_jid:make_jid(StateData#state.user, StateData#state.server, R), + JID = exmpp_jid:make(StateData#state.user, StateData#state.server, R), Res = exmpp_server_binding:bind(El, JID), send_element(StateData, Res), fsm_next_state(wait_for_session, @@ -1107,7 +1107,7 @@ handle_info({route, From, To, Packet}, StateName, StateData) -> ?DEBUG("broadcast~n~p~n", [Packet#xmlel.children]), case Packet#xmlel.children of [{item, {U, S, R} = _IJIDShort, ISubscription}] -> - IJID = exmpp_jid:make_jid(U, + IJID = exmpp_jid:make(U, S, R), {false, Attrs, @@ -1586,7 +1586,7 @@ is_privacy_allow(From, To, Packet, PrivacyList) -> presence_broadcast(StateData, From, JIDSet, Packet) -> lists:foreach(fun({U, S, R}) -> - FJID = exmpp_jid:make_jid(U, S, R), + FJID = exmpp_jid:make(U, S, R), case ejabberd_hooks:run_fold( privacy_check_packet, StateData#state.server, allow, @@ -1607,7 +1607,7 @@ presence_broadcast_to_trusted(StateData, From, T, A, Packet) -> fun({U, S, R} = JID) -> case ?SETS:is_element(JID, T) of true -> - FJID = exmpp_jid:make_jid(U, S, R), + FJID = exmpp_jid:make(U, S, R), case ejabberd_hooks:run_fold( privacy_check_packet, StateData#state.server, allow, @@ -1630,7 +1630,7 @@ presence_broadcast_to_trusted(StateData, From, T, A, Packet) -> presence_broadcast_first(From, StateData, Packet) -> Probe = exmpp_presence:probe(), ?SETS:fold(fun({U, S, R}, X) -> - FJID = exmpp_jid:make_jid(U, S, R), + FJID = exmpp_jid:make(U, S, R), ejabberd_router:route( From, FJID, @@ -1645,7 +1645,7 @@ presence_broadcast_first(From, StateData, Packet) -> true -> As = ?SETS:fold( fun({U, S, R} = JID, A) -> - FJID = exmpp_jid:make_jid(U, S, R), + FJID = exmpp_jid:make(U, S, R), case ejabberd_hooks:run_fold( privacy_check_packet, StateData#state.server, allow, @@ -1869,7 +1869,7 @@ process_unauthenticated_stanza(StateData, El) when ?IS_IQ(El) -> ResIQ = exmpp_iq:error_without_original(El, 'service-unavailable'), Res1 = exmpp_stanza:set_sender(ResIQ, - exmpp_jid:make_jid(StateData#state.server)), + exmpp_jid:make(StateData#state.server)), Res2 = exmpp_stanza:remove_recipient(Res1), send_element(StateData, Res2); _ -> diff --git a/src/ejabberd_s2s.erl b/src/ejabberd_s2s.erl index 835f4db4a..e21511fcb 100644 --- a/src/ejabberd_s2s.erl +++ b/src/ejabberd_s2s.erl @@ -408,14 +408,14 @@ new_connection(MyServer, Server, From, FromTo, max_s2s_connections_number({From, To}) -> case acl:match_rule( - From, max_s2s_connections, exmpp_jid:make_jid(To)) of + From, max_s2s_connections, exmpp_jid:make(To)) of Max when is_integer(Max) -> Max; _ -> ?DEFAULT_MAX_S2S_CONNECTIONS_NUMBER end. max_s2s_connections_number_per_node({From, To}) -> case acl:match_rule( - From, max_s2s_connections_per_node, exmpp_jid:make_jid(To)) of + From, max_s2s_connections_per_node, exmpp_jid:make(To)) of Max when is_integer(Max) -> Max; _ -> ?DEFAULT_MAX_S2S_CONNECTIONS_NUMBER_PER_NODE end. diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl index 0676abbcc..0a0a9e46a 100644 --- a/src/ejabberd_s2s_in.erl +++ b/src/ejabberd_s2s_in.erl @@ -346,7 +346,7 @@ stream_established({xmlstreamelement, El}, StateData) -> Conns = ?DICT:store({LFrom, LTo}, wait_for_verification, StateData#state.connections), change_shaper(StateData, LTo, - exmpp_jid:make_jid(LFrom)), + exmpp_jid:make(LFrom)), {next_state, stream_established, StateData#state{connections = Conns, diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl index d2f415d66..6cc7c20c5 100644 --- a/src/ejabberd_sm.erl +++ b/src/ejabberd_sm.erl @@ -142,8 +142,8 @@ bounce_offline_message(From, To, Packet) -> stop. disconnect_removed_user(User, Server) -> - ejabberd_sm:route(exmpp_jid:make_jid(), - exmpp_jid:make_jid(User, + ejabberd_sm:route(exmpp_jid:make(), + exmpp_jid:make(User, Server), #xmlel{name = 'broadcast', children = [{exit, "User removed"}]}). diff --git a/src/ejabberd_system_monitor.erl b/src/ejabberd_system_monitor.erl index 6d5a03b81..cfd8c381b 100644 --- a/src/ejabberd_system_monitor.erl +++ b/src/ejabberd_system_monitor.erl @@ -190,7 +190,7 @@ process_large_heap(Pid, Info) -> "(~w) The process ~w is consuming too much memory:~n~p~n" "~s", [node(), Pid, Info, DetailedInfo]), - From = exmpp_jid:make_jid(undefined, Host, <<"watchdog">>), + From = exmpp_jid:make(undefined, Host, <<"watchdog">>), lists:foreach( fun(S) -> try diff --git a/src/jd2ejd.erl b/src/jd2ejd.erl index 4ee7577f4..9151f45be 100644 --- a/src/jd2ejd.erl +++ b/src/jd2ejd.erl @@ -115,7 +115,7 @@ process_xdb(_User, _Server, _El) -> xdb_data(_User, _Server, #xmlcdata{}) -> ok; xdb_data(User, Server, #xmlel{ns = NS} = El) -> - From = exmpp_jid:make_jid(User, Server), + From = exmpp_jid:make(User, Server), LServer = exmpp_stringprep:nameprep(Server), case NS of ?NS_LEGACY_AUTH -> @@ -156,12 +156,12 @@ xdb_data(User, Server, #xmlel{ns = NS} = El) -> true -> catch mod_vcard_odbc:process_sm_iq( From, - exmpp_jid:make_jid(Server), + exmpp_jid:make(Server), #iq{kind = request, type = set, ns = ?NS_VCARD, payload = El, iq_ns = ?NS_JABBER_CLIENT}); false -> catch mod_vcard:process_sm_iq( From, - exmpp_jid:make_jid(Server), + exmpp_jid:make(Server), #iq{kind = request, type = set, ns = ?NS_VCARD, payload = El, iq_ns = ?NS_JABBER_CLIENT}) end, ok; @@ -173,7 +173,7 @@ xdb_data(User, Server, #xmlel{ns = NS} = El) -> "1" -> catch mod_private:process_sm_iq( From, - exmpp_jid:make_jid(Server), + exmpp_jid:make(Server), #iq{kind = request, type = set, ns = ?NS_PRIVATE, iq_ns = ?NS_JABBER_CLIENT, payload = #xmlel{name = 'query', children = @@ -192,7 +192,7 @@ process_offline(Server, To, #xmlel{children = Els}) -> FromS = exmpp_stanza:get_sender(El), From = case FromS of undefined -> - exmpp_jid:make_jid(Server); + exmpp_jid:make(Server); _ -> try exmpp_jid:parse_jid(FromS) diff --git a/src/jlib.erl b/src/jlib.erl index 898e20a8b..3b1e8f914 100644 --- a/src/jlib.erl +++ b/src/jlib.erl @@ -372,7 +372,7 @@ from_old_jid(JID) -> Node = exmpp_jid:node(JID), Resource = exmpp_jid:resource(JID), Domain = exmpp_jid:domain(JID), - exmpp_jid:make_jid(Node,Domain,Resource). + exmpp_jid:make(Node,Domain,Resource). short_jid(JID) -> diff --git a/src/mod_announce.erl b/src/mod_announce.erl index b6a2ea188..abaef4b05 100644 --- a/src/mod_announce.erl +++ b/src/mod_announce.erl @@ -671,10 +671,10 @@ announce_all(From, To, Packet) -> Err = exmpp_stanza:reply_with_error(Packet, 'forbidden'), ejabberd_router:route(To, From, Err); allow -> - Local = exmpp_jid:make_jid(exmpp_jid:domain(To)), + Local = exmpp_jid:make(exmpp_jid:domain(To)), lists:foreach( fun({User, Server}) -> - Dest = exmpp_jid:make_jid(User, Server), + Dest = exmpp_jid:make(User, Server), ejabberd_router:route(Local, Dest, Packet) end, ejabberd_auth:get_vh_registered_users(Host)) end. @@ -686,10 +686,10 @@ announce_all_hosts_all(From, To, Packet) -> Err = exmpp_stanza:reply_with_error(Packet, 'forbidden'), ejabberd_router:route(To, From, Err); allow -> - Local = exmpp_jid:make_jid(exmpp_jid:domain(To)), + Local = exmpp_jid:make(exmpp_jid:domain(To)), lists:foreach( fun({User, Server}) -> - Dest = exmpp_jid:make_jid(User, Server), + Dest = exmpp_jid:make(User, Server), ejabberd_router:route(Local, Dest, Packet) end, ejabberd_auth:dirty_get_registered_users()) end. @@ -720,10 +720,10 @@ announce_all_hosts_online(From, To, Packet) -> end. announce_online1(Sessions, Server, Packet) -> - Local = exmpp_jid:make_jid(Server), + Local = exmpp_jid:make(Server), lists:foreach( fun({U, S, R}) -> - Dest = exmpp_jid:make_jid(U, S, R), + Dest = exmpp_jid:make(U, S, R), ejabberd_router:route(Local, Dest, Packet) end, Sessions). @@ -837,7 +837,7 @@ send_motd(JID) -> [#motd_users{}] -> ok; _ -> - Local = exmpp_jid:make_jid(exmpp_jid:ldomain(JID)), + Local = exmpp_jid:make(exmpp_jid:ldomain(JID)), ejabberd_router:route(Local, JID, Packet), F = fun() -> mnesia:write(#motd_users{us = US}) diff --git a/src/mod_caps.erl b/src/mod_caps.erl index f9441f1ee..b7d740379 100644 --- a/src/mod_caps.erl +++ b/src/mod_caps.erl @@ -352,7 +352,7 @@ handle_cast({note_caps, From, Stanza = exmpp_iq:get(?NS_JABBER_CLIENT, Query, ID), ejabberd_local:register_iq_response_handler (list_to_binary(Host), ID, ?MODULE, handle_disco_response), - ejabberd_router:route(exmpp_jid:make_jid(Host), + ejabberd_router:route(exmpp_jid:make(Host), From, Stanza), timer:send_after(?CAPS_QUERY_TIMEOUT, self(), {disco_timeout, ID}), ?DICT:store(ID, node_to_binary(Node, SubNode), Dict) diff --git a/src/mod_configure.erl b/src/mod_configure.erl index ce6062310..9dc25ffc8 100644 --- a/src/mod_configure.erl +++ b/src/mod_configure.erl @@ -1743,7 +1743,7 @@ stop_node(From, Host, ENode, Action, XData) -> [?XMLATTR('type', <<"submit">>)], children = SubEls}] }, - To = exmpp_jid:make_jid(Host), + To = exmpp_jid:make(Host), mod_announce:announce_commands(empty, From, To, Request) end, Time = timer:seconds(Delay), diff --git a/src/mod_irc/mod_irc_connection.erl b/src/mod_irc/mod_irc_connection.erl index 03f3fae64..b9eef8223 100644 --- a/src/mod_irc/mod_irc_connection.erl +++ b/src/mod_irc/mod_irc_connection.erl @@ -252,7 +252,7 @@ handle_info({route_chan, Channel, Resource, case exmpp_message:get_subject(El) of undefined -> ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat( [Channel, "%", StateData#state.server]), StateData#state.host, StateData#state.nick), @@ -369,7 +369,7 @@ handle_info({route_chan, Channel, Resource, El}, StateName, StateData) when ?IS_IQ(El) -> From = StateData#state.user, - To = exmpp_jid:make_jid(lists:concat([Channel, "%", StateData#state.server]), + To = exmpp_jid:make(lists:concat([Channel, "%", StateData#state.server]), StateData#state.host, StateData#state.nick), _ = case exmpp_iq:xmlel_to_iq(El) of #iq{kind = request, ns = ?NS_MUC_ADMIN} = IQ_Rec -> @@ -586,7 +586,7 @@ terminate(_Reason, _StateName, StateData) -> lists:foreach( fun(Chan) -> ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, StateData#state.nick), StateData#state.user, @@ -686,7 +686,7 @@ process_channel_list_user(StateData, Chan, User) -> _ -> {User1, <<"member">>, <<"participant">>} end, ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, User2), StateData#state.user, #xmlel{ns = ?NS_JABBER_CLIENT, name = 'presence', children = @@ -709,7 +709,7 @@ process_channel_topic(StateData, Chan, String) -> {ok, Msg, _} = regexp:sub(String, ".*332[^:]*:", ""), Msg1 = filter_message(Msg), ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, ""), StateData#state.user, @@ -734,7 +734,7 @@ process_channel_topic_who(StateData, Chan, String) -> Msg2 = filter_message(Msg1), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, ""), StateData#state.user, exmpp_message:groupchat(Msg2)). @@ -743,7 +743,7 @@ process_channel_topic_who(StateData, Chan, String) -> process_endofwhois(StateData, _String, Nick) -> ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Nick, "!", StateData#state.server]), + exmpp_jid:make(lists:concat([Nick, "!", StateData#state.server]), StateData#state.host, ""), StateData#state.user, exmpp_message:chat("End of WHOIS")). @@ -751,7 +751,7 @@ process_endofwhois(StateData, _String, Nick) -> process_whois311(StateData, String, Nick, Ident, Irchost) -> {ok, Fullname, _} = regexp:sub(String, ".*311[^:]*:", ""), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Nick, "!", StateData#state.server]), + exmpp_jid:make(lists:concat([Nick, "!", StateData#state.server]), StateData#state.host, ""), StateData#state.user, exmpp_message:chat(lists:concat( @@ -761,7 +761,7 @@ process_whois311(StateData, String, Nick, Ident, Irchost) -> process_whois312(StateData, String, Nick, Ircserver) -> {ok, Ircserverdesc, _} = regexp:sub(String, ".*312[^:]*:", ""), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Nick, "!", StateData#state.server]), + exmpp_jid:make(lists:concat([Nick, "!", StateData#state.server]), StateData#state.host, ""), StateData#state.user, exmpp_message:chat(lists:concat(["WHOIS: ", Nick, " use ", @@ -770,7 +770,7 @@ process_whois312(StateData, String, Nick, Ircserver) -> process_whois319(StateData, String, Nick) -> {ok, Chanlist, _} = regexp:sub(String, ".*319[^:]*:", ""), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Nick, "!", StateData#state.server]), + exmpp_jid:make(lists:concat([Nick, "!", StateData#state.server]), StateData#state.host, ""), StateData#state.user, exmpp_message:chat(lists:concat(["WHOIS: ", Nick, " is on ", @@ -789,7 +789,7 @@ process_chanprivmsg(StateData, Chan, From, String) -> end, Msg2 = filter_message(Msg1), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, exmpp_message:groupchat(Msg2)). @@ -807,7 +807,7 @@ process_channotice(StateData, Chan, From, String) -> end, Msg2 = filter_message(Msg1), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, exmpp_message:groupchat(Msg2)). @@ -826,7 +826,7 @@ process_privmsg(StateData, _Nick, From, String) -> end, Msg2 = filter_message(Msg1), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([FromUser, "!", StateData#state.server]), + exmpp_jid:make(lists:concat([FromUser, "!", StateData#state.server]), StateData#state.host, undefined), StateData#state.user, exmpp_message:chat(Msg2)). @@ -843,7 +843,7 @@ process_notice(StateData, _Nick, From, String) -> end, Msg2 = filter_message(Msg1), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([FromUser, "!", StateData#state.server]), + exmpp_jid:make(lists:concat([FromUser, "!", StateData#state.server]), StateData#state.host, undefined), StateData#state.user, exmpp_message:chat(Msg2)). @@ -879,7 +879,7 @@ process_topic(StateData, Chan, From, String) -> {ok, Msg, _} = regexp:sub(String, ".*TOPIC[^:]*:", ""), Msg1 = filter_message(Msg), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, exmpp_message:groupchat(Msg1, @@ -890,7 +890,7 @@ process_part(StateData, Chan, From, String) -> {ok, Msg, _} = regexp:sub(String, ".*PART[^:]*:", ""), Msg1 = filter_message(Msg), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, #xmlel{ns = ?NS_JABBER_CLIENT, name = 'presence', attrs = [?XMLATTR('type', <<"unavailable">>)], children = @@ -923,7 +923,7 @@ process_quit(StateData, From, String) -> case ?SETS:is_member(FromUser, Ps) of true -> ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, @@ -947,7 +947,7 @@ process_join(StateData, Channel, From, _String) -> [FromUser | FromIdent] = string:tokens(From, "!"), Chan = lists:subtract(Channel, ":#"), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, #xmlel{ns = ?NS_JABBER_CLIENT, name = 'presence', children = @@ -973,7 +973,7 @@ process_join(StateData, Channel, From, _String) -> process_mode_o(StateData, Chan, _From, Nick, Affiliation, Role) -> %Msg = lists:last(string:tokens(String, ":")), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, Nick), StateData#state.user, #xmlel{ns = ?NS_JABBER_CLIENT, name = 'presence', children = @@ -986,12 +986,12 @@ process_kick(StateData, Chan, From, Nick, String) -> Msg = lists:last(string:tokens(String, ":")), Msg2 = Nick ++ " kicked by " ++ From ++ " (" ++ filter_message(Msg) ++ ")", ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, undefined), StateData#state.user, exmpp_message:groupchat(Msg2)), ejabberd_router:route( - exmpp_jid:make_jid(lists:concat([Chan, "%", StateData#state.server]), + exmpp_jid:make(lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, Nick), StateData#state.user, #xmlel{ns = ?NS_JABBER_CLIENT, name = 'presence', attrs = [?XMLATTR('type', <<"unavailable">>)], children = @@ -1011,7 +1011,7 @@ process_nick(StateData, From, NewNick) -> case ?SETS:is_member(FromUser, Ps) of true -> ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, FromUser), StateData#state.user, @@ -1024,7 +1024,7 @@ process_nick(StateData, From, NewNick) -> #xmlel{ns = ?NS_MUC_USER, name = 'status', attrs = [?XMLATTR('code', <<"303">>)]} ]}]}), ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, Nick), StateData#state.user, @@ -1047,7 +1047,7 @@ process_error(StateData, String) -> lists:foreach( fun(Chan) -> ejabberd_router:route( - exmpp_jid:make_jid( + exmpp_jid:make( lists:concat([Chan, "%", StateData#state.server]), StateData#state.host, StateData#state.nick), StateData#state.user, diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 6c76008e5..c0f44a8fa 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -127,7 +127,7 @@ init([Host, ServerHost, Access, Room, HistorySize, RoomShaper, Creator, _Nick, D access = Access, room = Room, history = lqueue_new(HistorySize), - jid = exmpp_jid:make_jid(Room, Host), + jid = exmpp_jid:make(Room, Host), just_created = true, room_shaper = Shaper}), State1 = set_opts(DefRoomOpts, State), @@ -142,7 +142,7 @@ init([Host, ServerHost, Access, Room, HistorySize, RoomShaper, Opts]) -> access = Access, room = Room, history = lqueue_new(HistorySize), - jid = exmpp_jid:make_jid(Room, Host), + jid = exmpp_jid:make(Room, Host), room_shaper = Shaper}), {ok, normal_state, State}. @@ -1882,7 +1882,7 @@ send_existing_presences(ToJID, StateData) -> ok; _ -> {N,D,R} = LJID, - FromAffiliation = get_affiliation(exmpp_jid:make_jid(N,D,R), + FromAffiliation = get_affiliation(exmpp_jid:make(N,D,R), StateData), ItemAttrs = case (Role == moderator) orelse @@ -2632,7 +2632,7 @@ send_kickban_presence1(UJID, Reason, Code, StateData) -> {ok, #user{jid = _RealJID, nick = Nick}} = ?DICT:find(UJID, StateData#state.users), {N,D,R} = UJID, - Affiliation = get_affiliation(exmpp_jid:make_jid(N,D,R), StateData), + Affiliation = get_affiliation(exmpp_jid:make(N,D,R), StateData), SAffiliation = affiliation_to_binary(Affiliation), lists:foreach( fun({_LJID, Info}) -> diff --git a/src/mod_privacy.erl b/src/mod_privacy.erl index 03f042aa3..820a8aba5 100644 --- a/src/mod_privacy.erl +++ b/src/mod_privacy.erl @@ -363,8 +363,8 @@ process_list_set(LUser, LServer, Name, Els) -> Error; {atomic, {result, _} = Res} -> ejabberd_router:route( - exmpp_jid:make_jid(LUser, LServer), - exmpp_jid:make_jid(LUser, LServer), + exmpp_jid:make(LUser, LServer), + exmpp_jid:make(LUser, LServer), #xmlel{name = 'broadcast', children=[{privacy_list, #userlist{name = Name, list = []}, @@ -394,8 +394,8 @@ process_list_set(LUser, LServer, Name, Els) -> Error; {atomic, {result, _} = Res} -> ejabberd_router:route( - exmpp_jid:make_jid(LUser, LServer), - exmpp_jid:make_jid(LUser, LServer), + exmpp_jid:make(LUser, LServer), + exmpp_jid:make(LUser, LServer), #xmlel{name = 'broadcast', children=[{privacy_list, #userlist{name = Name, list = List}, diff --git a/src/mod_privacy_odbc.erl b/src/mod_privacy_odbc.erl index 42e84e520..6f373d49f 100644 --- a/src/mod_privacy_odbc.erl +++ b/src/mod_privacy_odbc.erl @@ -363,8 +363,8 @@ process_list_set(LUser, LServer, Name, Els) -> Error; {atomic, {result, _} = Res} -> ejabberd_router:route( - exmpp_jid:make_jid(LUser, LServer), - exmpp_jid:make_jid(LUser, LServer), + exmpp_jid:make(LUser, LServer), + exmpp_jid:make(LUser, LServer), #xmlel{name = 'broadcast', children=[{privacy_list, #userlist{name = Name, list = []}, @@ -395,8 +395,8 @@ process_list_set(LUser, LServer, Name, Els) -> Error; {atomic, {result, _} = Res} -> ejabberd_router:route( - exmpp_jid:make_jid(LUser, LServer), - exmpp_jid:make_jid(LUser, LServer), + exmpp_jid:make(LUser, LServer), + exmpp_jid:make(LUser, LServer), #xmlel{name = 'broadcast', children=[{privacy_list, #userlist{name = Name, list = List}, diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index d826f551e..0d5b8aeef 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -640,7 +640,7 @@ presence_probe(Peer, JID, _Pid) -> %% out_subscription(User, Server, JID, subscribed) -> - Owner = exmpp_jid:make_jid(User, Server, ""), + Owner = exmpp_jid:make(User, Server, ""), {U, S, R} = jlib:short_prepd_jid(JID), Rs = case R of [] -> user_resources(U, S); @@ -651,7 +651,7 @@ out_subscription(User, Server, JID, subscribed) -> out_subscription(_, _, _, _) -> ok. in_subscription(_, User, Server, Owner, unsubscribed, _) -> - Subscriber = exmpp_jid:make_jid(User, Server, ""), + Subscriber = exmpp_jid:make(User, Server, ""), Proc = gen_mod:get_module_proc(Server, ?PROCNAME), gen_server:cast(Proc, {unsubscribe, Subscriber, Owner}); in_subscription(_, _, _, _, _, _) -> @@ -706,7 +706,7 @@ handle_cast({presence, User, Server, Resources, JID}, State) -> handle_cast({remove_user, LUser, LServer}, State) -> Host = State#state.host, - Owner = exmpp_jid:make_jid(LUser, LServer), + Owner = exmpp_jid:make(LUser, LServer), %% remove user's subscriptions lists:foreach(fun(PType) -> {result, Subscriptions} = node_action(Host, PType, get_entity_subscriptions, [Host, Owner]), @@ -2042,7 +2042,7 @@ send_items(Host, Node, NodeId, Type, {LU, LS, LR} = LJID, Number) -> Stanza = event_stanza( [#xmlel{ns = ?NS_PUBSUB_EVENT, name = 'items', attrs = nodeAttr(Node), children = itemsEls(ToSend)}]), - ejabberd_router ! {route, service_jid(Host), exmpp_jid:make_jid(LU, LS, LR), Stanza}. + ejabberd_router ! {route, service_jid(Host), exmpp_jid:make(LU, LS, LR), Stanza}. %% @spec (Host, JID, Plugins) -> {error, Reason} | {result, Response} %% Host = host() @@ -2411,8 +2411,8 @@ string_to_node(SNode) -> %% @doc

Generate pubsub service JID.

service_jid(Host) -> case Host of - {U,S,_} -> exmpp_jid:make_jid(U, S); - _ -> exmpp_jid:make_jid(Host) + {U,S,_} -> exmpp_jid:make(U, S); + _ -> exmpp_jid:make(Host) end. %% @spec (LJID, Subscription, PresenceDelivery) -> boolean() @@ -2629,7 +2629,7 @@ broadcast_stanza(Host, Node, _NodeId, _Type, Options, Subscriptions, Stanza) -> %% set the from address on the notification to the bare JID of the account owner %% Also, add "replyto" if entity has presence subscription to the account owner %% See XEP-0163 1.1 section 4.3.1 - Sender = exmpp_jid:make_jid(LUser, LServer), + Sender = exmpp_jid:make(LUser, LServer), %%ReplyTo = jlib:make_jid(LUser, LServer, SenderResource), % This has to be used case catch ejabberd_c2s:get_subscribed(C2SPid) of Contacts when is_list(Contacts) -> @@ -2642,7 +2642,7 @@ broadcast_stanza(Host, Node, _NodeId, _Type, Options, Subscriptions, Stanza) -> end end, [], user_resources(U, S)), lists:foreach(fun(R) -> - ejabberd_router ! {route, Sender, exmpp_jid:make_jid(U, S, R), Stanza} + ejabberd_router ! {route, Sender, exmpp_jid:make(U, S, R), Stanza} end, Rs) end) end, Contacts); diff --git a/src/mod_pubsub/node_flat.erl b/src/mod_pubsub/node_flat.erl index 95275ee66..acab96119 100644 --- a/src/mod_pubsub/node_flat.erl +++ b/src/mod_pubsub/node_flat.erl @@ -99,7 +99,7 @@ create_node_permission(Host, ServerHost, _Node, _ParentNode, Owner, Access) -> true; % pubsub service always allowed _ -> {LU, LS, LR} = LOwner, - acl:match_rule(ServerHost, Access, exmpp_jid:make_jid(LU, LS, LR)) =:= allow + acl:match_rule(ServerHost, Access, exmpp_jid:make(LU, LS, LR)) =:= allow end, {result, Allowed}. diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl index 8b920f3cb..ab6f2c1b5 100644 --- a/src/mod_pubsub/node_hometree.erl +++ b/src/mod_pubsub/node_hometree.erl @@ -203,7 +203,7 @@ create_node_permission(Host, ServerHost, Node, _ParentNode, Owner, Access) -> true; % pubsub service always allowed _ -> {LU, LS, LR} = LOwner, - case acl:match_rule(ServerHost, Access, exmpp_jid:make_jid(LU, LS, LR)) of + case acl:match_rule(ServerHost, Access, exmpp_jid:make(LU, LS, LR)) of allow -> case Node of ["home", Server, User | _] -> true; diff --git a/src/mod_pubsub/node_pep.erl b/src/mod_pubsub/node_pep.erl index a49b6b9c1..c486ac2ac 100644 --- a/src/mod_pubsub/node_pep.erl +++ b/src/mod_pubsub/node_pep.erl @@ -119,7 +119,7 @@ create_node_permission(Host, ServerHost, _Node, _ParentNode, Owner, Access) -> {undefined, Host, undefined} -> true; % pubsub service always allowed _ -> - JID = exmpp_jid:make_jid(User, Server, Resource), + JID = exmpp_jid:make(User, Server, Resource), case acl:match_rule(ServerHost, Access, JID) of allow -> case Host of diff --git a/src/mod_register.erl b/src/mod_register.erl index 5e895d6f2..c45a47cca 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -76,8 +76,8 @@ unauthenticated_iq_register(_Acc, {A, _Port} -> A; _ -> undefined end, - BareJID = exmpp_jid:make_jid(Server), - ResIQ = process_iq(exmpp_jid:make_jid(), + BareJID = exmpp_jid:make(Server), + ResIQ = process_iq(exmpp_jid:make(), BareJID, IQ_Rec, Address), @@ -143,10 +143,10 @@ process_iq(From, To, {User, Server, Resource} -> ResIQ = exmpp_iq:result(IQ_Rec, SubEl), ejabberd_router:route( - exmpp_jid:make_jid(User, + exmpp_jid:make(User, Server, Resource), - exmpp_jid:make_jid(User, + exmpp_jid:make(User, Server, Resource), exmpp_iq:iq_to_xmlel(ResIQ)), @@ -204,7 +204,7 @@ try_register(User, Server, Password, Source, Lang) -> false -> {error, 'bad-request'}; _ -> - JID = exmpp_jid:make_jid(User, + JID = exmpp_jid:make(User, Server), Access = gen_mod:get_module_opt(Server, ?MODULE, access, all), case acl:match_rule(Server, Access, JID) of @@ -247,7 +247,7 @@ send_welcome_message(JID) -> ok; {Subj, Body} -> ejabberd_router:route( - exmpp_jid:make_jid(Host), + exmpp_jid:make(Host), JID, exmpp_message:normal(Subj, Body)); _ -> @@ -268,7 +268,7 @@ send_registration_notifications(UJID) -> try JID = exmpp_jid:parse_jid(S), ejabberd_router:route( - exmpp_jid:make_jid(Host), + exmpp_jid:make(Host), JID, exmpp_message:chat(Body)) catch diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 5d4e4c889..7ae405284 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -301,14 +301,14 @@ process_item_set(From, To, #xmlel{} = El) -> if IsTo -> ejabberd_router:route( exmpp_jid:jid_to_bare_jid(From), - exmpp_jid:make_jid(U, S, R), + exmpp_jid:make(U, S, R), exmpp_presence:unsubscribe()); true -> ok end, if IsFrom -> ejabberd_router:route( exmpp_jid:jid_to_bare_jid(From), - exmpp_jid:make_jid(U, S, R), + exmpp_jid:make(U, S, R), exmpp_presence:unsubscribed()); true -> ok end, @@ -384,8 +384,8 @@ process_item_els(Item, []) -> push_item(User, Server, From, Item) when is_binary(User), is_binary(Server), ?IS_JID(From) -> - ejabberd_sm:route(exmpp_jid:make_jid(), - exmpp_jid:make_jid(User, Server), + ejabberd_sm:route(exmpp_jid:make(), + exmpp_jid:make(User, Server), #xmlel{name = 'broadcast', children = [{item, Item#roster.jid, @@ -411,7 +411,7 @@ push_item(User, Server, Resource, From, Item) "push" ++ randoms:get_string()), ejabberd_router:route( From, - exmpp_jid:make_jid(User, Server, Resource), + exmpp_jid:make(User, Server, Resource), ResIQ). %% @spec (Ignored, User, Server) -> Subscription_Lists @@ -559,7 +559,7 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ok; _ -> ejabberd_router:route( - exmpp_jid:make_jid(User, Server), JID1, + exmpp_jid:make(User, Server), JID1, exmpp_presence:AutoReply()) end, case Push of @@ -570,7 +570,7 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ok; true -> push_item(User, Server, - exmpp_jid:make_jid(User, Server), Item) + exmpp_jid:make(User, Server), Item) end, true; none -> @@ -843,7 +843,7 @@ process_item_attrs_ws(Item, []) -> get_in_pending_subscriptions(Ls, User, Server) when is_binary(User), is_binary(Server) -> - JID = exmpp_jid:make_jid(User, Server), + JID = exmpp_jid:make(User, Server), US = {exmpp_jid:lnode(JID), exmpp_jid:ldomain(JID)}, case mnesia:dirty_index_read(roster, US, #roster.us) of Result when is_list(Result) -> @@ -1184,7 +1184,7 @@ user_roster(User, Server, Query, Lang) -> build_contact_jid_td({U, S, R}) -> %% Convert {U, S, R} into {jid, U, S, R, U, S, R}: - ContactJID = exmpp_jid:make_jid(U, S, R), + ContactJID = exmpp_jid:make(U, S, R), JIDURI = case {exmpp_jid:lnode(ContactJID), exmpp_jid:ldomain(ContactJID)} of {undefined, _} -> ""; {CUser, CServer} -> @@ -1245,7 +1245,7 @@ user_roster_parse_query(User, Server, Items, Query) -> user_roster_subscribe_jid(User, Server, JID) -> out_subscription(User, Server, JID, subscribe), - UJID = exmpp_jid:make_jid(User, Server), + UJID = exmpp_jid:make(User, Server), ejabberd_router:route( UJID, JID, exmpp_presence:subscribe()). @@ -1263,10 +1263,10 @@ user_roster_item_parse_query(User, Server, Items, Query) -> "validate" ++ ejabberd_web_admin:term_to_id(JID), 1, Query) of {value, _} -> {U, S, R} = JID, - JID1 = exmpp_jid:make_jid(U, S, R), + JID1 = exmpp_jid:make(U, S, R), out_subscription( User, Server, JID1, subscribed), - UJID = exmpp_jid:make_jid(User, Server), + UJID = exmpp_jid:make(User, Server), ejabberd_router:route( UJID, JID1, exmpp_presence:subscribed()), throw(submitted); @@ -1275,7 +1275,7 @@ user_roster_item_parse_query(User, Server, Items, Query) -> "remove" ++ ejabberd_web_admin:term_to_id(JID), 1, Query) of {value, _} -> {U, S, R} = JID, - UJID = exmpp_jid:make_jid(User, Server), + UJID = exmpp_jid:make(User, Server), Attrs1 = exmpp_xml:set_attribute_in_list([], 'jid', exmpp_jid:jid_to_list(U, S, R)), Attrs2 = exmpp_xml:set_attribute_in_list(Attrs1, diff --git a/src/mod_roster_odbc.erl b/src/mod_roster_odbc.erl index 01edcd3c4..590f036e4 100644 --- a/src/mod_roster_odbc.erl +++ b/src/mod_roster_odbc.erl @@ -285,14 +285,14 @@ process_item_set(From, To, #xmlel{} = El) -> if IsTo -> ejabberd_router:route( exmpp_jid:jid_to_bare_jid(From), - exmpp_jid:make_jid(U, S, R), + exmpp_jid:make(U, S, R), exmpp_presence:unsubscribe()); true -> ok end, if IsFrom -> ejabberd_router:route( exmpp_jid:jid_to_bare_jid(From), - exmpp_jid:make_jid(U, S, R), + exmpp_jid:make(U, S, R), exmpp_presence:unsubscribed()); true -> ok end, @@ -347,8 +347,8 @@ process_item_els(Item, []) -> push_item(User, Server, From, Item) when is_binary(User), is_binary(Server) -> - ejabberd_sm:route(exmpp_jid:make_jid(), - exmpp_jid:make_jid(User, Server), + ejabberd_sm:route(exmpp_jid:make(), + exmpp_jid:make(User, Server), #xmlel{name = 'broadcast', children = [{item, Item#roster.jid, @@ -365,7 +365,7 @@ push_item(User, Server, Resource, From, Item) -> "push" ++ randoms:get_string()), ejabberd_router:route( From, - exmpp_jid:make_jid(User, Server, Resource), + exmpp_jid:make(User, Server, Resource), ResIQ). get_subscription_lists(_, User, Server) @@ -503,7 +503,7 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ok; _ -> ejabberd_router:route( - exmpp_jid:make_jid(User, Server), JID1, + exmpp_jid:make(User, Server), JID1, exmpp_presence:AutoReply()) end, case Push of @@ -514,7 +514,7 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ok; true -> push_item(User, Server, - exmpp_jid:make_jid(User, Server), Item) + exmpp_jid:make(User, Server), Item) end, true; none -> @@ -754,7 +754,7 @@ process_item_attrs_ws(Item, []) -> get_in_pending_subscriptions(Ls, User, Server) when is_binary(User), is_binary(Server) -> - JID = exmpp_jid:make_jid(User, Server), + JID = exmpp_jid:make(User, Server), LUser = exmpp_jid:lnode(JID), LServer = exmpp_jid:ldomain_as_list(JID), Username = ejabberd_odbc:escape(LUser), @@ -1019,7 +1019,7 @@ user_roster(User, Server, Query, Lang) -> build_contact_jid_td({U, S, R}) -> %% Convert {U, S, R} into {jid, U, S, R, U, S, R}: - ContactJID = exmpp_jid:make_jid(U, S, R), + ContactJID = exmpp_jid:make(U, S, R), JIDURI = case {exmpp_jid:lnode(ContactJID), exmpp_jid:ldomain(ContactJID)} of {undefined, _} -> ""; {CUser, CServer} -> @@ -1070,7 +1070,7 @@ user_roster_parse_query(User, Server, Items, Query) -> user_roster_subscribe_jid(User, Server, JID) -> out_subscription(User, Server, JID, subscribe), - UJID = exmpp_jid:make_jid(User, Server), + UJID = exmpp_jid:make(User, Server), ejabberd_router:route( UJID, JID, exmpp_presence:subscribe()). @@ -1082,10 +1082,10 @@ user_roster_item_parse_query(User, Server, Items, Query) -> "validate" ++ ejabberd_web_admin:term_to_id(JID), 1, Query) of {value, _} -> {U, S, R} = JID, - JID1 = exmpp_jid:make_jid(U, S, R), + JID1 = exmpp_jid:make(U, S, R), out_subscription( User, Server, JID1, subscribed), - UJID = exmpp_jid:make_jid(User, Server), + UJID = exmpp_jid:make(User, Server), ejabberd_router:route( UJID, JID1, exmpp_presence:subscribed()), throw(submitted); @@ -1093,7 +1093,7 @@ user_roster_item_parse_query(User, Server, Items, Query) -> case lists:keysearch( "remove" ++ ejabberd_web_admin:term_to_id(JID), 1, Query) of {value, _} -> - UJID = exmpp_jid:make_jid(User, Server), + UJID = exmpp_jid:make(User, Server), Attrs1 = exmpp_xml:set_attribute_in_list([], 'jid', exmpp_jid:jid_to_list(JID)), Attrs2 = exmpp_xml:set_attribute_in_list(Attrs1, diff --git a/src/mod_service_log.erl b/src/mod_service_log.erl index 499f96e70..725f69010 100644 --- a/src/mod_service_log.erl +++ b/src/mod_service_log.erl @@ -63,13 +63,13 @@ log_user_receive(_JID, From, To, Packet) -> log_packet(From, To, Packet, Host) -> Loggers = gen_mod:get_module_opt(Host, ?MODULE, loggers, []), - ServerJID = exmpp_jid:make_jid(Host), + ServerJID = exmpp_jid:make(Host), FixedPacket = exmpp_stanza:set_jids(Packet, From, To), lists:foreach( fun(Logger) -> ejabberd_router:route( ServerJID, - exmpp_jid:make_jid(Logger), + exmpp_jid:make(Logger), #xmlel{name = 'route', children = [FixedPacket]}) end, Loggers). diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl index 3892b7098..b8df4d19c 100644 --- a/src/mod_shared_roster.erl +++ b/src/mod_shared_roster.erl @@ -199,12 +199,12 @@ process_item(RosterItem, Host) -> %% Remove pending out subscription Mod:out_subscription(UserTo, ServerTo, - exmpp_jid:make_jid(UserFrom, ServerFrom), + exmpp_jid:make(UserFrom, ServerFrom), unsubscribe), %% Remove pending in subscription Mod:in_subscription(aaaa, UserFrom, ServerFrom, - exmpp_jid:make_jid(UserTo, ServerTo), + exmpp_jid:make(UserTo, ServerTo), unsubscribe, ""), %% But we're still subscribed, so respond as such. @@ -237,9 +237,9 @@ set_new_rosteritems(UserFrom, ServerFrom, RIFrom = build_roster_record(UserFrom, ServerFrom, UserTo, ServerTo, NameTo, GroupsFrom), set_item(UserFrom, ServerFrom, ResourceTo, RIFrom), - JIDTo = exmpp_jid:make_jid(UserTo, ServerTo), + JIDTo = exmpp_jid:make(UserTo, ServerTo), - JIDFrom = exmpp_jid:make_jid(UserFrom, ServerFrom), + JIDFrom = exmpp_jid:make(UserFrom, ServerFrom), RITo = build_roster_record(UserTo, ServerTo, UserFrom, ServerFrom, UserFrom,[]), set_item(UserTo, ServerTo, undefined, RITo), @@ -268,8 +268,8 @@ set_item(User, Server, Resource, Item) -> ResIQ = exmpp_iq:set(?NS_JABBER_CLIENT, Request, "push" ++ randoms:get_string()), ejabberd_router:route( - exmpp_jid:make_jid(User, Server, Resource), - exmpp_jid:make_jid(Server), + exmpp_jid:make(User, Server, Resource), + exmpp_jid:make(Server), ResIQ). @@ -334,7 +334,7 @@ out_subscription(UserFrom, ServerFrom, JIDTo, unsubscribed) -> %% Remove pending out subscription {UserTo, ServerTo, _} = jlib:short_prepd_bare_jid(JIDTo), - JIDFrom = exmpp_jid:make_jid(UserFrom, UserTo), + JIDFrom = exmpp_jid:make(UserFrom, UserTo), Mod:out_subscription(UserTo, ServerTo, JIDFrom, unsubscribe), %% Remove pending in subscription @@ -684,7 +684,7 @@ push_item(User, Server, From, Item) -> %% ejabberd_sm:route(jlib:make_jid("", "", ""), %% jlib:make_jid(User, Server, "") %% why? - ejabberd_sm:route(From, exmpp_jid:make_jid(User, Server), + ejabberd_sm:route(From, exmpp_jid:make(User, Server), #xmlel{name = 'broadcast', children = [{item, Item#roster.jid, @@ -695,7 +695,7 @@ push_item(User, Server, From, Item) -> "push" ++ randoms:get_string()), lists:foreach( fun(Resource) -> - JID = exmpp_jid:make_jid(User, Server, Resource), + JID = exmpp_jid:make(User, Server, Resource), ejabberd_router:route(JID, JID, Stanza) end, ejabberd_sm:get_user_resources(list_to_binary(User), list_to_binary(Server))). @@ -707,7 +707,7 @@ push_roster_item(User, Server, ContactU, ContactS, GroupName, Subscription) -> subscription = Subscription, ask = none, groups = [GroupName]}, - push_item(User, Server, exmpp_jid:make_jid(Server), Item). + push_item(User, Server, exmpp_jid:make(Server), Item). item_to_xml(Item) -> {U, S, R} = Item#roster.jid, diff --git a/src/web/ejabberd_http_poll.erl b/src/web/ejabberd_http_poll.erl index d4ecaf549..9b521c34a 100644 --- a/src/web/ejabberd_http_poll.erl +++ b/src/web/ejabberd_http_poll.erl @@ -423,14 +423,14 @@ resend_message(Packet) -> get_jid("from", ParsedPacket) -> case exmpp_stanza:get_sender(ParsedPacket) of undefined -> - exmpp_jid:make_jid(); + exmpp_jid:make(); From -> exmpp_jid:parse_jid(From) end; get_jid("to", ParsedPacket) -> case exmpp_stanza:get_recipient(ParsedPacket) of undefined -> - exmpp_jid:make_jid(); + exmpp_jid:make(); From -> exmpp_jid:parse_jid(From) end. diff --git a/src/web/ejabberd_web_admin.erl b/src/web/ejabberd_web_admin.erl index 934369878..b2d689dea 100644 --- a/src/web/ejabberd_web_admin.erl +++ b/src/web/ejabberd_web_admin.erl @@ -77,7 +77,7 @@ process(["server", SHost | RPath], #request{auth = Auth} = Request) -> case get_auth(Auth) of {User, Server} -> case acl:match_rule( - Host, configure, exmpp_jid:make_jid(User, Server)) of + Host, configure, exmpp_jid:make(User, Server)) of deny -> ejabberd_web:error(not_allowed); allow -> @@ -99,7 +99,7 @@ process(RPath, #request{auth = Auth} = Request) -> case get_auth(Auth) of {User, Server} -> case acl:match_rule( - global, configure, exmpp_jid:make_jid(User, Server)) of + global, configure, exmpp_jid:make(User, Server)) of deny -> ejabberd_web:error(not_allowed); allow ->