api.addLocalMessage()
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
AddLocalMessageParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
chatId | number | Target chat |
senderId | Identifier of the sender of the message | |
replyToMessageId | number | Identifier of the message to reply to or 0 |
disableNotification | boolean | Pass true to disable notification for the message |
inputMessageContent | The content of the message to be added |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'addLocalMessage' | 'error'
airgram: Airgram
request: {
method: 'addLocalMessage'
params: AddLocalMessageParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}