Class TdApi.Chat

  • Enclosing class:
    TdApi

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

      • id

        public long id
        Chat unique identifier.
      • title

        public java.lang.String title
        Chat title.
      • lastMessage

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

        public long order
        Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined.
      • isPinned

        public boolean isPinned
        True, if the chat is pinned.
      • canBeReported

        public boolean canBeReported
        True, if the chat can be reported to Telegram moderators through reportChat.
      • 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.
      • 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 java.lang.String clientData
        Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used.
      • CONSTRUCTOR

        public static final int CONSTRUCTOR
        Identifier uniquely determining type of the object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Chat

        public Chat()
        Default constructor.
      • Chat

        public Chat​(long id,
                    TdApi.ChatType type,
                    java.lang.String title,
                    TdApi.ChatPhoto photo,
                    TdApi.Message lastMessage,
                    long order,
                    boolean isPinned,
                    boolean canBeReported,
                    int unreadCount,
                    long lastReadInboxMessageId,
                    long lastReadOutboxMessageId,
                    int unreadMentionCount,
                    TdApi.NotificationSettings notificationSettings,
                    long replyMarkupMessageId,
                    TdApi.DraftMessage draftMessage,
                    java.lang.String clientData)
        Constructor for initialization of all fields.
        Parameters:
        id - Chat unique identifier.
        type - Type of the chat.
        title - Chat title.
        photo - Chat photo; may be null.
        lastMessage - Last message in the chat; may be null.
        order - Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined.
        isPinned - True, if the chat is pinned.
        canBeReported - True, if the chat can be reported to Telegram moderators through reportChat.
        unreadCount - Number of unread messages in the chat.
        lastReadInboxMessageId - Identifier of the last read incoming message.
        lastReadOutboxMessageId - Identifier of the last read outgoing message.
        unreadMentionCount - Number of unread messages with a mention/reply in the chat.
        notificationSettings - Notification settings for this chat.
        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 - A draft of a message in the chat; may be null.
        clientData - Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used.