devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
820 stars 249 forks source link

[Feature Request] Group Security feature - Add the possibility to send messages only from administrators #274

Closed simonemori closed 3 months ago

simonemori commented 3 months ago

Hello and thanks for this cool tool!

Is it possible to Add the possibility to send messages only from administrators?

In this way, it is possible to create groups for communications services only, like school things etc...

Now there is the possibility to use PUT /api/{session}/groups/{groupId}/settings/security/info-admin-only to set name, picture, etc and it works properly.

Thanks

patron:PLUS

allburov commented 3 months ago

It looks possible, weird we didn't add it when we added info-admin-only

devlikepro commented 3 months ago

Hi! It's been added in 2024.3.5 version - already available in WAHA Plus and we'll release it later in WAHA Core. Security - who can send messages


Security - who can send messages

Updates the group settings to only allow admins to send messages.

PUT /api/{session}/groups/{groupId}/settings/security/messages-admin-only

{
  "adminsOnly": true
}

Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.

Get the group settings to only allow admins to send messages.

GET /api/{session}/groups/{groupId}/settings/security/messages-admin-only

{
  "adminsOnly": true
}

👉 Breaking changes

patron:PRO