Commit Graph

1822 Commits

Author SHA1 Message Date
frank a08319f615
fix(sync)_: sync fallback notification (#5888)
* fix(sync)_: Improve EnableInstallationAndSync and add EnableInstallationV2

- Refactor EnableInstallationAndSync for better error handling and response merging
- Add new EnableInstallationV2 method returning the installation
- Update tests to check for installation in response
- Deprecate old EnableInstallation method

* chore_: remove EnableInstallationV2

* fix(sync)_: create/delete AC notification only when targetInstallationID match

- Add targetInstallationID parameter to SendPairInstallation function
- Update protobuf SyncPairInstallation struct with TargetInstallationId field
- Modify method calls across multiple test files to include new parameter
- Update pairing.proto and pairing.pb.go with new field for local pairing

* chore_: rename stubEnableInstallationAndPair

chore_: move InstallationIDProvider

chore_: revert endpoints.go

test_: check AC with resp

chore_: rename ModifiedInstallationsTargetedToThisDevice

test_: add InstallationIDProvider

chore_: revert endpoints.go

chore_: remove comment

test_: add TestNewInstallationCreatedIsNotDeleted
2024-10-07 22:05:37 +08:00
Igor Sirotin c1dd9397f7
refactor_: remove generated files from source control (#5878)
* fix_: gitignore generated files

* chore_: delete generated files

* fix_: update go generate instructions

* feat(Makefile)_: clean-generated-files target

* feat(Makefile)_: `generate` target

* fix(Makefile)_: dependent generate target

* ci_: run generate, update docker file deps

* fix(Makefile)_: remove `clean-generated-files` target

* fix(Makefile)_: simpler GO_GENERATE_CMD arg

* fix_: temp workspace GO_GENERATE_FAST_DIR
2024-10-03 20:59:44 +01:00
Patryk Osmaczko 5a0e06f1ea fix(communities)!: stop syncing community on `LastOpenedAt` update
Syncing the entire community for potentially frequent actions like
`LastOpenedAt` updates is highly inefficient when using Waku as the
transport layer, as it can result in significant bandwidth overhead.
2024-10-03 16:11:29 +02:00
Patryk Osmaczko 2c0178c9c5 fix(tests)_: prevent crash when creating wakuv2 from multiple goroutines
Creating wakuv2 from multiple goroutines results in a race condition
where multiple in-memory databases with the same name are attempted to
be opened.
2024-10-01 20:17:28 +02:00
Jonathan Rainville 1460589a0b
fix(manager)_: make sure to re-add revealed accounts in the response (#5867)
We remove the shared accounts to send normal admins to not leak the addresses, however, that was a destructive action that also removed them from the `requestToJoin` param, which is reused later in the code, so it created an unwanted side effect. The side effect is now erased.
2024-10-01 10:35:56 -04:00
Igor Sirotin 031b5342f1
chore_: move/rename files messing generation (#5897)
* refactor_: rename migrations file

* refactor_: move generate_handlers to cmd

* fix_: makefile generate_handlers path
2024-09-30 19:19:36 +01:00
Patryk Osmaczko 291b87f82d chore(mailserver)_: reduce debug logs size in messenger_mailserver
Logs from `messenger_mailserver` occupy 40 out of 100MB of data in
my `geth.log`.

Instead of extending `logger` with many parameters, such as `chatIDs`,
`topic`, etc., the hash of those parameters is calucalted and kept as a
context.

iterates: #5889
2024-09-30 18:45:29 +02:00
Jonathan Rainville 2bbcce6e25
fix(bridge)_: fix bridge replies not working when they come from Discord (#5830)
Fixes https://github.com/status-im/status-desktop/issues/16323

The problem was that the code expected to receive the Discord message ID, but the bridge is smart enough to return the Status message ID already, so there is no need to try and convert it.

There were also a couple issues in the bridge code itself.
2024-09-27 11:36:25 -04:00
frank 7a23ac59c4
fix_: ignore log partial API request (#5865)
* fix_: ignore log partial sensitive API request

* chore_: use validator

* chore_: rebase
2024-09-27 11:48:51 +01:00
frank 38308d48f2
feat_: log on panic (#5849)
* feat_: log error and stacktrace when panic in goroutine

* test_: add test TestSafeGo

* chore_: rename logAndCall to call

* chore_: rename SafeGo to Go

* chore_: make lint-fix

* chore_: use t.Cleanup

* chore_: Revert "chore_: use t.Cleanup"

This reverts commit 4eb420d179cc0e208e84c13cb941e6b3d1ed9819.

* chore_: Revert "chore_: make lint-fix"

This reverts commit fcc995f157e671a4229b47419c3a0e4004b5fdab.

* chore_: Revert "chore_: rename SafeGo to Go"

This reverts commit a6d73d6df583f313032d79aac62f66328039cb55.

* chore_: Revert "chore_: rename logAndCall to call"

This reverts commit 8fbe993bedb9fbba67349a44f151e2dd5e3bc4cc.

* chore_: Revert "test_: add test TestSafeGo"

This reverts commit a1fa91839f3960398980c6bf456e6462ec944819.

* chore_: Revert "feat_: log error and stacktrace when panic in goroutine"

This reverts commit f612dd828fa2ce410d0e806fe773ecbe3e86a68a.

* feat_: log error and stacktrace when panic in goroutine

* chore_: make lint-fix

* chore_: rename logAndCall to call

* chore_: renaming LogOnPanic

* chore_: update rest goroutine function calls

* chore_: make lint-fix
2024-09-27 06:37:32 +08:00
richΛrd a84f78f8aa
fix_: remove unreachable code error message (#5845) 2024-09-23 09:12:02 -04:00
frank f04a9a8726
feat(sync)!: leftovers work for sync fallback (#5794)
* 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>
2024-09-19 16:17:46 +08:00
frank 6e5a32c022
fix(mentions)_: add callID for `OnChangeText` (#3806) 2024-09-19 13:03:56 +08:00
Igor Sirotin fb150f3d16
fix!: move `MuteFor24Hr` to the end of the enum (#5813) 2024-09-10 11:25:40 +01:00
Mohamed Javid 17c30ac532
fix_: Flaky TestBackupKeypairs test (#5811)
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>
2024-09-09 20:30:05 +05:30
Igor Sirotin bbdf5d5ae0
chore: remove urls package (#5810)
* chore!: remove urls package

* fix_: move encodeDataURL and decodeDataURL to messenger_share_urls
2024-09-09 14:45:21 +01:00
richΛrd c24eba8af2
fix_: make mailserver availability subscriptions concurrency safe (#5804) 2024-09-05 15:18:23 -04:00
richΛrd 771a0c3562
refactor: remove wakuv1 code from mailserver cycle and add ENR to list of storenodes (#5753)
* test_: remove eth.prod mailservers from cycle
* test_: disable store request for wakuv1
* chore_: add ENR and remove V1 code
* refactor_: storenode cycle and allow ENRs and multiaddresses
2024-09-05 10:25:26 -04:00
kaichao 1b53d04ccf
feat_: accept community join request with mvds (#5787)
* 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.
2024-09-05 18:53:09 +08:00
Alexandra Betouni 060918bcd4
feat_: adding 24hours duration for chats mute (#5020)
Needed for https://github.com/status-im/status-desktop/issues/13393
2024-09-04 15:41:45 +01:00
Azanul Haque 3ca2d6eb23
fix_: Orphaned generated code (#4086)
Signed-off-by: Azanul <azanulhaque@gmail.com>
2024-09-03 21:32:23 +01:00
Igor Sirotin beaca5faf7
chore_: uncomment tests (#5792)
* chore_: uncomment tests

* chore_: better comment

Co-authored-by: osmaczko <33099791+osmaczko@users.noreply.github.com>
2024-09-03 12:40:50 +01:00
Igor Sirotin 4083aae162
chore_: refactor `TestMessengerCollapsedComunityCategoriesSuite` (#5790)
* chore_: improve readability of `TestE2eSendingReceivingProfilePicture`

* chore_: cleanup logs

* chore_: remove generateKeyUID

* chore_: cleanup logs

* chore_: move chat message sending to switch case

* chore_: remove redundant args

* chore_: simplify images check

* chore(testMesengerConfig)_: add createSettings option

* chore_: move TestMessengerCollapsedCommunityCategoriesSuite

* chore(MessengerProfilePictureHandlerSuite)_: simpler messenger creation

* chore_: MessengerProfilePictureHandlerSuite test cases

* chore_: lint fix

* chore_: address pr comments
2024-09-03 12:39:49 +01:00
Sean Hagstrom 717814e83f
fix!: ensure deleting message does not accidentally delete unrelated notifications (#5789)
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.
2024-09-03 10:12:44 +01:00
frank e6a2f0afd6
chore_: fix flaky test TestEnableInstallationAndPair (#5775) 2024-09-02 16:24:38 +08:00
Mohamed Javid bd0464d192
fix_: send accounts event on handling backed up accounts (#5739)
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>
2024-08-31 00:58:03 +05:30
Arseniy Klempner 27d02d5fc8
feat(telemetry)_: include device type in metrics (#5669)
* feat(telemetry)_: include device type in metrics

* chore(telemetry)_: refactor common fields used across metrics
2024-08-30 08:59:03 -07:00
Parvesh Monu 0531535ef5
fix_: fix unmute logic (#5720) 2024-08-30 17:47:43 +05:30
frank 82ba10ede7
chore(mentions)_: Add suggestion limit for mention recommendations (#5774)
- 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
2024-08-30 09:37:08 +08:00
Igor Sirotin 28e7a364c7
chore(test_stats)_: better stats, print skipped tests (#5781)
* chore(test_stats)_: better stats, list skipped tests

* chore_: add skip reasons to some tests
2024-08-29 21:09:26 +01:00
kaichao 84928e218f
feat_: request to join community message use mvds (#5723)
* 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
2024-08-28 22:11:34 +08:00
Pablo Lopez 0c0888927c
fix_: store query lastrequest (#5767) 2024-08-27 08:58:52 +03:00
Igor Sirotin e0eb737c51
fix_: enable tests to run with `-count` more than 1 (#5757)
* 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
2024-08-23 19:30:58 +00:00
richΛrd 36c893d3d2
fix_: proper content topic conversion between transport and waku layer for setting criteria interest (#5758) 2024-08-21 13:45:32 -04:00
richΛrd 4aa51f9882
fix_: wait for mailserver available signal to change missing messages criteria (#5686) 2024-08-16 14:26:10 -04:00
richΛrd c02ebf957c
refactor_: use concrete datatypes instead of `string` (#5701) 2024-08-16 19:24:21 +01:00
Igor Sirotin a00bf6977b
fix_: publish community periodically (#5709) (#5715)
* fix_: publish community at app start

* fix_: allow publishing community with same clock

* chore_: increase community publish interval to 24 hours
2024-08-15 16:49:08 +01:00
Igor Sirotin f660be0daa
chore!: simplify local pairing API (#5643)
* chore!: switch to use CreateAccount, fix tests

* chore_: move GenerateInstallationID to multidevice

* chore!: clean up ReceiverConfig

* chore_: use DefaultKeystoreRelativePath

* chore_: cleanup

* fix_: import api

* chore_: lint fix

* chore_: remove unused import
2024-08-14 21:10:19 +01:00
Andrea Maria Piana 0954a4ad13 feat!: drive proxy stage name from the client 2024-08-14 18:50:01 +00:00
Igor Sirotin 130c995b92
chore_: remove logging identity images (#5708) 2024-08-14 10:32:17 +01:00
Igor Sirotin 9175e45e61
fix_: block on logout (#5696)
* fix_: check context on processAndPushTelemetry

* fix_: fix waitgroup add/done in Waku

* fix(pendingTracker)_: stop the pending transacitonTracker on logout

* chore_: lint fix

---------

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2024-08-12 22:30:13 +01:00
richΛrd 48ebe24f8e
fix_: tmp remove subscription to mailserver available signal to avoid leak (#5684) 2024-08-09 10:04:45 -04:00
Jonathan Rainville 772b5b6d35
fix(contact_request)_: potential fix to contact request with no saved message (#5665) (#5673)
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.
2024-08-08 15:36:51 +01:00
Igor Sirotin 01288227d3
fix_: log utc timestamp (#5672)
* fix_: log zone-agnostic time

* chore_: use time.Truncate
2024-08-07 18:54:42 +01:00
Mykhailo Prakhov 58a9557c58
fix: reject handling requests to join without revealed accounts (#5549)
* fix(requestToJoin)_: request to join must have revealed addresses with signature

* fix(tests)_: fix tests

* chore(tests)_: increase tests timeout
2024-08-07 17:57:02 +02:00
Igor Sirotin eeb34f780f
chore_: remove deprecated `CreateAccount.BackupDisabledDataDir` (#5664)
* chore_: remove deprecated CreateAccount.BackupDisabledDataDir

* test_: cover ErrCreateAccountInvalidRootDataDir
2024-08-07 13:59:43 +01:00
Igor Sirotin 2f5437130e
feat_: auto set random wallet emoji when creating account (#5667)
* feat_: auto set random wallet emoji when creating account

* fix_: remove emoji on error

* fix_: lint
2024-08-07 13:34:04 +01:00
richΛrd 20d6d4eb9a
refactor: extract missing messages logic to go-waku (#5638) 2024-08-06 14:49:26 -04:00
Sale Djenic 2129a3f95c feat_: accounts/saved addresses capacity related api endpoints added
Added endpoints:
- `RemainingAccountCapacity`
- `RemainingKeypairCapacity`
- `RemainingWatchOnlyAccountCapacity`
- `RmaininngCapacityForSavedAddresses`
2024-08-06 08:19:33 +02:00
richΛrd 5212f337d7
feat_: rate limit message publishing (#5523) 2024-08-01 14:36:25 -04:00