Optional replyId on send (API + MCP) — protocol-level threaded replies (#31)
CI / build + unit (push) Successful in 33s
CI / build + unit (push) Successful in 33s
This commit was merged in pull request #31.
This commit is contained in:
@@ -488,11 +488,16 @@ export class MeshService implements OnModuleInit, OnModuleDestroy {
|
||||
return [...this.telemetryHistory].reverse();
|
||||
}
|
||||
|
||||
/** Send `text` to node `to` on the pinned test channel; returns the packet id. Throws ServiceUnavailable when the bridge is down. */
|
||||
async sendText(to: number, text: string): Promise<number> {
|
||||
/** Send `text` to node `to` on the pinned test channel; returns the packet id. Optional `replyId` marks the message as a reply to an earlier packet (the recipient app renders it as a threaded quote). Throws ServiceUnavailable when the bridge is down. */
|
||||
async sendText(to: number, text: string, replyId?: number): Promise<number> {
|
||||
if (!this.connected || !this.socket)
|
||||
throw new ServiceUnavailableException('bridge not connected');
|
||||
const { bytes, id } = await buildTextToRadio(to, text, this.sendChannel);
|
||||
const { bytes, id } = await buildTextToRadio(
|
||||
to,
|
||||
text,
|
||||
this.sendChannel,
|
||||
replyId,
|
||||
);
|
||||
const rec: MessageRecord = {
|
||||
id,
|
||||
dir: 'tx',
|
||||
|
||||
Reference in New Issue
Block a user