コード例 #1
0
        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);
        }
コード例 #2
0
 public async Task CreateAsync(ConversationDto conversationDto)
 {
     await conversationRepo.CreateAsync(mapper.Map <Conversation>(conversationDto));
 }