Route command replies through MeshService.respond() — same channel, threaded quote (v0.18.1)
CI / build + unit (pull_request) Successful in 42s
CI / build + unit (pull_request) Successful in 42s
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
metadataFrame,
|
||||
moduleConfigSectionFrame,
|
||||
nodeInfoFrame,
|
||||
outboundPackets,
|
||||
startBridge,
|
||||
telemetryPacketFrame,
|
||||
textPacketFrame,
|
||||
@@ -667,21 +668,6 @@ describe('MeshService message history', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// outbound text packets written to the bridge, in order (want_config frames skipped)
|
||||
function outboundPackets(out: Uint8Array[]): P.Mesh.MeshPacket[] {
|
||||
const merged = new Uint8Array(out.reduce((n, c) => n + c.length, 0));
|
||||
let off = 0;
|
||||
for (const c of out) {
|
||||
merged.set(c, off);
|
||||
off += c.length;
|
||||
}
|
||||
return extractFrames(merged).packets.flatMap((p) => {
|
||||
const tr = fromBinary(P.Mesh.ToRadioSchema, p);
|
||||
if (tr.payloadVariant?.case === 'packet') return [tr.payloadVariant.value];
|
||||
return [];
|
||||
});
|
||||
}
|
||||
|
||||
describe('MeshService respond', () => {
|
||||
it('replies to an rx DM as a directed send back to the sender on the original channel with replyId = messageId', async () => {
|
||||
const bridge = await startBridge();
|
||||
|
||||
Reference in New Issue
Block a user