Package org.drinkless.tdlib

# Class TdApi.ForwardMessages

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.Messages>
org.drinkless.tdlib.TdApi.ForwardMessages

Enclosing class:
  `TdApi`

public static class TdApi.ForwardMessages extends TdApi.Function<TdApi.Messages>
Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can't be forwarded, null will be returned instead of the message.

Returns `Messages`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `chatId`
  Identifier of the chat to which to forward messages.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `fromChatId`
  Identifier of the chat from which to forward messages.
  `long[]`
  `messageIds`
  Identifiers of the messages to forward.
  `TdApi.MessageSendOptions`
  `options`
  Options to be used to send the messages; pass null to use default options.
  `boolean`
  `removeCaption`
  Pass true to remove media captions of message copies.
  `boolean`
  `sendCopy`
  Pass true to copy content of the messages without reference to the original sender.
  `TdApi.MessageTopic`
  `topicId`
  Topic in which the messages will be forwarded; message threads aren't supported; pass null if none.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ForwardMessages()`
  Default constructor for a function, which forwards previously sent messages.
  `ForwardMessages(long chatId, TdApi.MessageTopic topicId, long fromChatId, long[] messageIds, TdApi.MessageSendOptions options, boolean sendCopy, boolean removeCaption)`
  Creates a function, which forwards previously sent messages.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

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

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

- ## Field Details

  - ### chatId

    public long chatId
    Identifier of the chat to which to forward messages.

  - ### topicId

    public TdApi.MessageTopic topicId
    Topic in which the messages will be forwarded; message threads aren't supported; pass null if none.

  - ### fromChatId

    public long fromChatId
    Identifier of the chat from which to forward messages.

  - ### messageIds

    public long[] messageIds
    Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.canBeForwarded.

  - ### options

    public TdApi.MessageSendOptions options
    Options to be used to send the messages; pass null to use default options.

  - ### sendCopy

    public boolean sendCopy
    Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.canBeCopied and messageProperties.canBeCopiedToSecretChat to check whether the message is suitable.

  - ### removeCaption

    public boolean removeCaption
    Pass true to remove media captions of message copies. Ignored if sendCopy is false.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### ForwardMessages

    public ForwardMessages()
    Default constructor for a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can't be forwarded, null will be returned instead of the message.

    Returns `Messages`

  - ### ForwardMessages

    public ForwardMessages(long chatId, TdApi.MessageTopic topicId, long fromChatId, long[] messageIds, TdApi.MessageSendOptions options, boolean sendCopy, boolean removeCaption)
    Creates a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can't be forwarded, null will be returned instead of the message.

    Returns `Messages`

    Parameters:
      `chatId` - Identifier of the chat to which to forward messages.
      `topicId` - Topic in which the messages will be forwarded; message threads aren't supported; pass null if none.
      `fromChatId` - Identifier of the chat from which to forward messages.
      `messageIds` - Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.canBeForwarded.
      `options` - Options to be used to send the messages; pass null to use default options.
      `sendCopy` - Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.canBeCopied and messageProperties.canBeCopiedToSecretChat to check whether the message is suitable.
      `removeCaption` - Pass true to remove media captions of message copies. Ignored if sendCopy is false.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.Messages>`
    Returns:
      this.CONSTRUCTOR