mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Support sql backend in mod_shared_roster commands (#1244)
This commit is contained in:
parent
38666cfd58
commit
5b4f347da8
@ -1315,11 +1315,11 @@ srg_create(Group, Host, Name, Description, Display) ->
|
|||||||
Opts = [{name, Name},
|
Opts = [{name, Name},
|
||||||
{displayed_groups, DisplayList},
|
{displayed_groups, DisplayList},
|
||||||
{description, Description}],
|
{description, Description}],
|
||||||
{atomic, ok} = mod_shared_roster:create_group(Host, Group, Opts),
|
{atomic, _} = mod_shared_roster:create_group(Host, Group, Opts),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
srg_delete(Group, Host) ->
|
srg_delete(Group, Host) ->
|
||||||
{atomic, ok} = mod_shared_roster:delete_group(Host, Group),
|
{atomic, _} = mod_shared_roster:delete_group(Host, Group),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
srg_list(Host) ->
|
srg_list(Host) ->
|
||||||
@ -1342,11 +1342,11 @@ srg_get_members(Group, Host) ->
|
|||||||
|| {MUser, MServer} <- Members].
|
|| {MUser, MServer} <- Members].
|
||||||
|
|
||||||
srg_user_add(User, Host, Group, GroupHost) ->
|
srg_user_add(User, Host, Group, GroupHost) ->
|
||||||
{atomic, ok} = mod_shared_roster:add_user_to_group(GroupHost, {User, Host}, Group),
|
{atomic, _} = mod_shared_roster:add_user_to_group(GroupHost, {User, Host}, Group),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
srg_user_del(User, Host, Group, GroupHost) ->
|
srg_user_del(User, Host, Group, GroupHost) ->
|
||||||
{atomic, ok} = mod_shared_roster:remove_user_from_group(GroupHost, {User, Host}, Group),
|
{atomic, _} = mod_shared_roster:remove_user_from_group(GroupHost, {User, Host}, Group),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user