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 spoilers on images (MSC4193) #2212

Merged
merged 9 commits into from
Feb 22, 2025
Merged

Conversation

gingershaped
Copy link
Contributor

@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
Contributor 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
Contributor 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.

@gingershaped gingershaped requested a review from ajbura February 16, 2025 17:16
@gingershaped gingershaped requested a review from ajbura February 19, 2025 15:35
Copy link
Collaborator

@kfiven kfiven left a comment

Choose a reason for hiding this comment

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

Thanks!

@kfiven kfiven changed the title Add support for MSC4193: Spoilers on Media Add support for spoilers on images (MSC4193) Feb 22, 2025
@ajbura ajbura merged commit dd4c1a9 into cinnyapp:dev Feb 22, 2025
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement MSC4193
3 participants