tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Creating a folder from a contact for which there is no chat #2700

Closed fat-complex closed 11 months ago

fat-complex commented 11 months ago

I'm trying to create a folder and put there a contact with whom I don't have a chat. But tdlib says it's a mistake. What should I add to the CreateChatFolder request?

levlam commented 11 months ago

First, you need to create a chat with the user using createPrivateChat.

fat-complex commented 11 months ago

I tried to create a private chat for the user. It was created, then I put it in the included_chat_ids_ field. I make a createChatFolder request and get this message: Chat is not in the chat list. As a result, the folder was not created(.

levlam commented 11 months ago

You must ensure that the chat in a chat list first. Private chats must be non-empty for this.

fat-complex commented 11 months ago

It turns out that it is impossible to create a folder for contacts that I have and for which there are no chats, as in ios?

levlam commented 11 months ago

If chat isn't in the main or archive chat lsit, then it is not supposed to be shown in other folders.

fat-complex commented 11 months ago

Yes, thank you, I understood that. When you create a folder for such a case in iOS, these contacts do not appear on the main folder. But when you go to the folder settings and open this folder, contacts for which there are no chats are displayed there. Is there any way to do this using tdlib?

levlam commented 11 months ago

No.

fat-complex commented 11 months ago

@levlam Thx)

fat-complex commented 11 months ago

))