Optional replyId on send (API + MCP) — protocol-level threaded replies (#31)
CI / build + unit (push) Successful in 33s

This commit was merged in pull request #31.
This commit is contained in:
2026-09-25 13:53:47 +02:00
parent 0909fbc6e2
commit 15d93ec2a4
11 changed files with 137 additions and 15 deletions
+3
View File
@@ -126,6 +126,7 @@ export async function buildTextToRadio(
to: number,
text: string,
channelIndex: number,
replyId?: number,
): Promise<{ bytes: Uint8Array; id: number }> {
const P = await loadProto();
const id = randomPacketId();
@@ -140,6 +141,8 @@ export async function buildTextToRadio(
portnum: P.Portnums.PortNum.TEXT_MESSAGE_APP,
payload: new TextEncoder().encode(text),
wantResponse: true,
// camelCase on purpose — the JS protobufs package silently drops snake_case reply_id; 0 = not a reply (proto3 default, omitted from wire)
replyId: replyId ?? 0,
},
},
});