Allow empty form for mute/unmute commands
This commit is contained in:
parent
9aec929e71
commit
249c942fc2
|
@ -808,6 +808,13 @@ func handleSetQueryCommand(s xmpp.Sender, iq *stanza.IQ, command *stanza.Command
|
||||||
members, err := session.GetChatMembers(toId, true, "", membersList)
|
members, err := session.GetChatMembers(toId, true, "", membersList)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
fieldType = stanza.FieldTypeListSingle
|
fieldType = stanza.FieldTypeListSingle
|
||||||
|
switch command.Node {
|
||||||
|
// allow empty form
|
||||||
|
case "mute", "unmute":
|
||||||
|
options = append(options, stanza.Option{
|
||||||
|
ValuesList: []string{""},
|
||||||
|
})
|
||||||
|
}
|
||||||
for _, member := range members {
|
for _, member := range members {
|
||||||
senderId := session.GetSenderId(member.MemberId)
|
senderId := session.GetSenderId(member.MemberId)
|
||||||
options = append(options, stanza.Option{
|
options = append(options, stanza.Option{
|
||||||
|
|
Loading…
Reference in a new issue