Coder Social home page Coder Social logo

Comments (6)

blez avatar blez commented on May 21, 2024

Hello, sorry for pushing you, just interesting if there are any updates for that issue?

from mtproto.

quenbyako avatar quenbyako commented on May 21, 2024

Hey @blez! Thanks for asking and ping for inactivity!

I researched this issue, Here is whats happen:

So, TL schema has preeeety few types, including only bytestream and a few types of integers and floats (int32, uint32, int64, int128 and int256). Also it support custom crc codes for defining specific objects with specific decoding. See something wrong?

Yyyyeup, no single type for boolean, arrays, nulltype, etc. So, in TL, bool true and false are objects!

What's the problem? bool type cant implement Object interface in any case in go. We try to fix it with adding specific struct InterfacedObject in near future updates (until new year), which contains only interface{} parameter and Unwrap method, which is getting you native object (bool, slice, ar what you want)

P.S. If you want for faster responses, write us in telegram chat.

from mtproto.

quenbyako avatar quenbyako commented on May 21, 2024

@blez i'll tried to fix this bug, tests passed out, but in real life result ma be different, so i'll not close this issue yet.

If you have a few time, your feedback will be appreciated

from mtproto.

blez avatar blez commented on May 21, 2024

No, does not work

panic: got invalid response type: bool

goroutine 1 [running]:
github.com/xelaj/mtproto/telegram.(*Client).UploadSaveBigFilePart(0xc0001ef340, 0x47c3f6d0649b4e9, 0x7f00000000, 0xc000380000, 0x80000, 0x3f5e19a, 0x0, 0x0, 0x0)
	/home/paval/go/pkg/mod/github.com/xelaj/[email protected]/telegram/methods_gen.go:9078 +0x20d
main.main()
exit status 2

from mtproto.

quenbyako avatar quenbyako commented on May 21, 2024

@blez could you please share your code in playground? Just want to understand in which context client panics

from mtproto.

blez avatar blez commented on May 21, 2024

@quenbyako
Something like this https://play.golang.org/p/zv6WaheNR_Y
But I'm not sure my code is an issue. Your lib can't "parse" bool response

panic: got invalid response type: bool

goroutine 1 [running]:
github.com/xelaj/mtproto/telegram.(*Client).UploadSaveBigFilePart(0xc0001cf380, 0x6ce07ec8745d7a83, 0x7f00000000, 0xc000300000, 0x80000, 0x3f5e19a, 0x0, 0x0, 0x0)
exit status 2

from mtproto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.