feat(peer): ask a peer what it says about itself

The client answered a UserInfoRequest but could never send one, so a
user's profile — description, upload slots, queue length — was something
this client served and never saw. The reply (peer code 16) is now parsed
too, with the tolerances other clients carry: a picture is skipped rather
than kept, a length that overruns the message is clamped, and a message
that stops early (older clients, and Museek+ writing a boolean as an
integer) still yields every field before it.
This commit is contained in:
Michel de Graaf
2026-09-09 17:14:17 +00:00
parent 6d6f4f282e
commit 0546d3a77c
7 changed files with 263 additions and 1 deletions
+5
View File
@@ -919,6 +919,11 @@ impl Client {
}
}
}
ClientOperation::PeerInfoReceived { username, info } => {
if let Ok(mut ctx) = client_context.write_safe() {
ctx.store_peer_info(username, info);
}
}
ClientOperation::FolderContents {
username,
token,