1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 14:28:49 +09:00

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

This commit is contained in:
syuilo 2023-01-26 18:44:43 +09:00
parent d7dda8f6e3
commit 7cb13cf839

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;
}