POST /api/send — to now accepts a node number, a long/short name (resolved through the in-memory node DB), or an explicit broadcast sentinel. Omitted to still means broadcast.
{"text":"hello","to":"Kamil SP8MK/P"}// DM by name → resolved to its node number
{"text":"hi all","to":"!b"}// explicit broadcast (also: "broadcast", omitted, or 4294967295)
Details
New MeshService.resolveDest(to?) — resolution order: undefined/"" → broadcast; number / numeric string → node number (must be integer in 1..0xffffffff); "!b"/"broadcast" (case-insensitive) → broadcast; anything else → existing node() lookup (exact num → exact long/short name → unique substring)
Unknown names → 400 no node matching '<to>'; invalid numbers → 400 invalid node number '<n>' (tightening: previously any finite number passed through — 42.5, negatives and >0xffffffff are now rejected)
DM vs broadcast semantics documented in Swagger: DMs are unicast wantAck-tracked via GET /api/messages; broadcasts stay pending because firmware strips want_ack pre-TX
All sends still ride channel index 2 (testowy, MESH_SEND_CHANNEL) regardless of type — modern firmware PKI handles unicast encryption/channel anyway
## What
`POST /api/send` — `to` now accepts a **node number, a long/short name** (resolved through the in-memory node DB), or an explicit broadcast sentinel. Omitted `to` still means broadcast.
```json
{ "text": "hello", "to": "Kamil SP8MK/P" } // DM by name → resolved to its node number
{ "text": "hi all", "to": "!b" } // explicit broadcast (also: "broadcast", omitted, or 4294967295)
```
## Details
- New `MeshService.resolveDest(to?)` — resolution order: undefined/"" → broadcast; number / numeric string → node number (must be integer in 1..0xffffffff); "!b"/"broadcast" (case-insensitive) → broadcast; anything else → existing `node()` lookup (exact num → exact long/short name → unique substring)
- Unknown names → 400 `no node matching '<to>'`; invalid numbers → 400 `invalid node number '<n>'` (tightening: previously any finite number passed through — 42.5, negatives and >0xffffffff are now rejected)
- DM vs broadcast semantics documented in Swagger: DMs are unicast wantAck-tracked via GET /api/messages; broadcasts stay pending because firmware strips want_ack pre-TX
- All sends still ride channel index 2 (testowy, MESH_SEND_CHANNEL) regardless of type — modern firmware PKI handles unicast encryption/channel anyway
## Verification
- `npm run build` ✓
- `npm test` — 24/24 passed (was 22, +2: sentinel/number/name resolution; unknown-name + invalid-number rejections)
- v0.4.0, CHANGELOG entry added
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
POST /api/send—tonow accepts a node number, a long/short name (resolved through the in-memory node DB), or an explicit broadcast sentinel. Omittedtostill means broadcast.Details
MeshService.resolveDest(to?)— resolution order: undefined/"" → broadcast; number / numeric string → node number (must be integer in 1..0xffffffff); "!b"/"broadcast" (case-insensitive) → broadcast; anything else → existingnode()lookup (exact num → exact long/short name → unique substring)no node matching '<to>'; invalid numbers → 400invalid node number '<n>'(tightening: previously any finite number passed through — 42.5, negatives and >0xffffffff are now rejected)Verification
npm run build✓npm test— 24/24 passed (was 22, +2: sentinel/number/name resolution; unknown-name + invalid-number rejections)