Skip to content

Add spoiler markdown and spoilered attachments - #1648

Merged
SpikeViper merged 8 commits into
version/0.8.0from
feat/spoiler-markdown
Aug 20, 2026
Merged

SpikeViper merged 8 commits into
version/0.8.0from
feat/spoiler-markdown

Conversation

@SkyJoshua

@SkyJoshua SkyJoshua commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds ||spoiler|| markdown for message text, plus a "Mark as spoiler" option when uploading an image or video. Spoilered images/videos render blurred with a click-to-reveal overlay, and link previews (Twitter cards, YouTube, etc.) generated from a URL inside a spoiler now inherit the spoiler too, so they don't leak the content before it's revealed.

Changes

  • New ||spoiler|| inline markdown extension (hooks into Markdig's emphasis parser, so nested formatting/mentions/emoji inside a spoiler still work)
  • Blur + reveal-on-click UI for spoilered images, videos, and text
  • Spoilered links produce a spoilered embed instead of an immediately visible one
  • New is_spoiler column on message_attachments (migration included)
  • Spoiler toggle checkbox added to the image/video upload modal

Test plan

  • ||text|| renders blurred and reveals on click, including nested bold/mentions/emoji
  • Bare URL inside ||...|| still becomes a working link
  • A link inside a spoiler isn't clickable until revealed
  • Uploading an image/video with "Mark as spoiler" checked blurs it in chat until clicked
  • A spoilered link's auto-generated embed is also hidden until revealed
  • Migration applies cleanly to an existing database

Images & Videos

Spoiler Text
Spoiler.Text.mp4
Spoiler Attachment
Spoiler.Attachment.mp4
Spoiler Embeds
Spoiler.Embeds.mp4

Adds Discord-style ||spoiler|| text, plus a spoiler flag for uploaded
images/videos that blurs them until clicked. Link previews generated
from a spoilered URL now inherit the spoiler too.
@SkyJoshua
SkyJoshua requested a review from a team as a code owner August 2, 2026 00:10
Comment thread Valour/Client/Components/Messages/Attachments/ImageAttachmentComponent.razor Outdated
Comment thread Valour/Client/Components/Messages/Attachments/ImageAttachmentComponent.razor Outdated
Comment thread Valour/Client/Components/Messages/MessageComponent.razor Outdated
Comment thread Valour/Client/Components/Messages/MessageComponent.razor Outdated
Comment thread Valour/Client/Markdig/SpoilerRenderer.cs Outdated
Comment thread Valour/Client/Markdig/SpoilerRenderer.cs Outdated
Comment thread Valour/Client/Messages/Rendering/MarkdownManager.cs Outdated
Comment thread Valour/Client/wwwroot/css/globals.css
SpikeViper and others added 2 commits August 20, 2026 12:55
…omponent.razor

Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
…omponent.razor

Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Deploying valour-marketing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5460c7f
Status:⚡️  Build in progress...

View logs

SpikeViper and others added 5 commits August 20, 2026 12:55
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
@SpikeViper
SpikeViper merged commit ae74616 into version/0.8.0 Aug 20, 2026
1 check was pending
@SpikeViper
SpikeViper deleted the feat/spoiler-markdown branch August 20, 2026 16:56
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.

3 participants