| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-11-19 19:47:02 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-11-19 19:47:02 UTC |
| parent | 7650883375eec46c0fca6ca2251a6eb0c230062d |
| borogove/queries/CommandExecute.hx | +1 | -1 |
diff --git a/borogove/queries/CommandExecute.hx b/borogove/queries/CommandExecute.hx index 3bef266..a265093 100644 --- a/borogove/queries/CommandExecute.hx +++ b/borogove/queries/CommandExecute.hx @@ -70,7 +70,7 @@ class CommandExecute extends GenericQuery { final extActionsField = forms[0]?.form?.field("http://jabber.org/protocol/commands#actions"); if (extActionsField != null) extActionsField.type = "hidden"; final extActions: Array<FormOption> = (extActionsField?.options ?? []).map(o -> o.toFormOption()); - final actions = (cmd.getChild("actions")?.allTags()?.map(s -> new FormOption(s.name.capitalize(), s.name))?.filter(o -> o.value != "execute") ?? []).concat(extActions); + final actions = extActions.length > 0 ? extActions : (cmd.getChild("actions")?.allTags()?.map(s -> new FormOption(s.name.capitalize(), s.name))?.filter(o -> o.value != "execute") ?? []); if (cmd.attr.get("status") == "executing") { if (actions.length < 1) actions.push(new FormOption("Go", "execute")); if (actions.find(a -> a.value == "cancel") == null) actions.push(new FormOption("Cancel", "cancel"));