* feat(sync)!: remove compatibility with v2.29
* feat(sync)_: add AC notifications when initiating the sync fallback
Needed for https://github.com/status-im/status-desktop/issues/15750
Adds an AC notification when the syncing fails and the user is prompted to use a seed phrase instead.
There is one notification for the initiator (created) and one for the old account (received).
Once the flow is completed, ie the receiver presses Enable and sync, the notifications are deleted
* test_: update test
* fix_: lint issue
* chore_: ignore tmp file generated by make lint-fix
* chore_: rename EnableAndSyncInstallation to EnableInstallationAndSync
* chore_: address review feedback
* chore_: revert changes to .gitignore
* fix_: simplify code
* fix_: keep old API
---------
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
This commit fixes the flaky TestBackupKeypairs test.
The flakiness is due to the order in which the backup is processed. The test expects the profile keypair addresses first but sometimes, the non-profile keypair is processed before the profile keypair. This commit updates the test to ensure the received addresses exist in the expected.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* feat_: accept community join request with mvds
* chore_: no sender when use mvds in comm join response
* fix_: only use mvds for tokenized communities
* chore_: add comment for this.
This change attempts to resolve an issue with notifications being deleted for users after another user deletes the last message inside a community.
The cause of the issue seemed to be related to how notifications could reference a message with the `LastMessage` field. And if the last message was deleted from a community, then the notifications that reference the last message via `LastMessage` field would also removed/deleted.
Moving forward, we will no longer use the `LastMessage` field as a way to detect notifications that need to be deleted, and we now only use the `Message` field of a notification, and we have adapted the creation of notifications to avoid using the `LastMessage` field.
This commit moves the "accountsFeed" from "initServices" to the status node config, and adds a reference to messenger config for sending events on handling backed-up data.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
- Introduce a constant `suggestionsLimit` set to 15
- Apply the suggestion limit when calculating mention suggestions
- Replace unlimited suggestions (-1) with the new limit in relevant function calls
- This change aims to improve performance and user experience by limiting the number of mention suggestions displayed
* feat_: request to join community message use mvds
* chore_: set skip encryption layer to false when request to join community
* chore_: fix tests.
* chore_: fix test.
* chore_: fix more tests
* chore_: fix resend raw message test.
* chore_: add comments for skip encryption layer
* fix(TestProfilingCPU)_: enable run with -count=2
* fix(TestProfilingMem)_: enable run with -count=2
* fix(zaputil)_: register encoder only once
* fix(timesource)_: global variables override in tests
* fix(TestClosingsqlDB)_: delete database from cache
* fix(postgres/helpers)_: drop connections before dropping database
* fix_: linter
* chore_: remove redundant condition
Fixes https://github.com/status-im/status-desktop/issues/15930
The issue happened because I received a notification about a contact request, but the request was not associated with a message in the DB. The DB didn't have a message with the required ID in it.
This potential fix moves the creation of the contact request later in the handling code, because the only way this bug can happen as far as I see it is if there is an error later in the handler function and the message is never added to the response, and therefore never saved.
* feat(telemetry)_: publish peerId
* fix_: fix goimports lint error in waku
* fix_: trim extra slash, use the right Waku service
* fix_: update protocol/messenger.go
Co-authored-by: richΛrd <info@richardramos.me>
* fix_: panic when PeerID is called on wakuv1
* fix_: use option instead of additional param for PeerID
---------
Co-authored-by: Arseniy Klempner <arseniyk@status.im>
Co-authored-by: richΛrd <info@richardramos.me>
* feat(pairing)!: Add extra parameters and remove v2 compatibility
This commit includes the following changes:
I have added a flag to maintain 2.29 compatibility.
Breaking change in connection string
The local pairing code that was parsing the connection string had a few non-upgradable features:
It was strictly checking the number of parameters, throwing an error if the number was different. This made it impossible to add parameters to it without breaking.
It was strictly checking the version number. This made increasing the version number impossible as older client would just refuse to connect.
The code has been changed so that:
Two parameters have been added, installation-id and key-uid. Those are needed for the fallback flow.
I have also removed version from the payload, since it wasn't used.
This means that we don't support v1 anymore. V2 parsing is supported . Going forward there's a clear strategy on how to update the protocol (append parameters, don't change existing one).
https://www.youtube.com/watch?v=oyLBGkS5ICk Is a must watch video for understanding the strategy
Changed MessengerResponse to use internally a map of installations rather than an array (minor)
Just moving towards maps as arrays tend to lead to subtle bugs.
Moved pairing methods to messenger_pairing.go
Just moved some methods
Added 2 new methods for the fallback flow
FinishPairingThroughSeedPhraseProcess
https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R29
EnableAndSyncInstallation
https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R18
Flow for clients
Client A1 is logged in
Client A2 is logged out
Client A1 shows a QR code
Client A2 scans a QR code
If connection fails on A2, the user will be prompted to enter a seed phrase.
If the generated account matches the key-uid from the QR code, A2 should call FinishPairingThroughSeedPhraseProcess with the installation id passed in the QR code. This will send installation information over waku. The user should be shown its own installation id and prompted to check the other device.
Client A1 will receive new installation data through waku, if they are still on the qr code page, they should show a popup to the user showing the received installation id, and a way to Enable and Sync, which should call the EnableAndSyncInstallation endpoint. This should finish the fallback syncing flow.
Current issues
Currently I haven't tested that all the data is synced after finishing the flow. I see that the two devices are paired correctly, but for example the DisplayName is not changed on the receiving device. I haven't had time to look into it further.
* test_: add more test for connection string parser
* fix_: fix panic when parse old connection string
* test_: add comments for TestMessengerPairAfterSeedPhrase
* fix_: correct error description
* feat_:rename FinishPairingThroughSeedPhraseProcess to EnableInstallationAndPair
* fix_: delete leftover
* fix_: add UniqueKey method
* fix_: unify the response for InputConnectionStringForBootstrapping
* fix_: remove fields installationID and keyUID in GethStatusBackend
* fix_: rename messenger_pairing to messenger_pairing_and_syncing
---------
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
* feat_: Check for mobile data connection if setting is on
* fix_: check code control flag inside asyncRequestAllHistoricMessages
---------
Co-authored-by: Igor Sirotin <sirotin@status.im>