-
Notifications
You must be signed in to change notification settings - Fork 116
API messages.sendMultiMedia Always Fails (400 MEDIA_INVALID) for valid media #148
Comments
I have the same question. Have you solved your problem |
@mvdicarlo Have you solved your problem? I need help |
No. I just accepted the less preferable way of sending individually for now. I don't know enough about the protocol to debug it myself |
I tried everything,This is very frustrating,The author doesn't have any explanation
… 2021年5月18日 下午8:34,Lemonynade ***@***.***> 写道:
No. I just accepted the less preferable way of sending individually for now.
Wasn't able to tell if this was a limitation of the library or some limitation of the Telegram API.
I don't know enough about the protocol to debug it myself
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#148 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDPXOTYCPI5TUMXMWXJMELTOJNDXANCNFSM4WPAAHKA>.
|
Any update on this issue? I try all kinds of ways but still the response is "400 MEDIA_INVALID" |
This is just fuck this is so stupid, why python has everything while js developers has to deal with dead library with "call" method that pretty much don't do anything, what the actual fuck why just why |
I'm going to try to patch this error. It seems that problem is at src/tl/builder/index.js:7159 'messages.sendMultiMedia': function(params) {
this.int32(-134016113);
const flags = (this.has(params.silent) << 5) | (this.has(params.background) << 6) | (this.has(params.clear_draft) << 7) | (this.has(params.noforwards) << 14) | (this.has(params.reply_to_msg_id) << 0) | (this.has(params.schedule_date) << 10) | (this.has(params.send_as) << 13);
this.int32(flags);
this.predicate(params.peer);
this.flag(this.int, params.reply_to_msg_id);
this.vector(this.predicate, params.multi_media);
this.flag(this.int, params.schedule_date);
this.flag(this.predicate, params.send_as);
}, |
you may use uploadMedia to upload each photo
=========================================================================================== |
I have been trying to get this particular api method to work (https://core.telegram.org/method/messages.sendMultiMedia).
I have provided sample code below that I am using to test this behavior. It shouldn't be an issue of the actual file being invalid as if you attempt to send the media using https://core.telegram.org/method/messages.sendMedia it works just fine.
It appears to be a bug, but I don't know enough about the protocol implementation to be able to fix it myself.
The text was updated successfully, but these errors were encountered: