Skip to content

fix(discord): stop the bridge's replies from pinging anyone - #97

Merged
EthanThatOneKid merged 1 commit into
mainfrom
fix/discord-no-ping
Sep 26, 2026
Merged

EthanThatOneKid merged 1 commit into
mainfrom
fix/discord-no-ping

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

What

Every part of a reply is posted with allowed_mentions: { parse: [] }.

Why

Discord parses mentions in message content by default. A reply's content can carry @user, @role, @here, or @everyone — forwarded from the asker's question or produced by the model — so Computer's answer could ping a person or the whole channel. The bridge's own admission rules already encode the intent (it answers a mention; it does not broadcast), but nothing enforced that on the way out.

parse: [] suppresses mention parsing in the posted content while leaving the reply reference intact. message_reference does not itself ping the replied-to user, so replies stay in-thread without notifying anyone.

Verified

  • pnpm run typecheck — clean.
  • pnpm test — 165/165.
  • Diff is one line; no other call site posts content with mentions.

A reply's content can carry `@user`, `@here`, or `@everyone` text forwarded from
the asker or echoed by the model, and Discord parses mentions in message content by
default — so Computer's answer could ping a user or the whole channel. Send
`allowed_mentions: { parse: [] }` on every part, matching the intent already
encoded in the admission rules: the bridge answers a mention, it does not
broadcast.
@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
computer Ready Ready Preview Sep 26, 2026 4:23pm UTC

@wazoocomputer

wazoocomputer Bot commented Sep 26, 2026

Copy link
Copy Markdown

This pull request addresses an issue where replies from the Discord bridge might inadvertently ping users, roles, or everyone due to Discord's default mention parsing behavior. The change adds allowed_mentions: { parse: [] } to the message payload, preventing any mentions in the reply content from generating pings while still maintaining the reply's in-thread context.

File Path Change Summary of Change
channels/discord/index.ts modified Added allowed_mentions to message payload

Reviewers should start by examining the change in channels/discord/index.ts.

@wazoocomputer

wazoocomputer Bot commented Sep 26, 2026

Copy link
Copy Markdown

This pull request addresses an issue where replies from the Discord bridge might inadvertently ping users, roles, or everyone due to Discord's default mention parsing behavior. The change adds allowed_mentions: { parse: [] } to the message payload, preventing any mentions in the reply content from generating pings while still maintaining the reply's in-thread context.

File Path Change Summary of Change
channels/discord/index.ts modified Added allowed_mentions to message payload

Reviewers should start by examining the change in channels/discord/index.ts.

This branch was successfully deployed

1 active deployment
Preview — de256542 Deployed Sep 26, 2026 by vercel[bot]
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