Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 2.75 KB

01-Message-Type-Text.mdx

File metadata and controls

50 lines (38 loc) · 2.75 KB
id title hide_title slug displayed_sidebar sidebar_position image
docs-chat-message-type-text
Text
true
./text
pushChatSidebar
1
/assets/docs/previews/docs_chat_message_type--text.png

Message type - Text

Enables sending simple text messages to the recipient.

<title>Message Type - Text | Push Chat | Push Documentation</title>

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

// userAlice.chat.send(recipient, message)
// This section focuses on customization parameters for 'message' object
const aliceMessagesBob = await userAlice.chat.send(recipient, {
  type: 'Text',
  content: 'Hello Bob!',
});

Customization parameters

When sending a message, you can customize the following params

Param Type Subtype Default Remarks
recipient string - - Recipient supports a number of address format including wallet address, chain agnostic wallet address, NFT addresses or even chatid which is useful in groups
message object - - Configuration for message to be sent
- message.type Text Text Type of message content
- message.content string - Pass plain text in the message content

Note: Parameters in this style are mandatory.