[FIX] Fix error that occurs on changing archive status of room #20098
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.
Checklist
Proposed changes
This PR fixes an issue that happens when you try to edit the info of a room, and save changes after changing the value of "Archived". The archive functionality is handled separately from other room settings. The archived key is not used in the saveRoomSettings method but was still being sent over. Hence, the request was being considered invalid. I deleted the "archived" key from the data being sent in the request, making the request valid again.
Issue(s)
Closes #20079
Steps to test or reproduce
Further comments
I considered not editing the data object, itself and instead of editing a copy of the data object, but it is itself being copied inside the function itself and does not affect anything else.
Another option that could be considered instead would be to manually unpack all the different values that can be present as in "client/views/admin/rooms/EditRoom.js", lines 128 to 140, but that might bring along unnecessary complexity.