public async Task <IHttpActionResult> GetMessagesFromDialog(GetDialogDto getdialogs)
        {
            var currentUser = long.Parse(User.Identity.GetUserId());
            var dialogList  = await _chatMessageService.GetMessagesFromDialog(currentUser, getdialogs.Recipient);

            var profiles = await _profileRepository.GetTinyProfiles(new List <long>() { currentUser, getdialogs.Recipient });

            var members = new JObject();

            foreach (var profile in profiles)
            {
                members.Add(profile.Id.ToString(),
                            new JObject()
                {
                    new JProperty("FirstName", profile.FirstName),
                    new JProperty("LastName", profile.LastName),
                    new JProperty("AvatarUrl", profile.AvatarUrl)
                });
            }
            return(SuccessApiResult(new DialogWithMessagesDto()
            {
                Members = members, Messages = dialogList
            }));
        }