Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

How to accept message? #43

Closed
AugerSoft opened this issue Dec 16, 2015 · 7 comments
Closed

How to accept message? #43

AugerSoft opened this issue Dec 16, 2015 · 7 comments

Comments

@AugerSoft
Copy link

I understand that this is not realized , but how do I implement the event to receive messages ?

@sochix
Copy link
Owner

sochix commented Dec 21, 2015

Start from reading Telegram Api, if you want to contribute I can guide you
through all steps.
16 дек. 2015 г. 23:01 пользователь "AugerSoft" notifications@github.com
написал:

I understand that this is not realized , but how do I implement the event
to receive messages ?


Reply to this email directly or view it on GitHub
#43.

@AugerSoft
Copy link
Author

I can offer you to write a income message, of course not free. I really need that this function was TLsharrp. :(

@sochix
Copy link
Owner

sochix commented Dec 23, 2015

Not get fully what you mean =) To start recieveing messages from telegram
you need to explore HandleUpdate method in MtProtoSender.cs. It's not
implemented, fully yet. Specification of handling updates you can find here
https://core.telegram.org/type/Updates. If you have any other questions
don't afraid to ask!

2015-12-22 13:52 GMT+03:00 AugerSoft notifications@github.com:

I can offer you to write a welcome message, of course not free. I really
need that this function was TLsharrp. :(


Reply to this email directly or view it on GitHub
#43 (comment).

Best regards, Ilya (http://sochix.ru)
С уважением, Илья (http://sochix.ru)

@AugerSoft
Copy link
Author

Я добавил обработку сообщений, но в метод HandleUpdate он падает только при подключении. Как сделать: проверять по таймауту каждые n секунд или есть более кошерный способ?

@ibgithub
Copy link

ibgithub commented Jul 2, 2016

first of all thank you for your TLSharp, it's awsome

I have same problem, how can I subscribing to updates? https://core.telegram.org/api/updates it is not clear how to subscribes?
I already create class for methods updates.getState or updates.getDifference, after I call updates.getState I got values for pts, qts, date, seq, unread_count. And then I call updates.getDifference using pts, qts, date value, I always got updates.differenceEmpty.

Please somebody help me to implement handling updates to get new messages?

@DrEhsan
Copy link

DrEhsan commented Jul 2, 2016

@ibgithub to implement updates you have to implement multithreating in core. in this case i mean you have to active stream and listen for incoming messages Telegram sends the update events for 10 active sessions of accounts so you don't need to do anything to subscribe on that. you only need to receive the data from telegram or listen on Stream to get incoming messages again and again and then parse that message to it is constructions

@ibgithub
Copy link

ibgithub commented Jul 2, 2016

@DrEhsan, How to implement multithreading in Telegram core? or to active stream and listen for incoming messages? Is there any link for doing that? there is no method for doing that in https://core.telegram.org/methods

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants