Skip to content

Support additional relays provided by the node#1982

Closed
alecperkins wants to merge 1 commit into
meshtastic:mainfrom
alecperkins:relay-info
Closed

Support additional relays provided by the node#1982
alecperkins wants to merge 1 commit into
meshtastic:mainfrom
alecperkins:relay-info

Conversation

@alecperkins

@alecperkins alecperkins commented Jun 23, 2026

Copy link
Copy Markdown

What changed?

Adds support for receiving additional relay info about the same packet from the firmware.

Why did it change?

meshtastic/firmware#10767 provides multiple notices of the same packet for each overheard transmission of the packet. This causes duplicate push notifications for the packet as each repeat is heard.

How is this tested?

I connected the current app (2.7.14 2062) to a node running the changed firmware, and observed the duplicate notifications. I built and installed the iOS app onto an iPhone 16 Pro (iOS 18) and connected it to the node to confirm it does not show duplicates now, and correctly counts the relays.

Screenshots/Videos (when applicable)

IMG_3059

Checklist

  • My code adheres to the project's coding and style guidelines.
  • I have conducted a self-review of my code.
  • I have commented my code, particularly in complex areas.
  • I have verified whether these changes require updates to the in-app documentation under docs/user/ or docs/developer/, and updated accordingly (see copilot-instructions.md for the view → doc page mapping). If no doc update is needed, add the skip-docs-check label.
  • I have tested the change to ensure that it works as intended.

The firmware now forwards additional copies of an inbound packet (same
packet id, relayed by a different node) so the app can track multiple
relayers. SwiftData's unique constraint on MessageEntity.messageId
upserts rather than throws, so re-saving a duplicate copy succeeded,
left messageSaved == true, and fired the message notification a second
time.

textMessageAppPacket now looks up an existing message by packet id
before inserting. When one is found, the copy is treated as an
additional relay: relayNode stays pinned to the first relayer seen and
the relays count is incremented, then it returns without inserting a
new message or scheduling a notification.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alecperkins alecperkins marked this pull request as ready for review June 24, 2026 00:46
@garthvh garthvh marked this pull request as draft June 27, 2026 06:57
@garthvh

garthvh commented Jun 27, 2026

Copy link
Copy Markdown
Member

Changed to draft, code is not even merged into develop in the firmware.

@garthvh

garthvh commented Jun 28, 2026

Copy link
Copy Markdown
Member

The firmware pull that this depends on needs to be reworked

@garthvh garthvh closed this Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants