Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(admin): render sticker previews at 320px instead of 160px (#1840)

Hampus480d56125d0a
diff --git a/fluxer_api/src/api/admin/services/guild/AdminGuildLookupService.ts b/fluxer_api/src/api/admin/services/guild/AdminGuildLookupService.ts
index 4976992f7..9a252c2fd 100644
--- a/fluxer_api/src/api/admin/services/guild/AdminGuildLookupService.ts
+++ b/fluxer_api/src/api/admin/services/guild/AdminGuildLookupService.ts
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import {MEDIA_PROXY_ICON_SIZE_DEFAULT} from '@fluxer/constants/src/MediaProxyAssetSizes';
+import type {MediaProxyImageSize} from '@fluxer/constants/src/MediaProxyImageSizes';
import {UnknownUserError} from '@fluxer/errors/src/domains/user/UnknownUserError';
import type {
ListGuildMembersRequest,
@@ -18,6 +19,8 @@ import type {IGatewayService} from '../../../infrastructure/IGatewayService';
import type {IUserRepository} from '../../../user/IUserRepository';
import {mapGuildsToAdminResponse} from '../../models/GuildTypes';
+const ADMIN_STICKER_MEDIA_RUNG: MediaProxyImageSize = 320;
+
interface AdminGuildLookupServiceDeps {
guildRepository: IGuildRepositoryAggregate;
userRepository: IUserRepository;
@@ -201,6 +204,6 @@ export class AdminGuildLookupService {
}
private buildStickerMediaUrl(id: string, animated: boolean): string {
- return `${Config.endpoints.media}/stickers/${id}.webp?size=${MEDIA_PROXY_ICON_SIZE_DEFAULT}${animated ? '&animated=true' : ''}`;
+ return `${Config.endpoints.media}/stickers/${id}.webp?size=${ADMIN_STICKER_MEDIA_RUNG}${animated ? '&animated=true' : ''}`;
}
}