* execute asynchronous commands for correct users
* pass transport session to message processing to avoid race condition
* account for server changes when determining unused servers
* enable one test
* enable all tests, remove log
* send "quota exceeded" message from SMP server when sender gets ERR QUOTA (ignored in the agent for now)
* send msg quota to the recipient to indicate that sender got ERR QUOTA, test
* switch between slow/fast retry intervals (tests do not pass yet)
* send QCONT message, refactor RetryInterval, test
* refactor
* remove comment
* remove space
* unit test for withRetryLock2
* refactor
* SMP v3: encrypt message timestamp and flags together with the body between server and recipient
* v3 tests
* update protocol doc
* add test for max size message
* delay in notifications test
* simplify v3
* encrypt server message to the recipient when sent
* refactor
* exit on error restoring the messages
* refactor, increase test timeout
* style
* add prints to the test
* remove error from unsafeMaxLenBS
* update protocol
* lint, improve test, change func param
* support stopping and resuming agent (#385)
* export agentDbPath
* support fully closing and resuming agent
* whitespace
* clean up
* support message flags visible to SMP server to control notifications (and for any future extensions)
* simplify message flags encoding
* GET command
* make sending confirmation asynchronous
* confirm first queue synchronously (on JOIN, and delete connection on failure), second queue asynchronously (from REPLY msg)
* test to retry JOIN when the first attempt fails
* process confirmation delivery errors
* make new smp client attempt to reconnect on network error
* reconnect async wip
* remove comments
* trigger tryReconnectClient
* add subscription before trying to take smp client
* move atomically modify asyncClients
* remove logs
* corrections
* don't put error into new smp client TMVar
* UnliftIO async
* re-work
* test for connection to the server that was initially down
* fix tests
* additionally test that bob receives the message after re-connect
* make test independent of event order
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* test: HELLO blocking message delivery on the same server
* test: quota exceeded in one queue should not block delivery in other queues
* fix test to work in stable branch
* simplify pending message delivery (#202)
* simplify pending message delivery (WIP)
* refactor
* fix concurrent message delivery
* remove type synonym
* types and encodings for double ratchet integration
* upgrade stack resolver
* type classes for version agreement, encode/decode connection request links and E2E params with versioning
* encode/decode client parameters (version and DH key) in SMP queue URI using query string parameters
* restore support of the current SMP queue URI format
* update AMessage to only send queues in REPLY message (not the full connection request)
* new agent message evnvelopes (tests fail)
* new message envelopes - tests pass
* store fully encrypted messages before sending
* unify message delivery via DB queue (excluding confirmation and invitation)
* remove activateSecuredQueue
* linter hints
* remove comment
* export order
* save rachet-encrypted message, not per-queue encrypted
* delete message after it is accepted by the server, reduce message delivery interval for the tests
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* make KeyHash non-optional, StrEncoding class
* change server URI format in agent config, refactor with StrEncoding
* refactor Crypto using checkAlgorithm
* refactor parsing connection requests
* prepare to validate CA fingerprint sent in client handshake
* KeyHash check in handshake
* rename type to CliCommand
* server validates keyhash sent by the client
* validate -a option when parsing
* more of StrEncoding
* use base64url encoding for public key in connection requests; only allow accepting invitations that were not accepted
* subscribe ContactConnection, fix test to use base64url encoding in key example
* asynchronous message sending to allow accepting messages when agent (or server) is offline
* send pending messages after agent restart; test for pending messages delivery when server restarted
* test pending message delivery after agent restart
* message delivery process per server
* test layout