fix(clients): persist group for node-inbound clients

The client create/edit form left `group` out of the request payload, so choosing a group in the form was silently dropped (bulkAdd from the Groups page still worked because it writes the column directly). Add `group` to the payload next to `comment`.

SyncInbound also overwrote group_name unconditionally; a group set via bulkAdd is never pushed to the node, so the next node snapshot — which lacks it — wiped the column. Keep group sticky (only overwrite when the incoming value is non-empty); group is only ever set/cleared via the Groups page. Preserve comment for node clients during snapshot sync the same way. Add tests.
This commit is contained in:
MHSanaei
2026-05-31 15:25:21 +02:00
parent b94e859e73
commit 24d0e4ec7c
4 changed files with 148 additions and 1 deletions

View File

@@ -344,6 +344,7 @@ export default function ClientFormModal({
reset: Number(form.reset) || 0,
limitIp: Number(form.limitIp) || 0,
tgId: Number(form.tgId) || 0,
group: form.group,
comment: form.comment,
enable: !!form.enable,
};