Do not send ParticipantLeft webhook event unless connected successfully. (#1234)
Fixes #1130
This commit is contained in:
@@ -612,11 +612,6 @@ type FakeLocalParticipant struct {
|
||||
setICEConfigArgsForCall []struct {
|
||||
arg1 types.IceConfig
|
||||
}
|
||||
SetNameStub func(string)
|
||||
setNameMutex sync.RWMutex
|
||||
setNameArgsForCall []struct {
|
||||
arg1 string
|
||||
}
|
||||
SetMetadataStub func(string)
|
||||
setMetadataMutex sync.RWMutex
|
||||
setMetadataArgsForCall []struct {
|
||||
@@ -635,6 +630,11 @@ type FakeLocalParticipant struct {
|
||||
setMigrateStateArgsForCall []struct {
|
||||
arg1 types.MigrateState
|
||||
}
|
||||
SetNameStub func(string)
|
||||
setNameMutex sync.RWMutex
|
||||
setNameArgsForCall []struct {
|
||||
arg1 string
|
||||
}
|
||||
SetPermissionStub func(*livekit.ParticipantPermission) bool
|
||||
setPermissionMutex sync.RWMutex
|
||||
setPermissionArgsForCall []struct {
|
||||
@@ -4011,38 +4011,6 @@ func (fake *FakeLocalParticipant) SetICEConfigArgsForCall(i int) types.IceConfig
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetName(arg1 string) {
|
||||
fake.setNameMutex.Lock()
|
||||
fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct {
|
||||
arg1 string
|
||||
}{arg1})
|
||||
stub := fake.SetNameStub
|
||||
fake.recordInvocation("SetName", []interface{}{arg1})
|
||||
fake.setNameMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.SetNameStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetNameCallCount() int {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
return len(fake.setNameArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetNameCalls(stub func(string)) {
|
||||
fake.setNameMutex.Lock()
|
||||
defer fake.setNameMutex.Unlock()
|
||||
fake.SetNameStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetNameArgsForCall(i int) string {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
argsForCall := fake.setNameArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetMetadata(arg1 string) {
|
||||
fake.setMetadataMutex.Lock()
|
||||
fake.setMetadataArgsForCall = append(fake.setMetadataArgsForCall, struct {
|
||||
@@ -4152,6 +4120,38 @@ func (fake *FakeLocalParticipant) SetMigrateStateArgsForCall(i int) types.Migrat
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetName(arg1 string) {
|
||||
fake.setNameMutex.Lock()
|
||||
fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct {
|
||||
arg1 string
|
||||
}{arg1})
|
||||
stub := fake.SetNameStub
|
||||
fake.recordInvocation("SetName", []interface{}{arg1})
|
||||
fake.setNameMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.SetNameStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetNameCallCount() int {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
return len(fake.setNameArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetNameCalls(stub func(string)) {
|
||||
fake.setNameMutex.Lock()
|
||||
defer fake.setNameMutex.Unlock()
|
||||
fake.SetNameStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetNameArgsForCall(i int) string {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
argsForCall := fake.setNameArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) SetPermission(arg1 *livekit.ParticipantPermission) bool {
|
||||
fake.setPermissionMutex.Lock()
|
||||
ret, specificReturn := fake.setPermissionReturnsOnCall[len(fake.setPermissionArgsForCall)]
|
||||
@@ -5110,6 +5110,8 @@ func (fake *FakeLocalParticipant) Invocations() map[string][][]interface{} {
|
||||
defer fake.setMigrateInfoMutex.RUnlock()
|
||||
fake.setMigrateStateMutex.RLock()
|
||||
defer fake.setMigrateStateMutex.RUnlock()
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
fake.setPermissionMutex.RLock()
|
||||
defer fake.setPermissionMutex.RUnlock()
|
||||
fake.setResponseSinkMutex.RLock()
|
||||
|
||||
@@ -120,16 +120,16 @@ type FakeParticipant struct {
|
||||
arg2 livekit.TrackID
|
||||
arg3 bool
|
||||
}
|
||||
SetNameStub func(string)
|
||||
setNameMutex sync.RWMutex
|
||||
setNameArgsForCall []struct {
|
||||
arg1 string
|
||||
}
|
||||
SetMetadataStub func(string)
|
||||
setMetadataMutex sync.RWMutex
|
||||
setMetadataArgsForCall []struct {
|
||||
arg1 string
|
||||
}
|
||||
SetNameStub func(string)
|
||||
setNameMutex sync.RWMutex
|
||||
setNameArgsForCall []struct {
|
||||
arg1 string
|
||||
}
|
||||
StartStub func()
|
||||
startMutex sync.RWMutex
|
||||
startArgsForCall []struct {
|
||||
@@ -759,38 +759,6 @@ func (fake *FakeParticipant) RemoveSubscriberArgsForCall(i int) (types.LocalPart
|
||||
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetName(arg1 string) {
|
||||
fake.setNameMutex.Lock()
|
||||
fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct {
|
||||
arg1 string
|
||||
}{arg1})
|
||||
stub := fake.SetNameStub
|
||||
fake.recordInvocation("SetName", []interface{}{arg1})
|
||||
fake.setNameMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.SetNameStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetNameCallCount() int {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
return len(fake.setNameArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetNameCalls(stub func(string)) {
|
||||
fake.setNameMutex.Lock()
|
||||
defer fake.setNameMutex.Unlock()
|
||||
fake.SetNameStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetNameArgsForCall(i int) string {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
argsForCall := fake.setNameArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetMetadata(arg1 string) {
|
||||
fake.setMetadataMutex.Lock()
|
||||
fake.setMetadataArgsForCall = append(fake.setMetadataArgsForCall, struct {
|
||||
@@ -823,6 +791,38 @@ func (fake *FakeParticipant) SetMetadataArgsForCall(i int) string {
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetName(arg1 string) {
|
||||
fake.setNameMutex.Lock()
|
||||
fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct {
|
||||
arg1 string
|
||||
}{arg1})
|
||||
stub := fake.SetNameStub
|
||||
fake.recordInvocation("SetName", []interface{}{arg1})
|
||||
fake.setNameMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.SetNameStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetNameCallCount() int {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
return len(fake.setNameArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetNameCalls(stub func(string)) {
|
||||
fake.setNameMutex.Lock()
|
||||
defer fake.setNameMutex.Unlock()
|
||||
fake.SetNameStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) SetNameArgsForCall(i int) string {
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
argsForCall := fake.setNameArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) Start() {
|
||||
fake.startMutex.Lock()
|
||||
fake.startArgsForCall = append(fake.startArgsForCall, struct {
|
||||
@@ -1108,6 +1108,8 @@ func (fake *FakeParticipant) Invocations() map[string][][]interface{} {
|
||||
defer fake.removeSubscriberMutex.RUnlock()
|
||||
fake.setMetadataMutex.RLock()
|
||||
defer fake.setMetadataMutex.RUnlock()
|
||||
fake.setNameMutex.RLock()
|
||||
defer fake.setNameMutex.RUnlock()
|
||||
fake.startMutex.RLock()
|
||||
defer fake.startMutex.RUnlock()
|
||||
fake.subscriptionPermissionMutex.RLock()
|
||||
|
||||
Reference in New Issue
Block a user