adding user to a SRG which has display groups which are not SRG throws error

Let us say there exists a valid SRG 'group1' which has as one of its displayed groups an entry which is not a SRG. Then adding a user to this 'group1' throws the error as shown below.

$ ejabberdctl srg_user_add 'admin' 'example.net' 'group1' 'example.net'
Problem 'error {case_clause,false}' occurred executing the command.
Stacktrace: [{mod_shared_roster,get_group_users,2},
{mod_shared_roster,push_members_to_user,5},
{mod_shared_roster,'-push_displayed_to_user/5-lc$^0/1-0-',5},
{mod_shared_roster,add_user_to_group,3},
{mod_admin_extra,srg_user_add,4},
{ejabberd_ctl,call_command,3},
{ejabberd_ctl,try_call_command,3},
{ejabberd_ctl,process2,3}]

I am not sure if this could be considered a bug but as far as I remember this problem did not occur with the previous versions.

I am using ejabberd 2.1.0 from Debian sid.

I cannot reproduce

Quote:

a valid SRG 'group1' which has as one of its displayed groups an entry which is not a SRG. Then adding a user to this 'group1' throws the error as shown below.

I am using ejabberd 2.1.0 from Debian sid.

I cannot reproduce the problem:

$ ejabberdctl srg_get_info group1 localhost
displayed_groups        ["aabbcc","asdasd@asdasd"]
$ ejabberdctl srg_user_add user3 localhost group1 localhost
$ ejabberdctl srg_get_members group1 localhost
user1@localhost
user2@localhost
user3@localhost
$

In any case, what's the purpose of having one entry in "display groups" that isn't a group?

There isn't any use. The only

There isn't any use. The only reason why something as such should be allowed is because deleting a SRG will create a problem for adding users in other groups, the display of which has this deleted group as an entry.

I will raise this bug with the Debain Package maintainer as I think this is caused by some patch he must have included.

Syndicate content