channels.ToggleViewForumAsMessages

class pyrogram.raw.functions.channels.ToggleViewForumAsMessages

Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a “View as messages” setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.

Details:
  • Layer: 223

  • ID: 9738BB15

Parameters:
  • channel (InputChannel) – The forum

  • enabled (bool) – The new value of the view_forum_as_messages flag.

Returns:

Updates

TL Schema

channels.toggleViewForumAsMessages#9738bb15
channel:InputChannel
enabled:Bool

= Updates

Parameter Tree

ToggleViewForumAsMessages
├── channelInputChannel
│ ├── InputChannelEmpty
│ ├── InputChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
└── enabledBool

Example

await app.invoke(
    ToggleViewForumAsMessages(
        channel=await app.resolve_channel(chat_id),
        enabled=True,
    )
)