processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.07k stars 1.51k forks source link

Can we edit srg label and description after creation through ejabberd api? #4104

Closed manimeik closed 1 month ago

manimeik commented 11 months ago

In ejabberd console, I can edit description of srg but I can't find api for that in ejabberd api doc. Also I want to edit label of srg through ejabberd api. Are these imposible?

badlop commented 11 months ago

In ejabberd console, I can edit description of srg

You mean in the ejabberd Web Admin page, right?

I can't find api for that in ejabberd api doc.

You are right, there is no command API to change the label or description of a Shared Roster Group. That right now can only be done in the WebAdmin.

When using the commands API, it is expected that the Label and Description are set when creating the group:

$ ejabberdctl srg_create gr2 localhost "Other Label" "Other Description" grr

$ ejabberdctl srg_get_info gr2 localhost
label   Other Label
displayed_groups        ["grr"]
description     Other Description

A workaround when using the API would be to obtain the details of an existing group, destroy it, then create again with the desired label and description.

manimeik commented 11 months ago

Thanks for your help @badlop Why doesn't Ejabberd have command api for this? Can I expect this feature on next update?

badlop commented 10 months ago

Hi, are you still interested in this feature? It should be easy to implement

badlop commented 1 month ago

ejabberd 24.06 added the command srg_set_info that allows to set label and description.