fix(discord): stop the bridge's replies from pinging anyone - #97
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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
Reviewers should start by examining the change in |
|
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
Reviewers should start by examining the change in |
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_referencedoes not itself ping the replied-to user, so replies stay in-thread without notifying anyone.Verified
pnpm run typecheck— clean.pnpm test— 165/165.