AmarnathCJD / gogram

Full-native implementation of MTProto protocol on Golang.
GNU General Public License v3.0
207 stars 41 forks source link

Update layer scheme #44

Closed npdkdev closed 1 year ago

npdkdev commented 1 year ago

Can you you update api layer, because I cannot login as user, the error is panic: sending AuthSentCode: [UPDATE_APP_LOGIN] this layer no longer supports logging in, please update your app (code 406), maybe can you tell me how to update the layer, I will update it

AmarnathCJD commented 1 year ago

@npdkdev Okey 👌, need to work on updating parser first then 🥲

npdkdev commented 1 year ago

what's is flags2 type, I see flags2.0?Vector and flags2.0?true, I think is not consistent , is that a interfaces{} on golang?

AmarnathCJD commented 1 year ago

@npdkdev Yeah I'm having trouble understandimg it cuz it breaks the current parser the 2.0 flag puts empty bytes and i couldn't find the order :(

npdkdev commented 1 year ago

I foolishly tried to change the parser, I tried and got *_gen.go then moved it into telegram/ and changed the Api in const.go to 158, after trying it I only get the log connection to [...] - <TCPFull> and no further response :(

AmarnathCJD commented 1 year ago

@npdkdev Yeah the internal decoder breaks which hangs the program

AmarnathCJD commented 1 year ago

@AmarnathCJD https://github.com/AmarnathCJD/gogram/blob/2.0/internal/encoding/tl/decoder.go >>

TAMILVIP007 commented 1 year ago

@AmarnathCJD

AnjanaMadu commented 1 year ago

@AmarnathCJD

AnjanaMadu commented 1 year ago

@TAMILVIP007

AmarnathCJD commented 1 year ago

Can you you update api layer, because I cannot login as user, the error is panic: sending AuthSentCode: [UPDATE_APP_LOGIN] this layer no longer supports logging in, please update your app (code 406), maybe can you tell me how to update the layer, I will update it

Strange I'm not getting this error And am suucessfully able to login and send auth code etc... Check the lib version etc

npdkdev commented 1 year ago

I found the problem, I am using AppID=1 and AppHash which belongs to telegram iOS, I have tried to replace it with my own obtained from my.telegram.org and it works, but is it not possible to update to the latest layer 158?, if the problem is with the parser is it possible to recreate it using methods and layouts like gotd, maybe using gotd/tl

AmarnathCJD commented 1 year ago

@npdkdev Nope the structures are different and gotd codes are so huge I can't even finish reading them

I need external help to complete the parser 🙂

AmarnathCJD commented 1 year ago

8