Browse SDKs · WASM
SDKsWASM

Insert a local group message

Insert a local group-chat message with the WASM SDK.

Copy

Parameters

ParameterTypeRequiredDescription
messageMessageItemYesComplete message object to write to the local database.
groupIDstringYesID of the target group.
sendIDstringYesUser ID of the message sender.
await openimsdk.insertGroupMessageToLocalStorage({
  message,
  groupID,
  sendID: currentUserID,
});

Promise completion affects only the current device. The message is not sent to group members and does not trigger a new-message event. Use a send API when you need server delivery, offline push, or multi-device synchronization.