public async Task <IActionResult> GetLast50Messages()
        {
            var messages = await _service.GetLast50MessagesAsync();

            var result = messages.Select(t => new ChatMessageViewModel {
                Id        = t.Id,
                Message   = t.Message,
                CreatedAt = t.CreatedAt.ToString(),
                UserName  = t.User.UserName
            });

            return(Ok(result));
        }