* batch server commands in one transport block
* subscribe to multiple queues using batched commands
* agent method to subscribe to multiple queues using batched commands
* refactor
* test for batched subscriptions
* delete part of connections in batched test
* add resubscribeConnections
* remove comment
* update SMP protocol doc
* 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
* process ntf server commands
* when subscription is re-created and it was ENDed, resubscribe to SMP
* SMPClientAgent draft
* SMPClientAgent: remove double tracking of subscriptions
* subscriber frame
* PING error now throws error to restart SMPClient for more reliable re-connection (#342)
* increase TCP timeout to 5 sec
* add pragmas and vacuum db (#343)
* vacuum in each connection to enable auto-vacuum (#344)
* update protocol, token verification
* refactor SMPClient to ProtocoClient, to use with notification server protocol
* notification server client, managing notification clients in the agent
* stub for push payload
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* notifications: protocol
* update protocol to include subscription ID and DH public key
* update protocol, started server
* add notification server subscription DH key
* use the same command type in notifications protocol, protocol parsing, server frame
* remove empty files
* 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>
* binary SMP protocol encoding (server tests fail)
* use 1 byte for bytestring length when encoding/decoding
* Encoding class, binary tags
* update server tests
* negotiate SMP version in client/server handshake
* add version columns to queues and connections
* split parsing SMP client commands and server responses to different functions
* check uniqueness of protocol tags
* split client commands and server responses/messages to separate types
* update types in SMP client
* remove pattern synonyms for SMP errors
* simplify getHandshake
* update SMP protocol encoding in protocol spec
* encode time as a number of seconds (64-bit integer) since epoch
* overview changes
* correction
* protocol docs changes
* include reviewer comments in the doc
* encryption scheme for the recipient traffic
* TLS cipher suite
* SMP commands for notifications (LSTN, NTFY) with separate queue IDs and keys
* rename Notifier types
* remove notify key and id from NEW and IDS commands (TODO add other commands)
* fix StoreLog serialization
* add commands for managing notifications
* add notification subscribers to server state, add notifier ID and key to store log
* add notifier ID and key to the queue
* refactor END notification to work for both types of subscriptions, deliver message notification (NMSG)
* process NSUB command - subscribe to message notifications
* test for message notifications
* fix SMP client function for NSUB command
* fix parse/serialize NID command
* refactor use ifM
* check duplicate notifier ID only against other notifier IDs
* refactor getQueue
* test notifier ID and key with store log
* Update src/Simplex/Messaging/Client.hs
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* Update src/Simplex/Messaging/Server.hs
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* store log: s/NOTIFY/NOTIFIER/
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* move SMP server from agent commands NEW/JOIN to agent config
* fix SMPServer parser
* update agent protocol - server management
* enable agent test
* agent test with 2 servers
* create reply queue on the configured server
* choose random server
* swap bind