This repository was archived by the owner on Feb 14, 2026. It is now read-only.
Implement showing and sending media spoilers#20
Open
cloudrac3r wants to merge 2 commits into
Open
Conversation
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 <github-merge-queue@users.noreply.github.com> * 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 <releases@riot.im> Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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.