addLocalMessage - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.coroutines / addLocalMessage

addLocalMessage

suspend fun TelegramFlow.addLocalMessage(chatId: Long, senderUserId: Int, replyToMessageId: Long, disableNotification: Boolean, inputMessageContent: InputMessageContent?): Message

Suspend function, which adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message.

Parameters

chatId - Target chat.

senderUserId - Identifier of the user who will be shown as the sender of the message; may be 0 for channel posts.

replyToMessageId - Identifier of the message to reply to or 0.

disableNotification - Pass true to disable notification for the message.

inputMessageContent - The content of the message to be added.

Return Message Describes a message.