public async Task StartDirectConverstation(NewConversationDto dto) { var currentUser = await GetCurrentUserAsync(); var conversation = conversationRepository.CreateAsync(currentUser.Id, dto.RecipientIds[0], dto.Text); var message = conversation.Messages.First(); Broastcast("conversation.new", conversation.ToDto(), dto.RecipientIds); Broastcast("message.sent", message.ToDto(), dto.RecipientIds); }
public async Task CreateAsync(ConversationDto conversationDto) { await conversationRepo.CreateAsync(mapper.Map <Conversation>(conversationDto)); }