Repository navigation
Conversation
…for them again at every connect
4 of 11 tasks
Collaborator
|
Shipped in the 0.2.94 release via #1046. |
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.
What changed and why
Signal's read receipts and typing were asked of the phone once per link and held only in memory. A restart turned both off until the phone answered again, and a link whose first answer never came was left without them (#738). chatd now keeps what the phone last said in its own file (
signal/<account>.settings, beside the kept reactions, pins and stickers), starts from it, and asks again at every connect. The phone's later word wins. Nothing is sent that the account did not agree to: what is not known stays off.Type
Platforms
Proof
Scenario: e2e/scenarios/signal-settings-kept
The scenario starts this build's chatd on Signal's scripted wire, steers it the way
crates/chatd/tests/signal.rsdoes, and speaks chatd's socket. The phone shares its settings, then is away for one restart (an emptysignal.phone-awayin the scratch directory, which this change adds to the scripted wire). After the restart a read goes out as "read receipts=true", a typing signal goes out, the message sent then does not say the receipts are off, and the kept file says on. When the phone answers later with receipts off, no receipt goes out. A build from before the change keeps nothing, so the kept-file steps fail there.Lab run: not made. The driver was checked only against a stand-in for chatd's frames, never against the real chatd on a lab host.
Also run on this branch on Windows before this pull request:
cargo build --workspace --all-targets --features tinyclient/gui, thencargo nextest run --workspace --features tinyclient/gui(3681 passed, 28 skipped; among them the two new scripted-wire tests and the new unit test), thencargo test --workspace --doc --features tinyclient/gui.Compatibility
No protocol change. The kept file belongs to the adapter and every field in it has a default, so a missing or unknown field reads as off.
Risk and rollback
A receipt or a typing signal could be sent from what the phone said before a restart instead of from a fresh answer. The phone is asked at every connect and its answer wins, and a file that does not read is off. Revert the commit; the file can stay.
Release note
Signal keeps the read receipts and typing the phone last shared over a restart, and asks for them again at every connect.
Part of #738. Left: Settings › Privacy does not yet show the phone's state.