-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
offset of history do not work with channels #947
Comments
I have same problem. |
I solved it! static void _tgl_do_get_history (struct tgl_state *TLS, struct get_history_extra *E, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra) {
clear_packet ();
//tgl_peer_t *C = tgl_peer_get (TLS, E->id);
//if (tgl_get_peer_type (E->id) != TGL_PEER_CHANNEL || (C && (C->flags & TGLCHF_MEGAGROUP))) {
out_int (CODE_messages_get_history);
out_peer_id (TLS, E->id);
//} else {
// out_int (CODE_channels_get_important_history);
// out_int (CODE_input_channel);
// out_int (tgl_get_peer_id (E->id));
// out_long (E->id.access_hash);
// }
out_int (E->max_id);
out_int (E->offset);
out_int (E->limit);
out_int (0);
out_int (0);
tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_history_methods, E, callback, callback_extra);
} save and recompile and enjoy! |
Thanks for ur help, I will try it. |
@pishgaman-org Thanks a lot! It works! |
Fixed - vysheng/tgl#115 |
hi thank you. |
@alisafari2017 So...this project is dead. There is a pretty nice python api for telegram https://github.com/LonamiWebs/Telethon. If you have some questions, write me @Goblenus (Telegram) |
Not solved yet :( |
@yoossarian Do not use it! This project is dead! |
@pishgaman-org Thank you sooo much, works like a charm. |
is ist? like, really? |
Just used telethon, worked like a charm and easy to use. Download 2000+ worth of photos from 2017... The readthedocs is not easy to build the queries but I could manage with partial information from different sources. |
When set offset greater than 0 in history command of channels, it always returns the following error:
{"result": "FAIL", "error_code": 71, "error": "RPC_CALL_FAIL 400: OFFSET_INVALID"}
It works with super groups with no problem, but with channels it does not work at all.
(I tested this with the latest version of test branch)
Please help me.
The text was updated successfully, but these errors were encountered: