Skip to content

Commit

Permalink
Fix issue where two kv4p HTs can get in an ack loop. Shouldn't ack acks.
Browse files Browse the repository at this point in the history
  • Loading branch information
VanceVagell committed Dec 25, 2024
1 parent c9a5de7 commit c768f36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ public void handlePacket(byte[] data) {
MessagePacket messagePacket = new MessagePacket(infoField.getRawBytes(), aprsPacket.getDestinationCall());

// If the message was addressed to us, notify the user and ACK the message to the sender.
if (messagePacket.getTargetCallsign().trim().toUpperCase().equals(callsign.toUpperCase())) {
if (!messagePacket.isAck() && messagePacket.getTargetCallsign().trim().toUpperCase().equals(callsign.toUpperCase())) {
showNotification(MESSAGE_NOTIFICATION_CHANNEL_ID, MESSAGE_NOTIFICATION_TO_YOU_ID,
aprsPacket.getSourceCall() + " messaged you", messagePacket.getMessageBody(), MainActivity.INTENT_OPEN_CHAT);
sendAckMessage(aprsPacket.getSourceCall().toUpperCase(), messagePacket.getMessageNumber());
Expand Down

0 comments on commit c768f36

Please sign in to comment.