Skip to main content

Message type - Meta

Enables sending arbitary meta actions in a group. This message type has some rules and it's recommeneded to not interact directly with this message type as Push SDK will handle it for you. It's documentated just for the curious minds.

// userAlice.chat.send(recipient, message)
// This section focuses on customization parameters for 'message' object
const aliceMessagesBob = await userAlice.chat.send(recipient, {
type: 'Meta',
content: "Alice.eth create the grp 'xyz'", // content can be eliminated
info: { // any added info that is not visible but can be programmatically understood
affected: [], // recipients // this can be array
arbitary: { // optional, can have anything, never shown based on type
timestamp: // epoch one, include timestamp so session key becomes different
}
}
});

Customization parameters

When sending a message, you can customize the following params

ParamTypeSubtypeDefaultRemarks
recipientstring--Recipient supports a number of address format including wallet address, chain agnostic wallet address, NFT addresses or even chatid which is useful in groups
messageobject--Configuration for message to be sent
-message.typeMetaTextType of message Content
-message.contentCREATE_GROUP or ADD_MEMBER or REMOVE_MEMBER or ASSIGN_MEMBER_PRIVILEGE or UPDATE_GROUP or UPDATE_GROUP_PROFILE or UPDATE_GROUP_META or USER_INTERACTION or CREATE_SPACE or ADD_LISTENER or REMOVE_LISTENER or ASSIGN_LISTENER_PRIVILEGE or ASSIGN_SPEAKER_PRIVILEGE or ASSIGN_COHOST_PRIVILEGE-Message Content
-options.info{ affected : string[]: arbitrary?: { [key: string]: any } }-Pass recipients in the affected array list, any arbitary data if applicable can be passed in arbitary object

Note: Parameters in this style are mandatory.