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
check_permissions_response_test.go
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
community_categories_test.go
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
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
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
community_event_message.go
community_events_factory.go
community_events_processing.go chore(communities)_: mv `unmarshalCommunityDescriptionMessage` to 2024-10-11 18:59:58 +02:00
community_events_processing_test.go
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
permissioned_balances_test.go
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
request_to_join.go fix_: share all future addresses storage 2024-07-18 12:08:40 +03:00
request_to_join_test.go
request_to_leave.go
roles_authorization.go
utils.go chore(community)_: reevaluateMembers optimization (#5169) 2024-05-17 18:15:39 +02:00
validator.go