浏览 SDKs · React Native
SDKsReact Native

设置消息本地扩展

OpenIM React Native SDK 设置消息本地扩展。

复制

使用 setMessageLocalEx() 为当前设备中的指定消息保存本地扩展数据。

await OpenIMSDK.setMessageLocalEx({
  conversationID,
  clientMsgID,
  localEx: JSON.stringify({ expanded: true }),
});

参数说明

参数类型是否必填说明
conversationIDstring消息所属的会话 ID。
clientMsgIDstring目标消息 ID。
localExstring本地扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展数据。

调用完成后,本地扩展数据已保存到当前设备的消息中。