Constructor: channel
Channel/supergroup info
When updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren’t set in the new constructor).
The only exception to the above rule is when the min
flag is set, in which case only the following fields must be applied over any locally stored version:
title
megagroup
color
photo
username
usernames
has_geo
noforwards
emoji_status
has_link
slow_mode_enabled
scam
fake
gigagroup
forum
level
restricted
restriction_reason
join_to_send
join_request
is_verified
default_banned_rights
signature_profiles
See here » for an implementation of the logic to use when updating the local user peer database.
Attributes:
Name | Type | Required | Description |
---|---|---|---|
creator | Bool | Optional | Whether the current user is the creator of this channel |
left | Bool | Optional | Whether the current user has left or is not a member of this channel |
broadcast | Bool | Optional | Is this a channel? |
verified | Bool | Optional | Is this channel verified by telegram? |
megagroup | Bool | Optional | Is this a supergroup? Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
restricted | Bool | Optional | Whether viewing/writing in this channel for a reason (see restriction_reason ) |
signatures | Bool | Optional | Whether signatures are enabled (channels) |
min | Bool | Optional | See min |
scam | Bool | Optional | This channel/supergroup is probably a scam Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
has_link | Bool | Optional | Whether this channel has a linked discussion group » (or this supergroup is a channel’s discussion group). The actual ID of the linked channel/supergroup is contained in channelFull.linked_chat_id . Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
has_geo | Bool | Optional | Whether this chanel has a geoposition |
slowmode_enabled | Bool | Optional | Whether slow mode is enabled for groups to prevent flood in chat. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
call_active | Bool | Optional | Whether a group call or livestream is currently active |
call_not_empty | Bool | Optional | Whether there’s anyone in the group call or livestream |
fake | Bool | Optional | If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
gigagroup | Bool | Optional | Whether this supergroup is a gigagroup Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
noforwards | Bool | Optional | Whether this channel or group is protected, thus does not allow forwarding messages from it |
join_to_send | Bool | Optional | Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
join_request | Bool | Optional | Whether a user’s join request will have to be approved by administrators, toggle using channels.toggleJoinToSend Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
forum | Bool | Optional | Whether this supergroup is a forum. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
stories_hidden | Bool | Optional | |
stories_hidden_min | Bool | Optional | |
stories_unavailable | Bool | Optional | |
signature_profiles | Bool | Optional | |
id | long | Yes | ID of the channel, see here » for more info |
access_hash | long | Optional | Access hash, see here » for more info |
title | string | Yes | Title |
username | string | Optional | Main active username. |
photo | ChatPhoto | Optional | Profile photo |
date | int | Yes | Date when the user joined the supergroup/channel, or if the user isn’t a member, its creation date |
restriction_reason | Array of RestrictionReason | Optional | Contains the reason why access to this channel must be restricted. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
admin_rights | ChatAdminRights | Optional | Admin rights of the user in this channel (see rights) |
banned_rights | ChatBannedRights | Optional | Banned rights of the user in this channel (see rights) |
default_banned_rights | ChatBannedRights | Optional | Default chat rights (see rights) |
participants_count | int | Optional | Participant count |
usernames | Array of Username | Optional | |
stories_max_id | int | Optional | |
color | PeerColor | Optional | |
profile_color | PeerColor | Optional | |
emoji_status | EmojiStatus | Optional | |
level | int | Optional | |
subscription_until_date | int | Optional | |
bot_verification_icon | long | Optional |
Type: Chat
Example:
$channel = ['_' => 'channel', 'creator' => Bool, 'left' => Bool, 'broadcast' => Bool, 'verified' => Bool, 'megagroup' => Bool, 'restricted' => Bool, 'signatures' => Bool, 'min' => Bool, 'scam' => Bool, 'has_link' => Bool, 'has_geo' => Bool, 'slowmode_enabled' => Bool, 'call_active' => Bool, 'call_not_empty' => Bool, 'fake' => Bool, 'gigagroup' => Bool, 'noforwards' => Bool, 'join_to_send' => Bool, 'join_request' => Bool, 'forum' => Bool, 'stories_hidden' => Bool, 'stories_hidden_min' => Bool, 'stories_unavailable' => Bool, 'signature_profiles' => Bool, 'id' => long, 'access_hash' => long, 'title' => 'string', 'username' => 'string', 'photo' => ChatPhoto, 'date' => int, 'restriction_reason' => [RestrictionReason, RestrictionReason], 'admin_rights' => ChatAdminRights, 'banned_rights' => ChatBannedRights, 'default_banned_rights' => ChatBannedRights, 'participants_count' => int, 'usernames' => [Username, Username], 'stories_max_id' => int, 'color' => PeerColor, 'profile_color' => PeerColor, 'emoji_status' => EmojiStatus, 'level' => int, 'subscription_until_date' => int, 'bot_verification_icon' => long];