Module tdlight.api
Package it.tdlight.jni

# Class TdApi.Chat

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Chat

Enclosing class:
  TdApi

public static final class TdApi.Chat extends TdApi.Object
A chat. (Can be a private chat, basic group, supergroup, or secret chat.)

## Field Summary

Fields
Modifier and Type
Field
Description
`TdApi.ChatActionBar`
`actionBar`
Information about actions which must be possible to do through the chat action bar; may be null.
`boolean`
`canBeDeletedForAllUsers`
True, if the chat messages can be deleted for all users.
`boolean`
`canBeDeletedOnlyForSelf`
True, if the chat messages can be deleted only for the current user while other users will continue to see the messages.
`boolean`
`canBeReported`
True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.
`String`
`clientData`
Application-specific data associated with the chat.
`static final int`
`CONSTRUCTOR`
`boolean`
`defaultDisableNotification`
Default value of the disableNotification parameter, used when a message is sent to the chat.
`TdApi.DraftMessage`
`draftMessage`
A draft of a message in the chat; may be null.
`boolean`
`hasScheduledMessages`
True, if the chat has scheduled messages.
`long`
`id`
Chat unique identifier.
`boolean`
`isBlocked`
True, if the chat is blocked by the current user and private messages from the chat can't be received.
`boolean`
`isMarkedAsUnread`
True, if the chat is marked as unread.
`TdApi.Message`
`lastMessage`
Last message in the chat; may be null.
`long`
`lastReadInboxMessageId`
Identifier of the last read incoming message.
`long`
`lastReadOutboxMessageId`
Identifier of the last read outgoing message.
`int`
`messageTtlSetting`
Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined.
`TdApi.ChatNotificationSettings`
`notificationSettings`
Notification settings for this chat.
`TdApi.ChatJoinRequestsInfo`
`pendingJoinRequests`
Information about pending join requests; may be null.
`TdApi.ChatPermissions`
`permissions`
Actions that non-administrator chat members are allowed to take in the chat.
`TdApi.ChatPhotoInfo`
`photo`
Chat photo; may be null.
`TdApi.ChatPosition[]`
`positions`
Positions of the chat in chat lists.
`long`
`replyMarkupMessageId`
Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
`String`
`themeName`
If non-empty, name of a theme, set for the chat.
`String`
`title`
Chat title.
`TdApi.ChatType`
`type`
Type of the chat.
`int`
`unreadCount`
Number of unread messages in the chat.
`int`
`unreadMentionCount`
Number of unread messages with a mention/reply in the chat.
`TdApi.VideoChat`
`videoChat`
Information about video chat of the chat.

## Constructor Summary

Constructors
Constructor
Description
`Chat()`
A chat.
`Chat(long id, TdApi.ChatType type, String title, TdApi.ChatPhotoInfo photo, TdApi.ChatPermissions permissions, TdApi.Message lastMessage, TdApi.ChatPosition[] positions, boolean isMarkedAsUnread, boolean isBlocked, boolean hasScheduledMessages, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean canBeReported, boolean defaultDisableNotification, int unreadCount, long lastReadInboxMessageId, long lastReadOutboxMessageId, int unreadMentionCount, TdApi.ChatNotificationSettings notificationSettings, int messageTtlSetting, String themeName, TdApi.ChatActionBar actionBar, TdApi.VideoChat videoChat, TdApi.ChatJoinRequestsInfo pendingJoinRequests, long replyMarkupMessageId, TdApi.DraftMessage draftMessage, String clientData)`
A chat.
`Chat(DataInput input)`
A chat.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### id

public long id
Chat unique identifier.

### type

public TdApi.ChatType type
Type of the chat.

### title

public String title
Chat title.

### photo

public TdApi.ChatPhotoInfo photo
Chat photo; may be null.

### permissions

public TdApi.ChatPermissions permissions
Actions that non-administrator chat members are allowed to take in the chat.

### lastMessage

public TdApi.Message lastMessage
Last message in the chat; may be null.

### positions

public TdApi.ChatPosition[] positions
Positions of the chat in chat lists.

### isMarkedAsUnread

public boolean isMarkedAsUnread
True, if the chat is marked as unread.

### isBlocked

public boolean isBlocked
True, if the chat is blocked by the current user and private messages from the chat can't be received.

### hasScheduledMessages

public boolean hasScheduledMessages
True, if the chat has scheduled messages.

### canBeDeletedOnlyForSelf

public boolean canBeDeletedOnlyForSelf
True, if the chat messages can be deleted only for the current user while other users will continue to see the messages.

