status-go/protocol/communities
Jonathan Rainville a6285cc827
Fix chats reseting when a Sync signal comes for communities (#3539)
* fix(community): stop re-joining comm when receiving a sync community msg

Fixes an issue with chats being reset. Since joining a community resaves the chats with the synced default value, it resets the sate of the chats, losing the unread messages, the muted state and more.
The solution is to block the re-joining of the community. In the case of the sync, we catch that error and just continue on.

* fix(import): fix HandleImport not saving the chat

Doesn't change much, but it could have caused issues in the future, so since we might have modified the chat, we make sure to save them
Also adds a test

* fix tests
2023-05-29 13:57:05 -04:00
..
migrations Handle organisation membership requests 2020-12-23 17:20:55 +01:00
adaptors.go feat: sync `CommunitySettings` across paired devices 2022-06-16 12:45:05 +02:00
community.go Community encryption should automatically be enabled/disabled depending on community permissions (closed/open) 2023-05-05 17:32:39 +02:00
community_categories.go Upgrade linter to 1.50.0 2023-01-13 17:52:03 +00:00
community_categories_test.go Validate no duplicated community chat names 2021-06-03 13:27:49 +02:00
community_test.go fix: remove ourselves from members when leaving community 2022-09-21 08:35:52 +02:00
errors.go Fix chats reseting when a Sync signal comes for communities (#3539) 2023-05-29 13:57:05 -04:00
manager.go Fix chats reseting when a Sync signal comes for communities (#3539) 2023-05-29 13:57:05 -04:00
manager_test.go Allow setting up wallet with new config 2023-05-19 13:23:21 +01:00
persistence.go fix(GetAllCommunityTokens): Add GetAllCommunityTokens function 2023-05-05 18:14:55 +02:00
persistence_test.go feat(CommunityTokenMetadata): Keep token metadata in CommunityDescription 2023-03-07 08:40:47 +01:00
persistence_test_helpers.go feat: add `SpectateCommunity` api 2022-10-06 21:21:37 +02:00
request_to_join.go Community request to join changes for pending and declined states (#3387) 2023-04-21 14:48:47 +05:30
request_to_join_test.go Sync Communities (#2253) 2021-08-06 16:40:23 +01:00
request_to_leave.go feat: introduce and distribute RequestToLeave community 2022-08-26 11:25:33 +02:00
utils.go feat: introduce and distribute RequestToLeave community 2022-08-26 11:25:33 +02:00
validator.go feat: community tags (#2708) 2022-06-24 09:40:12 -04:00