status-go/protocol/communities
frank b59f1d3849
fix_: chats and message history loading after login takes too much time (#5932)
* fix_: chats and message history loading after login takes too much time

* chore_: split to small functions to writing unit test easily

* test_: add test

* chore_: improve OldestMessageWhisperTimestampByChatIDs function

- Use 'any' type instead of 'interface{}' for args slice
- Add error check after rows iteration

* chore_: optimize OldestMessageWhisperTimestampByChatIDs query

This commit simplifies and optimizes the SQL query in the OldestMessageWhisperTimestampByChatIDs function. The changes include:

1. Removing the subquery and ROW_NUMBER() function
2. Using MIN() and GROUP BY instead of the previous approach
3. Directly selecting the required columns in a single query

These changes should improve the performance of the function, especially for large datasets, while maintaining the same functionality.
2024-10-18 10:25:34 +08:00
..
token feat(community tokens)_: Upgrade ERC721 contract to enable batch transfers 2024-07-08 11:30:51 +02:00
adaptors.go fix(communities)_: ensure community sync doesn't override joined state 2024-06-20 15:37:20 +02:00
check_permissions_response.go fix_: filter private permissions & add Id keys in check_permissions_response (#5059) 2024-04-19 09:23:54 -07:00
check_permissions_response_test.go feat: add permissions reevaluation request 2024-03-12 14:15:01 +01:00
community.go fix(communities)_: ensure community ID is populated with description 2024-10-09 08:49:36 +02:00
community_bloom_filter.go feat(communities)_: introduce bloom filter members list 2024-07-04 17:54:29 +02:00
community_bloom_filter_test.go feat(communities)_: introduce bloom filter members list 2024-07-04 17:54:29 +02:00
community_categories.go refactor: simplify events creation logic 2023-08-17 08:24:51 +02:00
community_categories_test.go refactor: update community access enum naming 2023-10-25 17:34:37 +02:00
community_changes.go fix(communities)_: kick AC notification after control node device change (#5472) 2024-07-05 10:38:12 +02:00
community_description_encryption.go fix: encrypt community's Categories and ActiveMembersCount 2024-03-20 18:41:07 -04:00
community_description_encryption_test.go fix(communities)_: ensure read-only channels are not encrypted 2024-05-16 11:21:55 +02:00
community_encryption_key_action.go Fix encryption metadata issues #4613 2024-02-07 10:25:41 +00:00
community_encryption_key_action_test.go chore(community)_: serialise community jsons with image URLs 2024-07-11 18:55:24 +07:00
community_event.go feat: admins can delete all members messages during the ban (#4834) 2024-02-29 18:54:17 +01:00
community_event_message.go fix: ensure community events eventual consistency 2024-02-20 21:07:01 +01:00
community_events_factory.go feat: admins can delete all members messages during the ban (#4834) 2024-02-29 18:54:17 +01:00
community_events_processing.go chore(communities)_: mv `unmarshalCommunityDescriptionMessage` to 2024-10-11 18:59:58 +02:00
community_events_processing_test.go fix: ensure community events eventual consistency 2024-02-20 21:07:01 +01:00
community_test.go fix: reject handling requests to join without revealed accounts (#5549) 2024-08-07 17:57:02 +02:00
community_token_permission.go feat_: delete or update permission when deleting a channel (#5297) 2024-06-07 18:30:01 +02:00
communnity_privileged_member_sync_msg.go fix(logs)_: remove community private key logging in publishCommunityPrivilegedMemberSyncMessage 2024-07-19 16:50:40 +02:00
errors.go fix(CommunitySharedAddresses)_: 2024-07-09 18:19:40 +02:00
manager.go fix_: chats and message history loading after login takes too much time (#5932) 2024-10-18 10:25:34 +08:00
manager_archive.go feat_: log on panic (#5849) 2024-09-27 06:37:32 +08:00
manager_archive_file.go chore(no-torrent)_: Refactored NewArchiveManager to use config pattern 2024-06-07 13:44:12 +01:00
manager_archive_file_nop.go chore(no-torrent)_: Renamed archive files to archive_file 2024-06-07 13:44:12 +01:00
manager_archive_nop.go chore(no-torrent)_: Refactored NewArchiveManager to use config pattern 2024-06-07 13:44:12 +01:00
manager_test.go fix(communities)_: ensure community ID is populated with description 2024-10-09 08:49:36 +02:00
permission_checker.go fix(communities)_: correct >1 NFT token requirement evaluation 2024-06-20 15:23:38 +02:00
permission_checker_test.go fix(communities)_: correct >1 NFT token requirement evaluation 2024-06-20 15:23:38 +02:00
permissioned_balances.go Fix: cover case where criteria doesn't have token IDs 2024-02-07 20:10:49 +00:00
permissioned_balances_test.go feat: New field in TokenCriteria proto 2024-02-27 16:25:26 +01:00
persistence.go fix: reject handling requests to join without revealed accounts (#5549) 2024-08-07 17:57:02 +02:00
persistence_mapping.go chore(community)_: serialise community jsons with image URLs 2024-07-11 18:55:24 +07:00
persistence_test.go chore(community)_: serialise community jsons with image URLs 2024-07-11 18:55:24 +07:00
persistence_test_helpers.go Add last opened at key for community (#4514) 2024-01-21 12:55:14 +02:00
request_to_join.go fix_: share all future addresses storage 2024-07-18 12:08:40 +03:00
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
roles_authorization.go feat: admins can delete all members messages during the ban (#4834) 2024-02-29 18:54:17 +01:00
utils.go chore(community)_: reevaluateMembers optimization (#5169) 2024-05-17 18:15:39 +02:00
validator.go feat: community tags (#2708) 2022-06-24 09:40:12 -04:00