Constructor: chat
Info about a group.
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).
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 the group |
left | Bool | Optional | Whether the current user has left the group |
deactivated | Bool | Optional | Whether the group was migrated |
call_active | Bool | Optional | Whether a group call is currently active |
call_not_empty | Bool | Optional | Whether there’s anyone in the group call |
noforwards | Bool | Optional | Whether this group is protected, thus does not allow forwarding messages from it |
id | long | Yes | ID of the group, see here » for more info |
title | string | Yes | Title |
photo | ChatPhoto | Optional | Chat photo |
participants_count | int | Yes | Participant count |
date | int | Yes | Date of creation of the group |
version | int | Yes | Used in basic groups to reorder updates and make sure that all of them were received. |
migrated_to | InputChannel | Optional | Means this chat was upgraded to a supergroup |
admin_rights | ChatAdminRights | Optional | Admin rights of the user in the group |
default_banned_rights | ChatBannedRights | Optional | Default banned rights of all users in the group |
Type: Chat
Example:
$chat = ['_' => 'chat', 'creator' => Bool, 'left' => Bool, 'deactivated' => Bool, 'call_active' => Bool, 'call_not_empty' => Bool, 'noforwards' => Bool, 'id' => long, 'title' => 'string', 'photo' => ChatPhoto, 'participants_count' => int, 'date' => int, 'version' => int, 'migrated_to' => InputChannel, 'admin_rights' => ChatAdminRights, 'default_banned_rights' => ChatBannedRights];