Module tdlight.api
Package it.tdlight.jni

# Class TdApi.ForwardMessages

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Messages>
it.tdlight.jni.TdApi.ForwardMessages

Enclosing class:
  TdApi

public static final 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`

## 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.
`long`
`messageThreadId`
If not 0, the message thread identifier in which the message will be sent; for forum threads only.
`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.

## Constructor Summary

Constructors
Constructor
Description
`ForwardMessages()`
Forwards previously sent messages.
`ForwardMessages(long chatId, long messageThreadId, long fromChatId, long[] messageIds, TdApi.MessageSendOptions options, boolean sendCopy, boolean removeCaption)`
Forwards previously sent messages.
`ForwardMessages(DataInput input)`
Forwards previously sent messages.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

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

`toString`

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

`serialize`

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

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

## Field Details

### chatId

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

### messageThreadId

public long messageThreadId
If not 0, the message thread identifier in which the message will be sent; for forum threads only.

### 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 message.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.

### 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()
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, long messageThreadId, long fromChatId, long[] messageIds, TdApi.MessageSendOptions options, boolean sendCopy, boolean removeCaption)
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.
  `messageThreadId` - If not 0, the message thread identifier in which the message will be sent; for forum threads only.
  `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 message.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.
  `removeCaption` - Pass true to remove media captions of message copies. Ignored if sendCopy is false.

  Returns `Messages`

### ForwardMessages

public ForwardMessages(DataInput input) throws IOException
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:
  `input` - Serialized input
Throws:
  `IOException` - the deserialization failed

## 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.Object`
Returns:
  this.CONSTRUCTOR

### serialize

public void serialize(DataOutput output) throws IOException
Serialize the TDLib class

Specified by:
  `serialize` in class `TdApi.Object`
Parameters:
  `output` - output data stream
Throws:
  `IOException` - the serialization failed

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`