Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Didn't receive the photo on telegram? #3033

Open
weihaofdyisheng opened this issue Aug 27, 2024 · 3 comments
Open

Didn't receive the photo on telegram? #3033

weihaofdyisheng opened this issue Aug 27, 2024 · 3 comments

Comments

@weihaofdyisheng
Copy link

weihaofdyisheng commented Aug 27, 2024

Message { id = 139460633 senderId = MessageSenderUser { userId = 7017911263 } chatId = -4168586955 sendingState = MessageSendingStatePending { sendingId = 0 } schedulingState = null isOutgoing = true isPinned = false isFromOffline = false canBeSaved = true hasTimestampedMedia = true isChannelPost = false isTopicMessage = false containsUnreadMention = false date = 1724742325 editDate = 0 forwardInfo = null importInfo = null interactionInfo = null unreadReactions = vector[0] { } factCheck = null replyTo = null messageThreadId = 0 savedMessagesTopicId = 0 selfDestructType = null selfDestructIn = 0.000000 autoDeleteIn = 0.000000 viaBotUserId = 0 senderBusinessBotUserId = 0 senderBoostCount = 0 authorSignature = "" mediaAlbumId = 0 effectId = 0 hasSensitiveContent = false restrictionReason = "" content = MessagePhoto { photo = Photo { hasStickers = false minithumbnail = null sizes = vector[1] { PhotoSize { type = "y" photo = File { id = 1242 size = 0 expectedSize = 0 local = LocalFile { path = "" canBeDownloaded = true canBeDeleted = false isDownloadingActive = false isDownloadingCompleted = false downloadOffset = 0 downloadedPrefixSize = 0 downloadedSize = 0 } remote = RemoteFile { id = "AgACAgUAAxkBAAKYq2bNerGeWmHMZQG3ePFji6W64uk5AAIFxzEb_IJxVuvMk9KOju_QAQADAgADeQADNQQ" uniqueId = "AQADBccxG_yCcVZ-" isUploadingActive = false isUploadingCompleted = true uploadedSize = 0 } } width = 0 height = 0 progressiveSizes = vector[0] { } } } } caption = FormattedText { text = "UION523972638361501696" entities = vector[0] { } } showCaptionAboveMedia = false hasSpoiler = false isSecret = false } replyMarkup = null }
This is the callback data received

TdApi.InputMessageContent content = new TdApi.InputMessagePhoto(new TdApi.InputFileRemote(id), null,null,0,0,new TdApi.FormattedText(message, null),false,null, false); client.send(new TdApi.SendMessage(chatId, 0, null, null, null, content), defaultHandler);
This is java Code.
I can confirm that this code works fine. Because one account can send normally, but another account cannot send, but a callback is received.

@weihaofdyisheng
Copy link
Author

I found that the size of the picture = 0 cannot be received.

@weihaofdyisheng
Copy link
Author

Error {
code = 400
message = "Wrong file identifier/HTTP URL specified"
}

@levlam
Copy link
Contributor

levlam commented Aug 27, 2024

The error "Wrong file identifier/HTTP URL specified" means that you are passing a wrong file identifier in InputFileRemote. You must not transfer file identifier between different users or even different sessions of the same user. This will not work for regular users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants