Skip to content
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

how to maintain a active main chat list as telegram client? #2430

Open
gillbates opened this issue May 8, 2023 · 7 comments
Open

how to maintain a active main chat list as telegram client? #2430

gillbates opened this issue May 8, 2023 · 7 comments

Comments

@gillbates
Copy link

Hi Team,

we've tried the java example:

private static void getMainChatList(final int limit) {

and we make a test scenario:

1, login a new account A without any chats:
2, A send message to a friend and thus a chat 1 is created.
2, A create a basic group with friend and thus chat 2 is created.
3, A delete the chat 1 from mac telegram client ui.
4, now we use gcs, and mainChatList shows a list with size 1 (only chat 2 there), this is correct.
5, At mac telegram client ui, we click to leave group (chat 2). now no more chats on UI.
6, if we use gcs again or even restart this class, it will always return the list with size 1 (chat 2 still there)
7, we even tried to send a GetChats after step 5

 TdApi.GetChats chats = new TdApi.GetChats();
        chats.limit = 1000;
        TdApi.ChatListMain chatListMain = new TdApi.ChatListMain();
        chats.chatList = chatListMain;
        haveFullMainChatList = false;
        client.send(chats, defaultHandler);

but it will still return a result list contains chat 2.

anyone has an idea about this?

@levlam
Copy link
Contributor

levlam commented May 8, 2023

Could you log in at https://web.telegram.org to see, whether the chat 2 is present?

@gillbates
Copy link
Author

gillbates commented May 8, 2023

Could you log in at https://web.telegram.org to see, whether the chat 2 is present?

@levlam

chat 2 is not there both at web & mac telegram.

You could reproduce this by steps above, it could 100% be reproduced ...

@levlam
Copy link
Contributor

levlam commented May 8, 2023

I can't reproduce this. When I leave a group from another app, it disappears. Could you reproduce this if the other app is TDLib-based?

@gillbates
Copy link
Author

@levlam

my reproduce step:

1, start this Example java.
2, login into web telegram.
3, use gcs, and now it will print chat 2.
4, leave chat 2 in web telegram
5, use gcs or restart java, it will still print chat 2

it will disappear from your side?

@levlam
Copy link
Contributor

levlam commented May 8, 2023

The chat disappears on my side. Could you send full TDLib log to https://t.me/tdlib_bot?

For this you need to comment the line, which sets verbosity level to 0:

   Client.execute(new TdApi.SetLogVerbosityLevel(0));

@levlam
Copy link
Contributor

levlam commented Jun 12, 2023

The mentioned issue happens because server doesn't send updates for the chat list change to the app, but some workarounds were added to TDLib to mitigate the issue.

@gillbates
Copy link
Author

yes...wait for updates and fix ...

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

No branches or pull requests

2 participants