Merge remote-tracking branch 'origin/develop' into feat/room-member-stats

# Conflicts:
#	soulseek-rs-lib/src/client/tests.rs
#	soulseek-rs-lib/tests/e2e.rs
#	soulseek-rs/src/daemon/openrpc.rs
#	soulseek-rs/src/daemon/proto/method.rs
#	soulseek-rs/src/daemon/server/mod.rs
#	soulseek-rs/src/remote/mod.rs
This commit is contained in:
Michel de Graaf
2026-08-28 15:18:37 +00:00
22 changed files with 845 additions and 15 deletions
+25 -1
View File
@@ -15,7 +15,7 @@ use crate::daemon::proto::{
MemberStats, Members, MessageParams, Messages, Method, PROTOCOL_VERSION,
QueryParams, Request, Response, RoomRef, RpcError, SayParams,
SearchResults, Searches, Seconds, SharesStatus, SlotsParams, TransferRef,
Uploads, UserRef, UserResult,
Uploads, UserRef, UserResult, Watched,
};
use mirror::Mirror;
use serde::de::DeserializeOwned;
@@ -768,6 +768,30 @@ impl SessionApi for RemoteSession {
)
}
fn watch_user(&self, username: &str) -> Result<()> {
self.tell(
Method::UserWatch,
UserRef {
username: username.to_string(),
},
)
}
fn unwatch_user(&self, username: &str) -> Result<()> {
self.tell(
Method::UserUnwatch,
UserRef {
username: username.to_string(),
},
)
}
fn watched_users(&self) -> Vec<String> {
self.request::<_, Watched>(Method::UserWatched, ())
.map(|watched| watched.users)
.unwrap_or_default()
}
fn user_info(&self, username: &str) -> Option<UserInfo> {
self.request::<_, UserResult>(
Method::UserInfoOf,