mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
API renaming : bare_jid_to_binary -> bare_to_binary
SVN Revision: 2135
This commit is contained in:
parent
9abe47f350
commit
437c9d07f5
@ -121,14 +121,14 @@ get_caps({U, S, R}, Retry) ->
|
|||||||
clear_caps(JID) ->
|
clear_caps(JID) ->
|
||||||
R = exmpp_jid:prep_resource(JID),
|
R = exmpp_jid:prep_resource(JID),
|
||||||
BJID = exmpp_jid:to_binary(JID),
|
BJID = exmpp_jid:to_binary(JID),
|
||||||
BUID = exmpp_jid:bare_jid_to_binary(JID),
|
BUID = exmpp_jid:bare_to_binary(JID),
|
||||||
catch mnesia:dirty_delete({user_caps, BJID}),
|
catch mnesia:dirty_delete({user_caps, BJID}),
|
||||||
catch mnesia:dirty_delete_object(#user_caps_resources{uid = BUID, resource = list_to_binary(R)}),
|
catch mnesia:dirty_delete_object(#user_caps_resources{uid = BUID, resource = list_to_binary(R)}),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
%% give default user resource
|
%% give default user resource
|
||||||
get_user_resources(U, S) ->
|
get_user_resources(U, S) ->
|
||||||
BUID = exmpp_jid:bare_jid_to_binary(U, S),
|
BUID = exmpp_jid:bare_to_binary(U, S),
|
||||||
case catch mnesia:dirty_read({user_caps_resources, BUID}) of
|
case catch mnesia:dirty_read({user_caps_resources, BUID}) of
|
||||||
{'EXIT', _} ->
|
{'EXIT', _} ->
|
||||||
[];
|
[];
|
||||||
@ -323,7 +323,7 @@ handle_cast({note_caps, From,
|
|||||||
case ejabberd_sm:get_user_resources(U, S) of
|
case ejabberd_sm:get_user_resources(U, S) of
|
||||||
[] ->
|
[] ->
|
||||||
% only store resource of caps aware external contacts
|
% only store resource of caps aware external contacts
|
||||||
BUID = exmpp_jid:bare_jid_to_binary(From),
|
BUID = exmpp_jid:bare_to_binary(From),
|
||||||
mnesia:dirty_write(#user_caps_resources{uid = BUID, resource = list_to_binary(R)});
|
mnesia:dirty_write(#user_caps_resources{uid = BUID, resource = list_to_binary(R)});
|
||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
|
Loading…
Reference in New Issue
Block a user