SDKsWASM
Insert a local group message
Insert a local group-chat message with the WASM SDK.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message | MessageItem | Yes | Complete message object to write to the local database. |
groupID | string | Yes | ID of the target group. |
sendID | string | Yes | User ID of the message sender. |
await openimsdk.insertGroupMessageToLocalStorage({
message,
groupID,
sendID: currentUserID,
});Resolving the Promise stores the message record on the local device only. Local messages are not synchronized across devices by OpenIMServer and do not trigger remote receive events. To deliver messages to group members normally, call Send a message.
Was this page helpful?