chore: update the anti-spam banner message#19
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the anti-spam warning copy shown on the discussions home page to explicitly mention external groups such as WhatsApp, improving clarity for learners.
Changes:
- Updated
spamWarningMessagedefault text to include an explicit WhatsApp example. - Updated the
SpamWarningBannerbolded substring to match the new message text.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/discussions/messages.js | Updates the default anti-spam banner message copy. |
| src/components/SpamWarningBanner.jsx | Keeps the bolded substring in sync with the updated message copy. |
Comments suppressed due to low confidence (1)
src/components/SpamWarningBanner.jsx:66
- The bolding logic depends on finding an exact hard-coded English substring inside the localized message (
msg.indexOf(boldText)). This is brittle (any copy tweak requires updatingboldText) and it won’t work for non-English translations (the substring won’t be found, so nothing is bolded). Consider switching to a single i18n message that marks the bold portion via a placeholder/rich-text value (e.g.,FormattedMessagewith avaluesfunction) or splitting the message into pre/bold/post segments using separate message IDs.
const msg = intl.formatMessage(messages.spamWarningMessage);
const boldText = 'never invite you to join external groups, such as on WhatsApp, or ask for personal or financial information';
const idx = msg.indexOf(boldText);
if (idx === -1) {
return msg;
}
return (
<>
{msg.slice(0, idx)}
<strong>{boldText}</strong>
{msg.slice(idx + boldText.length)}
</>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jcapphelix
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updated the anti-spam message .
Ticket
https://2u-internal.atlassian.net/browse/COSMO2-819