feat(lib): answer UserInfoRequest with our slots and queue
Opening a user's profile in SoulseekQt or Nicotine+ asks that peer directly (peer code 15), and a peer that never answers shows an endless spinner. The reply (code 16) carries no description or picture, the configured upload slot count, how many uploads are waiting, and whether a slot is free right now, which is what the reference clients send.
This commit is contained in:
@@ -766,6 +766,19 @@ impl Client {
|
||||
},
|
||||
);
|
||||
}
|
||||
ClientOperation::UserInfoRequested { requester_key } => {
|
||||
Self::reply_to_peer(
|
||||
&client_context,
|
||||
&requester_key,
|
||||
|ctx| {
|
||||
crate::message::peer::build_user_info(
|
||||
ctx.upload_slots as u32,
|
||||
ctx.upload_queue.len() as u32,
|
||||
ctx.has_free_upload_slot(),
|
||||
)
|
||||
},
|
||||
);
|
||||
}
|
||||
ClientOperation::FolderContentsRequested {
|
||||
requester_key,
|
||||
token,
|
||||
|
||||
Reference in New Issue
Block a user