forwardMessages

inline fun forwardMessages(fromChatId: Identifier, messageIds: List<Long>): ForwardMessagesAction

Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.

Api reference

Parameters

chatId

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

messageThreadId

Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

fromChatId

Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)

messageIds

A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.

disableNotification

Sends the messages silently. Users will receive a notification with no sound.

protectContent

Protects the contents of the forwarded messages from forwarding and saving


inline fun forwardMessages(fromChatId: Long, vararg messageId: Long): ForwardMessagesAction
inline fun forwardMessages(fromChatId: String, vararg messageId: Long): ForwardMessagesAction
inline fun forwardMessages(fromChatId: User, vararg messageId: Long): ForwardMessagesAction
inline fun forwardMessages(fromChatId: Chat, vararg messageId: Long): ForwardMessagesAction