Commit Graph

1685 Commits

Author SHA1 Message Date
osmaczko 948e09af03
fix(communities)_: ensure `ScheduleMembersReevaluation` is non-blocking (#5176) 2024-05-17 15:06:33 +02:00
Jonathan Rainville ae08ba6ad1
feat(search)_: filter out messages from non-viewable channels (#5161)
Fixes https://github.com/status-im/status-desktop/issues/14586
2024-05-16 12:41:04 -04:00
Michal Iskierko 574450289c feat_: Move community tokens transaction listening to status-go
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
2024-05-16 16:18:15 +02:00
Patryk Osmaczko 00ee631a22 chore_: cleanup `hash_ratchet_encrypted_messages` periodically
closes: #5036
2024-05-16 16:15:30 +02:00
Patryk Osmaczko 0db114f544 fix(communities)_: ensure read-only channels are not encrypted
fixes: status-im/status-desktop#14748
2024-05-16 11:21:55 +02:00
richΛrd 82ae41f6d5
feat(waku2)_: allow using an env variable to set the node's key (#5152) 2024-05-15 19:15:22 -04:00
richΛrd 9e0fb30f8d
chore_: bump go-waku (#5150) 2024-05-15 19:15:00 -04:00
Jonathan Rainville 5ca1cb0a0f
fix(messenger)_: make sure chats have an unread count of 0 for channels you can't view (#5062)
Fixes https://github.com/status-im/status-desktop/issues/14421

The problem is that you can receive messages to  a channel, then later, before marking them as read, a permission is added to them, so you no longer have access.
Then, you can't even mark it as read if it's hidden.
Here, I fix it by setting the unread count on Init at 0 if the user doesn't have view access to it. And I make sure we update the counts when we are removed from a channel
2024-05-15 15:57:12 -04:00
Godfrain Jacques bf56cb7ee2
fix_: saving profile image changes ens display name to non-ens (#5156)
When a user updates the preferred name, we should just ignore if the name is an ENS name,
because the ENS name is set only in the ENS popup. But this also means that if a user set
the profile name to an ENS name, this change will also be ignored.
2024-05-15 12:37:04 -07:00
frank 3b5eab3bf1
fix_:sync contact request decision (#5130)
* fix_:sync contact request decision

* chore_:optimise test

* chore_:address feedback from review
2024-05-15 08:01:47 +08:00
Alexander c46e395a58
Extend peersyncing to sync 1-to-1 messages (#4962)
* fix_: extend peersyncing to sync 1-to-1 messages

* fix_: tests
2024-05-14 12:20:13 +02:00
Jonathan Rainville 8f50b578d1
refactor(chat)_: remove concept of ChannelGroup and remove api functions (#4997)
For status-im/status-desktop#12595
2024-05-13 15:06:21 -04:00
frank eb6ebade8e fix_:failed test relate to old status community 2024-05-13 21:17:25 +08:00
Parvesh Monu 6eb40bf781 chore_: Remove old status community from the database 2024-05-13 21:17:25 +08:00
Godfrain Jacques 627e23ffa5
fix_: mitigate permission stuck in pending state (#5070)
This PR mitigates permission stuck in pending state upon making device a
control node. It fixes [#14023](status-im/status-desktop#14023)
2024-05-10 08:56:40 -07:00
Mykhailo Prakhov cb4c19cece
feat(encryption)_: request control node to resend ecnryption keys during restoring account by a seed phrase (#5142) 2024-05-10 10:04:46 +02:00
Igor Sirotin 349ea8ad6e
feat_: force members reevaluation (#5139)
* chore_: enable adding community manager options from messenger config

* chore_: make `reevaluateMembers` private method

* fix(MessengerCommunitiesTokenPermissionsSuite)_: proper waiting

* feat_: `ForceMembersReevaluation` method

* test_: increate some test timeouts
2024-05-09 22:59:51 +03:00
Andrey Bocharnikov 8cd4560823 fix(communities)_: prepare messages content for GetCommunityMemberAllMessages
Fixes #14060
2024-05-09 20:27:05 +07:00
Andrey Bocharnikov 6b5315b1fd fix(communities)_: delay starting torrent client until connection is established
Fixes # 14510
2024-05-09 11:00:53 +07:00
Igor Sirotin 529c658374
fix_: flaky TestSharedAddressesReturnsRevealedAccount (#5137) 2024-05-09 00:54:28 +01:00
Jonathan Rainville 5f4aab3121
feat(community)_: send signals about member reevaluation in progress (#5120)
Needed for https://github.com/status-im/status-desktop/issues/14378
2024-05-08 15:55:30 -04:00
Jonathan Rainville db0cc10a73
fix(permisisons)_: private permisisons shouldn't affect the check (#5116)
Fixes https://github.com/status-im/status-desktop/issues/14608
2024-05-08 14:45:58 -04:00
Igor Sirotin 3e4367a7cf
fix_: community members reevaluation fixes (#5117)
* fix_: prevent publishing older community description

* fix_: schedule member reevaluation instead of reevaluating in parallel

* fix_: lock community on members reevaluation

* fix(TestJoinCommunityAsAdminWithMemberAndAdminPermission)_: setup waitOnCommunitiesEvent in advance

* fix(TestEditSharedAddresses)_: remove redundant community description retrieval
2024-05-08 16:32:46 +01:00
Igor Sirotin 522f3288b0
chore_: uncomment and skip TestBecomeMemberPermissions (#5121) 2024-05-08 15:53:34 +01:00
Igor Sirotin 1c43b7a29b
chore_: better community json log (#5118) 2024-05-08 15:49:41 +01:00
Igor Sirotin 59c6ee5ffe
chore_: disable discv5 in tests (#5119) 2024-05-07 15:06:45 +01:00
Jonathan Rainville 9c2c638aaf
fix(communities)_: fix curated comm fetch not starting for unknown comm (#5110) (#5111) 2024-05-03 13:17:11 -04:00
frank 8c5a735438 feat_: retry sending specific messages 2024-05-02 05:40:49 +08:00
Jonathan Rainville 852a5beb39
feat_: limit number of members in a community and number of pending requests (#5107)
* feat(community): limit nb of requests to join and members

Needed for https://github.com/status-im/status-desktop/issues/14532

* chore: simplify TestRequestAccessAgain

* chore: add a test for the member limit
2024-05-01 13:27:31 -04:00
Andrey Bocharnikov 2fb6d615fd
fix_: add method to retrieve prepared message (#5102)
* Add Test_WHEN_MessageContainsImage_THEN_PreparedMessageByIDContainsLink
* Add Messenger.PreparedMessageByID call
fixes #13684
2024-05-01 09:54:47 +04:00
Mikhail Rogachev b5f8f792d5
chore: fix flaky tests in 'TestMessengerProfileShowcase' (#5104)
* chore_: fix flaky tests in 'TestMessengerProfileShowcase'

Close #5100

* chore_: fix flaky `TestShareShowcasePreferences`

Close #4751
2024-04-30 19:46:42 +02:00
Siddarth Kumar 1551c98f96
chore_: override DNS for iOS as well (#5093)
We need to apply the DNS override hack for iOS as well.

This PR -> https://github.com/status-im/status-mobile/pull/19798 in status-mobile fixes the DNS resolution issue for
iOS ARM Simulators and for Android x86 Emulators.
But we still need this change to ensure storenodes are found on real iOS devices and on Android arm Emulators.
2024-04-26 14:14:17 +02:00
Ajay Sivan 0ef4fb8cc7
chore_: log revealed addresses on join/edit (#5073) 2024-04-24 18:54:25 -07:00
Mohsen 70a9996d82
fix_: bio length check (#5074) 2024-04-24 20:41:08 +03:00
Ajay Sivan faf823f62f
fix_: filter private permissions & add Id keys in check_permissions_response (#5059) 2024-04-19 09:23:54 -07:00
Mikhail Rogachev 3baaac3e63
chore_: move grant exiration to a new test (#5078) 2024-04-19 16:23:27 +02:00
Siddarth Kumar d6c4682479
chore_: bump go to 1.20 (#5027)
This commit attempts to upgrade go version to 1.20.12
This commit also removes the following items from lint checks :
* `goconst`
* `structcheck`
* `deadcode`
* `golint`
* `varcheck`

Mobile PR for QA purposes -> https://github.com/status-im/status-mobile/pull/19564
2024-04-18 18:48:02 +02:00
Andrey Bocharnikov 78db9054fc
fix_: Add contact to removeTrustStatus response (#5058)
* Split function for reseting trust status and verification+trust status
* Refactoring: extract setTrustStatusForContact, setContactVerificationStatus functions
* Tests
2024-04-18 19:28:44 +04:00
Patryk Osmaczko 9e5462eb9e feat_: introduce forward error correction in segmentation layer
closes: #4330
2024-04-17 22:05:53 +02:00
Patryk Osmaczko bd91f5ab49 fix_: keep community locks map unreleased when Manager stops
`ReevaluateMembers` is run as a separate goroutine and sometimes it is
executed after `Manager` has been stopped. It tries to use the lock and
in consequence, it panics. Ensuring the map is still there prevents that.

^Happened in test: `TestCreateTokenPermission`.
2024-04-17 17:31:38 +02:00
Patryk Osmaczko 9d309886f7 fix_: mitigate race conditions on community
mitigates: status-im/status-desktop#14432
2024-04-17 17:31:38 +02:00
Mikhail Rogachev 6da423fc71
feat: Add an expiration and periodical publishing for community grants (#5024)
* feat_: add periodical publishing for community grants
feat_: Validate grant when receiving it
feat_: add expiration for grants
feat_: add test for grants expiration
fix_: move grants test to profile showcase, fix a few bugs
* feat_: use one group mesage to update grants
* chore_: review fixes
2024-04-17 16:53:51 +02:00
Mikhail Rogachev 1211b86151
chore_: update pb.go files according protoc version from nix (#5052) 2024-04-12 19:04:00 +02:00
Andrea Maria Piana 116fda7461 fix_: Remove rpc client from push notification servers and avoid panic 2024-04-11 17:12:14 +01:00
Godfrain Jacques e6fee1a84e
fix_: token-permitted channel input not locked (#5046)
Issue #14117
2024-04-10 10:51:58 -07:00
Patryk Osmaczko 21eba9928c chore_: bump `hash_ratchet_encrypted_messages_key_id` migration
This is to ensure proper migration from release branch.
2024-04-10 16:40:57 +02:00
Patryk Osmaczko dcf3ed2388 fix_: improve performance of `GetHashRatchetMessages`
This time with proper migration timestamp.

part of: #5036
2024-04-10 14:27:14 +02:00
Ibrahem Khalil 18cc3a16d5
Return request to join acceptance notifications (#4909) 2024-04-09 21:32:03 +02:00
kaichao e2a4a22896
chore: refactor status cli (#5010)
* chore: remove opts when create account

* chore: namings and better logging

* chore: config api modules with flag.

* chore: renaming

* chore: use methods on object

* fix: allow less characters for name

* fix: display name unit test

* chore: revert display name check.

* chore: change simulate display name.
2024-04-09 18:44:43 +03:00
flexsurfer 69326767d8
add image to chat preview (#4888) 2024-04-09 17:39:14 +02:00
Michal Iskierko c921079761 fix: handle bridge message edits
Issue #14044
2024-04-07 23:24:46 +02:00
Jonathan Rainville 6c82a6c2be fix(manager): make both perms satisfied if viewAndPost is satisfied
Fixes https://github.com/status-im/status-desktop/issues/14209
2024-04-04 14:34:59 -04:00
Patryk Osmaczko 107d7a9822 fix: increase mute interval check
Each 3 seconds is much too frequent, it leads to all communities being
read from the database and as a consequence to extensive memory
consumption (most likely garbage collector was not fast enough to
cleanup allocated memory).

mitigates: status-im/status-desktop#14281
2024-04-04 10:59:47 -04:00
yqrashawn aa73a0512c
feat: add contact customization color (#4869) 2024-04-03 22:49:57 +08:00
Mykhailo Prakhov 3c76fdc626
fix: crash in dbRecordBundleToCommunity if event was signed not by a control node (#5009) 2024-04-03 14:51:28 +02:00
Igor Sirotin 3bd00cb416
chore: log incorrect amountInWeis (#5005) 2024-04-02 14:54:24 +01:00
Mikhail Rogachev 30e143ca40
Fix(Profile): Remove profile showcase from general response via signal (#4982)
* Fix(Profile): Remove profile showcase from general responce via signal

* Fix(Profile): Restore community membership validation for the prodile showcase

* feat: Make profile validation optional

* fix: review fixes
2024-03-29 11:22:44 +01:00
Mykhailo Prakhov e4c1abb5ce
fix: validate display name on account creation (#4994) 2024-03-28 16:57:59 +01:00
Igor Sirotin 223a1d759e
Login endpoints improvements (#4980) 2024-03-28 15:01:44 +00:00
Ivan Belyakov c21e6430a2 fix(wallet): cleanup token_balances table on account removed
Updates #4937
2024-03-27 14:54:30 +01:00
Patryk Osmaczko 5b7910ae5a fix: validate community events read from database
Despite the expectation that only validated events are stored in the
database, instances have been identified where invalid events are saved.
This can lead to unexpected behavior or crashes.

This commit adds validation for community events read from the database
to prevent such cases.

**NOTE**: this fix does not address the root cause, which involves
invalid events being saved to the database. The exact scenario leading
to this issue has yet to be identified.

mitigates: status-im/status-desktop#14106
2024-03-27 14:31:03 +01:00
Igor Sirotin 1a2880b365
Fix/community tags indices (#4992)
* fix: strict order of community tags

* make tags containers private

* fix RandomCommunityTags implementation
2024-03-26 20:02:12 +00:00
Igor Sirotin edcb8ba3b8
fix: sync pending contacts (#4986) 2024-03-26 13:47:12 +00:00
Mohamed Javid 1886dc3360
[Feature] Allow setting TestNetworksEnabled in Create/Restore Account (#4971)
This commit adds the ability to set the "TestNetworksEnabled" flag while creating an account.

Function affected: "generateOrImportAccount"

This helps Dev/E2E/PR builds to enable Test Networks by default and disable them on release/nightly builds.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-03-26 17:08:16 +05:30
Igor Sirotin 0d9b6138d6
fix: race condition with empty PreferredName (status-desktop/14053) (#4981) 2024-03-25 15:43:45 +00:00
Patryk Osmaczko 7f44d4d12a refactor: remove unused `COMMUNITY_EVENTS_MESSAGE_REJECTED` 2024-03-25 13:18:20 +01:00
Mikhail Rogachev e878f89b65
fix: Remove proof of membership for the profile showcase communities (#4961)
https://github.com/status-im/status-desktop/issues/14084
2024-03-22 21:50:15 +01:00
Mykhailo Prakhov b931a75bd8
fix: crash on control node side dutring handling edited shared address from the member who left the community (#4967) 2024-03-22 15:25:37 +01:00
Mikhail Rogachev c7e7445f5c
Fix: ignore nil contact 'IsDisplayNameDupeOfCommunityMember' (#4956) 2024-03-21 20:43:51 +01:00
Patryk Osmaczko 0aed93ff04 fix: encrypt community's Categories and ActiveMembersCount
fixes: #4943
fixes: #4944
2024-03-20 18:41:07 -04:00
Andrea Maria Piana 894eb5758e Add canView to chat & fix admin role 2024-03-20 16:48:07 -04:00
Igor Sirotin c85bf76f21
fix: Update and improve `TestFetchRealCommunity` (#4949) 2024-03-20 18:10:02 +00:00
Mykhailo Prakhov ad342c8887
feat: get and delete community member messages API (#4932) 2024-03-19 20:44:49 +01:00
Sean Hagstrom b911297a3d
Feature: store and retrieve a contact's bio (#4916)
* chore: create migration for adding bio field to contacts table

* feature: update contact persistence to save and query contact bio

* test: ensure that the protocol can store and retrieve contact bio data
2024-03-19 18:09:13 +00:00
Pablo Lopez 78bf40994a
remove confusing debug log (#4948) 2024-03-19 19:11:18 +02:00
Mykhailo Prakhov a1033f466a
feat: add new CommunityMemberState - CommunityMemberBanWithAllMessagesDelete (#4941) 2024-03-19 14:40:23 +01:00
kaichao f0d6a4f64f
Send direct message using CLI (#4913)
* feat: send dm with cli

* fix: send contact request works

* feat: accept contact request

* feat: send dm

* fix: log

* feat: more dm

* fix: lint

* refactor: fix comments

* fix: more refactor

* fix: refoctor more

* fix: more refacotr

* fix: refactor dm

* fix: context from cli

* fix: add light mode flag

* fix: remove sleep when start node

* fix: better log

* fix: better logger

* fix: lint

* fix: comments

* fix: const flags

* fix: named logger

* feat: inteactive mode

* fix: send message in loop

* fix: better context manage

* feat: cli serve

* fix: readme

* extract to multi files

* fix: status cli rpc

* feat: create and login account

* fix: missing messagess

* fix: missing messages because data sync is not started.

* feat: start http service

* fix: lint

* fix: more build instructions.

* fix: review comments
2024-03-19 08:31:35 +08:00
Patryk Osmaczko 17c5ab414b fix: ensure `CommunityDescription` reprocessing on decryption failure
Previously, `CommunityDescription` instances failing partial decryption
were not reprocessed due to duplicate message check. This commit fixes
the issue by bypassing the check for such descriptions, allowing their
reprocessing upon receiving missing encryption key.

fixes: status-im/status-desktop#13647
2024-03-18 22:24:24 +01:00
Igor Sirotin b9d9938209 make generate 2024-03-18 15:01:29 +01:00
Michal Iskierko 8bf03609fc feat: Add HideIfPermissionsNotMet to CommunityChat struct
Issue #13291
2024-03-18 15:01:29 +01:00
Mikhail Rogachev 0aa1fb9eff
Fix: handle accepted contact verifaction if persistedVR is null (#4918) 2024-03-14 20:56:26 +01:00
Andrea Maria Piana 2311da2475 Port back migrations from release branch 2024-03-14 13:27:12 +00:00
Mikhail Rogachev b987e8d6f5
Fix: the validation of collectibles should not be dependent on capitalization (#4917) 2024-03-13 15:19:33 +01:00
Michal Iskierko 9db149d4f6 feat: handling replies for bridged messages
BridgeMessage struct has MessageID and ParentMessageID.
MessageID keeps the original Discord message ID.
ParentMessageID keeps the original Discord parent message ID (response_to).
When the new bridge message is received, corresponding status message response_to field is updated.

Issue #13258
2024-03-13 12:50:15 +01:00
Andrea Maria Piana 67dfff2324 Add index to hash ratchet & cache processed description 2024-03-13 11:35:11 +00:00
Ibrahem Khalil 8c0e24dc26
Add favicons to external link previews (#4788) 2024-03-12 22:47:51 +02:00
Jonathan Rainville 3f1547fc63 chore: add test that validates that the member role gets updated 2024-03-12 11:04:45 -04:00
Jonathan Rainville 6f119b9c53 fix(community): fix member role not being updated 2024-03-12 11:04:45 -04:00
Jonathan Rainville 605e3a4ed0 fix(community): fix editing a community channel loses the members 2024-03-12 11:04:45 -04:00
Jonathan Rainville e3810148d8 feat: add ViewersCanPostReactions to Chat object
Needed https://github.com/status-im/status-desktop/issues/13523
2024-03-12 11:04:45 -04:00
Patryk Osmaczko b02e3b19e2 feat: add permissions reevaluation request
Token master can't manage members directly, so it must request
reevaluation from the control node.

fixes: status-im/status-desktop#13778
2024-03-12 14:15:01 +01:00
Patryk Osmaczko 1de61d1933 fix: channel members evaluation on request acceptance
If there is only `viewAndPost` permission set on a channel, members who
don't satisfy the criteria shouldn't be able to view the channel.
2024-03-12 14:15:01 +01:00
Patryk Osmaczko 2995518939 chore: skip flaky TestSetStorenodeForCommunity_fetchMessagesFromNewStorenode 2024-03-11 22:02:07 +01:00
Igor Sirotin c8044bf400
chore: disable curated communities loop in tests (#4894) 2024-03-09 09:42:06 +00:00
Mikhail Rogachev 6522d52016
Feat: Simplify profile showcase preferences (#4854)
* Feat: simplify profile showcase preferences

* Feat: remove old profile showcase preferences on save

* Feat: add getters for showcase entries limits
2024-03-08 17:20:23 +01:00
Igor Sirotin 5a54d703c7
fix: flaky test request profile info (#4895) 2024-03-08 15:50:46 +00:00
Igor Sirotin c3e7d3823f
fix: process empty albumId in albumMessages (#4874) (#4898)
* fix: process empty albumId in albumMessages
* fix: right `prepareMessage` for empty album
2024-03-08 13:48:22 +00:00
Igor Sirotin 7f671f7632
chore: make generate with custom `-modtime` (#4896) 2024-03-08 09:25:17 +00:00
frank deb56c2c81 fix: race condition on updating account.Name during handle BackupData 2024-03-07 20:18:50 +08:00
Godfrain Jacques 0e37ec2058
Fix contact details large image is always empty (#4864)
fixes #13563 contact details largeImage is always empty
2024-03-06 09:25:19 -08:00