mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
API renaming : jid_to_bare_jid > bare
SVN Revision: 2120
This commit is contained in:
parent
447d3818f5
commit
5dbc4f9954
@ -838,7 +838,7 @@ session_established2(El, StateData) ->
|
||||
To = exmpp_stanza:get_recipient(El),
|
||||
ToJID = case To of
|
||||
undefined ->
|
||||
exmpp_jid:jid_to_bare_jid(StateData#state.jid);
|
||||
exmpp_jid:bare(StateData#state.jid);
|
||||
_ ->
|
||||
exmpp_jid:parse_jid(To)
|
||||
end,
|
||||
@ -1518,28 +1518,28 @@ presence_track(From, To, Packet, StateData) ->
|
||||
ejabberd_hooks:run(roster_out_subscription,
|
||||
StateData#state.server,
|
||||
[StateData#state.user, StateData#state.server, To, subscribe]),
|
||||
check_privacy_route(From, StateData, exmpp_jid:jid_to_bare_jid(From),
|
||||
check_privacy_route(From, StateData, exmpp_jid:bare(From),
|
||||
To, Packet),
|
||||
StateData;
|
||||
'subscribed' ->
|
||||
ejabberd_hooks:run(roster_out_subscription,
|
||||
StateData#state.server,
|
||||
[StateData#state.user, StateData#state.server, To, subscribed]),
|
||||
check_privacy_route(From, StateData, exmpp_jid:jid_to_bare_jid(From),
|
||||
check_privacy_route(From, StateData, exmpp_jid:bare(From),
|
||||
To, Packet),
|
||||
StateData;
|
||||
'unsubscribe' ->
|
||||
ejabberd_hooks:run(roster_out_subscription,
|
||||
StateData#state.server,
|
||||
[StateData#state.user, StateData#state.server, To, unsubscribe]),
|
||||
check_privacy_route(From, StateData, exmpp_jid:jid_to_bare_jid(From),
|
||||
check_privacy_route(From, StateData, exmpp_jid:bare(From),
|
||||
To, Packet),
|
||||
StateData;
|
||||
'unsubscribed' ->
|
||||
ejabberd_hooks:run(roster_out_subscription,
|
||||
StateData#state.server,
|
||||
[StateData#state.user, StateData#state.server, To, unsubscribed]),
|
||||
check_privacy_route(From, StateData, exmpp_jid:jid_to_bare_jid(From),
|
||||
check_privacy_route(From, StateData, exmpp_jid:bare(From),
|
||||
To, Packet),
|
||||
StateData;
|
||||
'error' ->
|
||||
|
@ -357,7 +357,7 @@ choose_pid(From, Pids) ->
|
||||
% Use sticky connections based on the JID of the sender (whithout
|
||||
% the resource to ensure that a muc room always uses the same
|
||||
% connection)
|
||||
Pid = lists:nth(erlang:phash(exmpp_jid:jid_to_bare_jid(From), length(Pids1)),
|
||||
Pid = lists:nth(erlang:phash(exmpp_jid:bare(From), length(Pids1)),
|
||||
Pids1),
|
||||
?DEBUG("Using ejabberd_s2s_out ~p~n", [Pid]),
|
||||
Pid.
|
||||
|
@ -678,7 +678,7 @@ check_max_sessions(JID) ->
|
||||
%% Defaults to infinity
|
||||
get_max_user_sessions(JID) ->
|
||||
case acl:match_rule(
|
||||
exmpp_jid:ldomain_as_list(JID), max_user_sessions, exmpp_jid:jid_to_bare_jid(JID)) of
|
||||
exmpp_jid:ldomain_as_list(JID), max_user_sessions, exmpp_jid:bare(JID)) of
|
||||
Max when is_integer(Max) -> Max;
|
||||
infinity -> infinity;
|
||||
_ -> ?MAX_USER_SESSIONS
|
||||
|
@ -379,7 +379,7 @@ short_jid(JID) ->
|
||||
{exmpp_jid:node(JID), exmpp_jid:domain(JID), exmpp_jid:resource(JID)}.
|
||||
|
||||
short_bare_jid(JID) ->
|
||||
short_jid(exmpp_jid:jid_to_bare_jid(JID)).
|
||||
short_jid(exmpp_jid:bare(JID)).
|
||||
|
||||
short_prepd_jid(JID) ->
|
||||
{exmpp_jid:lnode(JID),
|
||||
@ -387,6 +387,6 @@ short_prepd_jid(JID) ->
|
||||
exmpp_jid:lresource(JID)}.
|
||||
|
||||
short_prepd_bare_jid(JID) ->
|
||||
short_prepd_jid(exmpp_jid:jid_to_bare_jid(JID)).
|
||||
short_prepd_jid(exmpp_jid:bare(JID)).
|
||||
|
||||
|
||||
|
@ -2379,7 +2379,7 @@ find_changed_items(UJID, UAffiliation, URole,
|
||||
UJID,
|
||||
UAffiliation, URole,
|
||||
Items, Lang, StateData,
|
||||
[{exmpp_jid:jid_to_bare_jid(JID),
|
||||
[{exmpp_jid:bare(JID),
|
||||
affiliation,
|
||||
SAffiliation,
|
||||
exmpp_xml:get_path(
|
||||
|
@ -300,14 +300,14 @@ process_item_set(From, To, #xmlel{} = El) ->
|
||||
{U, S, R} = OldItem#roster.jid,
|
||||
if IsTo ->
|
||||
ejabberd_router:route(
|
||||
exmpp_jid:jid_to_bare_jid(From),
|
||||
exmpp_jid:bare(From),
|
||||
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:bare(From),
|
||||
exmpp_jid:make(U, S, R),
|
||||
exmpp_presence:unsubscribed());
|
||||
true -> ok
|
||||
|
@ -284,14 +284,14 @@ process_item_set(From, To, #xmlel{} = El) ->
|
||||
{U, S, R} = OldItem#roster.jid,
|
||||
if IsTo ->
|
||||
ejabberd_router:route(
|
||||
exmpp_jid:jid_to_bare_jid(From),
|
||||
exmpp_jid:bare(From),
|
||||
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:bare(From),
|
||||
exmpp_jid:make(U, S, R),
|
||||
exmpp_presence:unsubscribed());
|
||||
true -> ok
|
||||
|
Loading…
Reference in New Issue
Block a user