dss 2 years ago
parent
commit
18d1854cc6

+ 5 - 9
src/CallCenter.Application/Handlers/FlowControl/AnsweredExtToOuterNotificationHandler.cs

@@ -44,16 +44,12 @@ namespace CallCenter.Application.Handlers
                 };
                 await _callDetailRepository.AddAsync(detail, cancellationToken);
 
-                var callDetail = _callDetailRepository.GetAsync(x => x.CallId == model.Id && x.EventName == "ANSWER");
-
-                if (callDetail == null)
+                
+                //调用业务通知 通知前端
+                var workModel = _userCacheManager.GetWorkByTel(notification.Outer.From);
+                if (workModel != null)
                 {
-                    //调用业务通知 通知前端
-                    var workModel = _userCacheManager.GetWorkByTel(notification.Outer.From);
-                    if (workModel != null)
-                    {
-                        await _realtimeService.AnsweredAsync(workModel.UserId, new AnseredDto() { ConversationId = notification.Outer.Id, From = notification.Outer.From, Id = model.Id, To = notification.Outer.To, CallType = ECallType.ExtToOuter }, cancellationToken);
-                    }
+                    await _realtimeService.AnsweredAsync(workModel.UserId, new AnseredDto() { ConversationId = notification.Outer.Id, From = notification.Outer.From, Id = model.Id, To = notification.Outer.To, CallType = ECallType.ExtToOuter }, cancellationToken);
                 }
             }
         }