Exemplo n.º 1
0
        public async Task <IEnumerable <MessageViewModel> > MessageHistory([FromBody] string destinataryId)
        {
            var auth0Id = _helper.GetCurrentUserProfile(User);

            var messages = await _profileRepository.GetMessages(auth0Id, destinataryId);

            foreach (var message in messages)
            {
                message.Message = _cryptography.Decrypt(message.Message);
            }

            return(messages);
        }