mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Do not call functions from ejabberd_riak directly
This commit is contained in:
parent
0917209711
commit
56d61c2784
@ -1551,29 +1551,10 @@ split(Data) ->
|
||||
clear_riak_tables(Config) ->
|
||||
User = ?config(user, Config),
|
||||
Server = ?config(server, Config),
|
||||
Slave = jlib:make_jid(<<"test_slave">>, Server, <<>>),
|
||||
Master = jlib:make_jid(<<"test_master">>, Server, <<>>),
|
||||
Room = muc_room_jid(Config),
|
||||
{U, S, _} = jlib:jid_tolower(jlib:make_jid(User, Server, <<>>)),
|
||||
{USlave, SSlave, _} = LSlave = jlib:jid_tolower(Slave),
|
||||
{UMaster, SMaster, _} = LMaster = jlib:jid_tolower(Master),
|
||||
{URoom, SRoom, _} = jlib:jid_tolower(jlib:jid_remove_resource(Room)),
|
||||
US = {U, S},
|
||||
USSlave = {USlave, SSlave},
|
||||
USMaster = {UMaster, SMaster},
|
||||
USRoom = {URoom, SRoom},
|
||||
ok = ejabberd_riak:delete(roster, {USlave, SSlave, LMaster}),
|
||||
ok = ejabberd_riak:delete(roster, {UMaster, SMaster, LSlave}),
|
||||
ok = ejabberd_riak:delete(passwd, US),
|
||||
ok = ejabberd_riak:delete(passwd, USSlave),
|
||||
ok = ejabberd_riak:delete(passwd, USMaster),
|
||||
ok = ejabberd_riak:delete(roster_version, USSlave),
|
||||
ok = ejabberd_riak:delete(roster_version, USMaster),
|
||||
ok = ejabberd_riak:delete(last_activity, US),
|
||||
ok = ejabberd_riak:delete(last_activity, USSlave),
|
||||
ok = ejabberd_riak:delete(last_activity, USMaster),
|
||||
ok = ejabberd_riak:delete(vcard, US),
|
||||
ok = ejabberd_riak:delete(privacy, US),
|
||||
ok = ejabberd_riak:delete(private_storage, {U, S, <<"storage:bookmarks">>}),
|
||||
ok = ejabberd_riak:delete(muc_room, USRoom),
|
||||
{URoom, SRoom, _} = jlib:jid_tolower(Room),
|
||||
ejabberd_auth:remove_user(User, Server),
|
||||
ejabberd_auth:remove_user(<<"test_slave">>, Server),
|
||||
ejabberd_auth:remove_user(<<"test_master">>, Server),
|
||||
mod_muc:forget_room(Server, URoom, SRoom),
|
||||
Config.
|
||||
|
Loading…
Reference in New Issue
Block a user