Esempio n. 1
0
        public ReplyMessage ReplyToMessage(ReplyMessage message, int chatId, int replyTo)
        {
            var chat = _chatRepo.GetOne(chatId);

            message.ReplyTo = _messageRepo.GetOne(replyTo);
            chat.Messages.Add(message);
            _chatRepo.Save(chat);
            message = _messageRepo.GetMessage(message.Id) as ReplyMessage;
            return(message);
        }