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

Implement showing and sending media spoilers #20

Open
wants to merge 2 commits into
base: sc
Choose a base branch
from

Conversation

cloudrac3r
Copy link

@cloudrac3r cloudrac3r commented Sep 8, 2023

For sending, there is a checkbox during file upload asking whether to send as a spoiler. It applies to both "upload" and "upload all".

For showing, we piggyback off the existing hidden images implementation, fixing it to actually function correctly and be clickable. It works for m.image and m.video events. I have not tried using it when the base event is an extensible event.

Both of these use the town.robin.msc3725.content_warning (later, m.content_warning) event type as per MSC3725.

The previous hidden images implementation would PERMANENTLY remember an image as "should be shown" after it has been clicked once. I removed this behaviour, since the status quo on other apps of forgetting the state after you click to another room seems fairly natural. And it gives you a natural way out if you regret clicking.

If merged upstream, this could fix element-hq/element-web#18061 and vector-im/element-web#18062.

image

image

  • I agree to release my changes under this project's license

@cloudrac3r cloudrac3r changed the title Implement showing and sending spoilers Implement showing and sending media spoilers Sep 8, 2023
SpiritCroc pushed a commit that referenced this pull request Oct 6, 2024
* [create-pull-request] automated change (matrix-org#12966)

Co-authored-by: github-merge-queue <[email protected]>

* Add timezone to right panel profile.

* Add setting to publish timezone

* Add string for timezone publish

* Automatically update timezone when setting changes.

* Refactor to using a hook

And automatically refresh the timezone every minute.

* Check for feature support for extended profiles.

* lint

* Add timezone

* Remove unintentional changes

* Use browser default timezone.

* lint

* tweaks

* Set timezone publish at the device level to prevent all devices writing to the timezone field.

* Update hook to use external client.

* Add test for user timezone.

* Update snapshot for preferences tab.

* Hide timezone info if not provided.

* Stablize test

* Fix date test types.

* prettier

* Add timezone tests

* Add test for invalid timezone.

* Update screenshot

* Remove check for profile.

---------

Co-authored-by: ElementRobot <[email protected]>
Co-authored-by: github-merge-queue <[email protected]>
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.

Rendering content warnings
1 participant