[ejabberd] add_rosteritem behavior
ggozad at crypho.com
Mon Nov 7 15:55:48 MSK 2016
> I've committed an improvement to the add_rosteritem command, so now it
> is possible to provide several groups as argument:
> $ ejabberdctl add_rosteritem user1 localhost user3 localhost UsER3
> "g1;g2;g3" both
> As you noticed, this command overwrites the previous roster item,
> which means any previous information, like previous groups, is lost.
> If you want to preserve old groups, and simply add more, then you will
> have to write that yourself. For example, get previous groups with
> this, and add them to your argument:
> $ ejabberdctl get_roster user1 localhost
> user3 at localhost UsER3 both none g3
> user3 at localhost UsER3 both none g2
> user3 at localhost UsER3 both none g1
Thanks for the fix. Would it not make more sense to decouple add groups to a subscription from adding a subscription?
Then you would modify groups regardless of subscriptions. This would also be in sync with having separate tables for roster groups.
More information about the ejabberd