-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sometimes message are not sent. #383
Comments
Hi! Is this example the entire program you're running for the test? What if you add some sleep after the last line? I suspect that when you receive the response from tdlib ( |
Yes, I just changed the content of
I can try, but what would be the difference? I mean I can understand a sleep between result and result.wait or something like that but not at the end.
That's entirely true :D but the question are:
Thanks |
I think this is expected. As far as I understand, the message isn't sent immediately and there are different states, for example: https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message_sending_state_pending.html Currently It's also possible to get the message object with |
I agree that is not the best way but it allows to understand at least why the message has not been delivered. |
Yes, there is a method So actually you need to listen to |
@dat-browny Can you try the new example please? |
Thanks for the update. I'm not a python programmer but I think there is a mistake. At some point
but Am I missed something? In any case I would rename any single |
Huh, yes :) I forgot to update it.
Good idea, thanks! |
@alexander-akhmetov Oh, it work successfully, thank you for solve my problem. |
After a bit of test I got into this scenario: I launched my python script (10:50AM) and the message was immediately delivered. While it was immediately delivered I didn't get the After a while I sent another message (11:20AM). It was immediately delivered as well and I got two So I think there is a bit of mismatch between what the API are saying vs the real behavior of a message.
|
You can try increasing the verbosity of the tdlib logging:
I think tdlib should log these events too, and then maybe we can see if it's an issue in python-telegram. The logging should be useful also because tdlib can send other events too, for example |
I tried a more verbose level, but it is really too much verbose. Anyway, given a python script that just sends an |
Hello,
I'm running 0.18.0 and I have the following script (taken a bit from the example):
So it happens that sometimes message is not sent and for the first time it is sent, all previously undelivered messages are sent.
Practical example:
I run the script at 00:10, the random message is 'a' and it is undelivered
I run the script at 00:15, the random message is 'a' and it is undelivered
I run the script at 00:20, the random message is 'b' and it is undelivered
I run the script at 00:25, the random message is 'c' and I see delivered at the same time: 'a', 'a', 'b', 'c'
I tried with both bundle libtdjson.so and compiled from source libtdjson.so (recent version too), but I have always the same failure.
My guess is that it's not a python-telegram issue but is an upstream libtdjson or service issue. I'm just wondering if I'm the only one that hits this issue and if there is any workaround.
Thanks
The text was updated successfully, but these errors were encountered: