Skip to content

feat: v1.7.3 — replace URLs with "URL posted" before speaking - #6

Merged
sbcmsbgithub merged 1 commit into
masterfrom
feat/url-redaction
May 18, 2026
Merged

sbcmsbgithub merged 1 commit into
masterfrom
feat/url-redaction

Conversation

@sbcmsbgithub

Copy link
Copy Markdown
Owner

Summary

Any URL in a chat message is replaced with "URL posted" before being spoken. The listener is never subjected to a 40-character web address being read aloud.

What changed

  • Added URL_RE = /https?:\/\/\S+|www\.\S+/gi near the other regex constants.
  • Applied it to the spoken string in handleNode (after assembling parts, before enqueueSpeak).
  • The raw msg.body (used for the dedup key) is not modified — two different URLs from the same sender still produce unique keys and deduplicate independently.

Examples

Message body Spoken
check this out https://example.com/some/long/path check this out URL posted
www.google.com URL posted
see http://foo.com and http://bar.com see URL posted and URL posted

Test plan

  • Post a message containing an https:// link — should hear "URL posted", not the URL
  • Post a message containing a www. link — same
  • Post a normal message with no URL — unchanged behaviour
  • Post the same URL twice — second should be deduped (not re-read)

🤖 Generated with Claude Code

Adds URL_RE regex (http/https/www) applied to the spoken string in handleNode.
URLs in message bodies are never read aloud; the listener hears "URL posted"
instead. The raw body is preserved in the dedup key so URL messages still
deduplicate correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sbcmsbgithub
sbcmsbgithub merged commit 53ec60b into master May 18, 2026
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