Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MSC4193: Spoilers on Media #2212

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

gingershaped
Copy link

@gingershaped gingershaped commented Feb 15, 2025

Description

Adds support for MSC4193 by allowing users to mark image attachments as spoilers, which will blur them in the UI until explicitly revealed. The m.spoiler.reason field is supported for received images, although this PR does not add a way to set it for sent images.

Fixes #1966

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

github-actions bot commented Feb 15, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@gingershaped
Copy link
Author

If the most recent message in a room's history is a spoilered image which has been revealed, it will be re-hidden when the next message is sent. I'm not sure why this happens, but it seems to be a symptom of a bug which is out of the scope of this PR to fix.

@gingershaped
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

ajbura added a commit to cinnyapp/cla that referenced this pull request Feb 15, 2025
@ajbura ajbura self-requested a review February 16, 2025 03:24
Copy link

github-actions bot commented Feb 16, 2025

Preview: https://2212--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

Copy link
Member

@ajbura ajbura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the request changes, We should not delete list.ts as it is a generic atom file which can be used somewhere else, or even better maybe we can change in "PUT" action to update the existing entry if it already exist.

src/app/components/message/content/ImageContent.tsx Outdated Show resolved Hide resolved
src/app/components/message/content/ImageContent.tsx Outdated Show resolved Hide resolved
src/app/components/message/content/ImageContent.tsx Outdated Show resolved Hide resolved
src/app/components/message/content/ImageContent.tsx Outdated Show resolved Hide resolved
src/app/components/message/content/ImageContent.tsx Outdated Show resolved Hide resolved
src/app/components/message/content/ImageContent.tsx Outdated Show resolved Hide resolved
src/app/components/upload-card/UploadCardRenderer.tsx Outdated Show resolved Hide resolved
src/app/state/room/roomInputDrafts.ts Outdated Show resolved Hide resolved
@gingershaped gingershaped requested a review from ajbura February 16, 2025 17:16
@gingershaped gingershaped requested a review from ajbura February 19, 2025 15:35
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.

Implement MSC4193
2 participants