Commit Graph
693 Commits
Author SHA1 Message Date
spaced4ndy 0dcd53450e refactor 2023-12-21 21:12:52 +04:00
spaced4ndy acf2f2b97e rename function 2023-12-21 20:25:14 +04:00
spaced4ndy db3f1dab87 refactor 2023-12-21 20:22:14 +04:00
spaced4ndy 3f72fa89ee fix for random update 2023-12-21 16:04:01 +04:00
spaced4ndy a480b01fce Merge branch 'master' into f/batch-send 2023-12-21 15:58:27 +04:00
spaced4ndy f90d4ad8fa group history preference 2023-12-21 15:23:14 +04:00
spaced4ndy be6d9306de batcher tests 2023-12-21 14:43:09 +04:00
spaced4ndy 106916fd29 EncodedChatMessage type 2023-12-21 11:39:20 +04:00
Evgeny Poberezkin 7bcda7e54b core: use ChaChaDRG as the source of randomness (#3551)
* core: use ChaChaDRG as the source of randomness

* do not use entropy directly

* dont use RNG from agent

* simplexmq

* update iOS
2023-12-21 00:42:40 +00:00
spaced4ndy 4723849d22 refactor 2023-12-20 22:42:12 +04:00
spaced4ndy 14184971f7 refactor batcher 2023-12-20 22:33:03 +04:00
spaced4ndy 396b4d2b2c possibly fix builder for single msg 2023-12-20 22:15:37 +04:00
spaced4ndy c350aa0ae4 comment 2023-12-20 22:07:44 +04:00
spaced4ndy 2feb849fe4 reverse batches 2023-12-20 22:01:39 +04:00
spaced4ndy b2e46554fe use withStoreBatch 2023-12-20 21:03:27 +04:00
spaced4ndy d8d52c8504 lazy msg body 2023-12-20 20:43:05 +04:00
spaced4ndy a832e217a7 rework batching 2023-12-20 20:15:16 +04:00
spaced4ndy cadce7488f rename 2023-12-20 19:41:44 +04:00
spaced4ndy ed59dcea82 rename 2023-12-20 19:39:14 +04:00
spaced4ndy 8fb6bec762 use builder 2023-12-20 19:36:19 +04:00
spaced4ndy b50e772688 fix - don't check msg size for binary 2023-12-20 19:12:37 +04:00
spaced4ndy d2b6494b19 check size in encodeChatMessage 2023-12-20 18:59:18 +04:00
spaced4ndy a108c7ba7f check number of errors 2023-12-20 15:43:24 +04:00
spaced4ndy e70cc80e58 fix disappearing messages 2023-12-20 15:37:44 +04:00
spaced4ndy 245bd62877 tests 2023-12-20 15:23:14 +04:00
spaced4ndy 8018168f73 Merge branch 'master' into f/batch-send 2023-12-20 11:17:33 +04:00
Evgeny PoberezkinandAlexander Bondarenko 6ba3100d34 core: batch sending messages (#3566)
* core: batch sending messages

* batch without iorefs (#3573)

* one-pass

* simplexmq

* simplexmq

* simplexmq

* simplexmq

* revert change to ios project file

* refactor

* simplify

---------

Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com>
2023-12-20 10:38:39 +04:00
spaced4ndy 41fd643eb9 refactor, tests 2023-12-19 20:35:54 +04:00
spaced4ndy 194241dcc0 rework to build history via chat items 2023-12-19 18:27:01 +04:00
Evgeny Poberezkinandspaced4ndy 7b073ba9f8 core: allow deleting last user (#3567)
* core: allow deleting last user (tests fail)

* tests, allow activating the hidden user when there is no active user

* hide logs

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* comment

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* comment

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-12-19 10:26:01 +00:00
spaced4ndy e714f4037a collect and send message history 2023-12-13 21:44:29 +04:00
spaced4ndy a55bb679c8 Merge branch 'master' into f/batch-send 2023-12-13 17:25:00 +04:00
spaced4ndy 8f9ef383c6 wip 2023-12-12 15:21:49 +04:00
spaced4ndy ad7a554583 batch introductions 2023-12-12 14:49:41 +04:00
spaced4ndy 2d2e7cee9e implement batching 2023-12-12 13:28:10 +04:00
Evgeny Poberezkin f9a125bc32 Merge branch 'master' into ios-notifications 2023-12-11 14:11:00 +00:00
spaced4ndy c7cfbf0c19 Merge branch 'master' into f/batch-send 2023-12-11 18:05:36 +04:00
Alexander Bondarenkoandspaced4ndy 35c1975d66 core: chat list pagination (#3505)
* add pagination args to APIGetChats

* add search to chat list API

* rename arg to paginationTs_ to match type

* lift another condition to ids query

* collect all chat refs before sorting, then get details

* split remaining preview functions

* roll back to collecting ids first with query cleanup

* add connection join back to filter out groups

* extract and expand tests

* add fav/unread args

* WIP

* lay out the queries with favs

* tweak tests

* add fav tests

* fix order by in the before case

* build query footer wholly from pagination

* add migration for direct contacts

* fix setting contact_used

* fix setting contact_used for group link contacts

* align search x filters space with UI, support filter by either favorite or unread, optimize queries, indexes

* always set chat_ts, fix tests

* refactor tests

* fix pagination logic, more tests

* refactor, rename

* increase default pagination count

* comments

* refactor

* comment

* report errors

* refactor

* remove unused type

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-12-11 17:50:32 +04:00
Evgeny Poberezkin 666903ae76 Merge branch 'master' into ios-notifications 2023-12-11 13:06:32 +00:00
Evgeny Poberezkinandspaced4ndy 8a41a4c214 ios: do not start chat if it was stopped, deliver "app stopped" notifications (#3535)
* add stopped notifications, remove full off mode

* core: allow initializing chat data without starting chat

* ios: ask before starting chat if it was stopped

* correct text

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>

* fix comment

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2023-12-11 12:59:49 +00:00
Evgeny Poberezkin f65b8a9e78 core: mark all user messages read (#3530) 2023-12-11 12:26:45 +00:00
Evgeny Poberezkin d3059afc99 ios, core: better notifications processing to avoid contention for database (#3485)
* core: forward notifications about message processing (for iOS notifications)

* simplexmq

* the option to keep database key, to allow re-opening the database

* export new init with keepKey and reopen DB api

* stop remote ctrl when suspending chat

* ios: close/re-open db on suspend/activate

* allow activating chat without restoring (for NSE)

* update NSE to suspend/activate (does not work)

* simplexmq

* suspend chat and close database when last notification in the process is processed

* stop reading notifications on message markers

* replace async stream with cancellable concurrent queue

* better synchronization of app and NSE

* remove outside of task

* remove unused var

* whitespace

* more debug logging, handle cancelled read after dequeue

* comments

* more comments
2023-12-09 21:59:40 +00:00
spaced4ndy 82e0b7d1a6 wip 2023-12-08 11:07:12 +04:00
spaced4ndy 18f7ecb7e1 encoding, remove instances 2023-12-07 20:38:58 +04:00
spaced4ndy bf0babdb93 refactor code to work with updated schema 2023-12-07 18:38:39 +04:00
spaced4ndy e75332e3eb encoding, refactor processing 2023-12-07 13:42:15 +04:00
spaced4ndy ecd66ad7f3 schema, refactor group processing for batched messages 2023-12-06 20:10:56 +04:00
spaced4ndy fad0e4181f Revert "multiple events in ChatMessage and supporting types"
This reverts commit 9b239b26ba.
2023-12-06 20:10:30 +04:00
spaced4ndy 9b239b26ba multiple events in ChatMessage and supporting types 2023-12-06 13:01:59 +04:00
spaced4ndy 420d8537cb core: batch send stubs, comments 2023-12-05 20:59:53 +04:00