Skip to content

feat: do not use external twemoji cdn - #120

Open
dvorakjan wants to merge 1 commit into
masterfrom
feature/avoid-external-twemoji-cdn
Open

dvorakjan wants to merge 1 commit into
masterfrom
feature/avoid-external-twemoji-cdn

Conversation

@dvorakjan

Copy link
Copy Markdown
Member

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 374608a4da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib.js
Comment on lines +12 to +13
if (currentScript && currentScript.src) {
return currentScript.src;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate currentScript before using it as Twemoji base

getBotChatScriptSrc() returns document.currentScript.src unconditionally, so when BotChat.App() is invoked from another external script (for example /app.js), Twemoji asset URLs are derived from that caller script directory instead of the BotChat bundle directory. In that context, early emoji renders (such as during initialization paths that call twemoji.parse) resolve to the wrong twemoji/svg/*.svg path and 404. This branch should only be used when currentScript.src matches the BotChat filename pattern, otherwise continue scanning script tags.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant