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

How to get a list of folders? #2765

Closed azkadev closed 9 months ago

azkadev commented 9 months ago

Screenshot from 2024-01-19 01-18-31

azkadev commented 9 months ago

and how to use this method addChatFolderByInviteLink

I'm confused about adding the chat_ids parameters

azkadev commented 9 months ago

and how to use this method addChatFolderByInviteLink

I'm confused about adding the chat_ids parameters

I used the checkChatFolderInviteLink method first then used this addChatFolderByInviteLink and it worked

levlam commented 9 months ago

You just need to handle updateChatFolders update for this. There is no need to get chat folders explicitly.

addChatFolderByInviteLink needs to be used only while processing links of the type internalLinkTypeChatFolderInvite after successful checkChatFolderInviteLink call. All parameters can be received from checkChatFolderInviteLink response.

azkadev commented 9 months ago

updateChatFolders