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

4.7.0 regression: edit button not displayed in the first minute after sending a new message #25478

Closed
nicolas-guichard opened this issue May 11, 2022 · 9 comments · Fixed by #25724

Comments

@nicolas-guichard
Copy link

Description:

In rooms where editing is enabled and limited in time, the client does not display the edit button in the first minute after sending.
Editing by pressing the up arrow key or with other clients still work as expected. It's only a UI issue.

I think I tracked this down in messageActionDefault.ts:

return !!currentTsDiff && currentTsDiff < blockEditInMinutes;

where currentTsDiff is the difference in minutes between the current time and the message timestamp.
During the first minute, currentTsDiff is 0 hence !!currentTsDiff is false and the edit button is not displayed.

This was introduced here.

Steps to reproduce:

  1. Send a message in a room with edits enabled enabled for settings.Message_AllowEditing_BlockEditInMinutes > 1.
  2. Hover the message, the edit button does not appear during the first minute.

Expected behavior:

The edit button is available as soon as the message is sent.

Actual behavior:

The edit button only appears one minute later.

Server Setup Information:

  • Version of Rocket.Chat Server: 4.7.0
  • Operating System:
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:

Client Setup Information

  • Desktop App or Browser Version: Firefox 100
  • Operating System: OpenSUSE

Additional context

Relevant logs:

@ankar84
Copy link

ankar84 commented May 12, 2022

Confirm that issue on 4.7.0!

@ghost
Copy link

ghost commented May 23, 2022

Same on 4.7.1

@alvarow
Copy link

alvarow commented May 23, 2022

Same for me.

@usefool
Copy link

usefool commented May 25, 2022

Same for me - if the "block edit after ..." option is set

Workaround: set " Block Message Editing After (n) Minutes" Option to 0 (to disable it)

@saschafoerster
Copy link

Still there on 4.8.1

@danceganse
Copy link

danceganse commented Jun 27, 2022

same problem like @saschafoerster mentioned before

@danel1
Copy link

danel1 commented Jun 28, 2022

@debdutdeb @sampaiodiego This is quite "breaking" for most of our users, since they've used the edit button mostly. Also we've set a limit to disable editing after one minute - so for us the button is gone completely... This should be an easy and fast fix - please take a look at it.

@debdutdeb
Copy link
Member

Hey, thanks for the ping. I'll look into it tonight. In the meantime if someone would like to open a PR, we'll pf course accept that too.

@danel1
Copy link

danel1 commented Jun 28, 2022

Hey, thanks for the ping. I'll look into it tonight. In the meantime if someone would like to open a PR, we'll pf course accept that too.

See #25724

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 a pull request may close this issue.

8 participants