From 81d2c5a4a7355af8a385893136e12e618a8b92d2 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 12 Apr 2023 10:58:56 +0900 Subject: enhance: カスタム絵文字関連の変更 (#9794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PackedNoteなどのemojisはプロキシしていないURLを返すように * MFMでx3/x4もしくはscale.x/yが2.5以上に指定されていた場合にはオリジナル品質の絵文字を使用する * update CHANGELOG.md * fix changelog * ?? * wip * fix * merge * Update packages/frontend/src/scripts/media-proxy.ts Co-authored-by: syuilo * merge * calc scale --------- Co-authored-by: syuilo --- packages/backend/src/core/CustomEmojiService.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'packages/backend/src/core') diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 3de936dd65..416c3de5a8 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -267,16 +267,7 @@ export class CustomEmojiService { const emoji = await this.cache.fetch(`${name} ${host}`, queryOrNull); if (emoji == null) return null; - - const isLocal = emoji.host == null; - const emojiUrl = emoji.publicUrl || emoji.originalUrl; // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ) - const url = isLocal - ? emojiUrl - : this.config.proxyRemoteFiles - ? `${this.config.mediaProxy}/emoji.webp?${query({ url: emojiUrl })}` - : emojiUrl; - - return url; + return emoji.publicUrl || emoji.originalUrl; // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ) } /** -- cgit v1.2.3-freya