Skip to content

fix(meeting): allow disabling waiting room via --waiting-room=false - #36

Open
xBoyMinemc wants to merge 1 commit into
TencentCloud:mainfrom
xBoyMinemc:main
Open

fix(meeting): allow disabling waiting room via --waiting-room=false#36
xBoyMinemc wants to merge 1 commit into
TencentCloud:mainfrom
xBoyMinemc:main

Conversation

@xBoyMinemc

Copy link
Copy Markdown

Problem

In cmd/meeting/update.go, the code previously checked if o.AutoInWaitingRoom before setting settings["auto_in_waiting_room"].

When users run tmeet meeting update --waiting-room=false, o.AutoInWaitingRoom is false, 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.AutoInWaitingRoom to if cmd.Flags().Changed("waiting-room").

This ensures that whenever the --waiting-room flag is explicitly provided (such as --waiting-room=false), auto_in_waiting_room: false is properly serialized into the request body and sent to the server.

Verification

  • Tested with tmeet meeting update --meeting-id <ID> --waiting-room=false
  • Verified via tmeet meeting get --meeting-id <ID> that auto_in_waiting_room in the response is now correctly updated to false.

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.
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.

1 participant