fix: preserve user figures in avatar imager
CI / check (push) Successful in 26s
CI / release (push) Skipped
CI / deploy (push) Successful in 44s

This commit is contained in:
Simo committed 2026-08-09 21:48:43 +02:00
1 parent 49185dd7a9
commit 4a6fcd050e
5 files changed
+12 -251

No files matched your search

+9
View File
@@ -37,6 +37,15 @@ describe("avatarImageUrl", () => {
expect(url.startsWith("https://img.example.com?")).toBe(true);
});
it("preserves the exact user look instead of replacing it with a default figure", () => {
const look =
"hr-11782-40-40.hd-180-7-14.ch-11592-66.lg-10726-79-1408.sh-11764-1408.ha-11958-70-1408.wa-2007-0";
const url = new URL(avatarImageUrl(look));
expect(url.searchParams.get("figure")).toBe(look);
});
it("uses & when the base already has a query string", () => {
// This test is no longer applicable since avatarImageUrl doesn't accept a base parameter
// The base URL is now resolved from env