From d60c72d66d2284ff12a74a69f32030954bb5b1e1 Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Mon, 7 Apr 2025 09:24:48 -0400 Subject: [PATCH 1/2] add emoji and reply support --- packages/core/deno.json | 2 +- packages/core/src/meshDevice.ts | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/core/deno.json b/packages/core/deno.json index 25e18d0..d5e56a0 100644 --- a/packages/core/deno.json +++ b/packages/core/deno.json @@ -1,6 +1,6 @@ { "name": "@meshtastic/core", - "version": "2.6.2", + "version": "2.6.3", "exports": { ".": "./mod.ts" }, diff --git a/packages/core/src/meshDevice.ts b/packages/core/src/meshDevice.ts index 635980d..918556a 100755 --- a/packages/core/src/meshDevice.ts +++ b/packages/core/src/meshDevice.ts @@ -96,11 +96,12 @@ export class MeshDevice { destination?: Destination, wantAck?: boolean, channel?: ChannelNumber, + replyId?: number, + emoji?: number, ): Promise { this.log.debug( Emitter[Emitter.SendText], - `📤 Sending message to ${destination ?? "broadcast"} on channel ${ - channel?.toString() ?? 0 + `📤 Sending message to ${destination ?? "broadcast"} on channel ${channel?.toString() ?? 0 }`, ); @@ -114,6 +115,8 @@ export class MeshDevice { wantAck, false, true, + replyId, + emoji, ); } @@ -127,8 +130,7 @@ export class MeshDevice { ): Promise { this.log.debug( Emitter[Emitter.SendWaypoint], - `📤 Sending waypoint to ${destination} on channel ${ - channel?.toString() ?? 0 + `📤 Sending waypoint to ${destination} on channel ${channel?.toString() ?? 0 }`, ); @@ -181,8 +183,8 @@ export class MeshDevice { to: destination === "broadcast" ? Constants.broadcastNum : destination === "self" - ? this.myNodeInfo.myNodeNum - : destination, + ? this.myNodeInfo.myNodeNum + : destination, id: this.generateRandId(), wantAck: wantAck, channel, @@ -988,8 +990,7 @@ export class MeshDevice { default: { this.log.error( Emitter[Emitter.HandleMeshPacket], - `⚠️ Received unhandled AdminMessage, type ${ - adminMessage.payloadVariant.case ?? "undefined" + `⚠️ Received unhandled AdminMessage, type ${adminMessage.payloadVariant.case ?? "undefined" }`, dataPacket.payload, ); From 72cc480cdd0c2e501d2619c3ca1ffe84669f8d68 Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Mon, 7 Apr 2025 11:27:28 -0400 Subject: [PATCH 2/2] fomatting --- packages/core/src/meshDevice.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/core/src/meshDevice.ts b/packages/core/src/meshDevice.ts index 918556a..378a66e 100755 --- a/packages/core/src/meshDevice.ts +++ b/packages/core/src/meshDevice.ts @@ -101,7 +101,8 @@ export class MeshDevice { ): Promise { this.log.debug( Emitter[Emitter.SendText], - `📤 Sending message to ${destination ?? "broadcast"} on channel ${channel?.toString() ?? 0 + `📤 Sending message to ${destination ?? "broadcast"} on channel ${ + channel?.toString() ?? 0 }`, ); @@ -130,7 +131,8 @@ export class MeshDevice { ): Promise { this.log.debug( Emitter[Emitter.SendWaypoint], - `📤 Sending waypoint to ${destination} on channel ${channel?.toString() ?? 0 + `📤 Sending waypoint to ${destination} on channel ${ + channel?.toString() ?? 0 }`, ); @@ -183,8 +185,8 @@ export class MeshDevice { to: destination === "broadcast" ? Constants.broadcastNum : destination === "self" - ? this.myNodeInfo.myNodeNum - : destination, + ? this.myNodeInfo.myNodeNum + : destination, id: this.generateRandId(), wantAck: wantAck, channel, @@ -990,7 +992,8 @@ export class MeshDevice { default: { this.log.error( Emitter[Emitter.HandleMeshPacket], - `⚠️ Received unhandled AdminMessage, type ${adminMessage.payloadVariant.case ?? "undefined" + `⚠️ Received unhandled AdminMessage, type ${ + adminMessage.payloadVariant.case ?? "undefined" }`, dataPacket.payload, );