Example #1
0
 public ResPQ(byte[] nonce, byte[] serverNonce, byte[] pq, TLLongVector fingerprints)
 {
     this.nonce        = nonce;
     this.serverNonce  = serverNonce;
     this.pq           = pq;
     this.fingerprints = fingerprints;
 }
Example #2
0
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.nonce        = StreamingUtils.readBytes(0x10, stream);
     this.serverNonce  = StreamingUtils.readBytes(0x10, stream);
     this.pq           = StreamingUtils.readTLBytes(stream);
     this.fingerprints = StreamingUtils.readTLLongVector(stream, context);
 }
Example #3
0
        private void button1_Click_2(object sender, EventArgs e)
        {
            TLInputPeerChannel from = new TLInputPeerChannel();

            from.setAccessHash(2120444971788660000);
            from.setChannelId(1007286733);

            TLInputPeerSelf to = new TLInputPeerSelf();


            TLIntVector ids = new TLIntVector();

            ids.add(2061);

            TLLongVector rands = new TLLongVector();

            rands.add(986875756);

            TLRequestMessagesForwardMessages fw = new TLRequestMessagesForwardMessages();

            fw.setFromPeer(from);
            fw.setToPeer(to);
            fw.setId(ids);
            fw.setRandomId(rands);

            NewApi.Api().doRpcCall(fw);
        }
Example #4
0
        public MTNeedResendMessage(long[] msgIds)
        {
            this.messages = new TLLongVector();
            long[] numArray = msgIds;
            int    length   = numArray.Length;
            int    index    = 0;

            while (true)
            {
                if (index >= length)
                {
                    break;
                }
                long num3 = numArray[index];
                this.messages.add(Long.valueOf(num3));
                index++;
            }
        }
Example #5
0
 public MTMessagesAllInfo(TLLongVector msgIds, string info)
 {
     this.msgIds = msgIds;
     this.info   = info;
 }
Example #6
0
 public MTMsgsAck(TLLongVector messages)
 {
     this.messages = new TLLongVector();
     this.messages = messages;
 }
Example #7
0
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.imported      = StreamingUtils.readTLVector(stream, context);
     this.retryContacts = StreamingUtils.readTLLongVector(stream, context);
     this.users         = StreamingUtils.readTLVector(stream, context);
 }
Example #8
0
 public virtual void setDocuments(TLLongVector documents)
 {
     this.documents = documents;
 }
Example #9
0
 public MTMsgsStateReq(TLLongVector messages)
 {
     this.messages = messages;
 }
 public TLDecryptedMessageActionReadMessages()
 {
     this.randomIds = new TLLongVector();
 }
Example #11
0
 public virtual void setMsgIds(TLLongVector value)
 {
     this.msgIds = value;
 }
Example #12
0
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.msgIds = StreamingUtils.readTLLongVector(stream, context);
     this.query  = StreamingUtils.readTLMethod(stream, context);
 }
Example #13
0
 public MTNeedResendMessage(TLLongVector messages)
 {
     this.messages = messages;
 }
Example #14
0
 public MTNeedResendMessage(Long[] msgIds)
 {
     this.messages = new TLLongVector();
     Collections.addAll(this.messages, msgIds);
 }
Example #15
0
 public MTNeedResendMessage()
 {
     this.messages = new TLLongVector();
 }
Example #16
0
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.msgIds = StreamingUtils.readTLLongVector(stream, context);
     this.info   = StreamingUtils.readTLString(stream);
 }
 public virtual void setRandomIds(TLLongVector randomIds)
 {
     this.randomIds = randomIds;
 }
Example #18
0
 public virtual void setMsgIds(TLLongVector msgIds)
 {
     this.msgIds = msgIds;
 }
Example #19
0
 public virtual void setOrder(TLLongVector order)
 {
     this.order = order;
 }
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.randomIds = StreamingUtils.readTLLongVector(stream, context);
 }
Example #21
0
 public MTMsgsStateReq()
 {
     this.messages = new TLLongVector();
 }
Example #22
0
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.flags = StreamingUtils.readInt(stream);
     this.order = StreamingUtils.readTLLongVector(stream, context);
 }
Example #23
0
 public virtual void setFingerprints(TLLongVector fingerprints)
 {
     this.fingerprints = fingerprints;
 }
Example #24
0
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.emoticon  = StreamingUtils.readTLString(stream);
     this.documents = StreamingUtils.readTLLongVector(stream, context);
 }
Example #25
0
 public MTMsgsAck()
 {
     this.messages = new TLLongVector();
 }
Example #26
0
 public TLImportedContacts()
 {
     this.retryContacts = new TLLongVector();
 }
Example #27
0
 public MTMsgsAck(Long[] msgIds)
 {
     this.messages = new TLLongVector();
     this.messages = new TLLongVector();
     Collections.addAll(this.messages, msgIds);
 }
Example #28
0
 public virtual void setRetryContacts(TLLongVector retryContacts)
 {
     this.retryContacts = retryContacts;
 }
Example #29
0
        private async void ForwardB_Click(object sender, EventArgs e)
        {
            if (ForwardTB.Text.Trim() != "" && textBox1.Text.Trim() != "")
            {
                Loading(ForwardB, true);
                string notify = "";


                if (NewApi.isAuthenticated())
                {
                    TLInputPeerUser iuser = null;
                    Random          rand  = new Random();

                    string search = textBox1.Text.Trim().Replace("@", "").Replace("+", "").Replace(" ", "").ToLower();

                    TLUser user = await FindPeer(search);

                    if (user != null)
                    {
                        TLInputPeerUser Puser = new TLInputPeerUser();
                        Puser.setAccessHash(user.getAccessHash());
                        Puser.setUserId(user.getId());


                        if (search == null || search == "")
                        {
                            search = user.getFirstName() + " " + user.getLastName();
                        }

                        string[]    lines   = System.Text.RegularExpressions.Regex.Split(ForwardTB.Text.Trim(), "\r\n");
                        long        Faccess = 0;
                        int         FId     = 0;
                        TLIntVector mId     = new TLIntVector();
                        FId     = Convert.ToInt32(lines[0].Trim() + "");
                        Faccess = Convert.ToInt64(lines[1].Trim() + "");
                        mId.add(Convert.ToInt32(lines[2].Trim() + ""));

                        TLInputPeerUser from = new TLInputPeerUser();
                        from.setAccessHash(Faccess);
                        from.setUserId(FId);

                        TLLongVector lRand = new TLLongVector();
                        lRand.add(rand.Next());

                        TLRequestMessagesForwardMessages req = new TLRequestMessagesForwardMessages();
                        req.setFromPeer(from);
                        req.setToPeer(Puser);
                        req.setId(mId);
                        req.setRandomId(lRand);
                        req.enableSilent(true);
                        req.enableWithMyScore(true);



                        try
                        {
                            //var res = Api.doRpcCall(req);
                            var res = await WTask.Task.Run(() => NewApi.Api().doRpcCall(req));

                            notify = "پیام به " + search + " فوروارد شد.";
                            //NotifyBar.ForeColor = Color.Green;
                        }
                        catch (Exception ex)
                        {
                            notify = "خطا: " + ex.Message;
                            //NotifyBar.ForeColor = Color.Red;
                        }
                    }
                }

                Loading(ForwardB, false, notify);
            }
        }