-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[FIX] Not showing edit message button when blocking edit after N minutes #25724
[FIX] Not showing edit message button when blocking edit after N minutes #25724
Conversation
c7b431d
to
f6d0212
Compare
@@ -171,7 +171,7 @@ Meteor.startup(async function () { | |||
if (msgTs != null) { | |||
currentTsDiff = moment().diff(msgTs, 'minutes'); |
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.
Instead of the current change, I could have changed currentTsDiff = moment().diff(msgTs, 'minutes');
(which returns an Integer
) to currentTsDiff = moment().diff(msgTs, 'minutes', true);
, which returns a precise float
, meaning currentTsDiff
would never equal 0.
I don't know if you have any preference ?
thx a lot for your contribution @matthias4217 |
@sampaiodiego @debdutdeb Hey guys, thanks for commiting to develop and preparing for 5.x. We do not really wan't to upgrade directly to 5.x after release to due "stability-reasons". Would it therefore be possible, to pick this for 4.8.2 - maybe with other bugfixes and release asap as "Bugfix Update" so users have a choice? Thanks! |
fair enough @danel1 , I'll add this one to 4.8.2 milestone.. not promising we'll actually make it, but if we make it, this one will be included, ok? |
…tes (#25724) Co-authored-by: Diego Sampaio <chinello@gmail.com>
Proposed changes (including videos or screenshots)
Previously, in Rocketchat 4.7.0 and later, as mentioned in #25478, the edit button was not displayed on the interface in the minute after having sent a message. This is now fixed : messages can be edited right after sending them.
Issues
Steps to test or reproduce
I've tested this locally. Without this patch, the edit button isn't shown after sending a message. With it, it is now shown immediately.
Further comments
This is my first pull request to RocketChat. Please tell me if I need to change anything.