Commit Graph

253 Commits

Author SHA1 Message Date
Jonathan Rainville 772b5b6d35
fix(contact_request)_: potential fix to contact request with no saved message () ()
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
Mykhailo Prakhov 58a9557c58
fix: reject handling requests to join without revealed accounts ()
* 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
Prem Chaitanya Prathi 9a703162c4
refactor: only use shards ()
* refactor_: use shards by default

* fix_: metadata lightclient check

* chore_: update go-waku
2024-07-15 20:55:12 +05:30
Samuel Hawksby-Robinson 3d68013332 chore(no-torrent)_: Renamed Torrent to Archive
I've renamed TorrentManager to ArchiveManager, ArchiveManager to ArchiveFileManager, TorrentContract to ArchiveService, ArchiveContract to ArchiveFileService. I've also renamed all init functions and struct fields to the appropriate archive-centric naming.
2024-06-07 13:44:12 +01:00
Samuel Hawksby-Robinson a9c7db6f25 chore(no-torrent)_: Replaced entirely LogStdout with default logger 2024-06-07 13:44:12 +01:00
Samuel Hawksby-Robinson 93256fc252 chore(no-torrent)_: Made torrentClientReady() belong to TorrentManager 2024-06-07 13:44:12 +01:00
Samuel Hawksby-Robinson 9b458c63e0 chore(no-torrent)_: I've fully split Manager from TorrentManager
I've removed any mention or dependency of TorrentManager from Manager. There is still more work to do, but Messenger now communicates directly with a TorrentManager rather than asking the communities Manager to handle it. I've ensured that LogStdout() is only called from TorrentManager and removed entirely from Manager, this functionality seems to be some kind of debug tool specifically for torrent related functionality. Next I need to focus on functions within Messenger that call a TorrentManager and see how to isolate these from the main flows, following that I also need fix the tests that are broken. I will also need to refactor torrentClientReady() so that it is a function of TorrentManager, this may allow for pushing more functions into TorrentManager which will lead to better torrent encapsulation.
2024-06-07 13:44:12 +01:00
Mykhailo Prakhov 2053bd323b
fix(community)_: handle outdated request to join and request to join response when we have been joined () 2024-05-31 19:16:45 +02:00
Mykhailo Prakhov 3cae2e06f3
fix(ActivityCenterNotification)_: update pending state of request to join ActivityCenterNotification when member was joined () 2024-05-28 17:02:30 +02:00
Mikhail Rogachev 4f493a533e
chore(identity)_: remove old social links implementation () 2024-05-24 10:35:34 +02:00
frank 3b5eab3bf1
fix_:sync contact request decision ()
* 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 ()
* fix_: extend peersyncing to sync 1-to-1 messages

* fix_: tests
2024-05-14 12:20:13 +02:00
yqrashawn aa73a0512c
feat: add contact customization color () 2024-04-03 22:49:57 +08:00
Mikhail Rogachev 30e143ca40
Fix(Profile): Remove profile showcase from general response via signal ()
* 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 () 2024-03-28 16:57:59 +01:00
Igor Sirotin bdb2b261a6
feature: view only channel reactions ()
* CommunityMember channel role

* make generate
2024-03-01 17:15:38 +00:00
Sale Djenic e87e9b6f81 fix: recovering/migrating keypairs fixes
- fixed issue with displaying 3 words name on the login screen after recovering from waku
- fixed inability to delete account after recovering from waku
2024-03-01 11:11:16 +01:00
Mikhail Rogachev 7cc4c12642
Feat: Add social links to the profile showcase ()
* feat: add social links to the profile showcase

* fix: deprecate old social links, add synced profile showcase to response
2024-02-26 16:53:40 +03:00
Mykhailo Prakhov 3959948c4c
chore: fix ban/unban flow and delete all messages feature ()
feat: delete all messages for banned member and ban/unban AC notifications
2024-02-22 11:25:13 +01:00
Igor Sirotin 85c0e282ae
feature: profile showcase preferences sync&backup () 2024-02-17 18:07:20 +00:00
Jonathan Rainville 2bdc7ec0f4
fix(handler): fix CR received from a removed contact removed ()
Fixes https://github.com/status-im/status-desktop/issues/13488

The problem was that when you add a contact, it create the chat. Then, if you remove them, it doesn't remove the chat, so `chat.Active` is true.
Now I check in that case if it's a 1x1 chat and if so, if we are contact.
2024-02-13 10:15:42 -05:00
Mikhail Rogachev 3ea2002904
Feat: Modify grants for profile showcase use ()
* chore: regenerate proto binaries

