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