### canBeDeletedForAllUsers

public boolean canBeDeletedForAllUsers
True, if the chat messages can be deleted for all users.

### canBeReported

public boolean canBeReported
True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.

### defaultDisableNotification

public boolean defaultDisableNotification
Default value of the disableNotification parameter, used when a message is sent to the chat.

### unreadCount

public int unreadCount
Number of unread messages in the chat.

### lastReadInboxMessageId

public long lastReadInboxMessageId
Identifier of the last read incoming message.

### lastReadOutboxMessageId

public long lastReadOutboxMessageId
Identifier of the last read outgoing message.

### unreadMentionCount

public int unreadMentionCount
Number of unread messages with a mention/reply in the chat.

### notificationSettings

public TdApi.ChatNotificationSettings notificationSettings
Notification settings for this chat.

### messageTtlSetting

public int messageTtlSetting
Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats.

### themeName

public String themeName
If non-empty, name of a theme, set for the chat.

### actionBar

public TdApi.ChatActionBar actionBar
Information about actions which must be possible to do through the chat action bar; may be null.

### videoChat

public TdApi.VideoChat videoChat
Information about video chat of the chat.

### pendingJoinRequests

public TdApi.ChatJoinRequestsInfo pendingJoinRequests
Information about pending join requests; may be null.

### replyMarkupMessageId

public long replyMarkupMessageId
Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.

### draftMessage

public TdApi.DraftMessage draftMessage
A draft of a message in the chat; may be null.

### clientData

public String clientData
Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### Chat

public Chat()
A chat. (Can be a private chat, basic group, supergroup, or secret chat.)

### Chat

public Chat(long id, TdApi.ChatType type, String title, TdApi.ChatPhotoInfo photo, TdApi.ChatPermissions permissions, TdApi.Message lastMessage, TdApi.ChatPosition[] positions, boolean isMarkedAsUnread, boolean isBlocked, boolean hasScheduledMessages, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean canBeReported, boolean defaultDisableNotification, int unreadCount, long lastReadInboxMessageId, long lastReadOutboxMessageId, int unreadMentionCount, TdApi.ChatNotificationSettings notificationSettings, int messageTtlSetting, String themeName, TdApi.ChatActionBar actionBar, TdApi.VideoChat videoChat, TdApi.ChatJoinRequestsInfo pendingJoinRequests, long replyMarkupMessageId, TdApi.DraftMessage draftMessage, String clientData)
A chat. (Can be a private chat, basic group, supergroup, or secret chat.)

Parameters:
  `id` - long Chat unique identifier.
  `type` - ChatType Type of the chat.
  `title` - String Chat title.
  `photo` - ChatPhotoInfo Chat photo; may be null.
  `permissions` - ChatPermissions Actions that non-administrator chat members are allowed to take in the chat.
  `lastMessage` - Message Last message in the chat; may be null.
  `positions` - ChatPosition[] Positions of the chat in chat lists.
  `isMarkedAsUnread` - boolean True, if the chat is marked as unread.
  `isBlocked` - boolean True, if the chat is blocked by the current user and private messages from the chat can't be received.
  `hasScheduledMessages` - boolean True, if the chat has scheduled messages.
  `canBeDeletedOnlyForSelf` - boolean True, if the chat messages can be deleted only for the current user while other users will continue to see the messages.
  `canBeDeletedForAllUsers` - boolean True, if the chat messages can be deleted for all users.
  `canBeReported` - boolean True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.
  `defaultDisableNotification` - boolean Default value of the disableNotification parameter, used when a message is sent to the chat.
  `unreadCount` - int Number of unread messages in the chat.
  `lastReadInboxMessageId` - long Identifier of the last read incoming message.
  `lastReadOutboxMessageId` - long Identifier of the last read outgoing message.
  `unreadMentionCount` - int Number of unread messages with a mention/reply in the chat.
  `notificationSettings` - ChatNotificationSettings Notification settings for this chat.
  `messageTtlSetting` - int Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats.
  `themeName` - String If non-empty, name of a theme, set for the chat.
  `actionBar` - ChatActionBar Information about actions which must be possible to do through the chat action bar; may be null.
  `videoChat` - VideoChat Information about video chat of the chat.
  `pendingJoinRequests` - ChatJoinRequestsInfo Information about pending join requests; may be null.
  `replyMarkupMessageId` - long Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
  `draftMessage` - DraftMessage A draft of a message in the chat; may be null.
  `clientData` - String Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used.

### Chat

public Chat(DataInput input) throws IOException
A chat. (Can be a private chat, basic group, supergroup, or secret chat.)

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`