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.
I never realized this was wrong, and I guess I kept re-linking as part of my tests, but there was no way for
presage
since a very long time (maybe even forever) to receive messages from a contact that changed their identity (which happens when you change your phone, for example).This PR fixes this and follows the default behavior of official Signal clients.
A
SyncMessage
is inserted in the 1-1 thread with the contact whose identity changed, which a client can interpret to display the "Your safety number with [CONTACT] has changed".Currently, the values are used in the following way:
verified::State::Default
will always be saved in the timeline when the new identity is savedverified::State::Unverified
will be save in the timeline when the safety number changed, letting developers display a warning to users.Note: there is currently no way to manually mark some identity as verified in the timeline, but one could do it manually in a client.
Closes #181