public override string ToString()
        {
            if (Media is TLDecryptedMessageMediaEmpty)
            {
                return(string.Format("TLDecryptedMessage45 qts={0} in_seq_no={1} out_seq_no={2} flags=[{3}] date={4} delete_date={5} message={6}", Qts, InSeqNo, OutSeqNo, TLMessageBase.MessageFlagsString(Flags), Date, DeleteDate, Message));
            }

            return(string.Format("TLDecryptedMessage45 qts={0} in_seq_no={1} out_seq_no={2} flags=[{3}] date={4} delete_date={5} media={6}", Qts, InSeqNo, OutSeqNo, TLMessageBase.MessageFlagsString(Flags), Date, DeleteDate, Media));
        }
Beispiel #2
0
        public override TLObject FromBytes(byte[] bytes, ref int position)
        {
            bytes.ThrowExceptionIfIncorrect(ref position, Signature);

            Flags    = GetObject <TLInt>(bytes, ref position);
            Id       = GetObject <TLInt>(bytes, ref position);
            UserId   = GetObject <TLInt>(bytes, ref position);
            ChatId   = GetObject <TLInt>(bytes, ref position);
            Message  = GetObject <TLString>(bytes, ref position);
            Pts      = GetObject <TLInt>(bytes, ref position);
            PtsCount = GetObject <TLInt>(bytes, ref position);
            Date     = GetObject <TLInt>(bytes, ref position);

            if (IsSet(Flags, (int)MessageFlags.Fwd))
            {
                FwdFrom = GetObject <TLPeerBase>(bytes, ref position);
                FwdDate = GetObject <TLInt>(bytes, ref position);
            }
            if (IsSet(Flags, (int)MessageFlags.Reply))
            {
                ReplyToMsgId = GetObject <TLInt>(bytes, ref position);
            }
            if (IsSet(Flags, (int)MessageFlags.Entities))
            {
                Entities = GetObject <TLVector <TLMessageEntityBase> >(bytes, ref position);
            }



#if DEBUG
            var messageString = Message.ToString();
            var logString     = string.Format("TLUpdateShortChatMessage40 id={0} flags={1} user_id={2} message={3} pts={4} pts_count={5} date={6} fwd_from={7} fwd_date={8} reply_to_msg_id={9} entities={10}", Id, TLMessageBase.MessageFlagsString(Flags), UserId, messageString.Substring(0, Math.Min(messageString.Length, 5)), Pts, PtsCount, Date, FwdFrom, FwdDate, ReplyToMsgId, Entities);

            Logs.Log.Write(logString);
#endif

            return(this);
        }
Beispiel #3
0
 public override string ToString()
 {
     return(string.Format("TLUpdatesShortSentMessage id={0} media={1} flags={2}", Id, Media, TLMessageBase.MessageFlagsString(Flags)));
 }