From 8b3bf027063042c02531e6b635845bb35c19458b Mon Sep 17 00:00:00 2001 From: renaocheng Date: Mon, 6 Jul 2026 16:53:19 +0800 Subject: [PATCH] fix(vc): format meeting events files --- shortcuts/vc/vc_meeting_events.go | 12 ++++++------ shortcuts/vc/vc_meeting_events_test.go | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/shortcuts/vc/vc_meeting_events.go b/shortcuts/vc/vc_meeting_events.go index ad96e56c8..9dcc81c7a 100644 --- a/shortcuts/vc/vc_meeting_events.go +++ b/shortcuts/vc/vc_meeting_events.go @@ -208,12 +208,12 @@ func meetingEventsCurrentIdentity(runtime *common.RuntimeContext) (meetingEvents return meetingEventsBotIdentity(botInfo), "" } userOpenID := strings.TrimSpace(runtime.UserOpenId()) - identity := meetingEventsIdentity{ - ID: userOpenID, - Name: strings.TrimSpace(runtime.Config.UserName), - ParticipantType: "human", - IsSelf: true, - } + identity := meetingEventsIdentity{ + ID: userOpenID, + Name: strings.TrimSpace(runtime.Config.UserName), + ParticipantType: "human", + IsSelf: true, + } identity.Label = currentIdentityLabel(identity) if userOpenID == "" { return identity, "identity unavailable: current user open_id is unavailable" diff --git a/shortcuts/vc/vc_meeting_events_test.go b/shortcuts/vc/vc_meeting_events_test.go index 5f5dfcde1..dc2fcf379 100644 --- a/shortcuts/vc/vc_meeting_events_test.go +++ b/shortcuts/vc/vc_meeting_events_test.go @@ -616,7 +616,7 @@ func TestMeetingEvents_ExecuteJSON(t *testing.T) { out := strings.ReplaceAll(stdout.String(), " ", "") out = strings.ReplaceAll(out, "\n", "") for _, want := range []string{ - `"identity":{"id":"bot_001","name":"DemoBot","participant_type":"bot","is_self":true,"label":"DemoBot[bot]"}`, + `"identity":{"id":"bot_001","name":"DemoBot","participant_type":"bot","is_self":true,"label":"DemoBot[bot]"}`, `"current_participants":[`, `"role":"host"`, `"is_self":true`, @@ -693,7 +693,7 @@ func TestMeetingEvents_ExecuteJSON_BotIdentityErrorDoesNotBlockEvents(t *testing out = strings.ReplaceAll(out, "\n", "") for _, want := range []string{ `"event_type":"participant_joined"`, - `"identity":{"participant_type":"bot","is_self":true,"label":"bot"}`, + `"identity":{"participant_type":"bot","is_self":true,"label":"bot"}`, `"warnings":[`, `identityunavailable`, } { @@ -725,7 +725,7 @@ func TestMeetingEvents_ExecuteJSON_UserIdentitySkipsBotInfo(t *testing.T) { out := strings.ReplaceAll(stdout.String(), " ", "") out = strings.ReplaceAll(out, "\n", "") for _, want := range []string{ - `"identity":{"id":"ou_testuser","participant_type":"human","is_self":true,"label":"ou_testuser[human]"}`, + `"identity":{"id":"ou_testuser","participant_type":"human","is_self":true,"label":"ou_testuser[human]"}`, `"current_participants":[`, `"id":"ou_testuser"`, `"is_self":true`,