-
Hello! I can see list of messages in console.
But there is not text message in the message/content/caption/text |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
If you're sure there's a text message, then try something like this:
If there are no texts in the JSON you receive, then maybe these aren't text messages, but some images? |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your anser! text of code:
The caption of MessagePhoto is empty. In telegram channel it's full of text. For example there is first message of range: |
Beta Was this translation helpful? Give feedback.
Thank you very much for your anser!
I tried your recomendation and wrote next code:
text of code:
foreach (var message in messages.Messages_) { Console.WriteLine("============================="); Console.WriteLine("=========MESSAGE BEGIN========"); Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(message)); Console.WriteLine("========MESSAGE END======="); Console.WriteLine("========TEXT======="); if (message.Content is TdApi.MessageContent.MessagePhoto) { var text = ((TdApi.MessageContent.MessagePhoto)message.Content).Caption.Text; Console.WriteLine("============================="); } }
The caption of MessagePhoto is empty. In telegram channel it's full of text. For example …