Allow empty form for mute/unmute commands

This commit is contained in:
Bohdan Horbeshko 2024-05-10 19:53:16 -04:00
parent 9aec929e71
commit 249c942fc2

View file

@ -808,6 +808,13 @@ func handleSetQueryCommand(s xmpp.Sender, iq *stanza.IQ, command *stanza.Command
members, err := session.GetChatMembers(toId, true, "", membersList)
if err == nil {
fieldType = stanza.FieldTypeListSingle
switch command.Node {
// allow empty form
case "mute", "unmute":
options = append(options, stanza.Option{
ValuesList: []string{""},
})
}
for _, member := range members {
senderId := session.GetSenderId(member.MemberId)
options = append(options, stanza.Option{