From 48c9bc21e0aa9c76f492c009a21413755c970dbb Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 2 Aug 2024 17:25:19 +0800 Subject: [PATCH] :alien: Update call name in livekit --- pkg/internal/services/calls.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/internal/services/calls.go b/pkg/internal/services/calls.go index 4f1b20f..6073b2d 100644 --- a/pkg/internal/services/calls.go +++ b/pkg/internal/services/calls.go @@ -79,8 +79,9 @@ func GetCallParticipants(call models.Call) ([]*livekit.ParticipantInfo, error) { } func NewCall(channel models.Channel, founder models.ChannelMember) (models.Call, error) { + id := fmt.Sprintf("%s+%d", channel.Alias, channel.ID) call := models.Call{ - ExternalID: channel.Alias, + ExternalID: id, FounderID: founder.AccountID, ChannelID: channel.ID, Founder: founder, @@ -92,7 +93,7 @@ func NewCall(channel models.Channel, founder models.ChannelMember) (models.Call, } _, err := Lk.CreateRoom(context.Background(), &livekit.CreateRoomRequest{ - Name: call.ExternalID, + Name: id, EmptyTimeout: viper.GetUint32("calling.empty_timeout_duration"), MaxParticipants: viper.GetUint32("calling.max_participants"), })