account: download the avatar from its own link

The official TS6 client fetches the avatar map's names as they are
(MyTeamSpeak::Account::request_own_myts_avatar hands each name to
Avatar_Cache::request_avatar_from_urls, which GETs it without headers).
requestAvatarSignedUrl signs upload links: its reply only goes to
upload_avatar, an Http_Client::put. Voelin fetched such a link with a GET
and was refused with HTTP 403.

A refused download is now its own error ("avatar download returned HTTP
..."), apart from the account service's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
This commit is contained in:
Claude committed 2026-10-05 20:09:59 +00:00
1 parent 7cd258d9a5
commit 019f5be81c
2 files changed
+22 -9

No files matched your search

+1 -1
View File
@@ -446,7 +446,7 @@ impl App {
});
// The picture only when it changed (or was never fetched).
let Some(name) = avatar.filter(|name| *name != shown || !has_picture) else { return };
match client.avatar(&token, &name).await {
match client.avatar(&name).await {
Ok(bytes) => later(move |app| {
if app.myts.generation == generation && app.myts.signed_in {
app.myts.set_avatar(name, &bytes);