Mark packets as acked in MsgTracker

This patch updates webchat to track the msgs recieved as tracked
and acked, so the TX thread can stop trying to send.
This commit is contained in:
Hemna 2022-12-02 14:43:57 -05:00
parent 726c8f4f2f
commit 480094b0d4
2 changed files with 4 additions and 1 deletions

View File

@ -244,6 +244,8 @@ class WebChatTXThread(aprsd_thread.APRSDThread):
LOG.info(f"We got ack for our sent message {ack_num}")
messaging.log_packet(packet)
SentMessages().ack(int(ack_num))
tracker = messaging.MsgTrack()
tracker.remove(ack_num)
self.socketio.emit(
"ack", SentMessages().get(int(ack_num)),
namespace="/sendmsg",

View File

@ -102,7 +102,8 @@ class APRSDProcessPacketThread(APRSDThread):
# We don't put ack packets destined for us through the
# plugins.
if (
tocall.lower() == self.config["aprsd"]["callsign"].lower()
tocall
and tocall.lower() == self.config["aprsd"]["callsign"].lower()
and msg_response == "ack"
):
self.process_ack_packet(packet)