This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
MM-15324 Allow plugins override ephemeral posts #2759
Merged
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.
Summary
This PR enables ephemeral posts with a post.prop.type to override a post by a webapp plugin.
e.g. keeps the system_ephemeral post.type, but allows post.props.type to override
This has been validated by using
/test-ephemeral-post-override
from the test bot pluginTicket Link
Fixes mattermost/mattermost#10797
Notes
I did not add a test to post_message_view_test.jsx as I wasn't sure if it was needed and I am unfamiliar with snapshot testing. (happy to do it if requested).
I did not add a test for post_body.jsx as no tests currently exist for the component.