public void ProcessRepliesAndAudio(IList <TLMessageBase> messages)
        {
            for (var i = 0; i < messages.Count; i++)
            {
                var message = messages[i] as TLMessage;
                if (message != null)
                {
                    var mediaAudio = message.Media as TLMessageMediaAudio;
                    if (mediaAudio != null)
                    {
                        var audio = mediaAudio.Audio as TLAudio;
                        if (audio == null)
                        {
                            return;
                        }

                        var store         = IsolatedStorageFile.GetUserStoreForApplication();
                        var audioFileName = audio.GetFileName();
                        if (TLString.Equals(audio.MimeType, new TLString("audio/mpeg"), StringComparison.OrdinalIgnoreCase))
                        {
                            if (!store.FileExists(audioFileName))
                            {
                                mediaAudio.IsCanceled          = false;
                                mediaAudio.DownloadingProgress = mediaAudio.LastProgress > 0.0 ? mediaAudio.LastProgress : 0.001;
                                BeginOnThreadPool(() =>
                                {
                                    DownloadAudioFileManager.DownloadFile(audio.DCId, audio.ToInputFileLocation(), message, audio.Size);
                                });
                                continue;
                            }
                        }

                        var wavFileName = Path.GetFileNameWithoutExtension(audioFileName) + ".wav";

                        if (!store.FileExists(wavFileName))
                        {
                            mediaAudio.IsCanceled          = false;
                            mediaAudio.DownloadingProgress = mediaAudio.LastProgress > 0.0 ? mediaAudio.LastProgress : 0.001;
                            BeginOnThreadPool(() =>
                            {
                                DownloadAudioFileManager.DownloadFile(audio.DCId, audio.ToInputFileLocation(), message, audio.Size);
                            });
                            continue;
                        }
                    }
                }
            }

            var replyToMsgIds = new TLVector <TLInt>();
            var replyToMsgs   = new List <TLMessage25>();

            for (var i = 0; i < messages.Count; i++)
            {
                var message25 = messages[i] as TLMessage25;
                if (message25 != null)
                {
                    if (message25.ReplyToMsgId != null)
                    {
                        var replyToMsgId = message25.ReplyToMsgId;
                        if (replyToMsgId != null &&
                            replyToMsgId.Value != 0)
                        {
                            TLInt channelId   = null;
                            var   peerChannel = message25.ToId as TLPeerChannel;
                            if (peerChannel != null)
                            {
                                channelId = peerChannel.Id;
                            }

                            var reply = CacheService.GetMessage(replyToMsgId, channelId);
                            if (reply != null)
                            {
                                messages[i].Reply = reply;
                            }
                            else
                            {
                                replyToMsgIds.Add(replyToMsgId);
                                replyToMsgs.Add(message25);
                            }
                        }
                    }

                    if (message25.NotListened)
                    {
                        if (message25.Media != null)
                        {
                            message25.Media.NotListened = true;
                        }
                    }
                }
            }

            if (replyToMsgIds.Count > 0)
            {
                var channel = With as TLChannel;
                if (channel != null)
                {
                    var firstReplyToMsg = replyToMsgs.FirstOrDefault();
                    var peerChat        = firstReplyToMsg != null ? firstReplyToMsg.ToId as TLPeerChat : null;
                    if (peerChat != null)
                    {
                        MTProtoService.GetMessagesAsync(
                            replyToMsgIds,
                            result =>
                        {
                            CacheService.AddChats(result.Chats, results => { });
                            CacheService.AddUsers(result.Users, results => { });

                            for (var i = 0; i < result.Messages.Count; i++)
                            {
                                for (var j = 0; j < replyToMsgs.Count; j++)
                                {
                                    var messageToReply = replyToMsgs[j];
                                    if (messageToReply != null &&
                                        messageToReply.ReplyToMsgId.Value == result.Messages[i].Index)
                                    {
                                        replyToMsgs[j].Reply = result.Messages[i];
                                    }
                                }
                            }

                            //Execute.BeginOnUIThread(() =>
                            //{
                            for (var i = 0; i < replyToMsgs.Count; i++)
                            {
                                replyToMsgs[i].NotifyOfPropertyChange(() => replyToMsgs[i].ReplyInfo);
                            }
                            //});
                        },
                            error =>
                        {
                            Execute.ShowDebugMessage("messages.getMessages error " + error);
                        });
                    }
                    else
                    {
                        MTProtoService.GetMessagesAsync(
                            channel.ToInputChannel(),
                            replyToMsgIds,
                            result =>
                        {
                            CacheService.AddChats(result.Chats, results => { });
                            CacheService.AddUsers(result.Users, results => { });

                            for (var i = 0; i < result.Messages.Count; i++)
                            {
                                for (var j = 0; j < replyToMsgs.Count; j++)
                                {
                                    var messageToReply = replyToMsgs[j];
                                    if (messageToReply != null &&
                                        messageToReply.ReplyToMsgId.Value == result.Messages[i].Index)
                                    {
                                        replyToMsgs[j].Reply = result.Messages[i];
                                    }
                                }
                            }

                            //Execute.BeginOnUIThread(() =>
                            //{
                            for (var i = 0; i < replyToMsgs.Count; i++)
                            {
                                replyToMsgs[i].NotifyOfPropertyChange(() => replyToMsgs[i].ReplyInfo);
                            }
                            //});
                        },
                            error =>
                        {
                            Execute.ShowDebugMessage("channels.getMessages error " + error);
                        });
                    }
                }
                else
                {
                    MTProtoService.GetMessagesAsync(
                        replyToMsgIds,
                        result =>
                    {
                        CacheService.AddChats(result.Chats, results => { });
                        CacheService.AddUsers(result.Users, results => { });

                        for (var i = 0; i < result.Messages.Count; i++)
                        {
                            for (var j = 0; j < replyToMsgs.Count; j++)
                            {
                                var messageToReply = replyToMsgs[j];
                                if (messageToReply != null &&
                                    messageToReply.ReplyToMsgId.Value == result.Messages[i].Index)
                                {
                                    replyToMsgs[j].Reply = result.Messages[i];
                                }
                            }
                        }

                        //Execute.BeginOnUIThread(() =>
                        //{
                        for (var i = 0; i < replyToMsgs.Count; i++)
                        {
                            replyToMsgs[i].NotifyOfPropertyChange(() => replyToMsgs[i].ReplyInfo);
                        }
                        //});
                    },
                        error =>
                    {
                        Execute.ShowDebugMessage("messages.getMessages error " + error);
                    });
                }
            }
        }