feat(lib): send and receive private messages

Wire private messaging through the client:

- MessageFactory::build_message_user (code 22) and build_message_acked
  (code 23);
- the incoming MessageUser handler now acknowledges freshly delivered
  messages and forwards them to the client instead of only logging them;
- ClientContext buffers received UserMessages;
- Client::send_private_message and Client::take_private_messages expose the
  feature, and UserMessage (with accessors) is re-exported from the crate.

Verified end to end against soulfind: a_private_message_is_delivered_between_users
logs in two clients and asserts one receives the other's message.
This commit is contained in:
michel
2026-07-19 13:31:30 +02:00
parent f61e02e05c
commit a7372cc88e
6 changed files with 195 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ pub mod prelude {
}
// Re-export commonly used types
pub use actor::server_actor::PeerAddress;
pub use actor::server_actor::{PeerAddress, UserMessage};
pub use client::{Client, ClientSettings};
pub use error::{Result, SoulseekRs};
pub use types::{DownloadStatus, File, Search, SearchResult, Transfer};