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

How to send media? #26

Open
strelov1 opened this issue Dec 15, 2017 · 1 comment
Open

How to send media? #26

strelov1 opened this issue Dec 15, 2017 · 1 comment

Comments

@strelov1
Copy link

I try send media

update, err := cli.mtproto.InvokeSync(mtproto.TL_messages_sendMedia{
	Silent:  false,
	Background:  false,
	Clear_draft:  false,
	Peer:  mtproto.TL_inputPeerChannel{
            Channel_id: channelTo.Id,
            Access_hash: channelTo.Access_hash},
	Reply_to_msg_id: 0,
	Media:         	 message.Media,
	Random_id:       rand.Int63(),
	Reply_markup:    mtproto.TL_null{},
})
if err != nil {
	fmt.Println(err)
	log.Fatal(err)
}
cli.parseUpdate(*update)

and recieve
INPUT_FETCH_ERROR

@bobrovde
Copy link

@strelov1 when i try to upload media by method messages.saveFilePart i got same error.
Solve it by change encode method for TL_upload_saveFilePart in api.go.
I change x.Bytes(e.Bytes) to x.StringBytes(e.Bytes)

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