Skip to content

[codex] Prevent Telegram market symbol auto-links#202

Merged
Pigbibi merged 1 commit into
mainfrom
codex/telegram-symbol-autolinks
Jun 24, 2026
Merged

[codex] Prevent Telegram market symbol auto-links#202
Pigbibi merged 1 commit into
mainfrom
codex/telegram-symbol-autolinks

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • stop Telegram from auto-linking market symbols such as SOXL.US and 00700.HK
  • keep real URLs unchanged
  • add focused sender/payload coverage

Validation

  • python -m py_compile on touched files
  • targeted sender payload checks
  • git diff --check

@Pigbibi Pigbibi merged commit 803db64 into main Jun 24, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/telegram-symbol-autolinks branch June 24, 2026 20:04

@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: dca68cae45

ℹ️ 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 notifications/telegram.py
Comment on lines +23 to +24
return _TELEGRAM_MARKET_SYMBOL_LINK_RE.sub(
lambda match: f"{match.group(1)}.{_TELEGRAM_MARKET_SYMBOL_LINK_JOINER}{match.group(2)}",

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 Skip URL spans when breaking symbol auto-links

When a Telegram message includes a real URL whose domain or path segment matches this pattern, such as https://EXAMPLE.COM/status or https://SOXL.US/chart, the global substitution inserts the word-joiner into the URL text and makes the sent link invalid/non-clickable. Since build_sender applies this sanitizer to the entire prefixed message, URL ranges need to be detected and left unchanged before rewriting standalone market symbols.

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