fix(meeting): allow disabling waiting room via --waiting-room=false - #36
Open
xBoyMinemc wants to merge 1 commit into
Open
fix(meeting): allow disabling waiting room via --waiting-room=false#36xBoyMinemc wants to merge 1 commit into
xBoyMinemc wants to merge 1 commit into
Conversation
fix(meeting): allow disabling waiting room via --waiting-room=false
Previously, `UpdateOptions.Run` checked `if o.AutoInWaitingRoom` before
populating `settings["auto_in_waiting_room"]`. When a user explicitly
passed `--waiting-room=false`, the condition evaluated to false, causing
the field to be omitted from the request body entirely. As a result,
the server never received the update and the waiting room remained enabled.
This commit changes the check to `if cmd.Flags().Changed("waiting-room")`,
ensuring that explicitly specifying `--waiting-room=false` correctly sends
`{"auto_in_waiting_room": false}` to the Tencent Meeting API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
In
cmd/meeting/update.go, the code previously checkedif o.AutoInWaitingRoombefore settingsettings["auto_in_waiting_room"].When users run
tmeet meeting update --waiting-room=false,o.AutoInWaitingRoomisfalse, so the field was skipped and omitted from the HTTP PUT payload. Consequently, the meeting's waiting room on Tencent Meeting cloud could never be turned off.Solution
Change
if o.AutoInWaitingRoomtoif cmd.Flags().Changed("waiting-room").This ensures that whenever the
--waiting-roomflag is explicitly provided (such as--waiting-room=false),auto_in_waiting_room: falseis properly serialized into the request body and sent to the server.Verification
tmeet meeting update --meeting-id <ID> --waiting-room=falsetmeet meeting get --meeting-id <ID>thatauto_in_waiting_roomin the response is now correctly updated tofalse.