fix avatar deco media proxy

This commit is contained in:
fly_mc 2024-09-15 23:44:33 +08:00
parent 87ca834647
commit 226fe82dbf

View file

@ -494,7 +494,7 @@ export class UserEntityService implements OnModuleInit {
? getLocalUserDecorations()
: this.cacheService.pariRemoteUserDecorationsCache.fetch(user.id).then(res => res.map(ad => ({
...ad,
url: ad.url && this.config.proxyRemoteFiles
url: ad.url && (this.config.proxyRemoteFiles || this.config.mediaProxy)
? `${this.config.mediaProxy}/static.webp?url=${(encodeURIComponent(ad.url))}`
: ad.url,
})));