I'm using Telegram.Bot library to create a telegram bot with c# but my question is more about telegram bot api to specific library so anyone that uses telegram bot api can answer my question.
the question is, i want to send an image to a user more than one time, if i send to in a normal way:
//Code Used in This Specific library to normally send a message with image attached to it
InputOnlineFile imageFile = new InputOnlineFile(new MemoryStream(File.ReadAllBytes("filePath")));
botClient.SendPhotoAsync(ChatId, imageFile, caption);
this causes each message that has image have a separate messageId so user have to download each image separately.
another way of sending the same message is sending one message like above and store it's messageId and for other messages instead of sending a new message just forward the first message to the same user like this:
//Code Used in This Specific library to forward a message
botClient.ForwardMessageAsync(ChatId, ChatId, firstMessage.messageId)
this solves the issue but leaves an ugly "Forwarded From botname" title to the image.
so is there another way of doing the whole thing so every message look a like but have the same messageId? is there a way to forward the first message to the same user but get rid of that title?
thanks in advance
After send photo from file, you will obtain a file_id
(.result.photo[4].file_id
: AgADBQADLagxGyRN4FQwyg5Z9HLVFVFp0zIABAHza6yG8gXJ86cCAAEC
in this example)
And you can send with file ID now :)