Repository navigation
Conversation
Nickname matching could put one peer's messages in another peer's private chat on DM arrival or chat opening. A reply or explicit Resend could then target the wrong peer. GeoDM Block could also block a matching mesh peer while leaving the sender unblocked. Remove both history rules and the unread-name fallback. Keep fingerprint and known-key joins. Join courier full-key and derived short-ID history, preserving mesh sender IDs and recognizing the aliases for receipts. Resolve geohash Block by the sender's mapped key; stop if it is missing. Correct the fingerprint-test fixture to resolve through the transport. Restoring the removed rules fails their regressions. App, package and simulator tests, performance checks, SwiftLint, unsigned iOS simulator and macOS Release builds, and macOS Periphery pass. iOS Periphery matches the local baseline. No hardware run; receipts tested to transport handoff.
chessing234
reviewed
Oct 5, 2026
chessing234
left a comment
Contributor
There was a problem hiding this comment.
Reviewed removal of nickname-based consolidation and unread matching, key-derived alias migration, sender-ID preservation, read-receipt alias checks, and identity-based blocking. No blocking issue found.
Validation limit: source review only, except the CSV validator noted above. The app/test suite was not built or run because this environment has Command Line Tools but no full Xcode installation.
Preserve the sender-ID authorship and receipt-sync fixes from permissionlesstech#1793 while retaining identity-based private chat separation. Resolve overlapping tests so matching nicknames alone do not join conversations. Keep the own-message and rename regressions, along with fingerprint and known Noise-key continuity coverage. Add a regression ensuring stable-key consolidation preserves the device’s own sender ID while resolving the peer’s rows to its routing ID. Cover repeated A-to-B-to-A arrivals and keep histories separate. Verify that a reply from B’s open chat stays addressed to B when A returns with the same name and an unresolved fingerprint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Private chats with different peers can merge when their nicknames match. A reply or resent message intended for one peer can then be addressed to the other.
This happens locally on the device receiving their DMs; merging the chats does not itself send either peer the combined history.
The scenarios include:
Two code paths allowed this:
migratePrivateChatsIfNeededcould move or copy recent history into an empty conversation when either fingerprint was unavailable and a message matched the nickname. It checked the incoming fingerprint and the old chat's stored fingerprint, with a 24-hour cutoff.PrivateChatManager.consolidateMessagescould move a geohash DM thread and rewrite its sender IDs when every source row's sender name matched the peer's nickname, ignoring case. The upstream rule excludes threads containing this device's own rows, but a thread containing only the other sender's rows can still match by name. For a mesh peer, the match includes the geohash display-name suffix.Changes
Updated after #1793 merged to preserve its fixes and focus this PR on the remaining nickname-only history joins between different peers.
A shared name no longer joins history through these paths, including after a key change or between the same person's geohash and mesh identities.
Tests
Validation
The history and reply tests reproduced the bug on upstream main at
04995f68and passed with this fix. Deliberately restoring the faulty behavior made the relevant tests fail, covering nickname joins, sender identity, unread state, Block targeting, receipts and the retained authorship fixes.Routing was checked through a mock transport; physical-device and courier delivery remain unverified.