Skip to content

[FIX] Unable to edit a 'direct' room setting in the admin due to the room name#21636

Merged
sampaiodiego merged 14 commits intoRocketChat:developfrom
Jeanstaquet:FixSaveRoomInfoAdmin
Apr 29, 2021
Merged

[FIX] Unable to edit a 'direct' room setting in the admin due to the room name#21636
sampaiodiego merged 14 commits intoRocketChat:developfrom
Jeanstaquet:FixSaveRoomInfoAdmin

Conversation

@Jeanstaquet
Copy link
Contributor

@Jeanstaquet Jeanstaquet commented Apr 18, 2021

Proposed changes (including videos or screenshots)

When you are in the admin and want to change a room 'd' setting, it doesn't work because it takes into account the name that is set automatically and therefore tries to save that name. Since the name is not valid and should not be registered, we cannot change the setting for the 'd' room.
I made sure that when you want to change a setting in a 'd' room, that you don't take the name into account

2021-04-18.17-10-16.mp4

Behind the scene, the name is not saved

Issue(s)

Fixes #21635

Steps to test or reproduce

Further comments

@Jeanstaquet Jeanstaquet changed the title [FIX] Unable to edit a 'direct' room setting in the admin due to the name [FIX] Unable to edit a 'direct' room setting in the admin due to the room name Apr 18, 2021
KevLehman
KevLehman previously approved these changes Apr 19, 2021
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO a proper fix for this issue would be changing the frontend to actually not send the room name on payload since that was not changed (the field is event disabled). if the name is sent on the payload, the backend should validate it, otherwise let's say someone uses the endpoint providing only the room name, the endpoint will return success but nothing will be done, which I'd consider a bug.

@Jeanstaquet
Copy link
Contributor Author

@sampaiodiego alright, i will do the changes ASAP 👍

@Jeanstaquet
Copy link
Contributor Author

Jeanstaquet commented Apr 28, 2021

Proof that it works:

2021-04-29.01-51-17.mp4

@sampaiodiego sampaiodiego merged commit f8171f4 into RocketChat:develop Apr 29, 2021
@Jeanstaquet Jeanstaquet deleted the FixSaveRoomInfoAdmin branch April 29, 2021 14:07
gabriellsh added a commit that referenced this pull request Apr 29, 2021
…autolinker-phone

* 'develop' of github.com:RocketChat/Rocket.Chat:
  [FIX] Unable to edit a 'direct' room setting in the admin due to the room name (#21636)
@sampaiodiego sampaiodiego mentioned this pull request May 28, 2021
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 this pull request may close these issues.

Unable to edit a 'direct' room setting in the admin due to the name

3 participants

Comments