libtd-ktx / kotlinx.telegram.extensions / ChatKtx / addLocalMessage
addLocalMessage
open suspend fun
Chat
.addLocalMessage(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
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 TdApi.Message Describes a message.