message: extract privacy tokens from LID-addressed conversations#1148
Open
Wormey1o wants to merge 1 commit into
Open
message: extract privacy tokens from LID-addressed conversations#1148Wormey1o wants to merge 1 commit into
Wormey1o wants to merge 1 commit into
Conversation
storeHistoricalMessageSecrets currently filters tcToken extraction to chatJID.Server == DefaultUserServer. Accounts that have migrated to LID addressing store 1:1 chats under HiddenUserServer, so history sync yields zero privacy tokens for those chats. Companion devices then can't satisfy the tctoken requirement on outbound 1:1 sends and the server responds with error 463. Include HiddenUserServer in the filter so LID-addressed chats get the same treatment as DefaultUserServer chats. Group sends are unaffected (sender-key broadcast doesn't require a per-peer token).
|
nc work |
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.
Problem
storeHistoricalMessageSecrets(inmessage.go) filters tcToken extraction tochatJID.Server == types.DefaultUserServer. Accounts that have migrated to LID addressing store their 1:1 chats undertypes.HiddenUserServer, so the history-sync payload yields zero privacy tokens for those chats.The downstream effect on a freshly-paired companion device:
463, and the send is rejected.The pre-existing tokens on the primary device stay on the primary; only new outbound tokens from the primary propagate to companions via app-state sync. For accounts that haven't sent anything recently, the companion has no path to obtain tokens at all — the bridge is effectively stuck on inbound-only for 1:1.
Fix
Include
HiddenUserServerin the filter so LID-addressed chats get the same treatment asDefaultUserServerchats. One-line change.Repro
@lidJIDs — practically every post-LID-migration account).SendMessageto a 1:1 LID peer that the user has previously messaged from the primary.After this patch and a re-pair, history sync extracts the tokens and the same send succeeds.
Notes
DefaultUserServerchats.