diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx
index 47f099f9..045676ab 100644
--- a/src/components/PageComponents/Channel.tsx
+++ b/src/components/PageComponents/Channel.tsx
@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
import { fromByteArray, toByteArray } from "base64-js";
import { Controller, useForm } from "react-hook-form";
-import toast from "react-hot-toast";
+import { toast } from "react-hot-toast";
import { Input } from "@app/components/form/Input.js";
import { Form } from "@components/form/Form";
diff --git a/src/components/PageComponents/Messages/Message.tsx b/src/components/PageComponents/Messages/Message.tsx
index bade2be0..bc3744d9 100644
--- a/src/components/PageComponents/Messages/Message.tsx
+++ b/src/components/PageComponents/Messages/Message.tsx
@@ -31,7 +31,7 @@ export const Message = ({
return lastMsgSameUser ? (
{message.ack ? (
-
+
) : (
)}
@@ -68,7 +68,7 @@ export const Message = ({
{message.ack ? (
-
+
) : (
)}
diff --git a/src/core/subscriptions.ts b/src/core/subscriptions.ts
index c60169d8..92881664 100644
--- a/src/core/subscriptions.ts
+++ b/src/core/subscriptions.ts
@@ -1,4 +1,4 @@
-import toast from "react-hot-toast";
+import { toast } from "react-hot-toast";
import type { Device } from "@core/stores/deviceStore.js";
import { Protobuf, Types } from "@meshtastic/meshtasticjs";
@@ -7,6 +7,7 @@ export const subscribeAll = (
device: Device,
connection: Types.ConnectionType
) => {
+ let myNodeNum = 0;
connection.setLogLevel(Protobuf.LogRecord_Level.TRACE);
// onLogEvent
@@ -37,13 +38,14 @@ export const subscribeAll = (
device.addWaypoint(data);
device.addWaypointMessage({
waypointID: data.id,
- ack: rest.packet.from !== device.hardware.myNodeNum,
+ ack: rest.packet.from !== myNodeNum,
...rest,
});
});
connection.onMyNodeInfo.subscribe((nodeInfo) => {
device.setHardware(nodeInfo);
+ myNodeNum = nodeInfo.myNodeNum;
});
connection.onUserPacket.subscribe((user) => {
@@ -78,7 +80,7 @@ export const subscribeAll = (
connection.onMessagePacket.subscribe((messagePacket) => {
device.addMessage({
...messagePacket,
- ack: messagePacket.packet.from !== device.hardware.myNodeNum,
+ ack: messagePacket.packet.from !== myNodeNum,
});
});
};