channels.getGroupsForDiscussion

Get all groups that can be used as discussion groups.

Returned legacy group chats must be first upgraded to supergroups before they can be set as a discussion group.
To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.togglePreHistoryHidden, first.

messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats;
messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats;
---functions---
channels.getGroupsForDiscussion#f5dad378 = messages.Chats;

Parameters

This constructor does not require any parameters.

Result

messages.Chats

Related pages

Discussion groups

Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.

Channels

How to handle channels, supergroups, groups, and what's the difference between them.

channels.togglePreHistoryHidden

Hide/unhide message history for new channel/supergroup users