libtd-ktx / kotlinx.telegram.extensions / ChatKtx / forwardMessages
forwardMessages
open suspend fun
Chat
.forwardMessages(fromChatId:
Long
, messageIds:
LongArray
?, options:
SendMessageOptions
?, asAlbum:
Boolean
, sendCopy:
Boolean
, removeCaption:
Boolean
):
Messages
Suspend 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.
Parameters
fromChatId
- Identifier of the chat from which to forward messages.
messageIds
- Identifiers of the messages to forward.
options
- Options to be used to send the messages.
asAlbum
- True, if the messages should be grouped into an album after forwarding. For this
to work, no more than 10 messages may be forwarded, and all of them must be photo or video
messages.
sendCopy
- True, if content of the messages needs to be copied without links to the
original messages. Always true if the messages are forwarded to a secret chat.
removeCaption
- True, if media captions of message copies needs to be removed. Ignored if
sendCopy is false.
Return TdApi.Messages Contains a list of messages.