mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 23:25:13 +00:00
proxyRemoteFilesがfalseならリモートカスタム絵文字は直リンにする
This commit is contained in:
parent
d7dda8f6e3
commit
7cb13cf839
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue