From 80a4d021b95fe08987eeae3f769499f3860c44b7 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Fri, 10 May 2024 20:02:25 +0530 Subject: [PATCH] Add simulate leave request close reason (#2713) --- pkg/rtc/types/interfaces.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/types/interfaces.go b/pkg/rtc/types/interfaces.go index 3b230b0ee..01b874c62 100644 --- a/pkg/rtc/types/interfaces.go +++ b/pkg/rtc/types/interfaces.go @@ -97,6 +97,7 @@ const ( ParticipantCloseReasonSimulateMigration ParticipantCloseReasonSimulateNodeFailure ParticipantCloseReasonSimulateServerLeave + ParticipantCloseReasonSimulateLeaveRequest ParticipantCloseReasonNegotiateFailed ParticipantCloseReasonMigrationRequested ParticipantCloseReasonPublicationError @@ -140,6 +141,8 @@ func (p ParticipantCloseReason) String() string { return "SIMULATE_NODE_FAILURE" case ParticipantCloseReasonSimulateServerLeave: return "SIMULATE_SERVER_LEAVE" + case ParticipantCloseReasonSimulateLeaveRequest: + return "SIMULATE_LEAVE_REQUEST" case ParticipantCloseReasonNegotiateFailed: return "NEGOTIATE_FAILED" case ParticipantCloseReasonMigrationRequested: @@ -161,7 +164,7 @@ func (p ParticipantCloseReason) String() string { func (p ParticipantCloseReason) ToDisconnectReason() livekit.DisconnectReason { switch p { - case ParticipantCloseReasonClientRequestLeave: + case ParticipantCloseReasonClientRequestLeave, ParticipantCloseReasonSimulateLeaveRequest: return livekit.DisconnectReason_CLIENT_INITIATED case ParticipantCloseReasonRoomManagerStop: return livekit.DisconnectReason_SERVER_SHUTDOWN