proxyRemoteFilesがfalseならリモートカスタム絵文字は直リンにする

This commit is contained in:
syuilo 2023-01-26 18:44:43 +09:00
parent d7dda8f6e3
commit 7cb13cf839
1 changed files with 5 additions and 1 deletions

View File

@ -117,7 +117,11 @@ export class CustomEmojiService {
const isLocal = emoji.host == null;
const emojiUrl = emoji.publicUrl || emoji.originalUrl; // || emoji.originalUrl してるのは後方互換性のためpublicUrlはstringなので??はだめ)
const url = isLocal ? emojiUrl : `${this.config.url}/proxy/${encodeURIComponent((new URL(emojiUrl)).pathname)}?${query({ url: emojiUrl })}`;
const url = isLocal
? emojiUrl
: this.config.proxyRemoteFiles
? `${this.config.url}/proxy/${encodeURIComponent((new URL(emojiUrl)).pathname)}?${query({ url: emojiUrl })}`
: emojiUrl;
return url;
}