mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-02 21:17:12 +02:00
* src/mod_shared_roster.erl: The logged user (self) is now removed from
the shared roster list (EJAB-110). SVN Revision: 584
This commit is contained in:
parent
110c5290b2
commit
9fdef5c15f
|
@ -2,8 +2,11 @@
|
||||||
|
|
||||||
* src/web/ejabberd_web_admin.erl: More flexible parsing the shared
|
* src/web/ejabberd_web_admin.erl: More flexible parsing the shared
|
||||||
roster members list from the configuration form.
|
roster members list from the configuration form.
|
||||||
* src/mod_shared_roster.erl: Delete the shared roster group now
|
* src/mod_shared_roster.erl: Deletng a shared roster group now
|
||||||
correctly delete its user entries.
|
correctly deletes its user entries.
|
||||||
|
|
||||||
|
* src/mod_shared_roster.erl: The logged user (self) is now removed from
|
||||||
|
the shared roster list.
|
||||||
|
|
||||||
2006-06-19 Alexey Shchepin <alexey@sevcom.net>
|
2006-06-19 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
|
|
@ -75,14 +75,22 @@ stop(Host) ->
|
||||||
get_user_roster(Items, US) ->
|
get_user_roster(Items, US) ->
|
||||||
{U, S} = US,
|
{U, S} = US,
|
||||||
DisplayedGroups = get_user_displayed_groups(US),
|
DisplayedGroups = get_user_displayed_groups(US),
|
||||||
|
%% Get shared roster users in all groups and remove self:
|
||||||
SRUsers =
|
SRUsers =
|
||||||
lists:foldl(
|
lists:foldl(
|
||||||
fun(Group, Acc1) ->
|
fun(Group, Acc1) ->
|
||||||
lists:foldl(
|
lists:foldl(
|
||||||
fun(User, Acc2) ->
|
fun(User, Acc2) ->
|
||||||
dict:append(User, get_group_name(S, Group), Acc2)
|
if User == US -> Acc2;
|
||||||
|
true -> dict:append(User,
|
||||||
|
get_group_name(S, Group),
|
||||||
|
Acc2)
|
||||||
|
end
|
||||||
end, Acc1, get_group_users(S, Group))
|
end, Acc1, get_group_users(S, Group))
|
||||||
end, dict:new(), DisplayedGroups),
|
end, dict:new(), DisplayedGroups),
|
||||||
|
|
||||||
|
%% If partially subscribed users are also in shared roster, show them as
|
||||||
|
%% totally subscribed:
|
||||||
{NewItems1, SRUsersRest} =
|
{NewItems1, SRUsersRest} =
|
||||||
lists:mapfoldl(
|
lists:mapfoldl(
|
||||||
fun(Item, SRUsers1) ->
|
fun(Item, SRUsers1) ->
|
||||||
|
@ -96,6 +104,8 @@ get_user_roster(Items, US) ->
|
||||||
{Item, SRUsers1}
|
{Item, SRUsers1}
|
||||||
end
|
end
|
||||||
end, SRUsers, Items),
|
end, SRUsers, Items),
|
||||||
|
|
||||||
|
%% Export items in roster format:
|
||||||
SRItems = [#roster{usj = {U, S, {U1, S1, ""}},
|
SRItems = [#roster{usj = {U, S, {U1, S1, ""}},
|
||||||
us = US,
|
us = US,
|
||||||
jid = {U1, S1, ""},
|
jid = {U1, S1, ""},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user