When a larger file is sent from libqaul, the file needs to be sliced into the maximally allowed messages size, and each message needs to be encrypted. For larger files this can take quite a while.
To speed up the process and not block libqaul for too long, move the file slicing and encryption into an async worker thread.
When a larger file is sent from libqaul, the file needs to be sliced into the maximally allowed messages size, and each message needs to be encrypted. For larger files this can take quite a while.
To speed up the process and not block libqaul for too long, move the file slicing and encryption into an async worker thread.
The thread should be created here:
https://github.com/qaul/qaul.net/blob/899edace6dbd3e4e251f27b5498103a622b8afae/rust/libqaul/src/services/chat/file.rs#L520