Comments (7)
- check seriazliation of type double :)
- may be telegram guys blocks those geochats in layer 23? i see "Type schema is not available in the selected layer" in some methods/objects like https://core.telegram.org/type/geochats.StatedMessage
from mtproto.
- i tried using
getRecents
(https://core.telegram.org/method/geochats.getRecents) and i'm having the same error, that points to your 2 - i had the same feeling reading that period, that's why i contacted telegram support but i didn't receive anything useful
my point 3 is: we're actually authenticating with our gsm number, what about using API keys? is it the same?
from mtproto.
Forget point 3 😛
I tried to create e normal chat (group) and i'm getting erorr 400 again. Do you get what i am doing wrong?
My error:
leaf:telegram dunric$ ./telegram createchat
RPC: mtproto.TL_rpc_error{error_code:400, error_message:"INPUT_CONSTRUCTOR_INVALID"}
leaf:telegram dunric$
My piece of code:
func (m *MTProto) CreateChat() error {
resp := make(chan TL, 1)
m.queueSend <- packetToSend{
TL_messages_createChat{
[]TL{TL_inputUserContact{2921643}},
"My Chat",
},
resp,
}
x := <-resp
_, ok := x.(TL_messages_statedMessage)
if !ok {
return fmt.Errorf("RPC: %#v", x)
}
return nil
}
from mtproto.
I've got same result :( I think layer 23 is kinda deprecated for the TG servers, Durov has chosen offical clients for TG and the quality support for public API is no more needed.
from mtproto.
I had this answer from BotSupport:
Regarding your question, I want to let you know that geochat are just part of the old api layers, they are not any more present, so I don't recomend you to use them.
What do you think about the TL_messages_createChat
instead?
from mtproto.
With fixed "Vector bug" it's working now.
For TL_messages_createChat try
TL_messages_createChat{
[]TL{TL_inputUserSelf{}, TL_inputUserContact{132597}},
"My Chat",
},
Second peer must be your contact or you should get USERS_TOO_FEW error response.
from mtproto.
Hi @sdidyk
I am using your mtproto code for developing an sapmle app for only add contact and send message.
I had wrote all methods successfully, but I can not implement method for add contact!
there is the method: please help me to complete it. I have error : INPUT_CONSTRUCTOR_INVALID , too.
/////////////////////////////////
func (m *MTProto) Contacts_ImportContacts(in []TL) TL_contacts_importedContacts {
resp := make(chan TL, 1)
m.queueSend <- packetToSend{
TL_contacts_importContacts{in, TL_boolFalse{}}, resp}
x := <-resp
switch r := x.(type) {
case TL_contacts_importedContacts:
return r
default:
log.Println(x)
}
return TL_contacts_importedContacts{}
}
///////////////////////////////////////////////
and this is call of method:
func importContact(c *gin.Context) {
m, err := mtproto.NewMTProto(os.Getenv("HOME") + "/.telegram_go")
if err != nil {
fmt.Printf("Create failed: %s\n", err)
os.Exit(2)
}
_ = m.Connect()
var NewContact mtproto.TL_inputPhoneContact
NewContact.Last_name = ""
NewContact.First_name = ""
NewContact.Phone = "0989212049236"
NewContacts := []mtproto.TL{NewContact}
x := m.Contacts_ImportContacts(NewContacts)
c.JSON(200, gin.H{"status": x})
}
from mtproto.
Related Issues (15)
- Example fails with message "SendRoutine: use of closed network connection" HOT 7
- Fix Vector encoding HOT 1
- create ImportContact HOT 1
- Err: FLOOD_WAIT HOT 1
- Add new contact
- Deadlock after reconnect (changing datacenter)
- I used SendCode but the server did not return a SentCode instead of blocking me all the time. HOT 1
- nothing
- Send Big File
- Handle multiple sessions
- Auth is not working
- New Improved lib based in this.
- Add channel api support HOT 1
- Trying to revive project and add new layer HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtproto.