Esempio 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());
        }
Esempio 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);
        }
Esempio n. 3
0
 public IList <ConversationDto> GetConversations([FromUri(Name = "")] ConversationSearchDto searchDto)
 {
     searchDto = searchDto ?? new ConversationSearchDto();
     return(_conversationAppService.Find(searchDto));
 }