shelomentsevd / mtproto Goto Github PK
View Code? Open in Web Editor NEWGolang MTProto implementation. Current API layer is 65
Golang MTProto implementation. Current API layer is 65
@shelomentsevd
hi there, please handle FILE_MIGRATE_X error.
Telegram server closes connection with client after one or two hours.
Library handles it's like fatal error and terminates whole application.
This happens because this string returns io.EOF which means that connection closed by server.
dear Dmitriy Shelomentsev
please check order of out put on your example project on line 71 , 83
Telegram has the functionality to schedule messages but I don't know how to add it
I don't see methods to get file or photo, may be i miss something?
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
On TL_auth_checkPassword.Encode:
x.Bytes(e.Password_hash) must be x.StringBytes(e.Password_hash)
When we invoke TL_messages_getMessagesViews return Unknown constructor: 1cb5c415 error
Current example are broken
ИМХО нужен какой-то универсальный метод, чтобы временно уметь дергать любой метод без изменений и добавлений новых методов в библиотеку.
Например mtproto.Invoke()
. Не представляю как его реализовать в Golang, но в JavaScript библиотеке от @zerobias это делается подобным образом:
client('messages.getHistory', {
peer: {
_: 'inputPeerChannel',
channel_id : chat.id,
access_hash: chat.access_hash
},
max_id: offset,
offset: -full.length,
limit: 200
})
Это тоже не очень удобно, но зато таким образом можно в срочном порядке написать для себя множество нужных, но отсутсвующих в библиотеке методов.
Hey. There is one small question, how to search for channels and subscribe to them? How do I add new contacts?
Thx.
I want to split MTProto into two objects: network and mtproto. It'll help me to write unit tests for MTProto through network connection emulation Telegram server.
Configuration structure is anti-pattern and I should refactor this.
@shelomentsevd @Lord-Protector
panic: runtime error: slice bounds out of range
Line 164 in 7a7c9f6
after while we get FLOOD_WAIT_X error or auth_key_unregistered error
My phone number gets a redirect (returns status 303
with PHONE_MIGRATE_1
).
Ultimately, I have tracked down the issue to mtproto.go
's func (m *MTProto) readRoutine()
trying to read on a closed connection.
This seems to happen right on network.go
's call to nw.session = NewSession(file)
I believe as a result of calling reconnect
in mtproto upon seeing PHONE_MIGRATE_1
The actual error line looks like:
ReadRoutine: read tcp 10.0.0.161:53715->149.154.167.50:443: use of closed network connection
Hi, in my opinion you have a bug right here https://github.com/shelomentsevd/mtproto/blob/master/mtproto.go#L137
because if m.readData() != err, address in function signature didn't pass to m.addr field and if we trying to connect we get an error : missing port in address
Is there way to handle and store in arbitrary database the sessions of multiple users?
Hi
I'm trying to connect with my phone number (Iran 98
), but keep getting the -404
error.
I realized the problem occurs while getting authKey in makeAuthKey
.
After sending set_client_DH_params
when it reads the response it returns an error with data of -404
.
and of course connecting with a Russian phone number works great with no problem.
anyone facing this issue?
Move library to new version of protocol
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.