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

[Question] How to organize a search among chat/group/etc name #3055

Open
tilvin opened this issue Sep 19, 2024 · 1 comment
Open

[Question] How to organize a search among chat/group/etc name #3055

tilvin opened this issue Sep 19, 2024 · 1 comment

Comments

@tilvin
Copy link

tilvin commented Sep 19, 2024

Hello, i ask for advice or a second opinion about my problem.
At my app i have a search field where user types a chat name (or it's part) and the app is supposed to provide a list of found results.
So i take a string which user typed and I trigger searchPublicChats and searchChatsOnServer. So i getting array of chat ids.
Then i take each chat id and trigger getChat , so i receive chat Title and some other info.

Then i want to add chat logo to each chat instance and represent it along with title.
It seems i need to perform an additional request to download an icon to each chat instance.
There's a Minithumbnail, but it's really too small.

While it's processing the user is waiting for search result.

Is there any better solution for search?

Thanks!

@levlam
Copy link
Contributor

levlam commented Sep 19, 2024

See #2616 (comment) for the methods that are invoked by apps to get results of global search.

Also, you never need to call getChat, because chats should be cached as described at https://core.telegram.org/tdlib/getting-started.

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