Ejemplo n.º 1
0
        public IHttpActionResult ConversationCreated(int conversationId)
        {
            var dto = _conversationAppService.Find(conversationId);

            if (dto != null)
            {
                var connections = _notificationConnectionManager.GetConnections(Request.GetSiteId(), dto.AgentId, dto.DepartmentId);
                _hub.Clients.Clients(connections).conversationCreated(dto);
            }
            return(Ok());
        }
Ejemplo n.º 2
0
        public IList <ConversationDto> FindConversations(int socialUserId)
        {
            SocialUser user = _domainService.Find(socialUserId);

            if (user == null)
            {
                throw SocialExceptions.SocialUserIdNotExists(socialUserId);
            }

            ConversationSearchDto searchDto = new ConversationSearchDto();

            if (user != null)
            {
                searchDto.UserId = user.Id;
                return(_conversationService.Find(searchDto));
            }
            return(null);
        }
Ejemplo n.º 3
0
 public IList <ConversationDto> GetConversations([FromUri(Name = "")] ConversationSearchDto searchDto)
 {
     searchDto = searchDto ?? new ConversationSearchDto();
     return(_conversationAppService.Find(searchDto));
 }