Class TdApi.ForwardMessages
java.lang.Object
dev.voroby.springframework.telegram.client.TdApi.Object
dev.voroby.springframework.telegram.client.TdApi.Function<TdApi.Messages>
dev.voroby.springframework.telegram.client.TdApi.ForwardMessages
- Enclosing class:
- TdApi
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
Modifier and TypeFieldDescriptionlong
Identifier of the chat to which to forward messages.static final int
Identifier uniquely determining type of the object.long
Identifier of the chat from which to forward messages.long[]
Identifiers of the messages to forward.long
If not 0, the message thread identifier in which the message will be sent; for forum threads only.Options to be used to send the messages; pass null to use default options.boolean
Pass true to remove media captions of message copies.boolean
Pass true to copy content of the messages without reference to the original sender. -
Constructor Summary
ConstructorDescriptionDefault constructor for a function, which forwards previously sent messages.ForwardMessages
(long chatId, long messageThreadId, long fromChatId, long[] messageIds, TdApi.MessageSendOptions options, boolean sendCopy, boolean removeCaption) Creates a function, which forwards previously sent messages. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns an identifier uniquely determining type of the object.Methods inherited from class dev.voroby.springframework.telegram.client.TdApi.Function
toString
-
Field Details
-
chatId
public long chatIdIdentifier of the chat to which to forward messages. -
messageThreadId
public long messageThreadIdIf not 0, the message thread identifier in which the message will be sent; for forum threads only. -
fromChatId
public long fromChatIdIdentifier of the chat from which to forward messages. -
messageIds
public long[] messageIdsIdentifiers 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
public boolean sendCopyPass 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 removeCaptionPass true to remove media captions of message copies. Ignored if sendCopy is false. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
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, long messageThreadId, 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.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 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.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 classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-