mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
API renaming : bare_jid_to_jid -> full
SVN Revision: 2121
This commit is contained in:
parent
5dbc4f9954
commit
a136192db2
@ -465,7 +465,7 @@ do_route(From, To, Packet) ->
|
|||||||
fun({_, R}) ->
|
fun({_, R}) ->
|
||||||
do_route(
|
do_route(
|
||||||
From,
|
From,
|
||||||
exmpp_jid:bare_jid_to_jid(To, R),
|
exmpp_jid:full(To, R),
|
||||||
Packet)
|
Packet)
|
||||||
end, PResources);
|
end, PResources);
|
||||||
true ->
|
true ->
|
||||||
@ -479,7 +479,7 @@ do_route(From, To, Packet) ->
|
|||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun(R) ->
|
fun(R) ->
|
||||||
do_route(From,
|
do_route(From,
|
||||||
exmpp_jid:bare_jid_to_jid(To, R),
|
exmpp_jid:full(To, R),
|
||||||
Packet)
|
Packet)
|
||||||
end, get_user_resources(exmpp_jid:lnode(To),
|
end, get_user_resources(exmpp_jid:lnode(To),
|
||||||
exmpp_jid:ldomain(To)));
|
exmpp_jid:ldomain(To)));
|
||||||
|
@ -304,7 +304,7 @@ get_user_resources(BareJID) ->
|
|||||||
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs =
|
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs =
|
||||||
[?XMLATTR('jid',
|
[?XMLATTR('jid',
|
||||||
exmpp_jid:jid_to_binary(
|
exmpp_jid:jid_to_binary(
|
||||||
exmpp_jid:bare_jid_to_jid(BareJID, R))),
|
exmpp_jid:full(BareJID, R))),
|
||||||
?XMLATTR('name',
|
?XMLATTR('name',
|
||||||
exmpp_jid:lnode(BareJID))]}
|
exmpp_jid:lnode(BareJID))]}
|
||||||
end, lists:sort(Rs)).
|
end, lists:sort(Rs)).
|
||||||
@ -1677,7 +1677,7 @@ set_form(From, Host, ?NS_ADMINL("user-stats"), Lang, XData) ->
|
|||||||
|
|
||||||
Resources = ejabberd_sm:get_user_resources(exmpp_jid:lnode(JID),
|
Resources = ejabberd_sm:get_user_resources(exmpp_jid:lnode(JID),
|
||||||
exmpp_jid:ldomain(JID)),
|
exmpp_jid:ldomain(JID)),
|
||||||
IPs1 = [ejabberd_sm:get_user_ip(exmpp_jid:bare_jid_to_jid(JID,Resource))
|
IPs1 = [ejabberd_sm:get_user_ip(exmpp_jid:full(JID,Resource))
|
||||||
|| Resource <- Resources],
|
|| Resource <- Resources],
|
||||||
IPs = [inet_parse:ntoa(IP)++":"++integer_to_list(Port) || {IP, Port} <- IPs1],
|
IPs = [inet_parse:ntoa(IP)++":"++integer_to_list(Port) || {IP, Port} <- IPs1],
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ get_user_resources(JID) ->
|
|||||||
lists:map(fun(R) ->
|
lists:map(fun(R) ->
|
||||||
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [
|
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [
|
||||||
?XMLATTR('jid',
|
?XMLATTR('jid',
|
||||||
exmpp_jid:jid_to_binary(exmpp_jid:bare_jid_to_jid(JID, R))),
|
exmpp_jid:jid_to_binary(exmpp_jid:full(JID, R))),
|
||||||
?XMLATTR('name', exmpp_jid:lnode(JID))
|
?XMLATTR('name', exmpp_jid:lnode(JID))
|
||||||
]}
|
]}
|
||||||
end, lists:sort(Rs)).
|
end, lists:sort(Rs)).
|
||||||
|
@ -174,7 +174,7 @@ do_client_version(disabled, _From, _To) ->
|
|||||||
do_client_version(enabled, From, To) ->
|
do_client_version(enabled, From, To) ->
|
||||||
%% It is important to identify this process and packet
|
%% It is important to identify this process and packet
|
||||||
Random_resource = integer_to_list(random:uniform(100000)),
|
Random_resource = integer_to_list(random:uniform(100000)),
|
||||||
From2 = exmpp_jid:bare_jid_to_jid(From,Random_resource),
|
From2 = exmpp_jid:full(From,Random_resource),
|
||||||
|
|
||||||
%% Build an iq:query request
|
%% Build an iq:query request
|
||||||
Request = #xmlel{ns = ?NS_SOFT_VERSION, name = 'query'},
|
Request = #xmlel{ns = ?NS_SOFT_VERSION, name = 'query'},
|
||||||
|
@ -3533,7 +3533,7 @@ tab_count_user(JID) ->
|
|||||||
|
|
||||||
|
|
||||||
jid_replace_resource(JID, Resource) ->
|
jid_replace_resource(JID, Resource) ->
|
||||||
exmpp_jid:bare_jid_to_jid(JID, Resource).
|
exmpp_jid:full(JID, Resource).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user