From 0f767a0f22f476a7a38598f06b55f7a37b6854da Mon Sep 17 00:00:00 2001 From: zhx Date: Tue, 16 Jun 2026 14:15:35 +0800 Subject: [PATCH] fix: avoid animated room rps gift icons --- services/game-service/internal/service/roomrps/service.go | 2 +- services/game-service/internal/service/roomrps/service_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/game-service/internal/service/roomrps/service.go b/services/game-service/internal/service/roomrps/service.go index d7b83d65..4be32ec8 100644 --- a/services/game-service/internal/service/roomrps/service.go +++ b/services/game-service/internal/service/roomrps/service.go @@ -690,7 +690,7 @@ func roomRPSGiftIconURL(gift *walletv1.GiftConfig) string { gift.GetResource().GetPreviewUrl(), } for _, candidate := range candidates { - if value := strings.TrimSpace(candidate); value != "" { + if value := strings.TrimSpace(candidate); value != "" && !roomRPSURLLooksAnimated(value) { return value } } diff --git a/services/game-service/internal/service/roomrps/service_test.go b/services/game-service/internal/service/roomrps/service_test.go index 6e48c67e..05d749a7 100644 --- a/services/game-service/internal/service/roomrps/service_test.go +++ b/services/game-service/internal/service/roomrps/service_test.go @@ -12,7 +12,7 @@ import ( func TestUpdateConfigEnrichesStakeGiftsFromWalletCatalog(t *testing.T) { catalog := newFakeGiftCatalog(map[string]*walletv1.GiftConfig{ "2001": roomRPSWalletGift("2001", "Rose", "https://cdn.example.test/rose.png", "", "https://cdn.example.test/rose.mp4", 100), - "2002": roomRPSWalletGift("2002", "Bell", "", "https://cdn.example.test/bell-preview.png", "https://cdn.example.test/bell.svga", 300), + "2002": roomRPSWalletGift("2002", "Bell", "https://cdn.example.test/bell.mp4", "https://cdn.example.test/bell-preview.png", "https://cdn.example.test/bell.svga", 300), "2003": roomRPSWalletGift("2003", "Crown", "", "", "https://cdn.example.test/crown.svga", 500), "2004": roomRPSWalletGift("2004", "Cup", "https://cdn.example.test/cup.png", "", "", 1000), })