* feat: remove unused grant code for community's canPost
2024-02-11 15:11:04 +03:00
Mikhail Rogachev 2350461818
feat: Dispatch profile showcase message on mutual/verified contacts change () 2024-02-09 12:36:54 +03:00
Andrea Maria Piana c49a0fc314 [Fixes: ] 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
Mohsen 70ee70a19a
feat: implement new endpoint to set customization color () 2024-02-07 18:20:54 +03:00
Andrea Maria Piana 605fe40e32 Fix encryption metadata issues
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
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: 
2024-01-29 18:21:51 +01:00
Godfrain Jacques 5f6f7e502d
(fix/status-go) fix profile picture update/removal ()
This PR fixes [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
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
frank 81f4c86086
fix: return CustomizationColor only on db rows affected () 2024-01-19 18:26:39 +08:00
Dario Gabriel Lipicar 0d2c3cef7c feat: implement token management settings for collectibles 2024-01-18 11:46:35 -03: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
Godfrain Jacques 9d8b55e3d9
This PR (status-go) fixes ()
- 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` () () 2024-01-08 15:57:57 +00:00
Mikhail Rogachev 7fc3e4440f
Fix: Don't create extra mutual state messages when accepting the CR again ()
* 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
Igor Sirotin e3ef8c649a
chore: store node requests manager () 2023-12-15 19:50:12 +00:00
Ibrahem Khalil be8568e174
Community member joins the community if he sends a request to join an… () 2023-12-09 14:46:30 +02:00
Siddarth Kumar e0bbb7e2ec
fix: send chats along with response after joining ()
When an open community was created by Device A and shared with Device B and when Device B would request to join such a community, the general channel would be forever in loading state.

This happened because as part of messenger response the chatId of general channel was not sent and mobile client would not fetch that chat data.

This commit fixes that issue by sending chatId as part of messenger response right after the request to join community succeeds.
2023-12-07 21:32:37 +05:30
frank d7e7792b51
Fix/duplicate accept cr messages ()
* fix: Duplicate 'Contact Added' Notifications When Pair-Device User Accepts Request

* bump version
2023-12-05 12:22:20 +08:00
Cuteivist 04873ef880
feat: token order API () 2023-12-04 11:18:05 +01:00
Igor Sirotin e32c5546e1
test: request community from storenode ()
* feat: request community info from storenode test

* shutdownWaitGroup

* fix requestCommunityInfoFromMailserver timestamp roundin
2023-11-25 23:24:20 +00:00
Richard Ramos c012f94681 fix: send request on non protected topics, and add missing shard information on invite 2023-11-18 12:12:06 -04:00
Vitaly Vlasov 1794b93c16 Always set PubsubTopic in filters 2023-11-18 02:26:34 +02:00
Jonathan Rainville 2076853ce3
fix(profile_showcase): fix crash when profile showcase message is nil () ()
Partly fixes https://github.com/status-im/status-desktop/issues/12695
2023-11-13 12:35:41 -05:00
Mikhail Rogachev 03c32f620f
feat: Profile showcase data sharing ()
* feat: Add profile showcase messaging part with ecrypted data

* feat: Separate profile showcase categories to provide ablity to store custom data

* fix: review fixes

* feat: move profile showcase out of contact data

* fix: create index on contact id for profile tables

* chore: remove logger from link preview
2023-11-09 22:59:01 +04:00
Patryk Osmaczko f7042e4b9e refactor: extract layers in StatusMessage
Extracted:
- TransportLayer
- EncryptionLayer
- ApplicationLayer
2023-11-08 21:46:22 +01:00
Mykhailo Prakhov eb437e9d8d
feat: kick all members after ownership change and auto-accept after sharing the address ()
feat: kick all members after the ownership change and auto-accept after sharing the address
2023-10-31 15:20:40 +01:00
Mohsen 27b770c41b
fix: publish group member info () 2023-10-25 21:11:04 +03:00
Patryk Osmaczko 445135eb94 fix: ensure receivedMessage.CommunityID in chat message handler is set
This enables clients to obtain invitation's community ID even when
description processing is queued.

part of: 
2023-10-25 20:10:01 +02:00
Shinnok 3805662a18
fix(messenger_communities): block messages and reactions to token gated or spectated communities ()
Which specifies that if a user is not a community member & a
chat member, he can't post, react or pin messages in that chat.

Notes:
- also fix&cleanup associated failing tests.
- refactor Community.CanPost() to reflect the new requirement.
- grant code is not fully implemented and is to be removed later.

Fixes https://github.com/status-im/status-desktop/issues/11915
2023-10-25 10:26:18 -04:00