-
Notifications
You must be signed in to change notification settings - Fork 11.8k
fix: Don't allow OTR message editing #35600
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
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: cfec8a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35600 +/- ##
===========================================
+ Coverage 64.67% 64.72% +0.04%
===========================================
Files 3244 3242 -2
Lines 95394 95179 -215
Branches 17858 17817 -41
===========================================
- Hits 61695 61601 -94
+ Misses 30805 30733 -72
+ Partials 2894 2845 -49
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add tests to ensure this?
OTR is a beta feature, we don't fully support it, so we shouldn't invest time and effort writing e2e tests for a beta feature. |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
I think we will never leave beta if we don't have tests, so if it's worth the effort to fix it, it's worth the effort to test it. ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although there are ongoing discussions about deprecating this feature, no final decision has been made yet, so it’s still worthwhile to include tests for it.
fce3763
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Approving on behalf of frontend
Proposed changes (including videos or screenshots)
We currently don't support the editing of OTR messages, but still show the option in UI, this PR blocks this option in UI.
Issue(s)
Steps to test or reproduce
Further comments
SUP-701
This pull request addresses the issue of editing Off-The-Record (OTR) messages in the Rocket.Chat application. The changes include:
ChatMessages.ts
file by changing the method call fromfindLastOwnMessage
tofindPreviousOwnMessage
, which corrects the logic for navigating through messages.useEditMessageAction.ts
file to include checks for OTR messages in the edit message functionality.ChatAPI.ts
and altering thefindPreviousOwnMessage
method to make the message parameter optional.data.ts
by adding checks to prevent editing OTR messages and adjusting the logic for finding the previous editable message authored by the current user.These changes ensure that OTR messages cannot be edited, maintaining the integrity and privacy of such communications.