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