vysheng / tg

telegram-cli
GNU General Public License v2.0
6.5k stars 1.54k forks source link

supergroups (channel_set_admin) #937

Open appendhc opened 8 years ago

appendhc commented 8 years ago

im use tgl_do_channel_set_admin and reverse this error after promote user as admin or editor please fix it

* 1452866712.636903 Skipped 1 int out of 19 (type Bool) (query type channels set about) * 1452866712.636944 0x5698fc97 0x74ae4240 0x1cb5c415 0x00000000

telegram-cli: tgl/queries.c:470: tglq_query_result: Assertion `0' failed. SIGNAL received h./tg/bin/telegram-cli(print_backtrace+0x20)[0x46edb0] ./tg/bin/telegram-cli(termination_signal_handler+0x64)[0x46ee34] /lib/x86_64-linux-gnu/libc.so.6(+0x36d40)[0x7fc146a14d40] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7fc146a14cc9] /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fc146a180d8] /lib/x86_64-linux-gnu/libc.so.6(+0x2fb86)[0x7fc146a0db86] /lib/x86_64-linux-gnu/libc.so.6(+0x2fc32)[0x7fc146a0dc32] ./tg/bin/telegram-cli(tglq_query_result+0x3c0)[0x498840] ./tg/bin/telegram-cli[0x490eea] ./tg/bin/telegram-cli[0x4b63ab] /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x754)[0x7fc147e51f24] ./tg/bin/telegram-cli(net_loop+0xa6)[0x470336] ./tg/bin/telegram-cli(loop+0x187)[0x471637] ./tg/bin/telegram-cli(main+0x2e5)[0x46d615] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fc1469ffec5] ./tg/bin/telegram-cli[0x46d725]

appendhc commented 8 years ago

fixed remove assertion

zhityer commented 8 years ago

I have same problem

appendhc commented 8 years ago

change tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &channels_set_about_methods, 0, callback, callback_extra);} to tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);

zhityer commented 8 years ago

wrong...

appendhc commented 8 years ago

update tg to last version

zhityer commented 8 years ago

in latest version with the above changes Error was received again when use setadmin for blocked user or other times "" اگر از send_msgs_methods استفاده بشه وقتی کاربر رباتو بلاک کرده باشه یا یکسری مواقع دیگ که من الان یادم نیست، باز خطاهایی میده درنتیجه مشکل پابرجا میمونه با این تغییر هم

richpeterson commented 8 years ago

change tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &channels_set_about_methods, 0, callback, callback_extra);} to tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);

This work for me. Thank you. Change in tgl_do_channel_set_admin function

supaflybro commented 6 years ago

is there any way to edit admins permissions? I need to enable permission that allow admin to add new admins