Class TdApi.PinChatMessage

  • Enclosing class:
    TdApi

    public static class TdApi.PinChatMessage
    extends TdApi.Function
    Pins a message in a chat; requires canPinMessages rights or canEditMessages rights in the channel.

    Returns Ok

    • Field Summary

      Fields 
      Modifier and Type Field Description
      long chatId
      Identifier of the chat.
      static int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      boolean disableNotification
      True, if there must be no notification about the pinned message.
      long messageId
      Identifier of the new pinned message.
      boolean onlyForSelf
      True, if the message needs to be pinned for one side only; private chats only.
    • Constructor Summary

      Constructors 
      Constructor Description
      PinChatMessage()
      Default constructor for a function, which pins a message in a chat; requires canPinMessages rights or canEditMessages rights in the channel.
      PinChatMessage​(long chatId, long messageId, boolean disableNotification, boolean onlyForSelf)
      Creates a function, which pins a message in a chat; requires canPinMessages rights or canEditMessages rights in the channel.
    • Field Detail

      • chatId

        public long chatId
        Identifier of the chat.
      • messageId

        public long messageId
        Identifier of the new pinned message.
      • disableNotification

        public boolean disableNotification
        True, if there must be no notification about the pinned message. Notifications are always disabled in channels and private chats.
      • onlyForSelf

        public boolean onlyForSelf
        True, if the message needs to be pinned for one side only; private chats only.
      • CONSTRUCTOR

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

      • PinChatMessage

        public PinChatMessage()
        Default constructor for a function, which pins a message in a chat; requires canPinMessages rights or canEditMessages rights in the channel.

        Returns Ok

      • PinChatMessage

        public PinChatMessage​(long chatId,
                              long messageId,
                              boolean disableNotification,
                              boolean onlyForSelf)
        Creates a function, which pins a message in a chat; requires canPinMessages rights or canEditMessages rights in the channel.

        Returns Ok

        Parameters:
        chatId - Identifier of the chat.
        messageId - Identifier of the new pinned message.
        disableNotification - True, if there must be no notification about the pinned message. Notifications are always disabled in channels and private chats.
        onlyForSelf - True, if the message needs to be pinned for one side only; private chats only.