Commit Graph

1534 Commits

Author SHA1 Message Date
Andrea Maria Piana 598e3217ba Signal user if the networks are not supported 2024-02-13 12:09:46 +00:00
Igor Sirotin 5e905518aa
fix: missing fields in Communtiy CreateDeepCopy (#4718) 2024-02-12 23:26:32 +00:00
Igor Sirotin 432bfeea2f
fix: flaky `MessengerStoreNodeRequestSuite` (#4721) 2024-02-12 22:30:19 +00:00
Jonathan Rainville 1c42c07760
feat(discord_import): send signal when the import was cleaned up (#4693)
This is to let the front end know that the community was deleted so it can also delete it from the UI
2024-02-12 16:04:12 -05:00
Igor Sirotin 44c39d345e
chore: testWakuV2Config (#4704)
* chore: testWakuV2Config

* renamed to `NewTestWakuV2`
2024-02-12 12:53:15 +00:00
Igor Sirotin 8d4f4904c6
fix: better calculation of from/to mailserver batch parameters (#4702) 2024-02-12 12:20:56 +00:00
Andrea Maria Piana daef5c56e2 Add HighestRole & ordered roles to permission response
This commit adds HighestRole & a list of permissions in order of
importance to the CheckPermissionToJoinResponse.

This simplify client code so that it doesn't need to be calculated on
the client.
2024-02-12 12:18:56 +00:00
Mikhail Rogachev 3ea2002904
Feat: Modify grants for profile showcase use (#4694)
* chore: regenerate proto binaries

* feat: remove unused grant code for community's canPost
2024-02-11 15:11:04 +03:00
osmaczko ec1238e020
fix: adapt to `response.RequestsToJoinCommunity` interface change (#4705)
fixes tests build
2024-02-09 18:23:24 +00:00
Michal Iskierko cc66f43713 fix: fix permissions checker
Improve CheckPermissions function.
Check separately member and admin+tokenmaster permissions..

Issue #12884
2024-02-09 19:00:43 +01:00
Patryk Osmaczko 87199a8c99 chore: cover community events eventual consistency with test
It proves eventual consistency is broken for contact request events.

iterates: status-im/status-desktop#13387
2024-02-09 16:02:17 +01:00
Patryk Osmaczko a0e7b1374e feat: introduce `MessagesOrderController`
Enables controlling order of messages in tests. Useful for deterministic
reproduction of out-of-order messages.

Required for: status-im/status-desktop#13387
2024-02-09 16:02:17 +01:00
Patryk Osmaczko a8b7854ce9 feat: introduce `testWakuWrapper` and `testPublicWakuAPIWrapper`
Enables `PublicWakuAPI` introspection.
2024-02-09 16:02:17 +01:00
Patryk Osmaczko 7e8b61f888 feat: introduce `MessagesIterator`
Enables customization of iteration strategy for retrieved messages.
2024-02-09 16:02:17 +01:00
Mikhail Rogachev 9b7926b23b
feat: delete profile showcase community entry on community leave or kicked (#4686) 2024-02-09 12:37:54 +03:00
Mikhail Rogachev 2350461818
feat: Dispatch profile showcase message on mutual/verified contacts change (#4678) 2024-02-09 12:36:54 +03:00
Andrea Maria Piana c49a0fc314 [Fixes: #4687] Change requestsToJoinCommunity to a map
The test was flaky because of re-receiving the message, which resulted
in multiple identical requestsToJoin being added to messengerResponse.

We should in general avoid using arrays in messengerResponse and prefer
maps for exactly this reason.
2024-02-08 11:18:53 +00:00
Icaro Motta e7e6782241 Fix: linter error 2024-02-07 20:10:49 +00:00
Icaro Motta 31277f1e9e Fix: cover case where criteria doesn't have token IDs 2024-02-07 20:10:49 +00:00
Icaro Motta b727f1e14b Extract entire permissioned balances logic to separate file 2024-02-07 20:10:49 +00:00
Icaro Motta 105703e2eb Remove zombie code from experiments 2024-02-07 20:10:49 +00:00
Icaro Motta 4f8a66fc07 Create endpoint to get permissioned balances 2024-02-07 20:10:49 +00:00
Jonathan Rainville 18e7b6c331
Fix Discord Import getting stuck (#4681)
* fix(community_import): fix import getting stuck in case of error in msgs

Fixes #13438 and #13439

* fix(community_import): fixes a bug with the timestamp format

The importer didn't like `-` time zones like `-4`. Using the standard date format makes it work.
2024-02-07 13:02:47 -05:00
Mohsen 70ee70a19a
feat: implement new endpoint to set customization color (#4568) 2024-02-07 18:20:54 +03:00
Andrea Maria Piana 605fe40e32 Fix encryption metadata issues #4613
This commit fixes a few issues with communities encryption:

Key distribution was disconnected from the community description, this created a case where the key would arrive after the community description and that would result in the client thinking that it was kicked.
To overcome this, we added a message that signals the user that is kicked. Also, we distribute the key with the community description so that there's no more issues with timing.
This is a bit expensive for large communities, and it will require some further optimizations.

Key distribution is now also connected to the request to join response, so there are no timing issues.

Fixes an issue with key distribution (race condition) where the community would be modified before being compared, resulting in a comparison of two identical communities, which would result in no key being distributed. This commit only partially address the issue.
2024-02-07 10:25:41 +00:00
Mikhail Rogachev 47b9978525
Feat: Save and dispatch profile showcase on wallet account change (#4674)
* Feat: Save and dispatch profile showcase on wallet account change
* Feat: Remove entry and dispatch profile showcase on wallet account removal
2024-02-07 12:30:56 +03:00
Ivan Belyakov 33c46dd59d fix(protocol): crash in concurrent map write/read 2024-02-05 15:21:44 +01:00
Roman Volosovskyi 2dc1b48968
[#4671] Increase interval between calls to Directory contract (#4672) 2024-02-05 14:01:59 +01:00
richΛrd e9b10c4beb
chore: sync history regardless of connection type (#4656) 2024-02-02 13:03:55 -04:00
Roman Volosovskyi 9b10b29da2
[#4630] Add wallet_fetchOrGetCachedWalletBalances method (#4666) 2024-02-02 11:42:56 +01:00
Mohsen 9879b1ea77
fix: set display name issue (#4642) 2024-02-01 19:13:41 +03:30
Igor Sirotin 0c2a935578
fix: fetch history when back online (#4651) 2024-01-30 18:13:18 +00:00
richΛrd 98c1ebec05
fix: handle community shard unassignment and update (#4627) 2024-01-30 13:56:59 -04:00
Igor Sirotin 1f0fc2935c
fix: clear waku envelopes cache when deleting a chat (#4621)
* chore: extract `ErrPermissionToJoinNotSatisfied`
* chore: disable resending messages in communities tests
* chore: move newTestMessenger extraOptions to testMessengerConfig
* chore: `WithTestStoreNode` messenger option
* feat: waku `ClearEnvelopesCache` method
* fix: call `ClearEnvelopesCache` when deleting chat
* chore: `TestBecomeMemberPermissions` checks messages after rejoin
2024-01-30 13:43:34 +00:00
Michal Iskierko 73a5189398 feat(BridgeMessage): Add new type of chat message content: BridgeMessage
BridgeMessage is a type of chat message content which will be sent from  Matterbridge.
It contains fields:
- bridge name - depends on the used bridge, eg. "discord", "slack", etc...
- user name - username the message was received from
- content - message content
- user avatar
- message id
- parent message id - used in case of replies

Message is saved to a separated table: bridge_messages, similarly to discord messages.
The user_messages table is untouched.
bridge_messages table contains user_messages_id in order to join with user_messages table.

Issue #13098
2024-01-30 12:14:54 +01:00
Patryk Osmaczko 4a7d15b36d fix: use CommunityShardKey's clock rather than community's clock 2024-01-29 21:31:11 +01:00
Patryk Osmaczko ac81c15805 fix: ignore outdated COMMUNITY_SHARD_KEY messages
This mitigates issue where community shard on client's side was not in
sync with owner's.

relates to: status-im/status-desktop#13217
2024-01-29 18:21:51 +01:00
Patryk Osmaczko 67e18a8ff0 chore: introduce `unhandledMessagesTracker` 2024-01-29 18:21:51 +01:00
Sale Djenic 6403a7413b feat: new endpoint added which returns accounts of all contacts that match the passed address 2024-01-29 13:15:24 +01:00
Igor Sirotin ab641c0c78
fix: remove store node envelopes ordering hotfix (#4622) 2024-01-27 13:02:12 +00:00
Mikhail Rogachev fb98ee93ce
Correct profile showcase tokens and collectibles (#4511)
* feat: add profile showcase collectibles & assets missing fileds

* feat: resolve collectible identification issue

* feat: add validation for collectible visibility relative account

* feat: separate profile showcase assets on verified and unverified tokens

* fix: make chainId uint64, comment collectible account check

* chore: re-generate protobuf binaries with right protoc version

* Update protocol/messenger_profile_showcase.go

Co-authored-by: Igor Sirotin <sirotin@status.im>
2024-01-25 20:48:27 +04:00
frank bea0b5a63d
fix TestMarkAllActivityCenterNotificationsReadMarksMessagesAsSeen (#4615) 2024-01-25 13:56:56 +08:00
Godfrain Jacques 5f6f7e502d
(fix/status-go) fix profile picture update/removal (#4570)
This PR fixes [9947](status-im/status-desktop#9947) and contains :

    - Commit to fix the changing of custom picture and having the change
      reflected on contact's side
    - Commit to fix the deleting of picture and having the change reflected
      on contact's side
    - Rename confusing `ImageType` to `ImageFormat`
2024-01-24 12:09:28 -08:00
Patryk Osmaczko 1a85a29b1b chore: cover community sharding with tests
closes: #4262
2024-01-24 14:24:57 +01:00
Patryk Osmaczko 5162c285a8 refactor: introduce `newTestCommunitiesMessenger` 2024-01-24 14:24:57 +01:00
Patryk Osmaczko 92f43bac78 chore: extend `CreateWakuV2Network` with `useShardAsDefaultTopic` 2024-01-24 14:24:57 +01:00
Igor Sirotin 2a91fba1fa
chore: added and fixed some logs (#4577)
* chore: logs for successful storenode request
2024-01-23 18:20:01 +00:00
Andrea Maria Piana e65760ca85 Add basic peersyncing
This commit adds basic syncing capabilities with peers if they are both
online.

It updates the work done on MVDS, but I decided to create the code in
status-go instead, since it's very tight to the application (similarly
the code that was the inspiration for mvds, bramble, is all tight
together at the database level).

I reused parts of the protobufs.

The flow is:

1) An OFFER message is sent periodically with a bunch of message-ids and
   group-ids.
2) Anyone can REQUEST some of those messages if not present in their
   database.

3) The peer will then send over those messages.

It's disabled by default, but I am planning to add a way to set up the
flags.
2024-01-23 12:46:17 +00:00
Patryk Osmaczko bf5dcacdeb refactor: introduce `newTestMessenger`
This avoids duplication and enables better configuration possibilities
for clients.

Next step is to cleanup all `newMessenger` derivatives in tests.
2024-01-22 13:08:58 +01:00
Ibrahem Khalil 436d229856
Add last opened at key for community (#4514) 2024-01-21 12:55:14 +02:00
frank 81f4c86086
fix: return CustomizationColor only on db rows affected (#4593) 2024-01-19 18:26:39 +08:00
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00:00
Dario Gabriel Lipicar 0d2c3cef7c feat: implement token management settings for collectibles 2024-01-18 11:46:35 -03:00
Richard Ramos d0ca4447c6
test: bump go-libp2p 2024-01-18 14:28:06 +00:00
frank ea3e59ffee
replace mention name with public key (#4579)
* replace mention with public key

* bump version
2024-01-18 21:18:01 +08:00
Roman Volosovskyi 0bd4a06edc Comment out all logged flaky tests 2024-01-18 06:36:12 +00:00
Roman Volosovskyi 9aef13f83e
[#4200] Enable prevention of tx detection on unrevealed mnemonic/address (#4444) 2024-01-16 15:17:02 +01:00
Igor Sirotin a5acffc001
fix: TestFetchRealCommunity with shards fleet (#4553)
* fix: TestFetchRealCommunity with shards fleet
* fix: DefaultShardPubsubTopic
* chore: print waku query request id
2024-01-16 13:38:41 +03:00
Mykhailo Prakhov 94bee02ef7
chore: fetch comunity token metadata during handling community description (#4562) 2024-01-16 09:08:56 +01:00
Michal Iskierko 3d7ab79d91 fix: execute BeforeDispatch only once
Issue #4557
2024-01-15 17:03:33 +01:00
Patryk Osmaczko 3ddec465c5 fix: restore FetchCommunity&TryDatabase fallback to store nodes
Add missing check caused by recent `communities.GetByID` refactoring.
2024-01-12 13:15:29 +01:00
Sale Djenic 280f48877d chore(savedaddresses)!: favourite property removed and primary key updated
- favourite column removed from the saved_addresses table
- favourite property removed from the SavedAddress struct
- ens name removed from the primary key, the primary key now is composed of address and is_test columns
- ens parameter removed from wakuext_deleteSavedAddress
- wallet_getSavedAddresses moved to wakuext_getSavedAddresses (to keep them all in a single place)
- saved addresses related endpoints removed from the wallet service, even they logically belong there, a reason for that
is avoiding emitting sync message if one uses calls from the wallet service, while that's not the case in ext service. Once
we refactor this and introduce devices syncing mechanism in the wallet service, we should not only these but other wallet
related endpoints move there (removed: wallet_getSavedAddresses, wallet_addSavedAddress and wallet_deleteSavedAddress).

Affected area:
Saved addresses
2024-01-10 19:30:56 +01:00
Patryk Osmaczko 2a5dc6dec0 chore: remove boilerplate check of `communities.GetByID` clients
motivated by:
https://github.com/status-im/status-go/pull/4514#discussion_r1445808116
2024-01-10 18:58:17 +01:00
Dario Gabriel Lipicar 781a2c7c8e fix: ensure needed community tokens are available in the db
Fixes #13171
2024-01-10 12:57:10 -03:00
frank 5cb1972261
chore: return chats after mark all notifications read (#4432) 2024-01-10 09:36:33 +08:00
Ibrahem Khalil e1b52f9eae
Add joined at key to communities (#4513) 2024-01-09 20:36:47 +02:00
Dario Gabriel Lipicar 9d9c40b7cf fix: make fetchCommunity return latest available community
Fixes #13145
2024-01-08 18:09:21 -03:00
Patryk Osmaczko 16f11d49df fix: flaky TestEncryptionDecryption
fixes: #4510
2024-01-08 21:18:51 +01:00
Godfrain Jacques 9d8b55e3d9
This PR (status-go) fixes #12821 (#4516)
- Add album_images column to the user_messages table
- Migrate the database
2024-01-08 10:18:57 -08:00
Igor Sirotin 405d468e0e
fix: force verifiedOwner in `handleSyncInstallationCommunity` (#4405) (#4538) 2024-01-08 15:57:57 +00:00
Michal Iskierko 53ac61bb8b fix: a few adjustments for matterbridge
- exposig Online info
- adding ability to disable backup loop and auto message loop

Issue #12710
2024-01-08 14:21:26 +01:00
Mykhailo Prakhov 5c704b2ec2
chore: check and manualy verify community if during the fetchCommunity, community was added to the verification loop (#4533) 2024-01-05 18:09:38 +01:00
Cuteivist 7814f39cd7
feat: Add advanced token settings (#4524) 2024-01-05 12:12:53 +01:00
Cuteivist 846a4e2363
feat: Community token received notification (#4515) 2024-01-04 13:22:06 +01:00
Sale Djenic a8357dceac feat: color field added to saved address
- `color` column added to `saved_addresses` table
- `colorId` parameter exposed via `SavedAddress` struct

Affected area - saved addresses.

The following endpoints return or receive `SavedAddress` instance:
- `UpsertSavedAddress`
- `GetSavedAddresses`
- `AddSavedAddress`
2023-12-29 10:39:52 +01:00
Igor Sirotin 195982c950
fix_(StoreNodeRequestManager): various fixes and improvements (#4509) 2023-12-27 13:53:19 +00:00
Mikhail Rogachev 843bae5659
feat: Return seen/unseen messages count in MessnegerResponse (#4461) 2023-12-25 13:25:22 +07:00
Siddarth Kumar 151185c436
chore: log message contents before being sent (#4494)
When debugging message reliability we often get the number of messages sent and their IDs but we do not know the content of the messages and the type of message sent.

This commit adds debug level logs so that it helps in investigations.

ref : https://github.com/status-im/status-mobile/issues/18031

Closes [#18206](https://github.com/status-im/status-mobile/issues/18206)
2023-12-23 09:42:45 +05:30
Igor Sirotin a90589f4f7
chore: test filters are in the right place after store node requests (#4500) 2023-12-22 19:23:39 +00:00
Patryk Osmaczko 1d3c618fb4 feat: encrypt `CommunityDescription` fields
Extended `CommunityDescription` with a `privateData` map. This map
associates each hash ratchet `key_id` and `seq_no` with an encrypted
`CommunityDescription`. Each encrypted instance includes only data
requiring encryption.

closes: status-im/status-desktop#12851
closes: status-im/status-desktop#12852
closes: status-im/status-desktop#12853
2023-12-22 18:17:06 +01:00
Mykhailo Prakhov 9cbfda69da
chore: share shard info independently on waku version (#4507) 2023-12-22 17:43:38 +01:00
Mikhail Rogachev 1317f0c796
hotfix: Update profile showcase proto (#4506) 2023-12-22 22:43:27 +07:00
Mykhailo Prakhov 134137f9c5
feat: implemented a mechanism to retrieve shard information for a given community ID (#4499)
* feat: a mechanism to retrieve shard information for a given community ID
2023-12-22 13:37:37 +01:00
Cuteivist dac7a0daf9
feat: Fetch community data for tokens (#4497) 2023-12-22 10:43:19 +01:00
Godfrain Jacques 29ade0f817
fix (@status-go/stickers) Stickers still show in the recent list after being uninstalled (#4474)
fixes #12677
2023-12-21 10:05:30 -08:00
Mikhail Rogachev 7fc3e4440f
Fix: Don't create extra mutual state messages when accepting the CR again (#4488)
* Fix: don't create extra system messages when accepting the CR again

* chore: add one more test for cr flows repeated

* chore: use deprecation.AddChatsCount in contact requests tests
2023-12-22 00:38:14 +07:00
Cuteivist 6bfe626558
feat: Use media server for community token images (#4493) 2023-12-21 16:05:29 +01:00
Boris Melnik 6d77fb771a
fix(windows-build): Remove free space check for archives (#4485) 2023-12-20 21:21:02 +03:00
Igor Sirotin 92f0479a0c
chore: fetch contact with `StoreNodeRequestManager` (#4484) 2023-12-20 12:49:12 +00:00
Mykhailo Prakhov a5f6a6c2f6
fix: privileged member accepted/rejected request to join action is not approved by the control node after the member leaved and tries to join the community again (#4487) 2023-12-19 14:45:34 +01:00
Igor Sirotin 0818c98fca
fix_: don't start mailserver cycle when no mailservers set (#4457) 2023-12-19 11:58:44 +00:00
Mykhailo Prakhov 45bd8c16da
fix: do not ignore banned list if EventsData is nil (#4473) 2023-12-19 12:00:29 +01:00
Andrea Maria Piana 88fd1ce942 Surface acks, offers, requests to messenger 2023-12-18 10:33:05 +00:00
Dario Gabriel Lipicar b3cc73aa7f feat: use media server for community collectible images 2023-12-16 08:49:58 -03:00
Igor Sirotin e3ef8c649a
chore: store node requests manager (#4446) 2023-12-15 19:50:12 +00:00
Ibrahem Khalil 90c31afe7c
New way of sharing communities (#4341) 2023-12-15 13:55:32 +02:00
Cuteivist 7af313cd53
feat: Add community manager and fetch cached community metadata (#4450) 2023-12-14 17:50:46 +01:00
Siddarth Kumar a6df2be92e
fix crash on x86_64 android emulators (#4233)
Due to presence of syscall to `epoll_wait` android emulators after Android 10 would crash.
This commit has added `amd64` fallback implementations in 2 spots

- `tcp-shaker` ref : 571aa46f35
- `notify` ref : 0eb36e6c1a

The build flags are updated for fallback implementation to only be used in case of `x86_64` simulators.

status-mobile PR : https://github.com/status-im/status-mobile/pull/17773
2023-12-14 19:02:38 +05:30
Boris Melnik af9d3bc7b3
fix(history-archive): Skip dowloading data from torrent if free space is not enought (#4449) 2023-12-14 12:52:10 +03:00
richΛrd 42cf9fa740
fix: mailserver batches should be grouped by pubsub topics (#4458) 2023-12-13 17:14:06 -04:00