-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
カスタム絵文字をproxyに通すように #7526
カスタム絵文字をproxyに通すように #7526
Conversation
LGTM |
@@ -59,9 +61,12 @@ export async function populateEmoji(emojiName: string, noteUserHost: string | nu | |||
|
|||
if (emoji == null) return null; | |||
|
|||
const isLocal = emojiName.endsWith('@.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ユーザー情報についてくる絵文字情報はローカルでも@.
が付かないから判定条件変えないとダメだな
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
うーん判定が難しい
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name
の形式でも判定できないし(foo
形式の文字列はローカルでもリモートでもありうる)、url
でも判定できない(外部のオブジェクトストレージとか使ってる可能性ある)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まあ別にローカルなURLをさらにproxyに通しても問題は無いんだけど、無駄ではある
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すぐ上でDBクエリ用にhostをresolveしているので、普通にhostがnullかどうかで判定すればOK。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ほんとだ
const isLocal = emoji.host == null;
でいいかな
@rinsuki @mei23 @acid-chicken ↑良いアイデア募集中 |
|
あれ、その部分じゃない? |
Summary
Resolve #6451
試してないけどたぶん動く