From 129a540fabe969ff96349b96d6c253b7765cc390 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Fri, 21 Aug 2026 18:07:12 +0800 Subject: [PATCH 01/15] docs(react-native): add user and relationship documentation --- .../react-native/user/blacklist/add-black.mdx | 29 + .../user/blacklist/get-black-list.mdx | 53 + .../user/blacklist/remove-black.mdx | 19 + .../accept-friend-application.mdx | 29 + .../user/friend-applications/add-friend.mdx | 29 + .../delete-friend-requests.mdx | 30 + ...t-friend-application-list-as-applicant.mdx | 29 + ...t-friend-application-list-as-recipient.mdx | 84 ++ ...get-friend-application-unhandled-count.mdx | 27 + .../refuse-friend-application.mdx | 29 + .../user/friends/check-friend.mdx | 26 + .../user/friends/delete-friend.mdx | 19 + .../user/friends/get-friend-list-page.mdx | 79 ++ .../friends/get-specified-friends-info.mdx | 31 + .../user/friends/search-friends.mdx | 33 + .../user/friends/update-friends.mdx | 32 + .../get-subscribe-users-status.mdx | 19 + .../online-status/subscribe-users-status.mdx | 46 + .../unsubscribe-users-status.mdx | 19 + .../user/overview-relationships.mdx | 44 + .../sdk/react-native/user/overview-user.mdx | 46 + .../user/profile/get-self-user-info.mdx | 32 + .../user/profile/get-users-info.mdx | 39 + .../profile/set-friend-add-permission.mdx | 29 + .../profile/set-global-message-reception.mdx | 30 + .../user/profile/set-self-info.mdx | 53 + .../react-native/user/blacklist/add-black.mdx | 29 + .../user/blacklist/get-black-list.mdx | 53 + .../user/blacklist/remove-black.mdx | 19 + .../accept-friend-application.mdx | 29 + .../user/friend-applications/add-friend.mdx | 29 + .../delete-friend-requests.mdx | 30 + ...t-friend-application-list-as-applicant.mdx | 29 + ...t-friend-application-list-as-recipient.mdx | 84 ++ ...get-friend-application-unhandled-count.mdx | 27 + .../refuse-friend-application.mdx | 29 + .../user/friends/check-friend.mdx | 26 + .../user/friends/delete-friend.mdx | 19 + .../user/friends/get-friend-list-page.mdx | 79 ++ .../friends/get-specified-friends-info.mdx | 31 + .../user/friends/search-friends.mdx | 33 + .../user/friends/update-friends.mdx | 32 + .../get-subscribe-users-status.mdx | 19 + .../online-status/subscribe-users-status.mdx | 46 + .../unsubscribe-users-status.mdx | 19 + .../user/overview-relationships.mdx | 44 + .../sdk/react-native/user/overview-user.mdx | 46 + .../user/profile/get-self-user-info.mdx | 32 + .../user/profile/get-users-info.mdx | 39 + .../profile/set-friend-add-permission.mdx | 29 + .../profile/set-global-message-reception.mdx | 30 + .../user/profile/set-self-info.mdx | 52 + data/structure/chat-pages.json | 208 +++ .../structure/react-native-content-audit.json | 1200 +++++++++++++++++ .../react-native-navigation-labels.json | 47 + data/structure/react-native-sidebar.json | 152 +++ scripts/__tests__/client-sdk-sidebar.test.mjs | 3 +- scripts/build-client-sdk-zh-content.mjs | 4 +- scripts/lib/client-sdk-platforms.mjs | 13 + src/generated/navigation.json | 332 ++++- .../react-native-sdk-zh-content.json | 471 +++++++ src/generated/routes.json | 468 +++++++ src/generated/search-index-zh.json | 214 ++- src/generated/search-index.json | 208 +++ src/lib/client-sdk-commercial.ts | 8 +- src/lib/client-sdk-publication.ts | 9 +- src/lib/localized-docs.ts | 2 + 67 files changed, 5198 insertions(+), 10 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx create mode 100644 content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx create mode 100644 content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friends/check-friend.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friends/search-friends.mdx create mode 100644 content/docs/chat/sdk/react-native/user/friends/update-friends.mdx create mode 100644 content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx create mode 100644 content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx create mode 100644 content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx create mode 100644 content/docs/chat/sdk/react-native/user/overview-relationships.mdx create mode 100644 content/docs/chat/sdk/react-native/user/overview-user.mdx create mode 100644 content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx create mode 100644 content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx create mode 100644 content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx create mode 100644 content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx create mode 100644 content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/blacklist/add-black.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friends/check-friend.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friends/delete-friend.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friends/search-friends.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/friends/update-friends.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/overview-relationships.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/overview-user.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/profile/get-users-info.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/user/profile/set-self-info.mdx create mode 100644 data/structure/react-native-content-audit.json create mode 100644 data/structure/react-native-navigation-labels.json create mode 100644 data/structure/react-native-sidebar.json create mode 100644 src/generated/react-native-sdk-zh-content.json diff --git a/content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx b/content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx new file mode 100644 index 0000000000..e73e80f86e --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx @@ -0,0 +1,29 @@ +--- +title: 'Add a user to the blacklist' +description: 'Block a user with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/blacklist/add-black' +--- + +Call `addBlack()` to add a specified user to the current account's blocklist. + +```ts +await OpenIMSDK.addBlack({ + toUserID, + ex, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `toUserID` | `string` | Yes | User ID to block. | +| `ex` | `string` | No | Blocklist relationship extension information. | + +After the user is blocked, `OnBlackAdded` is emitted. See [Get the blocklist](/sdk/react-native/user/blacklist/get-black-list) for the blocklist and listener example. diff --git a/content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx b/content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx new file mode 100644 index 0000000000..001c245e5c --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx @@ -0,0 +1,53 @@ +--- +title: 'Get the blacklist' +description: 'Get the blocklist with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/blacklist/get-black-list' +--- + +Call `getBlackList()` to get the current account's blocklist. + +```ts +const blockedUsers = await OpenIMSDK.getBlackList(); +``` + +The method returns `BlackUserItem[]`: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | ID of the blocked user. | +| `nickname` | `string` | Nickname of the blocked user. | +| `faceURL` | `string` | Avatar URL of the blocked user. | +| `ownerUserID` | `string` | User ID that owns the blocklist relationship. | +| `operatorUserID` | `string` | User ID that performed the block operation. | +| `createTime` | `number` | Time when the blocklist record was created. | +| `addSource` | `number` | Source from which the user was blocked. | +| `ex` | `string` | Blocklist extension field. | + +Use `userID` when checking a blocklist relationship in a profile card or contact list. Blocklist management is separate from group management; use group APIs for muting or removing group members. + +## Listen for blocklist changes + +When the blocklist changes, `OnBlackAdded` or `OnBlackDeleted` is emitted with the corresponding blocked-user information: + +```ts +const handleBlackAdded = (blackUser: BlackUserItem) => { + // Add or update the record by blackUser.userID +}; +const handleBlackDeleted = (blackUser: BlackUserItem) => { + // Remove the record by blackUser.userID +}; + +OpenIMSDK.on(OpenIMEvent.OnBlackAdded, handleBlackAdded); +OpenIMSDK.on(OpenIMEvent.OnBlackDeleted, handleBlackDeleted); + +OpenIMSDK.off(OpenIMEvent.OnBlackAdded, handleBlackAdded); +OpenIMSDK.off(OpenIMEvent.OnBlackDeleted, handleBlackDeleted); +``` + +Remove these listeners when logging out, switching accounts, or tearing down the blocklist state. diff --git a/content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx b/content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx new file mode 100644 index 0000000000..4fa8d4e7e9 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx @@ -0,0 +1,19 @@ +--- +title: 'Remove a user from the blacklist' +description: 'Unblock a user with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/blacklist/remove-black' +--- + +Call `removeBlack()` to remove a specified user from the current account's blocklist. + +```ts +await OpenIMSDK.removeBlack(blackUserID); +``` + +`blackUserID` is the user ID to unblock. After the user is removed, `OnBlackDeleted` is emitted. See [Get the blocklist](/sdk/react-native/user/blacklist/get-black-list) for the listener example. diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx new file mode 100644 index 0000000000..f99db8a8ad --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx @@ -0,0 +1,29 @@ +--- +title: 'Accept a friend application' +description: 'Accept a friend request with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/accept-friend-application' +--- + +Call `acceptFriendApplication()` to accept a friend request. + +```ts +await OpenIMSDK.acceptFriendApplication({ + toUserID: applicantUserID, + handleMsg: '', +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `toUserID` | `string` | Yes | User ID of the applicant. | +| `handleMsg` | `string` | Yes | Message attached when handling the request. Pass an empty string when there is no message. | + +Accepting the request establishes a friendship and emits friend-request status changes and `OnFriendAdded`. See [Get the friend list](/sdk/react-native/user/friends/get-friend-list-page) for the friend-list listener. diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx new file mode 100644 index 0000000000..74ee5d31d3 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx @@ -0,0 +1,29 @@ +--- +title: 'Send a friend application' +description: 'Send a friend request with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/add-friend' +--- + +Call `addFriend()` to send a friend request to a specified user. + +```ts +await OpenIMSDK.addFriend({ + toUserID, + reqMsg, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `toUserID` | `string` | Yes | User ID to add. | +| `reqMsg` | `string` | Yes | Message attached to the request. Pass an empty string when there is no message. | + +A successful call means that the friend request was submitted; it does not mean that the recipient has accepted it. For request status changes, see the listener examples in [Get received friend requests](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient). diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx new file mode 100644 index 0000000000..3849ee5ffa --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx @@ -0,0 +1,30 @@ +--- +title: 'Delete friend applications' +description: 'Delete friend-request records with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/delete-friend-requests' +--- + +Call `deleteFriendRequests()` to delete multiple friend-request records. + +## Parameter description + +Each item in the array contains the following fields: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `fromUserID` | `string` | Yes | Applicant's user ID. | +| `toUserID` | `string` | Yes | Recipient's user ID. | + +```ts +await OpenIMSDK.deleteFriendRequests([ + { fromUserID, toUserID }, +]); +``` + +Deleting a record is not the same as rejecting the request, and it does not delete an established friendship. For request-record changes, see `OnFriendApplicationDeleted` in [Get received friend requests](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient). diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx new file mode 100644 index 0000000000..4b68a0974e --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -0,0 +1,29 @@ +--- +title: 'Get sent friend applications' +description: 'Get sent friend requests with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant' +--- + +Call `getFriendApplicationListAsApplicant()` to page through friend requests sent by the current user. + +```ts +const applications = await OpenIMSDK.getFriendApplicationListAsApplicant({ + offset: 0, + count: 20, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of requests to retrieve. | + +The method returns the current page as `FriendApplicationItem[]`. See [Get received friend requests](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient) for request fields. diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx new file mode 100644 index 0000000000..893d0d8920 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -0,0 +1,84 @@ +--- +title: 'Get received friend applications' +description: 'Get received friend requests with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient' +--- + +Call `getFriendApplicationListAsRecipient()` to page through friend requests received by the current user. + +```ts +const applications = await OpenIMSDK.getFriendApplicationListAsRecipient({ + handleResults: [ApplicationHandleResult.Unprocessed], + offset: 0, + count: 20, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `handleResults` | `number[]` | Yes | Request handling results to retrieve. | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of requests to retrieve. | + +| Enum value | Numeric value | Meaning | +| --- | --- | --- | +| `ApplicationHandleResult.Unprocessed` | `0` | Pending. | +| `ApplicationHandleResult.Agree` | `1` | Accepted. | +| `ApplicationHandleResult.Reject` | `-1` | Rejected. | + +The method returns the current page as `FriendApplicationItem[]`. + +### Friend request fields + +`FriendApplicationItem` contains the following fields: + +| Field | Type | Description | +| --- | --- | --- | +| `fromUserID` | `string` | Applicant's user ID. | +| `fromNickname` | `string` | Applicant's nickname. | +| `fromFaceURL` | `string` | Applicant's avatar URL. | +| `toUserID` | `string` | Recipient's user ID. | +| `toNickname` | `string` | Recipient's nickname. | +| `toFaceURL` | `string` | Recipient's avatar URL. | +| `reqMsg` | `string` | Message attached to the request. | +| `handleResult` | `ApplicationHandleResult` | Current handling result. | +| `handlerUserID` | `string` | User ID that handled the request. | +| `handleMsg` | `string` | Message entered when handling the request. | +| `handleTime` | `number` | Time when the request was handled. | +| `createTime` | `number` | Time when the request record was created. | +| `ex` | `string` | Request record extension string. | + +## Listen for friend-request changes + +When a friend request changes, `OnFriendApplicationAdded`, `OnFriendApplicationAccepted`, `OnFriendApplicationRejected`, or `OnFriendApplicationDeleted` is emitted with a `FriendApplicationItem`: + +```ts +const handleApplicationChanged = (application: FriendApplicationItem) => { + // Update the request by fromUserID and toUserID +}; +const handleApplicationDeleted = (application: FriendApplicationItem) => { + // Remove the request by fromUserID and toUserID +}; + +// Add listeners +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted); + +// Remove listeners +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted); +``` + +Identify a request with both `fromUserID` and `toUserID`. Remove these listeners when logging out, switching accounts, or tearing down the request-list state. diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx new file mode 100644 index 0000000000..d29675b6b9 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx @@ -0,0 +1,27 @@ +--- +title: 'Get pending application count' +description: 'Get the unhandled friend-request count with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count' +--- + +Call `getFriendApplicationUnhandledCount()` to get the number of unhandled friend requests after a specified time. + +```ts +const count = await OpenIMSDK.getFriendApplicationUnhandledCount({ + time, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `time` | `number` | Yes | Start time for the query, normally the last time the request list was viewed. | + +The method returns the number of unhandled friend requests after the specified time. diff --git a/content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx b/content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx new file mode 100644 index 0000000000..98f0379429 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx @@ -0,0 +1,29 @@ +--- +title: 'Reject a friend application' +description: 'Reject a friend request with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/refuse-friend-application' +--- + +Call `refuseFriendApplication()` to reject a friend request. + +```ts +await OpenIMSDK.refuseFriendApplication({ + toUserID: applicantUserID, + handleMsg: '', +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `toUserID` | `string` | Yes | User ID of the applicant. | +| `handleMsg` | `string` | Yes | Message attached when handling the request. Pass an empty string when there is no message. | + +For request status changes, see the listener examples in [Get received friend requests](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient). diff --git a/content/docs/chat/sdk/react-native/user/friends/check-friend.mdx b/content/docs/chat/sdk/react-native/user/friends/check-friend.mdx new file mode 100644 index 0000000000..37e7a03842 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friends/check-friend.mdx @@ -0,0 +1,26 @@ +--- +title: 'Check friendship status' +description: 'Check friendships with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/check-friend' +--- + +Call `checkFriend()` to check the friendship between the current user and multiple target users. + +```ts +const checks = await OpenIMSDK.checkFriend(['user_a', 'user_b']); +``` + +The returned `FriendshipInfo[]` corresponds to the input IDs by `userID`: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | ID of the user being checked. | +| `result` | `number` | `1` means the users are friends; `0` means they are not. | + +To determine a blocklist relationship, call [Get the blocklist](/sdk/react-native/user/blacklist/get-black-list) separately. diff --git a/content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx b/content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx new file mode 100644 index 0000000000..fbb066716b --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx @@ -0,0 +1,19 @@ +--- +title: 'Delete a friend' +description: 'Delete a friend with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/delete-friend' +--- + +Call `deleteFriend()` to delete the friendship between the current user and a specified user. + +```ts +await OpenIMSDK.deleteFriend(friendUserID); +``` + +`friendUserID` is the user ID of the friend to delete. After the friend is deleted, `OnFriendDeleted` is emitted with the deleted friend's information. See [Get the friend list](/sdk/react-native/user/friends/get-friend-list-page) for the listener example. diff --git a/content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx b/content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx new file mode 100644 index 0000000000..e048fe6925 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx @@ -0,0 +1,79 @@ +--- +title: 'Get the friend list' +description: 'Get the friend list with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/get-friend-list-page' +--- + +Call `getFriendListPage()` to retrieve the current user's friends page by page. + +```ts +const friends = await OpenIMSDK.getFriendListPage({ + offset: 0, + count: 50, + filterBlack: true, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of friends to request. | +| `filterBlack` | `boolean` | No | Whether to filter out blocked users. | + +The method returns the current page as `FriendUserItem[]`. Increase `offset` by the number of returned items to load the next page. Query the list again after friends are added or deleted. + +### Friend fields + +`FriendUserItem` contains the following fields: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | Friend user ID. | +| `nickname` | `string` | Friend nickname. | +| `faceURL` | `string` | Friend avatar URL. | +| `remark` | `string` | Remark set for the friend by the current user. | +| `isPinned` | `boolean` | Whether the friend is pinned. | +| `ownerUserID` | `string` | User ID that owns the friendship. | +| `operatorUserID` | `string` | User ID that most recently changed the relationship. | +| `addSource` | `number` | Source from which the friendship was added. | +| `createTime` | `number` | Time when the friendship was created. | +| `ex` | `string` | Friendship extension field. | +| `attachedInfo` | `string` | Information attached by the SDK. | + +`remark`, `isPinned`, and `ex` belong to the friendship and are not account-level user information. + +## Listen for friend changes + +When a friendship changes, `OnFriendAdded`, `OnFriendInfoChanged`, or `OnFriendDeleted` is emitted with the corresponding friend information: + +```ts +const handleFriendAdd = (friend: FriendUserItem) => { + // Add the friend +}; +const handleFriendChanged = (friend: FriendUserItem) => { + // Update the friend by friend.userID +}; +const handleFriendDeleted = (friend: FriendUserItem) => { + // Remove the friend by friend.userID +}; + +// Add listeners +OpenIMSDK.on(OpenIMEvent.OnFriendAdded, handleFriendAdd); +OpenIMSDK.on(OpenIMEvent.OnFriendInfoChanged, handleFriendChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendDeleted, handleFriendDeleted); + +// Remove listeners +OpenIMSDK.off(OpenIMEvent.OnFriendAdded, handleFriendAdd); +OpenIMSDK.off(OpenIMEvent.OnFriendInfoChanged, handleFriendChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendDeleted, handleFriendDeleted); +``` + +Remove these listeners when logging out, switching accounts, or tearing down the friend-list state. diff --git a/content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx b/content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx new file mode 100644 index 0000000000..831ee4f687 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx @@ -0,0 +1,31 @@ +--- +title: 'Get friend profiles' +description: 'Get specified friend profiles with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/get-specified-friends-info' +--- + +Call `getSpecifiedFriendsInfo()` to retrieve relationship information for specified user IDs. + +```ts +const friends = await OpenIMSDK.getSpecifiedFriendsInfo({ + userIDList: ['user_a', 'user_b'], + filterBlack: true, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `userIDList` | `string[]` | Yes | User IDs to retrieve. | +| `filterBlack` | `boolean` | No | Whether to filter out blocked users. | + +The method returns matching `FriendUserItem[]`; the array is not guaranteed to follow the order of the input IDs. See [Get the friend list](/sdk/react-native/user/friends/get-friend-list-page) for field descriptions. + +For public information about users who are not your friends, use [Get user profiles](/sdk/react-native/user/profile/get-users-info). diff --git a/content/docs/chat/sdk/react-native/user/friends/search-friends.mdx b/content/docs/chat/sdk/react-native/user/friends/search-friends.mdx new file mode 100644 index 0000000000..292c4e4ae8 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friends/search-friends.mdx @@ -0,0 +1,33 @@ +--- +title: 'Search friends' +description: "Search the current user's friends with the OpenIM React Native SDK." +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/search-friends' +--- + +Call `searchFriends()` to search the current user's friends. Trim leading and trailing whitespace before submitting a search. The current request uses the first non-empty value in `keywordList`. + +```ts +const friends = await OpenIMSDK.searchFriends({ + keywordList: [keyword.trim()], + isSearchUserID: true, + isSearchNickname: true, + isSearchRemark: true, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | Yes | Search keywords. The current request uses the first non-empty keyword. | +| `isSearchUserID` | `boolean` | Yes | Whether to match user IDs. | +| `isSearchNickname` | `boolean` | Yes | Whether to match friend nicknames. | +| `isSearchRemark` | `boolean` | Yes | Whether to match friend remarks. | + +The method returns `SearchedFriendsInfo[]`. Each item contains friend fields and `relationship`: `0` indicates a blocklist relationship and `1` indicates a friendship. diff --git a/content/docs/chat/sdk/react-native/user/friends/update-friends.mdx b/content/docs/chat/sdk/react-native/user/friends/update-friends.mdx new file mode 100644 index 0000000000..81aeaaf1dc --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/friends/update-friends.mdx @@ -0,0 +1,32 @@ +--- +title: 'Update friend information' +description: 'Update friend information with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/update-friends' +--- + +Call `updateFriends()` to update every friend in `friendUserIDs`. + +```ts +await OpenIMSDK.updateFriends({ + friendUserIDs: [friendUserID], + remark: remark, + isPinned: true, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `friendUserIDs` | `string[]` | Yes | Friend user IDs to update. | +| `remark` | `string` | No | New remark. | +| `isPinned` | `boolean` | No | Whether to pin the friend. | +| `ex` | `string` | No | New extension string. | + +Pass at least one field to update in addition to `friendUserIDs`. Call the method separately when different friends need different values. After friend information changes, `OnFriendInfoChanged` is emitted; see [Get the friend list](/sdk/react-native/user/friends/get-friend-list-page) for the listener example. diff --git a/content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx b/content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx new file mode 100644 index 0000000000..039ba8313f --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx @@ -0,0 +1,19 @@ +--- +title: 'Get subscribed user status' +description: 'Get the status of subscribed users with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/online-status/get-subscribe-users-status' +--- + +Call `getSubscribeUsersStatus()` to get the online status of users subscribed by the current account. + +```ts +const states = await OpenIMSDK.getSubscribeUsersStatus(); +``` + +The method returns `UserOnlineState[]` for the subscribed users. Subscribe to a target user first with [Subscribe to online status](/sdk/react-native/user/online-status/subscribe-users-status). diff --git a/content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx b/content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx new file mode 100644 index 0000000000..7dc59218b7 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx @@ -0,0 +1,46 @@ +--- +title: 'Subscribe to online status' +description: 'Subscribe to user online status with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/online-status/subscribe-users-status' +--- + +Call `subscribeUsersStatus()` to subscribe to the online status of specific users. Subscribe only to users whose status the current screen needs to display. + +```ts +const userIDs = [...new Set(visibleUserIDs.filter(Boolean))]; +const states = await OpenIMSDK.subscribeUsersStatus(userIDs); +``` + +The method returns the current `UserOnlineState[]` for these users: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | ID of the user whose status is reported. | +| `status` | `OnlineState` | `OnlineState.Online` means online; `OnlineState.Offline` means offline. | +| `platformIDs` | `Platform[]` (optional) | Platforms on which the user is currently online. | + +Online status indicates whether the user is connected to OpenIMServer. It does not indicate whether the user is viewing the app or a conversation. + +## Listen for online-status changes + +When a subscribed user's status changes, `OnUserStatusChanged` is emitted: + +```ts +const handleStatusChanged = (state: UserOnlineState) => { + // Update the status for state.userID +}; + +// Add the listener +OpenIMSDK.on(OpenIMEvent.OnUserStatusChanged, handleStatusChanged); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnUserStatusChanged, handleStatusChanged); +``` + +Cancel subscriptions and remove the listener when logging out, switching accounts, or when those users no longer need to be displayed. diff --git a/content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx b/content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx new file mode 100644 index 0000000000..325159b07e --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx @@ -0,0 +1,19 @@ +--- +title: 'Unsubscribe from online status' +description: 'Cancel user online-status subscriptions with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/online-status/unsubscribe-users-status' +--- + +Call `unsubscribeUsersStatus()` to cancel online-status subscriptions for specific users. + +```ts +await OpenIMSDK.unsubscribeUsersStatus(userIDs); +``` + +Cancel the corresponding subscriptions when a page changes, search results change, the user logs out, or those users no longer need to be displayed. diff --git a/content/docs/chat/sdk/react-native/user/overview-relationships.mdx b/content/docs/chat/sdk/react-native/user/overview-relationships.mdx new file mode 100644 index 0000000000..b9a8931252 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/overview-relationships.mdx @@ -0,0 +1,44 @@ +--- +title: 'Relationships overview' +description: 'Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/overview-relationships' +--- + +Relationships record the current user's friendships, friend requests, and blocklist relationships with other users. User profiles, account settings, and online status are covered by the [User overview](/sdk/react-native/user/overview-user). + +## Relationship objects + +The React Native SDK returns different objects for different relationship scenarios: + +| Type | Use case | Main APIs | +| --- | --- | --- | +| `PublicUserItem` | Looking up public profiles and displaying friend candidates or stranger profile cards | `getUsersInfo()` | +| `FriendUserItem` | Friend lists, friend remarks, pinned friends, and relationship extension data | `getFriendListPage()`, `getSpecifiedFriendsInfo()` | +| `FriendshipInfo` | Checking the friendship between the current user and target users | `checkFriend()` | +| `FriendApplicationItem` | Received or sent friend requests and their handling status | `getFriendApplicationListAsRecipient()`, `getFriendApplicationListAsApplicant()` | +| `BlackUserItem` | Blocklist relationships maintained by the current account | `getBlackList()`, `addBlack()`, `removeBlack()` | + +## Feature entry points + +| Need | Recommended page | +| --- | --- | +| Look up public user profiles | [Get user profiles](/sdk/react-native/user/profile/get-users-info) | +| Page through, search, or look up friends by ID | [Get the friend list](/sdk/react-native/user/friends/get-friend-list-page), [Search friends](/sdk/react-native/user/friends/search-friends), [Get friend profiles](/sdk/react-native/user/friends/get-specified-friends-info) | +| Check a friendship | [Check friendship](/sdk/react-native/user/friends/check-friend) | +| Update or delete a friendship | [Update friend information](/sdk/react-native/user/friends/update-friends), [Delete a friend](/sdk/react-native/user/friends/delete-friend) | +| Send or handle a friend request | [Send a friend request](/sdk/react-native/user/friend-applications/add-friend), [Get received friend requests](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient), [Accept a friend request](/sdk/react-native/user/friend-applications/accept-friend-application), [Reject a friend request](/sdk/react-native/user/friend-applications/refuse-friend-application) | +| View and maintain the blocklist | [Get the blocklist](/sdk/react-native/user/blacklist/get-black-list), [Block a user](/sdk/react-native/user/blacklist/add-black), [Unblock a user](/sdk/react-native/user/blacklist/remove-black) | + +## Event listeners + +Relationship changes emit events. Listener examples are documented on the following pages: + +- Friend-request changes: [Get received friend requests](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient). +- Friend and friend-profile changes: [Get the friend list](/sdk/react-native/user/friends/get-friend-list-page). +- Blocklist changes: [Get the blocklist](/sdk/react-native/user/blacklist/get-black-list). diff --git a/content/docs/chat/sdk/react-native/user/overview-user.mdx b/content/docs/chat/sdk/react-native/user/overview-user.mdx new file mode 100644 index 0000000000..f369c4e293 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/overview-user.mdx @@ -0,0 +1,46 @@ +--- +title: 'User overview' +description: 'Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/overview-user' +--- + +The OpenIM React Native SDK identifies users by `userID`. User APIs read and update the signed-in account's profile, retrieve public user profiles, and subscribe to user online status. + +Friends, friend requests, and the blocklist belong to relationships between users. See [Relationships overview](/sdk/react-native/user/overview-relationships). + +## User types + +The React Native SDK returns different user objects for different scenarios: + +| Type | Use case | Main APIs | +| --- | --- | --- | +| `SelfUserInfo` | The signed-in user's profile, avatar, nickname, and account-level message reception setting | `getSelfUserInfo()`, `setSelfInfo()` | +| `PublicUserItem` | Looking up users and displaying public profile cards | `getUsersInfo()` | +| `UserOnlineState` | A user's online status and online platform list | `subscribeUsersStatus()`, `getSubscribeUsersStatus()`, `unsubscribeUsersStatus()` | + +`SelfUserInfo` represents the signed-in user, while `PublicUserItem` represents public information available for lookup. Friend profiles, blocklist relationships, and group-member profiles use objects from the relationships or group capabilities. + +## Feature entry points + +| Need | Recommended page | +| --- | --- | +| Look up a public profile by `userID` for a profile card | [Get user profiles](/sdk/react-native/user/profile/get-users-info) | +| Read or update the current user's nickname, avatar, and extension data | [Get your profile](/sdk/react-native/user/profile/get-self-user-info), [Update your profile](/sdk/react-native/user/profile/set-self-info) | +| Set the account-level message reception option | [Set global message reception](/sdk/react-native/user/profile/set-global-message-reception) | +| Set how requests to add the current account are handled | [Set friend request permissions](/sdk/react-native/user/profile/set-friend-add-permission) | +| Subscribe to, read, and cancel online-status subscriptions | [Subscribe to online status](/sdk/react-native/user/online-status/subscribe-users-status), [Get subscribed user status](/sdk/react-native/user/online-status/get-subscribe-users-status), [Unsubscribe from online status](/sdk/react-native/user/online-status/unsubscribe-users-status) | +| Manage friends, friend requests, or the blocklist | [Relationships overview](/sdk/react-native/user/overview-relationships) | + +## Event listeners + +User state changes emit events. See the following pages for listener examples: + +- Current-user profile changes: [Update your profile](/sdk/react-native/user/profile/set-self-info). +- User online-status changes: [Subscribe to online status](/sdk/react-native/user/online-status/subscribe-users-status). +- Friend, friend-request, and blocklist changes: [Relationships overview](/sdk/react-native/user/overview-relationships). diff --git a/content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx b/content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx new file mode 100644 index 0000000000..2b68dfbd5e --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx @@ -0,0 +1,32 @@ +--- +title: 'Get your profile' +description: 'Get the current user profile with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/get-self-user-info' +--- + +Call `getSelfUserInfo()` to get the signed-in account's user information. + +```ts +const currentUser = await OpenIMSDK.getSelfUserInfo(); +``` + +## Return result + +The method returns the current account's `SelfUserInfo`: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | The OpenIM user ID of the signed-in user. | +| `nickname` | `string` | Account nickname. | +| `faceURL` | `string` | Account avatar URL. | +| `createTime` | `number` | Time when the user record was created. | +| `globalRecvMsgOpt` | `MessageReceiveOptType` | The account's global message reception option. | +| `ex` | `string` | An account extension string defined by your business. | + +Call this method after initialization and login to display the current account's avatar, nickname, and global message reception setting. Clear the stored current-user information when switching accounts. diff --git a/content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx b/content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx new file mode 100644 index 0000000000..a220af13e1 --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx @@ -0,0 +1,39 @@ +--- +title: 'Get user profiles' +description: 'Get public user profiles with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/get-users-info' +--- + +Call `getUsersInfo()` to retrieve public user information for a batch of user IDs. This is useful for friend candidates and stranger profile cards. + +If your product needs to search by nickname, phone number, organization, email, or another business field, have your backend perform the search and authorization checks first, then pass the returned user IDs to `getUsersInfo()`. + +```ts +const userIDList = Array.from(new Set(['user_a', 'user_b'])); +const users = await OpenIMSDK.getUsersInfo(userIDList); +``` + +## Parameter description + +`userIDList` is the array of user IDs to retrieve. Deduplicate the IDs before calling the API and keep the number of IDs in a single request within a reasonable limit. + +## Return result + +The method returns the matching `PublicUserItem[]`: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | OpenIM user ID. | +| `nickname` | `string` | Public account nickname. | +| `faceURL` | `string` | Public account avatar URL. | +| `ex` | `string` | Account extension field whose format is defined by your business. | + +The returned array is not guaranteed to follow the order of the input IDs. + +To retrieve the signed-in user's information, see [Get your profile](/sdk/react-native/user/profile/get-self-user-info) and [Update your profile](/sdk/react-native/user/profile/set-self-info). diff --git a/content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx b/content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx new file mode 100644 index 0000000000..509dc26dab --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx @@ -0,0 +1,29 @@ +--- +title: 'Set friend request permissions' +description: 'Set friend request permissions with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/set-friend-add-permission' +--- + +`addFriendPermission` controls whether users who add the current account must wait for the current user to review the request. Use `setSelfInfo()` to update this account-level setting: + +```ts +await OpenIMSDK.setSelfInfo({ + addFriendPermission: AddFriendPermission.AddFriendAllowed, +}); +``` + +## Parameter description + +| Enum value | Numeric value | Description | +| --- | --- | --- | +| `AddFriendPermission.AddFriendAllowed` | `0` | Allow requests, but require the current user to review them. | +| `AddFriendPermission.AddFriendAllowedNoReview` | `1` | Allow requests and establish the friendship without review. | +| `AddFriendPermission.AddFriendDenied` | `2` | Do not allow other users to add the current account. | + +This setting applies to future add-friend actions. It does not remove existing friends or automatically process pending requests. After the setting is updated, the current-user information is delivered through `OnSelfInfoUpdated`; see [Update your profile](/sdk/react-native/user/profile/set-self-info) for the listener example. diff --git a/content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx b/content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx new file mode 100644 index 0000000000..fa8cc3fb5b --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx @@ -0,0 +1,30 @@ +--- +title: 'Set global message reception' +description: 'Set the global message reception option with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/set-global-message-reception' +--- + +`globalRecvMsgOpt` controls the current account's global message reception option. Use `setSelfInfo()` to update the field: + +```ts +await OpenIMSDK.setSelfInfo({ + globalRecvMsgOpt: MessageReceiveOptType.NotNotify, +}); +``` + +## Parameter description + +| Enum value | Numeric value | Description | +| --- | --- | --- | +| `MessageReceiveOptType.Normal` | `0` | Receive messages normally and allow notifications. | +| `MessageReceiveOptType.NotNotify` | `2` | Receive messages without notifications. | + +After the setting is updated, the current-user information is delivered through `OnSelfInfoUpdated`. See [Update your profile](/sdk/react-native/user/profile/set-self-info) for the listener example. + +The global message reception option applies to the account. A conversation can also have its own message reception setting. diff --git a/content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx b/content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx new file mode 100644 index 0000000000..80ad3c61ea --- /dev/null +++ b/content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx @@ -0,0 +1,53 @@ +--- +title: 'Update your profile' +description: 'Update the current user profile with the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/set-self-info' +--- + +Call `setSelfInfo()` to update the signed-in account's basic display profile. Pass only the `nickname`, `faceURL`, or `ex` fields that should change in this request. + +```ts +await OpenIMSDK.setSelfInfo({ + nickname: nickname.trim(), + faceURL, + ex: mergedExtra, +}); +``` + +## Parameter description + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `nickname` | `string` | No | New nickname. | +| `faceURL` | `string` | No | New avatar URL. | +| `ex` | `string` | No | Extended user information. | + +Pass at least one profile field that should be updated. + +`ex` is a string. You can pass a JSON string or another business-defined format for extended user information. + +After the profile is updated, the `OnSelfInfoUpdated` event carries the updated user information. + +## Listen for current-user profile changes + +When the user's profile changes, `OnSelfInfoUpdated` is emitted with the updated `SelfUserInfo`: + +```ts +function handleSelfInfoUpdated(selfUserInfo: SelfUserInfo) { + // ... +} + +// Add the listener +OpenIMSDK.on(OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated); +``` + +Remove the listener when the user logs out, switches accounts, or the user state is torn down. diff --git a/content/zh/docs/chat/sdk/react-native/user/blacklist/add-black.mdx b/content/zh/docs/chat/sdk/react-native/user/blacklist/add-black.mdx new file mode 100644 index 0000000000..23632cb8b5 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/blacklist/add-black.mdx @@ -0,0 +1,29 @@ +--- +title: '将用户加入黑名单' +description: 'OpenIM React Native SDK 将用户加入黑名单。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/blacklist/add-black' +--- + +调用 `addBlack()` 将指定用户加入当前账号的黑名单。 + +```ts +await OpenIMSDK.addBlack({ + toUserID, + ex, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `toUserID` | `string` | 是 | 要加入黑名单的用户 ID。 | +| `ex` | `string` | 否 | 黑名单关系的扩展信息。 | + +加入黑名单后会触发 `OnBlackAdded` 事件。黑名单列表和事件监听方式见[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx b/content/zh/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx new file mode 100644 index 0000000000..e30f301086 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx @@ -0,0 +1,53 @@ +--- +title: '获取黑名单' +description: 'OpenIM React Native SDK 获取黑名单。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/blacklist/get-black-list' +--- + +调用 `getBlackList()` 获取当前账号的黑名单。 + +```ts +const blockedUsers = await OpenIMSDK.getBlackList(); +``` + +返回 `BlackUserItem[]`,常用字段如下: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 被拉黑的用户 ID。 | +| `nickname` | `string` | 被拉黑用户的昵称。 | +| `faceURL` | `string` | 被拉黑用户的头像地址。 | +| `ownerUserID` | `string` | 黑名单关系所属用户 ID。 | +| `operatorUserID` | `string` | 执行拉黑操作的用户 ID。 | +| `createTime` | `number` | 黑名单创建时间。 | +| `addSource` | `number` | 黑名单添加来源。 | +| `ex` | `string` | 黑名单扩展字段。 | + +资料卡或联系人列表判断黑名单关系时,应使用 `userID`。黑名单与群组管理是独立能力,群成员禁言或移除请使用群组相关 API。 + +## 监听黑名单变化 + +黑名单变化时,触发 `OnBlackAdded` 或 `OnBlackDeleted` 事件,事件直接携带对应的黑名单用户信息: + +```ts +const handleBlackAdded = (blackUser: BlackUserItem) => { + // 按 blackUser.userID 加入或更新记录 +}; +const handleBlackDeleted = (blackUser: BlackUserItem) => { + // 按 blackUser.userID 移除记录 +}; + +OpenIMSDK.on(OpenIMEvent.OnBlackAdded, handleBlackAdded); +OpenIMSDK.on(OpenIMEvent.OnBlackDeleted, handleBlackDeleted); + +OpenIMSDK.off(OpenIMEvent.OnBlackAdded, handleBlackAdded); +OpenIMSDK.off(OpenIMEvent.OnBlackDeleted, handleBlackDeleted); +``` + +退出登录、切换账号或销毁黑名单状态时,取消这些监听。 diff --git a/content/zh/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx b/content/zh/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx new file mode 100644 index 0000000000..99558e7270 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx @@ -0,0 +1,19 @@ +--- +title: '将用户移出黑名单' +description: 'OpenIM React Native SDK 将用户移出黑名单。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/blacklist/remove-black' +--- + +调用 `removeBlack()` 将指定用户移出当前账号的黑名单。 + +```ts +await OpenIMSDK.removeBlack(blackUserID); +``` + +`blackUserID` 是要移出黑名单的用户 ID。移出后会触发 `OnBlackDeleted` 事件,监听方式见[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx new file mode 100644 index 0000000000..bf4c0d3ee7 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx @@ -0,0 +1,29 @@ +--- +title: '接受好友申请' +description: 'OpenIM React Native SDK 接受好友申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/accept-friend-application' +--- + +调用 `acceptFriendApplication()` 接受好友申请。 + +```ts +await OpenIMSDK.acceptFriendApplication({ + toUserID: applicantUserID, + handleMsg: '', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `toUserID` | `string` | 是 | 申请发起人的用户 ID。 | +| `handleMsg` | `string` | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | + +接受后会建立好友关系,并触发好友申请状态变化和 `OnFriendAdded` 事件。好友列表变化的监听方式见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx new file mode 100644 index 0000000000..38ff5e4bf7 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx @@ -0,0 +1,29 @@ +--- +title: '发送好友申请' +description: 'OpenIM React Native SDK 发送好友申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/add-friend' +--- + +调用 `addFriend()` 向指定用户发送好友申请。 + +```ts +await OpenIMSDK.addFriend({ + toUserID, + reqMsg, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `toUserID` | `string` | 是 | 要申请添加的用户 ID。 | +| `reqMsg` | `string` | 是 | 申请附言;没有内容时传空字符串。 | + +发送成功只表示好友申请已提交,不表示对方已经同意。申请状态变化时,可在[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)页面监听相关事件。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx new file mode 100644 index 0000000000..533abe91ee --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx @@ -0,0 +1,30 @@ +--- +title: '删除好友申请' +description: 'OpenIM React Native SDK 删除好友申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/delete-friend-requests' +--- + +调用 `deleteFriendRequests()` 批量删除好友申请记录。 + +## 参数说明 + +数组中的每一项使用以下字段: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `fromUserID` | `string` | 是 | 申请发起人的用户 ID。 | +| `toUserID` | `string` | 是 | 申请接收人的用户 ID。 | + +```ts +await OpenIMSDK.deleteFriendRequests([ + { fromUserID, toUserID }, +]); +``` + +删除记录不等于拒绝申请,也不会删除已经建立的好友关系。申请记录变化时,可在[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)页面监听 `OnFriendApplicationDeleted`。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx new file mode 100644 index 0000000000..699bbd30db --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -0,0 +1,29 @@ +--- +title: '获取发出的好友申请' +description: 'OpenIM React Native SDK 获取发出的好友申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant' +--- + +调用 `getFriendApplicationListAsApplicant()` 分页查询当前用户发出的好友申请。 + +```ts +const applications = await OpenIMSDK.getFriendApplicationListAsApplicant({ + offset: 0, + count: 20, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次请求的申请数量。 | + +返回当前页的 `FriendApplicationItem[]`。申请记录字段见[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx new file mode 100644 index 0000000000..12b47537e1 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -0,0 +1,84 @@ +--- +title: '获取收到的好友申请' +description: 'OpenIM React Native SDK 获取收到的好友申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient' +--- + +调用 `getFriendApplicationListAsRecipient()` 分页查询当前用户收到的好友申请。 + +```ts +const applications = await OpenIMSDK.getFriendApplicationListAsRecipient({ + handleResults: [ApplicationHandleResult.Unprocessed], + offset: 0, + count: 20, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `handleResults` | `number[]` | 是 | 要查询的申请处理结果。 | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次请求的申请数量。 | + +| 枚举值 | 数值 | 含义 | +| --- | --- | --- | +| `ApplicationHandleResult.Unprocessed` | `0` | 待处理。 | +| `ApplicationHandleResult.Agree` | `1` | 已同意。 | +| `ApplicationHandleResult.Reject` | `-1` | 已拒绝。 | + +返回当前页的 `FriendApplicationItem[]`。 + +### 好友申请字段 + +`FriendApplicationItem` 类型字段说明: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `fromUserID` | `string` | 申请发起人的用户 ID。 | +| `fromNickname` | `string` | 申请发起人的昵称。 | +| `fromFaceURL` | `string` | 申请发起人的头像地址。 | +| `toUserID` | `string` | 申请接收人的用户 ID。 | +| `toNickname` | `string` | 申请接收人的昵称。 | +| `toFaceURL` | `string` | 申请接收人的头像地址。 | +| `reqMsg` | `string` | 申请附言。 | +| `handleResult` | `ApplicationHandleResult` | 当前处理结果。 | +| `handlerUserID` | `string` | 执行处理的用户 ID。 | +| `handleMsg` | `string` | 处理时填写的说明。 | +| `handleTime` | `number` | 处理时间。 | +| `createTime` | `number` | 申请记录创建时间。 | +| `ex` | `string` | 申请记录扩展字符串。 | + +## 监听好友申请变化 + +好友申请变化时,触发 `OnFriendApplicationAdded`、`OnFriendApplicationAccepted`、`OnFriendApplicationRejected` 或 `OnFriendApplicationDeleted` 事件。事件直接携带 `FriendApplicationItem`: + +```ts +const handleApplicationChanged = (application: FriendApplicationItem) => { + // 按 fromUserID 和 toUserID 更新申请记录 +}; +const handleApplicationDeleted = (application: FriendApplicationItem) => { + // 按 fromUserID 和 toUserID 移除申请记录 +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted); +``` + +申请记录使用 `fromUserID` 和 `toUserID` 共同定位。退出登录、切换账号或销毁申请列表状态时,取消这些监听。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx new file mode 100644 index 0000000000..d85b9e2c84 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx @@ -0,0 +1,27 @@ +--- +title: '获取未处理好友申请数' +description: 'OpenIM React Native SDK 获取未处理好友申请数。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count' +--- + +调用 `getFriendApplicationUnhandledCount()` 查询指定时间点之后未处理的好友申请数量。 + +```ts +const count = await OpenIMSDK.getFriendApplicationUnhandledCount({ + time, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `time` | `number` | 是 | 查询起始时间,通常使用上次查看申请列表的时间。 | + +返回该时间点之后的未处理好友申请数量。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx b/content/zh/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx new file mode 100644 index 0000000000..55b70b9042 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx @@ -0,0 +1,29 @@ +--- +title: '拒绝好友申请' +description: 'OpenIM React Native SDK 拒绝好友申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friend-applications/refuse-friend-application' +--- + +调用 `refuseFriendApplication()` 拒绝好友申请。 + +```ts +await OpenIMSDK.refuseFriendApplication({ + toUserID: applicantUserID, + handleMsg: '', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `toUserID` | `string` | 是 | 申请发起人的用户 ID。 | +| `handleMsg` | `string` | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | + +申请状态变化时,可在[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)页面监听相关事件。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friends/check-friend.mdx b/content/zh/docs/chat/sdk/react-native/user/friends/check-friend.mdx new file mode 100644 index 0000000000..fdfb604bdb --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friends/check-friend.mdx @@ -0,0 +1,26 @@ +--- +title: '检查好友关系' +description: 'OpenIM React Native SDK 检查好友关系。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/check-friend' +--- + +调用 `checkFriend()` 批量检查当前用户与指定用户的好友关系。 + +```ts +const checks = await OpenIMSDK.checkFriend(['user_a', 'user_b']); +``` + +返回的 `FriendshipInfo[]` 与输入用户 ID 按 `userID` 对应: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 被检查用户的 ID。 | +| `result` | `number` | `1` 表示是好友,`0` 表示不是好友。 | + +需要判断黑名单关系时,另行调用[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friends/delete-friend.mdx b/content/zh/docs/chat/sdk/react-native/user/friends/delete-friend.mdx new file mode 100644 index 0000000000..3751d52165 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friends/delete-friend.mdx @@ -0,0 +1,19 @@ +--- +title: '删除好友' +description: 'OpenIM React Native SDK 删除好友。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/delete-friend' +--- + +调用 `deleteFriend()` 删除当前用户与指定用户的好友关系。 + +```ts +await OpenIMSDK.deleteFriend(friendUserID); +``` + +`friendUserID` 是要删除的好友用户 ID。删除好友后会触发 `OnFriendDeleted` 事件,事件携带被删除好友的信息;好友列表的监听方式见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx b/content/zh/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx new file mode 100644 index 0000000000..40bef5eb53 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx @@ -0,0 +1,79 @@ +--- +title: '分页获取好友列表' +description: 'OpenIM React Native SDK 分页获取好友列表。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/get-friend-list-page' +--- + +调用 `getFriendListPage()` 分页获取当前用户的好友列表。 + +```ts +const friends = await OpenIMSDK.getFriendListPage({ + offset: 0, + count: 50, + filterBlack: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次请求的好友数量。 | +| `filterBlack` | `boolean` | 否 | 是否过滤黑名单用户。 | + +返回当前页的 `FriendUserItem[]`。继续加载时按请求条目数增加 `offset`;好友增删后重新请求列表。 + +### 好友信息字段 + +`FriendUserItem` 类型字段说明: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 好友用户 ID。 | +| `nickname` | `string` | 好友昵称。 | +| `faceURL` | `string` | 好友头像地址。 | +| `remark` | `string` | 当前用户为好友设置的备注。 | +| `isPinned` | `boolean` | 是否置顶。 | +| `ownerUserID` | `string` | 好友关系所属用户 ID。 | +| `operatorUserID` | `string` | 最近执行关系操作的用户 ID。 | +| `addSource` | `number` | 好友关系添加来源。 | +| `createTime` | `number` | 好友关系创建时间。 | +| `ex` | `string` | 好友关系扩展字段。 | +| `attachedInfo` | `string` | SDK 附加信息。 | + +`remark`、`isPinned` 和 `ex` 属于好友关系,不是账号级用户信息。 + +## 监听好友变化 + +好友关系变化时,触发 `OnFriendAdded`、`OnFriendInfoChanged` 或 `OnFriendDeleted` 事件。事件直接携带对应的好友信息: + +```ts +const handleFriendAdd = (friend: FriendUserItem) => { + // 新增好友 +}; +const handleFriendChanged = (friend: FriendUserItem) => { + // 按 friend.userID 更新好友列表 +}; +const handleFriendDeleted = (friend: FriendUserItem) => { + // 按 friend.userID 从好友列表移除 +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnFriendAdded, handleFriendAdd); +OpenIMSDK.on(OpenIMEvent.OnFriendInfoChanged, handleFriendChanged); +OpenIMSDK.on(OpenIMEvent.OnFriendDeleted, handleFriendDeleted); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnFriendAdded, handleFriendAdd); +OpenIMSDK.off(OpenIMEvent.OnFriendInfoChanged, handleFriendChanged); +OpenIMSDK.off(OpenIMEvent.OnFriendDeleted, handleFriendDeleted); +``` + +退出登录、切换账号或销毁好友列表状态时,取消这些监听。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx b/content/zh/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx new file mode 100644 index 0000000000..921f03067f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx @@ -0,0 +1,31 @@ +--- +title: '查询指定好友资料' +description: 'OpenIM React Native SDK 查询指定好友资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/get-specified-friends-info' +--- + +调用 `getSpecifiedFriendsInfo()` 按用户 ID 查询指定好友的关系信息。 + +```ts +const friends = await OpenIMSDK.getSpecifiedFriendsInfo({ + userIDList: ['user_a', 'user_b'], + filterBlack: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `userIDList` | `string[]` | 是 | 要查询的用户 ID 列表。 | +| `filterBlack` | `boolean` | 否 | 是否过滤黑名单用户。 | + +返回匹配的 `FriendUserItem[]`,数组不保证与输入 ID 按位置一一对应。字段说明见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。 + +查询陌生人的公开用户信息时,使用[获取用户资料](/sdk/react-native/user/profile/get-users-info)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friends/search-friends.mdx b/content/zh/docs/chat/sdk/react-native/user/friends/search-friends.mdx new file mode 100644 index 0000000000..15df553a78 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friends/search-friends.mdx @@ -0,0 +1,33 @@ +--- +title: '搜索好友' +description: 'OpenIM React Native SDK 搜索好友。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/search-friends' +--- + +调用 `searchFriends()` 搜索当前用户的好友。提交搜索前应去除关键词首尾空格;当前请求使用 `keywordList` 中的第一个非空关键词。 + +```ts +const friends = await OpenIMSDK.searchFriends({ + keywordList: [keyword.trim()], + isSearchUserID: true, + isSearchNickname: true, + isSearchRemark: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | 是 | 搜索关键词数组,当前使用第一个非空关键词。 | +| `isSearchUserID` | `boolean` | 是 | 是否匹配用户 ID。 | +| `isSearchNickname` | `boolean` | 是 | 是否匹配好友昵称。 | +| `isSearchRemark` | `boolean` | 是 | 是否匹配好友备注。 | + +返回 `SearchedFriendsInfo[]`。每项包含好友信息字段和 `relationship`:`0` 表示黑名单关系,`1` 表示好友关系。 diff --git a/content/zh/docs/chat/sdk/react-native/user/friends/update-friends.mdx b/content/zh/docs/chat/sdk/react-native/user/friends/update-friends.mdx new file mode 100644 index 0000000000..eb257ef697 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/friends/update-friends.mdx @@ -0,0 +1,32 @@ +--- +title: '更新好友资料' +description: 'OpenIM React Native SDK 更新好友资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/friends/update-friends' +--- + +使用 `updateFriends()` 更新 `friendUserIDs` 中的所有好友。 + +```ts +await OpenIMSDK.updateFriends({ + friendUserIDs: [friendUserID], + remark: remark, + isPinned: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表。 | +| `remark` | `string` | 否 | 新备注。 | +| `isPinned` | `boolean` | 否 | 是否置顶。 | +| `ex` | `string` | 否 | 新扩展字符串。 | + +除 `friendUserIDs` 外,至少传入一个要更新的字段。不同好友需要不同值时,分别调用该方法。更新好友资料后会触发 `OnFriendInfoChanged` 事件,监听方式见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx b/content/zh/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx new file mode 100644 index 0000000000..617efe3839 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx @@ -0,0 +1,19 @@ +--- +title: '获取已订阅用户状态' +description: 'OpenIM React Native SDK 获取已订阅用户状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/online-status/get-subscribe-users-status' +--- + +调用 `getSubscribeUsersStatus()` 获取当前账号已订阅用户的在线状态。 + +```ts +const states = await OpenIMSDK.getSubscribeUsersStatus(); +``` + +返回已订阅用户的 `UserOnlineState[]`。目标用户尚未订阅时,请先调用[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx b/content/zh/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx new file mode 100644 index 0000000000..fad6c9243f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx @@ -0,0 +1,46 @@ +--- +title: '订阅用户在线状态' +description: 'OpenIM React Native SDK 订阅用户在线状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/online-status/subscribe-users-status' +--- + +调用 `subscribeUsersStatus()` 订阅指定用户的在线状态。建议只订阅当前界面需要展示的用户。 + +```ts +const userIDs = [...new Set(visibleUserIDs.filter(Boolean))]; +const states = await OpenIMSDK.subscribeUsersStatus(userIDs); +``` + +返回这些用户当前的 `UserOnlineState[]`,字段如下: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 状态所属用户的 ID。 | +| `status` | `OnlineState` | `OnlineState.Online` 表示在线,`OnlineState.Offline` 表示离线。 | +| `platformIDs` | `Platform[]`(可选) | 用户当前在线的平台列表。 | + +在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看应用或某个会话。 + +## 监听在线状态变化 + +订阅用户的在线状态变化时,触发 `OnUserStatusChanged` 事件: + +```ts +const handleStatusChanged = (state: UserOnlineState) => { + // 按 state.userID 更新在线状态 +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnUserStatusChanged, handleStatusChanged); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnUserStatusChanged, handleStatusChanged); +``` + +退出登录、切换账号或不再需要展示这些用户时,取消订阅并移除监听。 diff --git a/content/zh/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx b/content/zh/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx new file mode 100644 index 0000000000..ef6631bc7c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx @@ -0,0 +1,19 @@ +--- +title: '取消订阅用户状态' +description: 'OpenIM React Native SDK 取消订阅用户状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/online-status/unsubscribe-users-status' +--- + +调用 `unsubscribeUsersStatus()` 取消订阅指定用户的在线状态。 + +```ts +await OpenIMSDK.unsubscribeUsersStatus(userIDs); +``` + +页面翻页、搜索结果变化、退出登录或不再需要展示这些用户时,应取消对应订阅。 diff --git a/content/zh/docs/chat/sdk/react-native/user/overview-relationships.mdx b/content/zh/docs/chat/sdk/react-native/user/overview-relationships.mdx new file mode 100644 index 0000000000..d0ce476de2 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/overview-relationships.mdx @@ -0,0 +1,44 @@ +--- +title: '关系链概览' +description: '了解 React Native SDK 中的好友、好友申请和黑名单能力。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/overview-relationships' +--- + +关系链记录当前用户与其他用户之间的好友关系、好友申请和黑名单。用户资料、账号设置和在线状态属于用户能力,见[用户概览](/sdk/react-native/user/overview-user)。 + +## 关系链对象 + +React Native SDK 会根据使用场景返回不同的对象: + +| 类型 | 适用场景 | 主要 API | +| --- | --- | --- | +| `PublicUserItem` | 查询公开用户资料、展示好友候选人或陌生人资料卡 | `getUsersInfo()` | +| `FriendUserItem` | 好友列表、好友备注、置顶和关系扩展字段 | `getFriendListPage()`、`getSpecifiedFriendsInfo()` | +| `FriendshipInfo` | 检查当前用户与目标用户的好友关系 | `checkFriend()` | +| `FriendApplicationItem` | 收到或发出的好友申请及其处理状态 | `getFriendApplicationListAsRecipient()`、`getFriendApplicationListAsApplicant()` | +| `BlackUserItem` | 当前账号维护的黑名单关系 | `getBlackList()`、`addBlack()`、`removeBlack()` | + +## 功能入口 + +| 需求 | 推荐页面 | +| --- | --- | +| 查询公开用户资料 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) | +| 分页、搜索或按 ID 查询好友关系 | [分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)、[搜索好友](/sdk/react-native/user/friends/search-friends)、[查询指定好友资料](/sdk/react-native/user/friends/get-specified-friends-info) | +| 检查好友关系 | [检查好友关系](/sdk/react-native/user/friends/check-friend) | +| 更新或删除好友关系 | [更新好友资料](/sdk/react-native/user/friends/update-friends)、[删除好友](/sdk/react-native/user/friends/delete-friend) | +| 发送或处理好友申请 | [发送好友申请](/sdk/react-native/user/friend-applications/add-friend)、[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)、[接受好友申请](/sdk/react-native/user/friend-applications/accept-friend-application)、[拒绝好友申请](/sdk/react-native/user/friend-applications/refuse-friend-application) | +| 查看和维护黑名单 | [获取黑名单](/sdk/react-native/user/blacklist/get-black-list)、[将用户加入黑名单](/sdk/react-native/user/blacklist/add-black)、[将用户移出黑名单](/sdk/react-native/user/blacklist/remove-black) | + +## 事件监听 + +关系链状态变化会触发事件,具体的事件监听详见: + +- 好友申请变化见[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)。 +- 好友关系和好友资料变化见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。 +- 黑名单变化见[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/overview-user.mdx b/content/zh/docs/chat/sdk/react-native/user/overview-user.mdx new file mode 100644 index 0000000000..9d613c295a --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/overview-user.mdx @@ -0,0 +1,46 @@ +--- +title: '用户概览' +description: '了解 React Native SDK 中的当前用户资料、公开用户资料、账号设置和在线状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/overview-user' +--- + +OpenIM React Native SDK 使用 `userID` 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。 + +好友、好友申请和黑名单属于用户之间的关系链能力,见[关系链概览](/sdk/react-native/user/overview-relationships)。 + +## 用户相关类型 + +React Native SDK 会根据使用场景返回不同的用户对象: + +| 类型 | 适用场景 | 主要 API | +| --- | --- | --- | +| `SelfUserInfo` | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | `getSelfUserInfo()`、`setSelfInfo()` | +| `PublicUserItem` | 查询应用用户和展示公开资料卡 | `getUsersInfo()` | +| `UserOnlineState` | 用户在线状态和在线平台列表 | `subscribeUsersStatus()`、`getSubscribeUsersStatus()`、`unsubscribeUsersStatus()` | + +`SelfUserInfo` 表示当前登录用户,`PublicUserItem` 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。 + +## 功能入口 + +| 需求 | 推荐页面 | +| --- | --- | +| 按 `userID` 查询公开资料,用于展示资料卡 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) | +| 读取或更新当前用户的昵称、头像和扩展信息 | [获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info) | +| 设置账号级消息接收方式 | [设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception) | +| 设置其他用户添加当前账号时的处理策略 | [设置好友添加权限](/sdk/react-native/user/profile/set-friend-add-permission) | +| 订阅、读取和取消订阅在线状态 | [订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)、[获取已订阅用户状态](/sdk/react-native/user/online-status/get-subscribe-users-status)、[取消订阅用户状态](/sdk/react-native/user/online-status/unsubscribe-users-status) | +| 管理好友、好友申请或黑名单 | [关系链概览](/sdk/react-native/user/overview-relationships) | + +## 事件监听 + +用户状态变化会触发事件,具体的事件监听详见: + +- 当前用户资料变化见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。 +- 用户在线状态变化见[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。 +- 好友、好友申请和黑名单变化见[关系链概览](/sdk/react-native/user/overview-relationships)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx b/content/zh/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx new file mode 100644 index 0000000000..5559bd5f91 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx @@ -0,0 +1,32 @@ +--- +title: '获取当前用户资料' +description: 'OpenIM React Native SDK 获取当前用户资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/get-self-user-info' +--- + +调用 `getSelfUserInfo()` 获取当前登录账号的用户信息。 + +```ts +const currentUser = await OpenIMSDK.getSelfUserInfo(); +``` + +## 返回结果 + +返回当前账号的 `SelfUserInfo`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,用于标识当前账号。 | +| `nickname` | `string` | 账号级昵称。 | +| `faceURL` | `string` | 账号级头像地址。 | +| `createTime` | `number` | 用户记录创建时间。 | +| `globalRecvMsgOpt` | `MessageReceiveOptType` | 当前账号的全局消息接收方式。 | +| `ex` | `string` | 由业务约定的账号级扩展字符串。 | + +完成初始化并登录后调用该方法,可用于展示当前账号的头像、昵称和全局消息接收设置。切换账号时,清理已保存的当前用户信息。 diff --git a/content/zh/docs/chat/sdk/react-native/user/profile/get-users-info.mdx b/content/zh/docs/chat/sdk/react-native/user/profile/get-users-info.mdx new file mode 100644 index 0000000000..e7f92bda8d --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/profile/get-users-info.mdx @@ -0,0 +1,39 @@ +--- +title: '获取用户资料' +description: 'OpenIM React Native SDK 获取用户资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/get-users-info' +--- + +调用 `getUsersInfo()` 按用户 ID 批量查询公开用户信息,适合用于展示好友候选人或陌生人资料卡的业务场景。 + +如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo()。 + +```ts +const userIDList = Array.from(new Set(['user_a', 'user_b'])); +const users = await OpenIMSDK.getUsersInfo(userIDList); +``` + +## 参数说明 + +`userIDList` 是要查询的用户 ID 数组。调用前建议去重,并控制单次请求数量。 + +## 返回结果 + +返回查询到的 `PublicUserItem[]`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | OpenIMSDK 用户 ID。 | +| `nickname` | `string` | 账号级公开昵称。 | +| `faceURL` | `string` | 账号级公开头像地址。 | +| `ex` | `string` | 账号级扩展字段,格式由业务约定。 | + +返回数组不保证与输入 ID 按位置一一对应。 + +该接口只读取其他用户的公开信息。如果要获取用户自己的信息,详见:[获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx b/content/zh/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx new file mode 100644 index 0000000000..5d1ea93ead --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx @@ -0,0 +1,29 @@ +--- +title: '设置好友添加权限' +description: 'OpenIM React Native SDK 设置好友添加权限。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/set-friend-add-permission' +--- + +`addFriendPermission` 控制其他用户添加当前账号时,是否需要当前用户确认。使用 `setSelfInfo()` 更新该账号级设置: + +```ts +await OpenIMSDK.setSelfInfo({ + addFriendPermission: AddFriendPermission.AddFriendAllowed, +}); +``` + +## 参数说明 + +| 枚举值 | 数值 | 含义 | +| --- | --- | --- | +| `AddFriendPermission.AddFriendAllowed` | `0` | 允许添加,但需要当前用户审核好友申请。 | +| `AddFriendPermission.AddFriendAllowedNoReview` | `1` | 允许添加,并直接建立好友关系,无需当前用户审核。 | +| `AddFriendPermission.AddFriendDenied` | `2` | 不允许其他用户添加当前账号。 | + +此设置只影响后续的添加行为,不会删除已有好友关系,也不会自动处理已经存在的待审核申请。设置完成后,当前用户信息会通过 `OnSelfInfoUpdated` 事件更新,监听方式见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。 diff --git a/content/zh/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx b/content/zh/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx new file mode 100644 index 0000000000..afcc320e3a --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx @@ -0,0 +1,30 @@ +--- +title: '设置全局消息接收方式' +description: 'OpenIM React Native SDK 设置全局消息接收方式。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/set-global-message-reception' +--- + +`globalRecvMsgOpt` 是当前账号的全局消息接收方式。使用 `setSelfInfo()` 更新该字段: + +```ts +await OpenIMSDK.setSelfInfo({ + globalRecvMsgOpt: MessageReceiveOptType.NotNotify, +}); +``` + +## 参数说明 + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `MessageReceiveOptType.Normal` | `0` | 正常接收消息,并允许通知。 | +| `MessageReceiveOptType.NotNotify` | `2` | 接收消息,但不通知。 | + +设置完成后,当前用户信息会通过 `OnSelfInfoUpdated` 事件更新,事件监听方式见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。 + +全局消息接收方式是账号级设置;单个会话还可以使用会话级消息接收设置。 diff --git a/content/zh/docs/chat/sdk/react-native/user/profile/set-self-info.mdx b/content/zh/docs/chat/sdk/react-native/user/profile/set-self-info.mdx new file mode 100644 index 0000000000..565141ef22 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/user/profile/set-self-info.mdx @@ -0,0 +1,52 @@ +--- +title: '更新当前用户资料' +description: 'OpenIM React Native SDK 更新当前用户资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/user/profile/set-self-info' +--- + +`setSelfInfo()` 更新当前登录账号的基础展示资料。只传入本次需要更新的 `nickname`、`faceURL` 或 `ex`。 + +```ts +await OpenIMSDK.setSelfInfo({ + nickname: nickname.trim(), + faceURL, + ex: mergedExtra, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `nickname` | `string` | 否 | 新昵称。 | +| `faceURL` | `string` | 否 | 新头像地址。 | +| `ex` | `string` | 否 | 扩展用户信息。 | + +至少传入一个实际要更新的资料字段。 + +`ex` 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展用户信息。 +更新当前用户资料后会触发 `OnSelfInfoUpdated` 事件,事件会携带更新后的用户信息。 + +## 监听当前用户资料变化 + +用户个人信息更新时,触发 `OnSelfInfoUpdated` 事件,以下为设置监听的示例: + +```ts +function handleSelfInfoUpdated(selfUserInfo: SelfUserInfo) { + // ... +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated); +``` + +退出登录、切换账号或销毁用户状态层时,要取消监听。 diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index e26d1cb2df..0a36a6049b 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -6678,5 +6678,213 @@ "context": "chat/sdk/common", "template": "guide", "contentFile": "content/docs/chat/sdk/error-codes.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/overview-user", + "openimPath": "/sdk/react-native/user/overview-user", + "title": "User overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/overview-user.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/overview-relationships", + "openimPath": "/sdk/react-native/user/overview-relationships", + "title": "Relationships overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/overview-relationships.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/profile/get-users-info", + "openimPath": "/sdk/react-native/user/profile/get-users-info", + "title": "Get user profiles", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/profile/get-self-user-info", + "openimPath": "/sdk/react-native/user/profile/get-self-user-info", + "title": "Get your profile", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/profile/set-self-info", + "openimPath": "/sdk/react-native/user/profile/set-self-info", + "title": "Update your profile", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/profile/set-global-message-reception", + "openimPath": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "Set global message reception", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/profile/set-friend-add-permission", + "openimPath": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/online-status/subscribe-users-status", + "openimPath": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "openimPath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "openimPath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friends/get-friend-list-page", + "openimPath": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "Get the friend list", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friends/search-friends", + "openimPath": "/sdk/react-native/user/friends/search-friends", + "title": "Search friends", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friends/search-friends.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friends/get-specified-friends-info", + "openimPath": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friends/check-friend", + "openimPath": "/sdk/react-native/user/friends/check-friend", + "title": "Check friendship", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friends/check-friend.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friends/update-friends", + "openimPath": "/sdk/react-native/user/friends/update-friends", + "title": "Update friend information", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friends/update-friends.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friends/delete-friend", + "openimPath": "/sdk/react-native/user/friends/delete-friend", + "title": "Delete a friend", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/add-friend", + "openimPath": "/sdk/react-native/user/friend-applications/add-friend", + "title": "Send a friend request", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "openimPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend requests", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "openimPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend requests", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "openimPath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get the unhandled friend-request count", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "openimPath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "Accept a friend request", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "openimPath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "Reject a friend request", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "openimPath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "Delete friend requests", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/blacklist/get-black-list", + "openimPath": "/sdk/react-native/user/blacklist/get-black-list", + "title": "Get the blocklist", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/blacklist/add-black", + "openimPath": "/sdk/react-native/user/blacklist/add-black", + "title": "Block a user", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/blacklist/remove-black", + "openimPath": "/sdk/react-native/user/blacklist/remove-black", + "title": "Unblock a user", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx" } ] diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json new file mode 100644 index 0000000000..d07debe9d6 --- /dev/null +++ b/data/structure/react-native-content-audit.json @@ -0,0 +1,1200 @@ +{ + "schemaVersion": 1, + "sources": { + "openimDocs": { + "repository": "https://github.com/openimsdk/docs", + "commit": "efd0f251b288167e1ca617504b10dd73986429f0" + }, + "reactNativeSdk": { + "package": "@openim/rn-client-sdk-enterprise", + "tag": "3.8.5", + "version": "3.8.5", + "repository": "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative", + "commit": "fa1e4084a374d381bd2b3e45abc43447b296894c" + } + }, + "pages": [ + { + "currentPath": "/sdk/react-native/overview", + "targetPath": "/sdk/react-native/overview", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍文档范围和领域入口。" + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍文档范围和领域入口。" + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/overview-user", + "targetPath": "/sdk/react-native/user/overview-user", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍文档范围和领域入口。" + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍文档范围和领域入口。" + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/profile/get-users-info", + "targetPath": "/sdk/react-native/user/profile/get-users-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getUsersInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/profile/get-self-user-info", + "targetPath": "/sdk/react-native/user/profile/get-self-user-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getSelfUserInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/profile/set-self-info", + "targetPath": "/sdk/react-native/user/profile/set-self-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setSelfInfo" + ], + "sdkEvents": [ + "OnSelfInfoUpdated" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/profile/set-global-message-reception", + "targetPath": "/sdk/react-native/user/profile/set-global-message-reception", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/profile/set-friend-add-permission", + "targetPath": "/sdk/react-native/user/profile/set-friend-add-permission", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/online-status/subscribe-users-status", + "targetPath": "/sdk/react-native/user/online-status/subscribe-users-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "subscribeUsersStatus" + ], + "sdkEvents": [ + "OnUserStatusChanged" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "targetPath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getSubscribeUsersStatus" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "targetPath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "unsubscribeUsersStatus" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/overview-relationships", + "targetPath": "/sdk/react-native/user/overview-relationships", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍文档范围和领域入口。" + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍文档范围和领域入口。" + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friends/get-friend-list-page", + "targetPath": "/sdk/react-native/user/friends/get-friend-list-page", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getFriendListPage" + ], + "sdkEvents": [ + "OnFriendInfoChanged", + "OnFriendAdded", + "OnFriendDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friends/search-friends", + "targetPath": "/sdk/react-native/user/friends/search-friends", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "searchFriends" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friends/get-specified-friends-info", + "targetPath": "/sdk/react-native/user/friends/get-specified-friends-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getSpecifiedFriendsInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friends/check-friend", + "targetPath": "/sdk/react-native/user/friends/check-friend", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "checkFriend" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friends/update-friends", + "targetPath": "/sdk/react-native/user/friends/update-friends", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "updateFriends" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friends/delete-friend", + "targetPath": "/sdk/react-native/user/friends/delete-friend", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteFriend" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/add-friend", + "targetPath": "/sdk/react-native/user/friend-applications/add-friend", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "addFriend" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "targetPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getFriendApplicationListAsRecipient" + ], + "sdkEvents": [ + "OnFriendApplicationAccepted", + "OnFriendApplicationAdded", + "OnFriendApplicationDeleted", + "OnFriendApplicationRejected" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "targetPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getFriendApplicationListAsApplicant" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "targetPath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getFriendApplicationUnhandledCount" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "targetPath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "acceptFriendApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "targetPath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "refuseFriendApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "targetPath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteFriendRequests" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/blacklist/get-black-list", + "targetPath": "/sdk/react-native/user/blacklist/get-black-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getBlackList" + ], + "sdkEvents": [ + "OnBlackAdded", + "OnBlackDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/blacklist/add-black", + "targetPath": "/sdk/react-native/user/blacklist/add-black", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "addBlack" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/user/blacklist/remove-black", + "targetPath": "/sdk/react-native/user/blacklist/remove-black", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "removeBlack" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] + } + ] +} diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json new file mode 100644 index 0000000000..74269b1b8b --- /dev/null +++ b/data/structure/react-native-navigation-labels.json @@ -0,0 +1,47 @@ +{ + "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", + "User": "用户", + "User profile": "用户资料", + "Online status": "在线状态", + "Relationships": "关系链", + "Friends": "好友", + "Friend applications": "好友申请", + "Blacklist": "黑名单", + "User overview": "用户概览", + "Get user profiles": "获取用户资料", + "Get your profile": "获取当前用户资料", + "Update your profile": "更新当前用户资料", + "Set global message reception": "设置全局消息接收方式", + "Set friend request permissions": "设置好友申请权限", + "Subscribe to online status": "订阅用户在线状态", + "Get subscribed user status": "查询已订阅用户状态", + "Unsubscribe from online status": "取消订阅用户状态", + "Relationships overview": "关系链概览", + "Get the friend list": "分页获取好友列表", + "Search friends": "搜索好友", + "Get friend profiles": "查询指定好友资料", + "Check friendship": "检查好友关系", + "Check friendship status": "检查好友关系", + "Update friend information": "更新好友资料", + "Delete a friend": "删除好友", + "Send a friend request": "发送好友申请", + "Send a friend application": "发送好友申请", + "Get received friend requests": "获取收到的好友申请", + "Get received friend applications": "获取收到的好友申请", + "Get sent friend requests": "获取发出的好友申请", + "Get sent friend applications": "获取发出的好友申请", + "Get the unhandled friend-request count": "获取待处理好友申请数量", + "Get pending application count": "获取未处理好友申请数", + "Accept a friend request": "同意好友申请", + "Accept a friend application": "接受好友申请", + "Reject a friend request": "拒绝好友申请", + "Reject a friend application": "拒绝好友申请", + "Delete friend requests": "删除好友申请", + "Delete friend applications": "删除好友申请", + "Get the blocklist": "获取黑名单", + "Get the blacklist": "获取黑名单", + "Block a user": "将用户加入黑名单", + "Add a user to the blacklist": "将用户加入黑名单", + "Unblock a user": "将用户移出黑名单", + "Remove a user from the blacklist": "将用户移出黑名单" +} diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json new file mode 100644 index 0000000000..c0e3037447 --- /dev/null +++ b/data/structure/react-native-sidebar.json @@ -0,0 +1,152 @@ +{ + "schemaVersion": 1, + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "sidebarExpansion": "active-path", + "nodes": [ + "/sdk/react-native/overview", + { + "id": "user", + "title": "User", + "children": [ + { + "path": "/sdk/react-native/user/overview-user", + "navigationTitle": "User overview" + }, + { + "id": "user-profile", + "title": "User profile", + "children": [ + { + "path": "/sdk/react-native/user/profile/get-users-info", + "navigationTitle": "Get user profiles" + }, + { + "path": "/sdk/react-native/user/profile/get-self-user-info", + "navigationTitle": "Get your profile" + }, + { + "path": "/sdk/react-native/user/profile/set-self-info", + "navigationTitle": "Update your profile" + } + ] + }, + { + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "navigationTitle": "Set global message reception" + }, + { + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "navigationTitle": "Set friend request permissions" + }, + { + "id": "online-status", + "title": "Online status", + "children": [ + { + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "navigationTitle": "Subscribe to online status" + }, + { + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "navigationTitle": "Get subscribed user status" + }, + { + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "navigationTitle": "Unsubscribe from online status" + } + ] + } + ] + }, + { + "id": "relationships", + "title": "Relationships", + "children": [ + "/sdk/react-native/user/overview-relationships", + { + "id": "friends", + "title": "Friends", + "children": [ + { + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "navigationTitle": "Get the friend list" + }, + { + "path": "/sdk/react-native/user/friends/search-friends", + "navigationTitle": "Search friends" + }, + { + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "navigationTitle": "Get friend profiles" + }, + { + "path": "/sdk/react-native/user/friends/check-friend", + "navigationTitle": "Check friendship status" + }, + { + "path": "/sdk/react-native/user/friends/update-friends", + "navigationTitle": "Update friend information" + }, + { + "path": "/sdk/react-native/user/friends/delete-friend", + "navigationTitle": "Delete a friend" + }, + { + "id": "friend-applications", + "title": "Friend applications", + "children": [ + { + "path": "/sdk/react-native/user/friend-applications/add-friend", + "navigationTitle": "Send a friend application" + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "navigationTitle": "Get received friend applications" + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "navigationTitle": "Get sent friend applications" + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "navigationTitle": "Get pending application count" + }, + { + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "navigationTitle": "Accept a friend application" + }, + { + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "navigationTitle": "Reject a friend application" + }, + { + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "navigationTitle": "Delete friend applications" + } + ] + } + ] + }, + { + "id": "blacklist", + "title": "Blacklist", + "children": [ + { + "path": "/sdk/react-native/user/blacklist/get-black-list", + "navigationTitle": "Get the blacklist" + }, + { + "path": "/sdk/react-native/user/blacklist/add-black", + "navigationTitle": "Add a user to the blacklist" + }, + { + "path": "/sdk/react-native/user/blacklist/remove-black", + "navigationTitle": "Remove a user from the blacklist" + } + ] + } + ] + } + ] +} diff --git a/scripts/__tests__/client-sdk-sidebar.test.mjs b/scripts/__tests__/client-sdk-sidebar.test.mjs index 5b2bab00e7..562c9f726d 100644 --- a/scripts/__tests__/client-sdk-sidebar.test.mjs +++ b/scripts/__tests__/client-sdk-sidebar.test.mjs @@ -12,7 +12,7 @@ import { const wasmSidebar = readJson('data/structure/wasm-sidebar.json'); test('registers the supported client SDK platforms and their structure paths', () => { - assert.deepEqual(clientSdkPlatformIds, ['android', 'ios', 'flutter', 'wasm']); + assert.deepEqual(clientSdkPlatformIds, ['android', 'ios', 'flutter', 'wasm', 'react-native']); assert.deepEqual(getClientSdkPlatform('android'), { id: 'android', contextKey: 'chat/sdk/android', @@ -42,6 +42,7 @@ test('registers the supported client SDK platforms and their structure paths', ( assert.equal(getClientSdkPlatform('flutter').contextKey, 'chat/sdk/flutter'); assert.equal(getClientSdkPlatform('wasm').contextKey, 'chat/sdk/wasm'); assert.throws(() => getClientSdkPlatform('unknown'), /Unknown client SDK platform: unknown/); + assert.equal(getClientSdkPlatform('react-native').contextKey, 'chat/sdk/react-native'); }); test('native sidebars keep unique platform routes and may extend the WASM structure', () => { diff --git a/scripts/build-client-sdk-zh-content.mjs b/scripts/build-client-sdk-zh-content.mjs index ab8744aca0..d6d1d60794 100644 --- a/scripts/build-client-sdk-zh-content.mjs +++ b/scripts/build-client-sdk-zh-content.mjs @@ -142,7 +142,7 @@ export function resolvePlatformRoutes({ platform, routesData, sidebar }) { suffix === 'overview' ? platform.id === 'wasm' ? structuralRoute.title - : `OpenIM SDK for ${platform.id === 'ios' ? 'iOS' : platform.id === 'android' ? 'Android' : 'Flutter'}` + : `OpenIM SDK for ${platform.id === 'ios' ? 'iOS' : platform.id === 'android' ? 'Android' : platform.id === 'flutter' ? 'Flutter' : platform.id === 'react-native' ? 'React Native' : platform.id}` : structuralRoute.title, }; }); @@ -150,7 +150,7 @@ export function resolvePlatformRoutes({ platform, routesData, sidebar }) { async function main() { const requested = process.argv.slice(2).filter((value) => !value.startsWith('-')); - const platformIds = requested.length > 0 ? requested : ['android', 'ios', 'flutter', 'wasm']; + const platformIds = requested.length > 0 ? requested : ['android', 'ios', 'flutter', 'wasm', 'react-native']; for (const platformId of platformIds) { const output = await buildClientSdkLocalizedFile(platformId); console.log( diff --git a/scripts/lib/client-sdk-platforms.mjs b/scripts/lib/client-sdk-platforms.mjs index 724b7d4f2e..498221bd74 100644 --- a/scripts/lib/client-sdk-platforms.mjs +++ b/scripts/lib/client-sdk-platforms.mjs @@ -48,6 +48,19 @@ const clientSdkPlatforms = { sidebarPath: 'data/structure/wasm-sidebar.json', localizedOutputPath: 'src/generated/wasm-sdk-zh-content.json', }, + 'react-native': { + id: 'react-native', + contextKey: 'chat/sdk/react-native', + routePrefix: '/sdk/react-native', + manualRoot: 'content/zh/docs/chat/sdk/react-native', + auditPath: 'data/structure/react-native-content-audit.json', + labelsPath: 'data/structure/react-native-navigation-labels.json', + sidebarPath: 'data/structure/react-native-sidebar.json', + localizedOutputPath: 'src/generated/react-native-sdk-zh-content.json', + sdkSourceKey: 'reactNativeSdk', + sdkTag: '3.8.5', + sdkCommit: 'fa1e4084a374d381bd2b3e45abc43447b296894c', + }, }; export const clientSdkPlatformIds = Object.freeze(Object.keys(clientSdkPlatforms)); diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 1411d08647..0e1e750ee6 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -10052,9 +10052,339 @@ "type": "page", "children": [], "minIndex": 519 + }, + { + "id": "user", + "segment": "user", + "title": "User", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/overview-user", + "segment": "overview-user", + "title": "User overview", + "href": "/sdk/react-native/user/overview-user", + "type": "page", + "children": [], + "minIndex": 520, + "navigationTitle": "User overview" + }, + { + "id": "user-profile", + "segment": "user-profile", + "title": "User profile", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/profile/get-users-info", + "segment": "get-users-info", + "title": "Get user profiles", + "href": "/sdk/react-native/user/profile/get-users-info", + "type": "page", + "children": [], + "minIndex": 521, + "navigationTitle": "Get user profiles" + }, + { + "id": "user/profile/get-self-user-info", + "segment": "get-self-user-info", + "title": "Get your profile", + "href": "/sdk/react-native/user/profile/get-self-user-info", + "type": "page", + "children": [], + "minIndex": 522, + "navigationTitle": "Get your profile" + }, + { + "id": "user/profile/set-self-info", + "segment": "set-self-info", + "title": "Update your profile", + "href": "/sdk/react-native/user/profile/set-self-info", + "type": "page", + "children": [], + "minIndex": 523, + "navigationTitle": "Update your profile" + } + ], + "minIndex": 521 + }, + { + "id": "user/profile/set-global-message-reception", + "segment": "set-global-message-reception", + "title": "Set global message reception", + "href": "/sdk/react-native/user/profile/set-global-message-reception", + "type": "page", + "children": [], + "minIndex": 524, + "navigationTitle": "Set global message reception" + }, + { + "id": "user/profile/set-friend-add-permission", + "segment": "set-friend-add-permission", + "title": "Set friend request permissions", + "href": "/sdk/react-native/user/profile/set-friend-add-permission", + "type": "page", + "children": [], + "minIndex": 525, + "navigationTitle": "Set friend request permissions" + }, + { + "id": "online-status", + "segment": "online-status", + "title": "Online status", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/online-status/subscribe-users-status", + "segment": "subscribe-users-status", + "title": "Subscribe to online status", + "href": "/sdk/react-native/user/online-status/subscribe-users-status", + "type": "page", + "children": [], + "minIndex": 526, + "navigationTitle": "Subscribe to online status" + }, + { + "id": "user/online-status/get-subscribe-users-status", + "segment": "get-subscribe-users-status", + "title": "Get subscribed user status", + "href": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "type": "page", + "children": [], + "minIndex": 527, + "navigationTitle": "Get subscribed user status" + }, + { + "id": "user/online-status/unsubscribe-users-status", + "segment": "unsubscribe-users-status", + "title": "Unsubscribe from online status", + "href": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "type": "page", + "children": [], + "minIndex": 528, + "navigationTitle": "Unsubscribe from online status" + } + ], + "minIndex": 526 + } + ], + "minIndex": 520 + }, + { + "id": "relationships", + "segment": "relationships", + "title": "Relationships", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/overview-relationships", + "segment": "overview-relationships", + "title": "Relationships overview", + "href": "/sdk/react-native/user/overview-relationships", + "type": "page", + "children": [], + "minIndex": 529 + }, + { + "id": "friends", + "segment": "friends", + "title": "Friends", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/friends/get-friend-list-page", + "segment": "get-friend-list-page", + "title": "Get the friend list", + "href": "/sdk/react-native/user/friends/get-friend-list-page", + "type": "page", + "children": [], + "minIndex": 530, + "navigationTitle": "Get the friend list" + }, + { + "id": "user/friends/search-friends", + "segment": "search-friends", + "title": "Search friends", + "href": "/sdk/react-native/user/friends/search-friends", + "type": "page", + "children": [], + "minIndex": 531, + "navigationTitle": "Search friends" + }, + { + "id": "user/friends/get-specified-friends-info", + "segment": "get-specified-friends-info", + "title": "Get friend profiles", + "href": "/sdk/react-native/user/friends/get-specified-friends-info", + "type": "page", + "children": [], + "minIndex": 532, + "navigationTitle": "Get friend profiles" + }, + { + "id": "user/friends/check-friend", + "segment": "check-friend", + "title": "Check friendship status", + "href": "/sdk/react-native/user/friends/check-friend", + "type": "page", + "children": [], + "minIndex": 533, + "navigationTitle": "Check friendship status" + }, + { + "id": "user/friends/update-friends", + "segment": "update-friends", + "title": "Update friend information", + "href": "/sdk/react-native/user/friends/update-friends", + "type": "page", + "children": [], + "minIndex": 534, + "navigationTitle": "Update friend information" + }, + { + "id": "user/friends/delete-friend", + "segment": "delete-friend", + "title": "Delete a friend", + "href": "/sdk/react-native/user/friends/delete-friend", + "type": "page", + "children": [], + "minIndex": 535, + "navigationTitle": "Delete a friend" + }, + { + "id": "friend-applications", + "segment": "friend-applications", + "title": "Friend applications", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/friend-applications/add-friend", + "segment": "add-friend", + "title": "Send a friend application", + "href": "/sdk/react-native/user/friend-applications/add-friend", + "type": "page", + "children": [], + "minIndex": 536, + "navigationTitle": "Send a friend application" + }, + { + "id": "user/friend-applications/get-friend-application-list-as-recipient", + "segment": "get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "href": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "type": "page", + "children": [], + "minIndex": 537, + "navigationTitle": "Get received friend applications" + }, + { + "id": "user/friend-applications/get-friend-application-list-as-applicant", + "segment": "get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "href": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "type": "page", + "children": [], + "minIndex": 538, + "navigationTitle": "Get sent friend applications" + }, + { + "id": "user/friend-applications/get-friend-application-unhandled-count", + "segment": "get-friend-application-unhandled-count", + "title": "Get pending application count", + "href": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "type": "page", + "children": [], + "minIndex": 539, + "navigationTitle": "Get pending application count" + }, + { + "id": "user/friend-applications/accept-friend-application", + "segment": "accept-friend-application", + "title": "Accept a friend application", + "href": "/sdk/react-native/user/friend-applications/accept-friend-application", + "type": "page", + "children": [], + "minIndex": 540, + "navigationTitle": "Accept a friend application" + }, + { + "id": "user/friend-applications/refuse-friend-application", + "segment": "refuse-friend-application", + "title": "Reject a friend application", + "href": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "type": "page", + "children": [], + "minIndex": 541, + "navigationTitle": "Reject a friend application" + }, + { + "id": "user/friend-applications/delete-friend-requests", + "segment": "delete-friend-requests", + "title": "Delete friend applications", + "href": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "type": "page", + "children": [], + "minIndex": 542, + "navigationTitle": "Delete friend applications" + } + ], + "minIndex": 536 + } + ], + "minIndex": 530 + }, + { + "id": "blacklist", + "segment": "blacklist", + "title": "Blacklist", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/blacklist/get-black-list", + "segment": "get-black-list", + "title": "Get the blacklist", + "href": "/sdk/react-native/user/blacklist/get-black-list", + "type": "page", + "children": [], + "minIndex": 543, + "navigationTitle": "Get the blacklist" + }, + { + "id": "user/blacklist/add-black", + "segment": "add-black", + "title": "Add a user to the blacklist", + "href": "/sdk/react-native/user/blacklist/add-black", + "type": "page", + "children": [], + "minIndex": 544, + "navigationTitle": "Add a user to the blacklist" + }, + { + "id": "user/blacklist/remove-black", + "segment": "remove-black", + "title": "Remove a user from the blacklist", + "href": "/sdk/react-native/user/blacklist/remove-black", + "type": "page", + "children": [], + "minIndex": 545, + "navigationTitle": "Remove a user from the blacklist" + } + ], + "minIndex": 543 + } + ], + "minIndex": 529 } ], - "pageCount": 1 + "pageCount": 27, + "sidebarExpansion": "active-path" }, { "key": "chat/sdk/common", diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json new file mode 100644 index 0000000000..a56495e261 --- /dev/null +++ b/src/generated/react-native-sdk-zh-content.json @@ -0,0 +1,471 @@ +{ + "sourceContext": "chat/sdk/react-native", + "sourceRoot": "content/zh/docs/chat/sdk/react-native", + "pageCount": 27, + "manualPageCount": 27, + "pendingPaths": [], + "reviewStates": { + "/sdk/react-native/overview": "published", + "/sdk/react-native/user/overview-user": "published", + "/sdk/react-native/user/profile/get-users-info": "published", + "/sdk/react-native/user/profile/get-self-user-info": "published", + "/sdk/react-native/user/profile/set-self-info": "published", + "/sdk/react-native/user/profile/set-global-message-reception": "published", + "/sdk/react-native/user/profile/set-friend-add-permission": "published", + "/sdk/react-native/user/online-status/subscribe-users-status": "published", + "/sdk/react-native/user/online-status/get-subscribe-users-status": "published", + "/sdk/react-native/user/online-status/unsubscribe-users-status": "published", + "/sdk/react-native/user/overview-relationships": "published", + "/sdk/react-native/user/friends/get-friend-list-page": "published", + "/sdk/react-native/user/friends/search-friends": "published", + "/sdk/react-native/user/friends/get-specified-friends-info": "published", + "/sdk/react-native/user/friends/check-friend": "published", + "/sdk/react-native/user/friends/update-friends": "published", + "/sdk/react-native/user/friends/delete-friend": "published", + "/sdk/react-native/user/friend-applications/add-friend": "published", + "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient": "published", + "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant": "published", + "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count": "published", + "/sdk/react-native/user/friend-applications/accept-friend-application": "published", + "/sdk/react-native/user/friend-applications/refuse-friend-application": "published", + "/sdk/react-native/user/friend-applications/delete-friend-requests": "published", + "/sdk/react-native/user/blacklist/get-black-list": "published", + "/sdk/react-native/user/blacklist/add-black": "published", + "/sdk/react-native/user/blacklist/remove-black": "published" + }, + "navigationLabels": { + "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", + "User": "用户", + "User profile": "用户资料", + "Online status": "在线状态", + "Relationships": "关系链", + "Friends": "好友", + "Friend applications": "好友申请", + "Blacklist": "黑名单", + "User overview": "用户概览", + "Get user profiles": "获取用户资料", + "Get your profile": "获取当前用户资料", + "Update your profile": "更新当前用户资料", + "Set global message reception": "设置全局消息接收方式", + "Set friend request permissions": "设置好友申请权限", + "Subscribe to online status": "订阅用户在线状态", + "Get subscribed user status": "查询已订阅用户状态", + "Unsubscribe from online status": "取消订阅用户状态", + "Relationships overview": "关系链概览", + "Get the friend list": "分页获取好友列表", + "Search friends": "搜索好友", + "Get friend profiles": "查询指定好友资料", + "Check friendship": "检查好友关系", + "Check friendship status": "检查好友关系", + "Update friend information": "更新好友资料", + "Delete a friend": "删除好友", + "Send a friend request": "发送好友申请", + "Send a friend application": "发送好友申请", + "Get received friend requests": "获取收到的好友申请", + "Get received friend applications": "获取收到的好友申请", + "Get sent friend requests": "获取发出的好友申请", + "Get sent friend applications": "获取发出的好友申请", + "Get the unhandled friend-request count": "获取待处理好友申请数量", + "Get pending application count": "获取未处理好友申请数", + "Accept a friend request": "同意好友申请", + "Accept a friend application": "接受好友申请", + "Reject a friend request": "拒绝好友申请", + "Reject a friend application": "拒绝好友申请", + "Delete friend requests": "删除好友申请", + "Delete friend applications": "删除好友申请", + "Get the blocklist": "获取黑名单", + "Get the blacklist": "获取黑名单", + "Block a user": "将用户加入黑名单", + "Add a user to the blacklist": "将用户加入黑名单", + "Unblock a user": "将用户移出黑名单", + "Remove a user from the blacklist": "将用户移出黑名单" + }, + "pages": { + "/sdk/react-native/overview": { + "body": "## 概览\n\n当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。\n\n## 接入模型\n\n客户端应在拿到后端为当前 `userID` 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。\n\n## 移动端注意事项\n\n- 验证应用前后台切换后的登录、重连和消息接收。\n- 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。\n- 推送 token 注册应通过可信后端和对应平台通知服务完成。\n- 排查移动端问题时记录 `operationID`、`errCode` 和 `errMsg`。\n\n## 相关 SDK\n\n- [iOS SDK](/sdk/ios/overview)\n- [Android SDK](/sdk/android/overview)\n- [Flutter SDK](/sdk/flutter/overview)", + "description": "OpenIM React Native SDK 入口,用于移动端应用。", + "headings": [ + { + "depth": 2, + "title": "概览", + "url": "#概览" + }, + { + "depth": 2, + "title": "接入模型", + "url": "#接入模型" + }, + { + "depth": 2, + "title": "移动端注意事项", + "url": "#移动端注意事项" + }, + { + "depth": 2, + "title": "相关 SDK", + "url": "#相关-sdk" + } + ], + "sourcePath": "/sdk/react-native/overview", + "title": "OpenIM React Native SDK 概览" + }, + "/sdk/react-native/user/overview-user": { + "body": "OpenIM React Native SDK 使用 `userID` 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。\n\n好友、好友申请和黑名单属于用户之间的关系链能力,见[关系链概览](/sdk/react-native/user/overview-relationships)。\n\n## 用户相关类型\n\nReact Native SDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要 API |\n| --- | --- | --- |\n| `SelfUserInfo` | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `PublicUserItem` | 查询应用用户和展示公开资料卡 | `getUsersInfo()` |\n| `UserOnlineState` | 用户在线状态和在线平台列表 | `subscribeUsersStatus()`、`getSubscribeUsersStatus()`、`unsubscribeUsersStatus()` |\n\n`SelfUserInfo` 表示当前登录用户,`PublicUserItem` 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于展示资料卡 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) |\n| 读取或更新当前用户的昵称、头像和扩展信息 | [获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info) |\n| 设置账号级消息接收方式 | [设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception) |\n| 设置其他用户添加当前账号时的处理策略 | [设置好友申请权限](/sdk/react-native/user/profile/set-friend-add-permission) |\n| 订阅、读取和取消订阅在线状态 | [订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)、[查询已订阅用户状态](/sdk/react-native/user/online-status/get-subscribe-users-status)、[取消订阅用户状态](/sdk/react-native/user/online-status/unsubscribe-users-status) |\n| 管理好友、好友申请或黑名单 | [关系链概览](/sdk/react-native/user/overview-relationships) |\n\n## 事件监听\n\n用户状态变化会触发事件,具体的事件监听详见:\n\n- 当前用户资料变化见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。\n- 用户在线状态变化见[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。\n- 好友、好友申请和黑名单变化见[关系链概览](/sdk/react-native/user/overview-relationships)。", + "description": "了解 React Native SDK 中的当前用户资料、公开用户资料、账号设置和在线状态。", + "headings": [ + { + "depth": 2, + "title": "用户相关类型", + "url": "#用户相关类型" + }, + { + "depth": 2, + "title": "功能入口", + "url": "#功能入口" + }, + { + "depth": 2, + "title": "事件监听", + "url": "#事件监听" + } + ], + "sourcePath": "/sdk/react-native/user/overview-user", + "title": "用户概览" + }, + "/sdk/react-native/user/profile/get-users-info": { + "body": "调用 `getUsersInfo()` 按用户 ID 批量查询公开用户信息,适合用于展示好友候选人或陌生人资料卡的业务场景。\n\n如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo()。\n\n```ts\nconst userIDList = Array.from(new Set(['user_a', 'user_b']));\nconst users = await OpenIMSDK.getUsersInfo(userIDList);\n```\n\n## 参数说明\n\n`userIDList` 是要查询的用户 ID 数组。调用前建议去重,并控制单次请求数量。\n\n## 返回结果\n\n返回查询到的 `PublicUserItem[]`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | OpenIMSDK 用户 ID。 |\n| `nickname` | `string` | 账号级公开昵称。 |\n| `faceURL` | `string` | 账号级公开头像地址。 |\n| `ex` | `string` | 账号级扩展字段,格式由业务约定。 |\n\n返回数组不保证与输入 ID 按位置一一对应。\n\n该接口只读取其他用户的公开信息。如果要获取用户自己的信息,详见:[获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。", + "description": "OpenIM React Native SDK 获取用户资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/user/profile/get-users-info", + "title": "获取用户资料" + }, + "/sdk/react-native/user/profile/get-self-user-info": { + "body": "调用 `getSelfUserInfo()` 获取当前登录账号的用户信息。\n\n```ts\nconst currentUser = await OpenIMSDK.getSelfUserInfo();\n```\n\n## 返回结果\n\n返回当前账号的 `SelfUserInfo`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,用于标识当前账号。 |\n| `nickname` | `string` | 账号级昵称。 |\n| `faceURL` | `string` | 账号级头像地址。 |\n| `createTime` | `number` | 用户记录创建时间。 |\n| `globalRecvMsgOpt` | `MessageReceiveOptType` | 当前账号的全局消息接收方式。 |\n| `ex` | `string` | 由业务约定的账号级扩展字符串。 |\n\n完成初始化并登录后调用该方法,可用于展示当前账号的头像、昵称和全局消息接收设置。切换账号时,清理已保存的当前用户信息。", + "description": "OpenIM React Native SDK 获取当前用户资料。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/user/profile/get-self-user-info", + "title": "获取当前用户资料" + }, + "/sdk/react-native/user/profile/set-self-info": { + "body": "`setSelfInfo()` 更新当前登录账号的基础展示资料。只传入本次需要更新的 `nickname`、`faceURL` 或 `ex`。\n\n```ts\nawait OpenIMSDK.setSelfInfo({\n nickname: nickname.trim(),\n faceURL,\n ex: mergedExtra,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `nickname` | `string` | 否 | 新昵称。 |\n| `faceURL` | `string` | 否 | 新头像地址。 |\n| `ex` | `string` | 否 | 扩展用户信息。 |\n\n至少传入一个实际要更新的资料字段。\n\n`ex` 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展用户信息。\n更新当前用户资料后会触发 `OnSelfInfoUpdated` 事件,事件会携带更新后的用户信息。\n\n## 监听当前用户资料变化\n\n用户个人信息更新时,触发 `OnSelfInfoUpdated` 事件,以下为设置监听的示例:\n\n```ts\nfunction handleSelfInfoUpdated(selfUserInfo: SelfUserInfo) {\n // ...\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated);\n```\n\n退出登录、切换账号或销毁用户状态层时,要取消监听。", + "description": "OpenIM React Native SDK 更新当前用户资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听当前用户资料变化", + "url": "#监听当前用户资料变化" + } + ], + "sourcePath": "/sdk/react-native/user/profile/set-self-info", + "title": "更新当前用户资料" + }, + "/sdk/react-native/user/profile/set-global-message-reception": { + "body": "`globalRecvMsgOpt` 是当前账号的全局消息接收方式。使用 `setSelfInfo()` 更新该字段:\n\n```ts\nawait OpenIMSDK.setSelfInfo({\n globalRecvMsgOpt: MessageReceiveOptType.NotNotify,\n});\n```\n\n## 参数说明\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `MessageReceiveOptType.Normal` | `0` | 正常接收消息,并允许通知。 |\n| `MessageReceiveOptType.NotNotify` | `2` | 接收消息,但不通知。 |\n\n设置完成后,当前用户信息会通过 `OnSelfInfoUpdated` 事件更新,事件监听方式见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。\n\n全局消息接收方式是账号级设置;单个会话还可以使用会话级消息接收设置。", + "description": "OpenIM React Native SDK 设置全局消息接收方式。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "设置全局消息接收方式" + }, + "/sdk/react-native/user/profile/set-friend-add-permission": { + "body": "`addFriendPermission` 控制其他用户添加当前账号时,是否需要当前用户确认。使用 `setSelfInfo()` 更新该账号级设置:\n\n```ts\nawait OpenIMSDK.setSelfInfo({\n addFriendPermission: AddFriendPermission.AddFriendAllowed,\n});\n```\n\n## 参数说明\n\n| 枚举值 | 数值 | 含义 |\n| --- | --- | --- |\n| `AddFriendPermission.AddFriendAllowed` | `0` | 允许添加,但需要当前用户审核好友申请。 |\n| `AddFriendPermission.AddFriendAllowedNoReview` | `1` | 允许添加,并直接建立好友关系,无需当前用户审核。 |\n| `AddFriendPermission.AddFriendDenied` | `2` | 不允许其他用户添加当前账号。 |\n\n此设置只影响后续的添加行为,不会删除已有好友关系,也不会自动处理已经存在的待审核申请。设置完成后,当前用户信息会通过 `OnSelfInfoUpdated` 事件更新,监听方式见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。", + "description": "OpenIM React Native SDK 设置好友申请权限。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "设置好友申请权限" + }, + "/sdk/react-native/user/online-status/subscribe-users-status": { + "body": "调用 `subscribeUsersStatus()` 订阅指定用户的在线状态。建议只订阅当前界面需要展示的用户。\n\n```ts\nconst userIDs = [...new Set(visibleUserIDs.filter(Boolean))];\nconst states = await OpenIMSDK.subscribeUsersStatus(userIDs);\n```\n\n返回这些用户当前的 `UserOnlineState[]`,字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 状态所属用户的 ID。 |\n| `status` | `OnlineState` | `OnlineState.Online` 表示在线,`OnlineState.Offline` 表示离线。 |\n| `platformIDs` | `Platform[]`(可选) | 用户当前在线的平台列表。 |\n\n在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看应用或某个会话。\n\n## 监听在线状态变化\n\n订阅用户的在线状态变化时,触发 `OnUserStatusChanged` 事件:\n\n```ts\nconst handleStatusChanged = (state: UserOnlineState) => {\n // 按 state.userID 更新在线状态\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnUserStatusChanged, handleStatusChanged);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnUserStatusChanged, handleStatusChanged);\n```\n\n退出登录、切换账号或不再需要展示这些用户时,取消订阅并移除监听。", + "description": "OpenIM React Native SDK 订阅用户在线状态。", + "headings": [ + { + "depth": 2, + "title": "监听在线状态变化", + "url": "#监听在线状态变化" + } + ], + "sourcePath": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "订阅用户在线状态" + }, + "/sdk/react-native/user/online-status/get-subscribe-users-status": { + "body": "调用 `getSubscribeUsersStatus()` 获取当前账号已订阅用户的在线状态。\n\n```ts\nconst states = await OpenIMSDK.getSubscribeUsersStatus();\n```\n\n返回已订阅用户的 `UserOnlineState[]`。目标用户尚未订阅时,请先调用[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。", + "description": "OpenIM React Native SDK 查询已订阅用户状态。", + "headings": [], + "sourcePath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "查询已订阅用户状态" + }, + "/sdk/react-native/user/online-status/unsubscribe-users-status": { + "body": "调用 `unsubscribeUsersStatus()` 取消订阅指定用户的在线状态。\n\n```ts\nawait OpenIMSDK.unsubscribeUsersStatus(userIDs);\n```\n\n页面翻页、搜索结果变化、退出登录或不再需要展示这些用户时,应取消对应订阅。", + "description": "OpenIM React Native SDK 取消订阅用户状态。", + "headings": [], + "sourcePath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "取消订阅用户状态" + }, + "/sdk/react-native/user/overview-relationships": { + "body": "关系链记录当前用户与其他用户之间的好友关系、好友申请和黑名单。用户资料、账号设置和在线状态属于用户能力,见[用户概览](/sdk/react-native/user/overview-user)。\n\n## 关系链对象\n\nReact Native SDK 会根据使用场景返回不同的对象:\n\n| 类型 | 适用场景 | 主要 API |\n| --- | --- | --- |\n| `PublicUserItem` | 查询公开用户资料、展示好友候选人或陌生人资料卡 | `getUsersInfo()` |\n| `FriendUserItem` | 好友列表、好友备注、置顶和关系扩展字段 | `getFriendListPage()`、`getSpecifiedFriendsInfo()` |\n| `FriendshipInfo` | 检查当前用户与目标用户的好友关系 | `checkFriend()` |\n| `FriendApplicationItem` | 收到或发出的好友申请及其处理状态 | `getFriendApplicationListAsRecipient()`、`getFriendApplicationListAsApplicant()` |\n| `BlackUserItem` | 当前账号维护的黑名单关系 | `getBlackList()`、`addBlack()`、`removeBlack()` |\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 查询公开用户资料 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) |\n| 分页、搜索或按 ID 查询好友关系 | [分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)、[搜索好友](/sdk/react-native/user/friends/search-friends)、[查询指定好友资料](/sdk/react-native/user/friends/get-specified-friends-info) |\n| 检查好友关系 | [检查好友关系](/sdk/react-native/user/friends/check-friend) |\n| 更新或删除好友关系 | [更新好友资料](/sdk/react-native/user/friends/update-friends)、[删除好友](/sdk/react-native/user/friends/delete-friend) |\n| 发送或处理好友申请 | [发送好友申请](/sdk/react-native/user/friend-applications/add-friend)、[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)、[接受好友申请](/sdk/react-native/user/friend-applications/accept-friend-application)、[拒绝好友申请](/sdk/react-native/user/friend-applications/refuse-friend-application) |\n| 查看和维护黑名单 | [获取黑名单](/sdk/react-native/user/blacklist/get-black-list)、[将用户加入黑名单](/sdk/react-native/user/blacklist/add-black)、[将用户移出黑名单](/sdk/react-native/user/blacklist/remove-black) |\n\n## 事件监听\n\n关系链状态变化会触发事件,具体的事件监听详见:\n\n- 好友申请变化见[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)。\n- 好友关系和好友资料变化见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。\n- 黑名单变化见[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。", + "description": "了解 React Native SDK 中的好友、好友申请和黑名单能力。", + "headings": [ + { + "depth": 2, + "title": "关系链对象", + "url": "#关系链对象" + }, + { + "depth": 2, + "title": "功能入口", + "url": "#功能入口" + }, + { + "depth": 2, + "title": "事件监听", + "url": "#事件监听" + } + ], + "sourcePath": "/sdk/react-native/user/overview-relationships", + "title": "关系链概览" + }, + "/sdk/react-native/user/friends/get-friend-list-page": { + "body": "调用 `getFriendListPage()` 分页获取当前用户的好友列表。\n\n```ts\nconst friends = await OpenIMSDK.getFriendListPage({\n offset: 0,\n count: 50,\n filterBlack: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次请求的好友数量。 |\n| `filterBlack` | `boolean` | 否 | 是否过滤黑名单用户。 |\n\n返回当前页的 `FriendUserItem[]`。继续加载时按请求条目数增加 `offset`;好友增删后重新请求列表。\n\n### 好友信息字段\n\n`FriendUserItem` 类型字段说明:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 好友用户 ID。 |\n| `nickname` | `string` | 好友昵称。 |\n| `faceURL` | `string` | 好友头像地址。 |\n| `remark` | `string` | 当前用户为好友设置的备注。 |\n| `isPinned` | `boolean` | 是否置顶。 |\n| `ownerUserID` | `string` | 好友关系所属用户 ID。 |\n| `operatorUserID` | `string` | 最近执行关系操作的用户 ID。 |\n| `addSource` | `number` | 好友关系添加来源。 |\n| `createTime` | `number` | 好友关系创建时间。 |\n| `ex` | `string` | 好友关系扩展字段。 |\n| `attachedInfo` | `string` | SDK 附加信息。 |\n\n`remark`、`isPinned` 和 `ex` 属于好友关系,不是账号级用户信息。\n\n## 监听好友变化\n\n好友关系变化时,触发 `OnFriendAdded`、`OnFriendInfoChanged` 或 `OnFriendDeleted` 事件。事件直接携带对应的好友信息:\n\n```ts\nconst handleFriendAdd = (friend: FriendUserItem) => {\n // 新增好友\n};\nconst handleFriendChanged = (friend: FriendUserItem) => {\n // 按 friend.userID 更新好友列表\n};\nconst handleFriendDeleted = (friend: FriendUserItem) => {\n // 按 friend.userID 从好友列表移除\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnFriendAdded, handleFriendAdd);\nOpenIMSDK.on(OpenIMEvent.OnFriendInfoChanged, handleFriendChanged);\nOpenIMSDK.on(OpenIMEvent.OnFriendDeleted, handleFriendDeleted);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnFriendAdded, handleFriendAdd);\nOpenIMSDK.off(OpenIMEvent.OnFriendInfoChanged, handleFriendChanged);\nOpenIMSDK.off(OpenIMEvent.OnFriendDeleted, handleFriendDeleted);\n```\n\n退出登录、切换账号或销毁好友列表状态时,取消这些监听。", + "description": "OpenIM React Native SDK 分页获取好友列表。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 3, + "title": "好友信息字段", + "url": "#好友信息字段" + }, + { + "depth": 2, + "title": "监听好友变化", + "url": "#监听好友变化" + } + ], + "sourcePath": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "分页获取好友列表" + }, + "/sdk/react-native/user/friends/search-friends": { + "body": "调用 `searchFriends()` 搜索当前用户的好友。提交搜索前应去除关键词首尾空格;当前请求使用 `keywordList` 中的第一个非空关键词。\n\n```ts\nconst friends = await OpenIMSDK.searchFriends({\n keywordList: [keyword.trim()],\n isSearchUserID: true,\n isSearchNickname: true,\n isSearchRemark: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `keywordList` | `string[]` | 是 | 搜索关键词数组,当前使用第一个非空关键词。 |\n| `isSearchUserID` | `boolean` | 是 | 是否匹配用户 ID。 |\n| `isSearchNickname` | `boolean` | 是 | 是否匹配好友昵称。 |\n| `isSearchRemark` | `boolean` | 是 | 是否匹配好友备注。 |\n\n返回 `SearchedFriendsInfo[]`。每项包含好友信息字段和 `relationship`:`0` 表示黑名单关系,`1` 表示好友关系。", + "description": "OpenIM React Native SDK 搜索好友。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friends/search-friends", + "title": "搜索好友" + }, + "/sdk/react-native/user/friends/get-specified-friends-info": { + "body": "调用 `getSpecifiedFriendsInfo()` 按用户 ID 查询指定好友的关系信息。\n\n```ts\nconst friends = await OpenIMSDK.getSpecifiedFriendsInfo({\n userIDList: ['user_a', 'user_b'],\n filterBlack: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `userIDList` | `string[]` | 是 | 要查询的用户 ID 列表。 |\n| `filterBlack` | `boolean` | 否 | 是否过滤黑名单用户。 |\n\n返回匹配的 `FriendUserItem[]`,数组不保证与输入 ID 按位置一一对应。字段说明见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。\n\n查询陌生人的公开用户信息时,使用[获取用户资料](/sdk/react-native/user/profile/get-users-info)。", + "description": "OpenIM React Native SDK 查询指定好友资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "查询指定好友资料" + }, + "/sdk/react-native/user/friends/check-friend": { + "body": "调用 `checkFriend()` 批量检查当前用户与指定用户的好友关系。\n\n```ts\nconst checks = await OpenIMSDK.checkFriend(['user_a', 'user_b']);\n```\n\n返回的 `FriendshipInfo[]` 与输入用户 ID 按 `userID` 对应:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 被检查用户的 ID。 |\n| `result` | `number` | `1` 表示是好友,`0` 表示不是好友。 |\n\n需要判断黑名单关系时,另行调用[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。", + "description": "OpenIM React Native SDK 检查好友关系。", + "headings": [], + "sourcePath": "/sdk/react-native/user/friends/check-friend", + "title": "检查好友关系" + }, + "/sdk/react-native/user/friends/update-friends": { + "body": "使用 `updateFriends()` 更新 `friendUserIDs` 中的所有好友。\n\n```ts\nawait OpenIMSDK.updateFriends({\n friendUserIDs: [friendUserID],\n remark: remark,\n isPinned: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表。 |\n| `remark` | `string` | 否 | 新备注。 |\n| `isPinned` | `boolean` | 否 | 是否置顶。 |\n| `ex` | `string` | 否 | 新扩展字符串。 |\n\n除 `friendUserIDs` 外,至少传入一个要更新的字段。不同好友需要不同值时,分别调用该方法。更新好友资料后会触发 `OnFriendInfoChanged` 事件,监听方式见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。", + "description": "OpenIM React Native SDK 更新好友资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friends/update-friends", + "title": "更新好友资料" + }, + "/sdk/react-native/user/friends/delete-friend": { + "body": "调用 `deleteFriend()` 删除当前用户与指定用户的好友关系。\n\n```ts\nawait OpenIMSDK.deleteFriend(friendUserID);\n```\n\n`friendUserID` 是要删除的好友用户 ID。删除好友后会触发 `OnFriendDeleted` 事件,事件携带被删除好友的信息;好友列表的监听方式见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。", + "description": "OpenIM React Native SDK 删除好友。", + "headings": [], + "sourcePath": "/sdk/react-native/user/friends/delete-friend", + "title": "删除好友" + }, + "/sdk/react-native/user/friend-applications/add-friend": { + "body": "调用 `addFriend()` 向指定用户发送好友申请。\n\n```ts\nawait OpenIMSDK.addFriend({\n toUserID,\n reqMsg,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `toUserID` | `string` | 是 | 要申请添加的用户 ID。 |\n| `reqMsg` | `string` | 是 | 申请附言;没有内容时传空字符串。 |\n\n发送成功只表示好友申请已提交,不表示对方已经同意。申请状态变化时,可在[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)页面监听相关事件。", + "description": "OpenIM React Native SDK 发送好友申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/add-friend", + "title": "发送好友申请" + }, + "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient": { + "body": "调用 `getFriendApplicationListAsRecipient()` 分页查询当前用户收到的好友申请。\n\n```ts\nconst applications = await OpenIMSDK.getFriendApplicationListAsRecipient({\n handleResults: [ApplicationHandleResult.Unprocessed],\n offset: 0,\n count: 20,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `handleResults` | `number[]` | 是 | 要查询的申请处理结果。 |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次请求的申请数量。 |\n\n| 枚举值 | 数值 | 含义 |\n| --- | --- | --- |\n| `ApplicationHandleResult.Unprocessed` | `0` | 待处理。 |\n| `ApplicationHandleResult.Agree` | `1` | 已同意。 |\n| `ApplicationHandleResult.Reject` | `-1` | 已拒绝。 |\n\n返回当前页的 `FriendApplicationItem[]`。\n\n### 好友申请字段\n\n`FriendApplicationItem` 类型字段说明:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `fromUserID` | `string` | 申请发起人的用户 ID。 |\n| `fromNickname` | `string` | 申请发起人的昵称。 |\n| `fromFaceURL` | `string` | 申请发起人的头像地址。 |\n| `toUserID` | `string` | 申请接收人的用户 ID。 |\n| `toNickname` | `string` | 申请接收人的昵称。 |\n| `toFaceURL` | `string` | 申请接收人的头像地址。 |\n| `reqMsg` | `string` | 申请附言。 |\n| `handleResult` | `ApplicationHandleResult` | 当前处理结果。 |\n| `handlerUserID` | `string` | 执行处理的用户 ID。 |\n| `handleMsg` | `string` | 处理时填写的说明。 |\n| `handleTime` | `number` | 处理时间。 |\n| `createTime` | `number` | 申请记录创建时间。 |\n| `ex` | `string` | 申请记录扩展字符串。 |\n\n## 监听好友申请变化\n\n好友申请变化时,触发 `OnFriendApplicationAdded`、`OnFriendApplicationAccepted`、`OnFriendApplicationRejected` 或 `OnFriendApplicationDeleted` 事件。事件直接携带 `FriendApplicationItem`:\n\n```ts\nconst handleApplicationChanged = (application: FriendApplicationItem) => {\n // 按 fromUserID 和 toUserID 更新申请记录\n};\nconst handleApplicationDeleted = (application: FriendApplicationItem) => {\n // 按 fromUserID 和 toUserID 移除申请记录\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged);\nOpenIMSDK.on(OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged);\nOpenIMSDK.on(OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged);\nOpenIMSDK.on(OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged);\nOpenIMSDK.off(OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged);\nOpenIMSDK.off(OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged);\nOpenIMSDK.off(OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted);\n```\n\n申请记录使用 `fromUserID` 和 `toUserID` 共同定位。退出登录、切换账号或销毁申请列表状态时,取消这些监听。", + "description": "OpenIM React Native SDK 获取收到的好友申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 3, + "title": "好友申请字段", + "url": "#好友申请字段" + }, + { + "depth": 2, + "title": "监听好友申请变化", + "url": "#监听好友申请变化" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "获取收到的好友申请" + }, + "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant": { + "body": "调用 `getFriendApplicationListAsApplicant()` 分页查询当前用户发出的好友申请。\n\n```ts\nconst applications = await OpenIMSDK.getFriendApplicationListAsApplicant({\n offset: 0,\n count: 20,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次请求的申请数量。 |\n\n返回当前页的 `FriendApplicationItem[]`。申请记录字段见[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)。", + "description": "OpenIM React Native SDK 获取发出的好友申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "获取发出的好友申请" + }, + "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count": { + "body": "调用 `getFriendApplicationUnhandledCount()` 查询指定时间点之后未处理的好友申请数量。\n\n```ts\nconst count = await OpenIMSDK.getFriendApplicationUnhandledCount({\n time,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `time` | `number` | 是 | 查询起始时间,通常使用上次查看申请列表的时间。 |\n\n返回该时间点之后的未处理好友申请数量。", + "description": "OpenIM React Native SDK 获取未处理好友申请数。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "获取未处理好友申请数" + }, + "/sdk/react-native/user/friend-applications/accept-friend-application": { + "body": "调用 `acceptFriendApplication()` 接受好友申请。\n\n```ts\nawait OpenIMSDK.acceptFriendApplication({\n toUserID: applicantUserID,\n handleMsg: '',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `toUserID` | `string` | 是 | 申请发起人的用户 ID。 |\n| `handleMsg` | `string` | 是 | 处理申请时附带的说明,没有内容时传空字符串。 |\n\n接受后会建立好友关系,并触发好友申请状态变化和 `OnFriendAdded` 事件。好友列表变化的监听方式见[分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)。", + "description": "OpenIM React Native SDK 接受好友申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "接受好友申请" + }, + "/sdk/react-native/user/friend-applications/refuse-friend-application": { + "body": "调用 `refuseFriendApplication()` 拒绝好友申请。\n\n```ts\nawait OpenIMSDK.refuseFriendApplication({\n toUserID: applicantUserID,\n handleMsg: '',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `toUserID` | `string` | 是 | 申请发起人的用户 ID。 |\n| `handleMsg` | `string` | 是 | 处理申请时附带的说明,没有内容时传空字符串。 |\n\n申请状态变化时,可在[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)页面监听相关事件。", + "description": "OpenIM React Native SDK 拒绝好友申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "拒绝好友申请" + }, + "/sdk/react-native/user/friend-applications/delete-friend-requests": { + "body": "调用 `deleteFriendRequests()` 批量删除好友申请记录。\n\n## 参数说明\n\n数组中的每一项使用以下字段:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `fromUserID` | `string` | 是 | 申请发起人的用户 ID。 |\n| `toUserID` | `string` | 是 | 申请接收人的用户 ID。 |\n\n```ts\nawait OpenIMSDK.deleteFriendRequests([\n { fromUserID, toUserID },\n]);\n```\n\n删除记录不等于拒绝申请,也不会删除已经建立的好友关系。申请记录变化时,可在[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)页面监听 `OnFriendApplicationDeleted`。", + "description": "OpenIM React Native SDK 删除好友申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "删除好友申请" + }, + "/sdk/react-native/user/blacklist/get-black-list": { + "body": "调用 `getBlackList()` 获取当前账号的黑名单。\n\n```ts\nconst blockedUsers = await OpenIMSDK.getBlackList();\n```\n\n返回 `BlackUserItem[]`,常用字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 被拉黑的用户 ID。 |\n| `nickname` | `string` | 被拉黑用户的昵称。 |\n| `faceURL` | `string` | 被拉黑用户的头像地址。 |\n| `ownerUserID` | `string` | 黑名单关系所属用户 ID。 |\n| `operatorUserID` | `string` | 执行拉黑操作的用户 ID。 |\n| `createTime` | `number` | 黑名单创建时间。 |\n| `addSource` | `number` | 黑名单添加来源。 |\n| `ex` | `string` | 黑名单扩展字段。 |\n\n资料卡或联系人列表判断黑名单关系时,应使用 `userID`。黑名单与群组管理是独立能力,群成员禁言或移除请使用群组相关 API。\n\n## 监听黑名单变化\n\n黑名单变化时,触发 `OnBlackAdded` 或 `OnBlackDeleted` 事件,事件直接携带对应的黑名单用户信息:\n\n```ts\nconst handleBlackAdded = (blackUser: BlackUserItem) => {\n // 按 blackUser.userID 加入或更新记录\n};\nconst handleBlackDeleted = (blackUser: BlackUserItem) => {\n // 按 blackUser.userID 移除记录\n};\n\nOpenIMSDK.on(OpenIMEvent.OnBlackAdded, handleBlackAdded);\nOpenIMSDK.on(OpenIMEvent.OnBlackDeleted, handleBlackDeleted);\n\nOpenIMSDK.off(OpenIMEvent.OnBlackAdded, handleBlackAdded);\nOpenIMSDK.off(OpenIMEvent.OnBlackDeleted, handleBlackDeleted);\n```\n\n退出登录、切换账号或销毁黑名单状态时,取消这些监听。", + "description": "OpenIM React Native SDK 获取黑名单。", + "headings": [ + { + "depth": 2, + "title": "监听黑名单变化", + "url": "#监听黑名单变化" + } + ], + "sourcePath": "/sdk/react-native/user/blacklist/get-black-list", + "title": "获取黑名单" + }, + "/sdk/react-native/user/blacklist/add-black": { + "body": "调用 `addBlack()` 将指定用户加入当前账号的黑名单。\n\n```ts\nawait OpenIMSDK.addBlack({\n toUserID,\n ex,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `toUserID` | `string` | 是 | 要加入黑名单的用户 ID。 |\n| `ex` | `string` | 否 | 黑名单关系的扩展信息。 |\n\n加入黑名单后会触发 `OnBlackAdded` 事件。黑名单列表和事件监听方式见[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。", + "description": "OpenIM React Native SDK 将用户加入黑名单。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/user/blacklist/add-black", + "title": "将用户加入黑名单" + }, + "/sdk/react-native/user/blacklist/remove-black": { + "body": "调用 `removeBlack()` 将指定用户移出当前账号的黑名单。\n\n```ts\nawait OpenIMSDK.removeBlack(blackUserID);\n```\n\n`blackUserID` 是要移出黑名单的用户 ID。移出后会触发 `OnBlackDeleted` 事件,监听方式见[获取黑名单](/sdk/react-native/user/blacklist/get-black-list)。", + "description": "OpenIM React Native SDK 将用户移出黑名单。", + "headings": [], + "sourcePath": "/sdk/react-native/user/blacklist/remove-black", + "title": "将用户移出黑名单" + } + } +} diff --git a/src/generated/routes.json b/src/generated/routes.json index e3c98303bb..2c3c30f0ff 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -15101,5 +15101,473 @@ "sourceIndex": 2725, "contentFile": "content/docs/chat/sdk/wasm/conversation/managing-conversations/hide-all-conversations.mdx", "navOrder": 433 + }, + { + "id": 1356, + "path": "/sdk/react-native/user/overview-user", + "relativePath": "sdk/react-native/user/overview-user", + "sourcePath": "/sdk/react-native/user/overview-user", + "title": "User overview", + "description": "Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2726, + "contentFile": "content/docs/chat/sdk/react-native/user/overview-user.mdx", + "navOrder": 520 + }, + { + "id": 1400, + "path": "/sdk/react-native/user/overview-relationships", + "relativePath": "sdk/react-native/user/overview-relationships", + "sourcePath": "/sdk/react-native/user/overview-relationships", + "title": "Relationships overview", + "description": "Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2726.5, + "contentFile": "content/docs/chat/sdk/react-native/user/overview-relationships.mdx", + "navOrder": 529 + }, + { + "id": 1357, + "path": "/sdk/react-native/user/profile/get-users-info", + "relativePath": "sdk/react-native/user/profile/get-users-info", + "sourcePath": "/sdk/react-native/user/profile/get-users-info", + "title": "Get user profiles", + "description": "Get public user profiles with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2727, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx", + "navOrder": 521 + }, + { + "id": 1358, + "path": "/sdk/react-native/user/profile/get-self-user-info", + "relativePath": "sdk/react-native/user/profile/get-self-user-info", + "sourcePath": "/sdk/react-native/user/profile/get-self-user-info", + "title": "Get your profile", + "description": "Get the current user profile with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2728, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx", + "navOrder": 522 + }, + { + "id": 1359, + "path": "/sdk/react-native/user/profile/set-self-info", + "relativePath": "sdk/react-native/user/profile/set-self-info", + "sourcePath": "/sdk/react-native/user/profile/set-self-info", + "title": "Update your profile", + "description": "Update the current user profile with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2729, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx", + "navOrder": 523 + }, + { + "id": 1360, + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "relativePath": "sdk/react-native/user/profile/set-global-message-reception", + "sourcePath": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "Set global message reception", + "description": "Set the global message reception option with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2730, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx", + "navOrder": 524 + }, + { + "id": 1361, + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "relativePath": "sdk/react-native/user/profile/set-friend-add-permission", + "sourcePath": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "description": "Set friend request permissions with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2731, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx", + "navOrder": 525 + }, + { + "id": 1362, + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "relativePath": "sdk/react-native/user/online-status/subscribe-users-status", + "sourcePath": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "description": "Subscribe to user online status with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2732, + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx", + "navOrder": 526 + }, + { + "id": 1363, + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "relativePath": "sdk/react-native/user/online-status/get-subscribe-users-status", + "sourcePath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "description": "Get the status of subscribed users with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2733, + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx", + "navOrder": 527 + }, + { + "id": 1364, + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "relativePath": "sdk/react-native/user/online-status/unsubscribe-users-status", + "sourcePath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "description": "Cancel user online-status subscriptions with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2734, + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx", + "navOrder": 528 + }, + { + "id": 1365, + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "relativePath": "sdk/react-native/user/friends/get-friend-list-page", + "sourcePath": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "Get the friend list", + "description": "Get the friend list with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2735, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx", + "navOrder": 530 + }, + { + "id": 1366, + "path": "/sdk/react-native/user/friends/search-friends", + "relativePath": "sdk/react-native/user/friends/search-friends", + "sourcePath": "/sdk/react-native/user/friends/search-friends", + "title": "Search friends", + "description": "Search the current user's friends with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2736, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/search-friends.mdx", + "navOrder": 531 + }, + { + "id": 1367, + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "relativePath": "sdk/react-native/user/friends/get-specified-friends-info", + "sourcePath": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "description": "Get specified friend profiles with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2737, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx", + "navOrder": 532 + }, + { + "id": 1368, + "path": "/sdk/react-native/user/friends/check-friend", + "relativePath": "sdk/react-native/user/friends/check-friend", + "sourcePath": "/sdk/react-native/user/friends/check-friend", + "title": "Check friendship status", + "description": "Check friendships with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2738, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/check-friend.mdx", + "navOrder": 533 + }, + { + "id": 1369, + "path": "/sdk/react-native/user/friends/update-friends", + "relativePath": "sdk/react-native/user/friends/update-friends", + "sourcePath": "/sdk/react-native/user/friends/update-friends", + "title": "Update friend information", + "description": "Update friend information with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2739, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/update-friends.mdx", + "navOrder": 534 + }, + { + "id": 1370, + "path": "/sdk/react-native/user/friends/delete-friend", + "relativePath": "sdk/react-native/user/friends/delete-friend", + "sourcePath": "/sdk/react-native/user/friends/delete-friend", + "title": "Delete a friend", + "description": "Delete a friend with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2740, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx", + "navOrder": 535 + }, + { + "id": 1371, + "path": "/sdk/react-native/user/friend-applications/add-friend", + "relativePath": "sdk/react-native/user/friend-applications/add-friend", + "sourcePath": "/sdk/react-native/user/friend-applications/add-friend", + "title": "Send a friend application", + "description": "Send a friend request with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2741, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx", + "navOrder": 536 + }, + { + "id": 1372, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "description": "Get received friend requests with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2742, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx", + "navOrder": 537 + }, + { + "id": 1373, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "description": "Get sent friend requests with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2743, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx", + "navOrder": 538 + }, + { + "id": 1374, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get pending application count", + "description": "Get the unhandled friend-request count with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2744, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx", + "navOrder": 539 + }, + { + "id": 1375, + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "relativePath": "sdk/react-native/user/friend-applications/accept-friend-application", + "sourcePath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "Accept a friend application", + "description": "Accept a friend request with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2745, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx", + "navOrder": 540 + }, + { + "id": 1376, + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "relativePath": "sdk/react-native/user/friend-applications/refuse-friend-application", + "sourcePath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "Reject a friend application", + "description": "Reject a friend request with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2746, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx", + "navOrder": 541 + }, + { + "id": 1377, + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "relativePath": "sdk/react-native/user/friend-applications/delete-friend-requests", + "sourcePath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "Delete friend applications", + "description": "Delete friend-request records with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2747, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx", + "navOrder": 542 + }, + { + "id": 1378, + "path": "/sdk/react-native/user/blacklist/get-black-list", + "relativePath": "sdk/react-native/user/blacklist/get-black-list", + "sourcePath": "/sdk/react-native/user/blacklist/get-black-list", + "title": "Get the blacklist", + "description": "Get the blocklist with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2748, + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx", + "navOrder": 543 + }, + { + "id": 1379, + "path": "/sdk/react-native/user/blacklist/add-black", + "relativePath": "sdk/react-native/user/blacklist/add-black", + "sourcePath": "/sdk/react-native/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "description": "Block a user with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2749, + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx", + "navOrder": 544 + }, + { + "id": 1380, + "path": "/sdk/react-native/user/blacklist/remove-black", + "relativePath": "sdk/react-native/user/blacklist/remove-black", + "sourcePath": "/sdk/react-native/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "description": "Unblock a user with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2750, + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx", + "navOrder": 545 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 997f9679ef..e06216d619 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -5649,11 +5649,11 @@ }, { "path": "/sdk/react-native/overview", - "title": "OpenIM SDK for React Native", - "description": "OpenIM React Native SDK entry point for mobile applications.", + "title": "OpenIM React Native SDK 概览", + "description": "OpenIM React Native SDK 入口,用于移动端应用。", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native overview", - "content": "Overview Use the React Native SDK when your chat experience is built with React Native and needs mobile runtime behavior for connectivity, local cache, media selection, file upload, and push notification handoff. Integration model The SDK should be initialized after your application has a backend issued token for the current userID . Register connection and message events before login, then keep conversation state in your application store so native lifecycle changes can restore the UI predictably. Mobile considerations Validate login, reconnect, and message receipt after app foreground and background transitions. Test file messages with the media picker and upload permissions required by each platform. Route push notification registration through your trusted backend and platform notification services. When diagnosing mobile only failures, record the time, user ID, action, errCode , and errMsg , but never record tokens or message content. Related SDKs iOS SDK /sdk/ios/overview Android SDK /sdk/android/overview Flutter SDK /sdk/flutter/overview" + "content": "概览 当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。 接入模型 客户端应在拿到后端为当前 userID 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。 移动端注意事项 验证应用前后台切换后的登录、重连和消息接收。 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。 推送 token 注册应通过可信后端和对应平台通知服务完成。 排查移动端问题时记录发生时间、用户 ID、操作名称、 errCode 和 errMsg ,但不要记录 Token 或消息正文。 相关 SDK iOS SDK /sdk/ios/overview Android SDK /sdk/android/overview Flutter SDK /sdk/flutter/overview" }, { "path": "/sdk/electron/getting-started/authenticate-and-init", @@ -6678,5 +6678,213 @@ "context": "SDKs · WASM · v4", "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations hide-all-conversations", "content": "hideAllConversations 会重置当前设备上全部会话的列表状态、未读数、最新消息摘要和草稿,使这些会话不再出现在分页会话列表中: await openimsdk.hideAllConversations ; Promise 成功只表示本地会话状态已经完成重置。该操作不会删除本地消息记录或服务端消息,也不会删除群组、好友关系或其他客户端上的会话。后续收到新消息或重新建立有效会话状态时,相应会话仍可再次出现在列表中。 批量隐藏后应重新查询 会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 和 会话总未读数 /sdk/wasm/conversation/managing conversations/get total unread count ,并用最新结果更新界面。不要把 Promise 成功当成远端状态事件。" + }, + { + "path": "/sdk/react-native/user/overview-user", + "title": "用户概览", + "description": "了解 React Native SDK 中的当前用户资料、公开用户资料、账号设置和在线状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-user", + "content": "OpenIM React Native SDK 使用 userID 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。 好友、好友申请和黑名单属于用户之间的关系链能力,见 关系链概览 /sdk/react native/user/overview relationships 。 用户相关类型 React Native SDK 会根据使用场景返回不同的用户对象: | 类型 | 适用场景 | 主要 API | | | | | | SelfUserInfo | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | getSelfUserInfo 、 setSelfInfo | | PublicUserItem | 查询应用用户和展示公开资料卡 | getUsersInfo | | UserOnlineState | 用户在线状态和在线平台列表 | subscribeUsersStatus 、 getSubscribeUsersStatus 、 unsubscribeUsersStatus | SelfUserInfo 表示当前登录用户, PublicUserItem 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。 功能入口 | 需求 | 推荐页面 | | | | | 按 userID 查询公开资料,用于展示资料卡 | 获取用户资料 /sdk/react native/user/profile/get users info | | 读取或更新当前用户的昵称、头像和扩展信息 | 获取当前用户资料 /sdk/react native/user/profile/get self user info 、 更新当前用户资料 /sdk/react native/user/profile/set self info | | 设置账号级消息接收方式 | 设置全局消息接收方式 /sdk/react native/user/profile/set global message reception | | 设置其他用户添加当前账号时的处理策略 | 设置好友添加权限 /sdk/react native/user/profile/set friend add permission | | 订阅、读取和取消订阅在线状态 | 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 、 获取已订阅用户状态 /sdk/react native/user/online status/get subscribe users status 、 取消订阅用户状态 /sdk/react native/user/online status/unsubscribe users status | | 管理好友、好友申请或黑名单 | 关系链概览 /sdk/react native/user/overview relationships | 事件监听 用户状态变化会触发事件,具体的事件监听详见: 当前用户资料变化见 更新当前用户资料 /sdk/react native/user/profile/set self info 。 用户在线状态变化见 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 。 好友、好友申请和黑名单变化见 关系链概览 /sdk/react native/user/overview relationships 。" + }, + { + "path": "/sdk/react-native/user/overview-relationships", + "title": "关系链概览", + "description": "了解 React Native SDK 中的好友、好友申请和黑名单能力。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-relationships", + "content": "关系链记录当前用户与其他用户之间的好友关系、好友申请和黑名单。用户资料、账号设置和在线状态属于用户能力,见 用户概览 /sdk/react native/user/overview user 。 关系链对象 React Native SDK 会根据使用场景返回不同的对象: | 类型 | 适用场景 | 主要 API | | | | | | PublicUserItem | 查询公开用户资料、展示好友候选人或陌生人资料卡 | getUsersInfo | | FriendUserItem | 好友列表、好友备注、置顶和关系扩展字段 | getFriendListPage 、 getSpecifiedFriendsInfo | | FriendshipInfo | 检查当前用户与目标用户的好友关系 | checkFriend | | FriendApplicationItem | 收到或发出的好友申请及其处理状态 | getFriendApplicationListAsRecipient 、 getFriendApplicationListAsApplicant | | BlackUserItem | 当前账号维护的黑名单关系 | getBlackList 、 addBlack 、 removeBlack | 功能入口 | 需求 | 推荐页面 | | | | | 查询公开用户资料 | 获取用户资料 /sdk/react native/user/profile/get users info | | 分页、搜索或按 ID 查询好友关系 | 分页获取好友列表 /sdk/react native/user/friends/get friend list page 、 搜索好友 /sdk/react native/user/friends/search friends 、 查询指定好友资料 /sdk/react native/user/friends/get specified friends info | | 检查好友关系 | 检查好友关系 /sdk/react native/user/friends/check friend | | 更新或删除好友关系 | 更新好友资料 /sdk/react native/user/friends/update friends 、 删除好友 /sdk/react native/user/friends/delete friend | | 发送或处理好友申请 | 发送好友申请 /sdk/react native/user/friend applications/add friend 、 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 、 接受好友申请 /sdk/react native/user/friend applications/accept friend application 、 拒绝好友申请 /sdk/react native/user/friend applications/refuse friend application | | 查看和维护黑名单 | 获取黑名单 /sdk/react native/user/blacklist/get black list 、 将用户加入黑名单 /sdk/react native/user/blacklist/add black 、 将用户移出黑名单 /sdk/react native/user/blacklist/remove black | 事件监听 关系链状态变化会触发事件,具体的事件监听详见: 好友申请变化见 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 。 好友关系和好友资料变化见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。 黑名单变化见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + }, + { + "path": "/sdk/react-native/user/profile/get-users-info", + "title": "获取用户资料", + "description": "OpenIM React Native SDK 获取用户资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-users-info", + "content": "调用 getUsersInfo 按用户 ID 批量查询公开用户信息,适合用于展示好友候选人或陌生人资料卡的业务场景。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。 const userIDList = Array.from new Set 'user a', 'user b' ; const users = await OpenIMSDK.getUsersInfo userIDList ; 参数说明 userIDList 是要查询的用户 ID 数组。调用前建议去重,并控制单次请求数量。 返回结果 返回查询到的 PublicUserItem : | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | ex | string | 账号级扩展字段,格式由业务约定。 | 返回数组不保证与输入 ID 按位置一一对应。 该接口只读取其他用户的公开信息。如果要获取用户自己的信息,详见: 获取当前用户资料 /sdk/react native/user/profile/get self user info 、 更新当前用户资料 /sdk/react native/user/profile/set self info 。" + }, + { + "path": "/sdk/react-native/user/profile/get-self-user-info", + "title": "获取当前用户资料", + "description": "OpenIM React Native SDK 获取当前用户资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-self-user-info", + "content": "调用 getSelfUserInfo 获取当前登录账号的用户信息。 const currentUser = await OpenIMSDK.getSelfUserInfo ; 返回结果 返回当前账号的 SelfUserInfo : | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,用于标识当前账号。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number | 用户记录创建时间。 | | globalRecvMsgOpt | MessageReceiveOptType | 当前账号的全局消息接收方式。 | | ex | string | 由业务约定的账号级扩展字符串。 | 完成初始化并登录后调用该方法,可用于展示当前账号的头像、昵称和全局消息接收设置。切换账号时,清理已保存的当前用户信息。" + }, + { + "path": "/sdk/react-native/user/profile/set-self-info", + "title": "更新当前用户资料", + "description": "OpenIM React Native SDK 更新当前用户资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-self-info", + "content": "setSelfInfo 更新当前登录账号的基础展示资料。只传入本次需要更新的 nickname 、 faceURL 或 ex 。 await OpenIMSDK.setSelfInfo nickname: nickname.trim , faceURL, ex: mergedExtra, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string | 否 | 新昵称。 | | faceURL | string | 否 | 新头像地址。 | | ex | string | 否 | 扩展用户信息。 | 至少传入一个实际要更新的资料字段。 ex 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展用户信息。 更新当前用户资料后会触发 OnSelfInfoUpdated 事件,事件会携带更新后的用户信息。 监听当前用户资料变化 用户个人信息更新时,触发 OnSelfInfoUpdated 事件,以下为设置监听的示例: function handleSelfInfoUpdated selfUserInfo: SelfUserInfo // ... ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; 退出登录、切换账号或销毁用户状态层时,要取消监听。" + }, + { + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "设置全局消息接收方式", + "description": "OpenIM React Native SDK 设置全局消息接收方式。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-global-message-reception", + "content": "globalRecvMsgOpt 是当前账号的全局消息接收方式。使用 setSelfInfo 更新该字段: await OpenIMSDK.setSelfInfo globalRecvMsgOpt: MessageReceiveOptType.NotNotify, ; 参数说明 | 枚举值 | 数值 | 说明 | | | | | | MessageReceiveOptType.Normal | 0 | 正常接收消息,并允许通知。 | | MessageReceiveOptType.NotNotify | 2 | 接收消息,但不通知。 | 设置完成后,当前用户信息会通过 OnSelfInfoUpdated 事件更新,事件监听方式见 更新当前用户资料 /sdk/react native/user/profile/set self info 。 全局消息接收方式是账号级设置;单个会话还可以使用会话级消息接收设置。" + }, + { + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "设置好友添加权限", + "description": "OpenIM React Native SDK 设置好友添加权限。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-friend-add-permission", + "content": "addFriendPermission 控制其他用户添加当前账号时,是否需要当前用户确认。使用 setSelfInfo 更新该账号级设置: await OpenIMSDK.setSelfInfo addFriendPermission: AddFriendPermission.AddFriendAllowed, ; 参数说明 | 枚举值 | 数值 | 含义 | | | | | | AddFriendPermission.AddFriendAllowed | 0 | 允许添加,但需要当前用户审核好友申请。 | | AddFriendPermission.AddFriendAllowedNoReview | 1 | 允许添加,并直接建立好友关系,无需当前用户审核。 | | AddFriendPermission.AddFriendDenied | 2 | 不允许其他用户添加当前账号。 | 此设置只影响后续的添加行为,不会删除已有好友关系,也不会自动处理已经存在的待审核申请。设置完成后,当前用户信息会通过 OnSelfInfoUpdated 事件更新,监听方式见 更新当前用户资料 /sdk/react native/user/profile/set self info 。" + }, + { + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "订阅用户在线状态", + "description": "OpenIM React Native SDK 订阅用户在线状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status subscribe-users-status", + "content": "调用 subscribeUsersStatus 订阅指定用户的在线状态。建议只订阅当前界面需要展示的用户。 const userIDs = ...new Set visibleUserIDs.filter Boolean ; const states = await OpenIMSDK.subscribeUsersStatus userIDs ; 返回这些用户当前的 UserOnlineState ,字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 状态所属用户的 ID。 | | status | OnlineState | OnlineState.Online 表示在线, OnlineState.Offline 表示离线。 | | platformIDs | Platform (可选) | 用户当前在线的平台列表。 | 在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看应用或某个会话。 监听在线状态变化 订阅用户的在线状态变化时,触发 OnUserStatusChanged 事件: const handleStatusChanged = state: UserOnlineState = // 按 state.userID 更新在线状态 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; 退出登录、切换账号或不再需要展示这些用户时,取消订阅并移除监听。" + }, + { + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "获取已订阅用户状态", + "description": "OpenIM React Native SDK 获取已订阅用户状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status get-subscribe-users-status", + "content": "调用 getSubscribeUsersStatus 获取当前账号已订阅用户的在线状态。 const states = await OpenIMSDK.getSubscribeUsersStatus ; 返回已订阅用户的 UserOnlineState 。目标用户尚未订阅时,请先调用 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 。" + }, + { + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "取消订阅用户状态", + "description": "OpenIM React Native SDK 取消订阅用户状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status unsubscribe-users-status", + "content": "调用 unsubscribeUsersStatus 取消订阅指定用户的在线状态。 await OpenIMSDK.unsubscribeUsersStatus userIDs ; 页面翻页、搜索结果变化、退出登录或不再需要展示这些用户时,应取消对应订阅。" + }, + { + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "分页获取好友列表", + "description": "OpenIM React Native SDK 分页获取好友列表。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-friend-list-page", + "content": "调用 getFriendListPage 分页获取当前用户的好友列表。 const friends = await OpenIMSDK.getFriendListPage offset: 0, count: 50, filterBlack: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的好友数量。 | | filterBlack | boolean | 否 | 是否过滤黑名单用户。 | 返回当前页的 FriendUserItem 。继续加载时按请求条目数增加 offset ;好友增删后重新请求列表。 好友信息字段 FriendUserItem 类型字段说明: | 字段 | 类型 | 说明 | | | | | | userID | string | 好友用户 ID。 | | nickname | string | 好友昵称。 | | faceURL | string | 好友头像地址。 | | remark | string | 当前用户为好友设置的备注。 | | isPinned | boolean | 是否置顶。 | | ownerUserID | string | 好友关系所属用户 ID。 | | operatorUserID | string | 最近执行关系操作的用户 ID。 | | addSource | number | 好友关系添加来源。 | | createTime | number | 好友关系创建时间。 | | ex | string | 好友关系扩展字段。 | | attachedInfo | string | SDK 附加信息。 | remark 、 isPinned 和 ex 属于好友关系,不是账号级用户信息。 监听好友变化 好友关系变化时,触发 OnFriendAdded 、 OnFriendInfoChanged 或 OnFriendDeleted 事件。事件直接携带对应的好友信息: const handleFriendAdd = friend: FriendUserItem = // 新增好友 ; const handleFriendChanged = friend: FriendUserItem = // 按 friend.userID 更新好友列表 ; const handleFriendDeleted = friend: FriendUserItem = // 按 friend.userID 从好友列表移除 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.on OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.on OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.off OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.off OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; 退出登录、切换账号或销毁好友列表状态时,取消这些监听。" + }, + { + "path": "/sdk/react-native/user/friends/search-friends", + "title": "搜索好友", + "description": "OpenIM React Native SDK 搜索好友。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends search-friends", + "content": "调用 searchFriends 搜索当前用户的好友。提交搜索前应去除关键词首尾空格;当前请求使用 keywordList 中的第一个非空关键词。 const friends = await OpenIMSDK.searchFriends keywordList: keyword.trim , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词数组,当前使用第一个非空关键词。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchNickname | boolean | 是 | 是否匹配好友昵称。 | | isSearchRemark | boolean | 是 | 是否匹配好友备注。 | 返回 SearchedFriendsInfo 。每项包含好友信息字段和 relationship : 0 表示黑名单关系, 1 表示好友关系。" + }, + { + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "查询指定好友资料", + "description": "OpenIM React Native SDK 查询指定好友资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-specified-friends-info", + "content": "调用 getSpecifiedFriendsInfo 按用户 ID 查询指定好友的关系信息。 const friends = await OpenIMSDK.getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userIDList | string | 是 | 要查询的用户 ID 列表。 | | filterBlack | boolean | 否 | 是否过滤黑名单用户。 | 返回匹配的 FriendUserItem ,数组不保证与输入 ID 按位置一一对应。字段说明见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。 查询陌生人的公开用户信息时,使用 获取用户资料 /sdk/react native/user/profile/get users info 。" + }, + { + "path": "/sdk/react-native/user/friends/check-friend", + "title": "检查好友关系", + "description": "OpenIM React Native SDK 检查好友关系。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends check-friend", + "content": "调用 checkFriend 批量检查当前用户与指定用户的好友关系。 const checks = await OpenIMSDK.checkFriend 'user a', 'user b' ; 返回的 FriendshipInfo 与输入用户 ID 按 userID 对应: | 字段 | 类型 | 说明 | | | | | | userID | string | 被检查用户的 ID。 | | result | number | 1 表示是好友, 0 表示不是好友。 | 需要判断黑名单关系时,另行调用 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + }, + { + "path": "/sdk/react-native/user/friends/update-friends", + "title": "更新好友资料", + "description": "OpenIM React Native SDK 更新好友资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends update-friends", + "content": "使用 updateFriends 更新 friendUserIDs 中的所有好友。 await OpenIMSDK.updateFriends friendUserIDs: friendUserID , remark: remark, isPinned: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendUserIDs | string | 是 | 要更新的好友用户 ID 列表。 | | remark | string | 否 | 新备注。 | | isPinned | boolean | 否 | 是否置顶。 | | ex | string | 否 | 新扩展字符串。 | 除 friendUserIDs 外,至少传入一个要更新的字段。不同好友需要不同值时,分别调用该方法。更新好友资料后会触发 OnFriendInfoChanged 事件,监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" + }, + { + "path": "/sdk/react-native/user/friends/delete-friend", + "title": "删除好友", + "description": "OpenIM React Native SDK 删除好友。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends delete-friend", + "content": "调用 deleteFriend 删除当前用户与指定用户的好友关系。 await OpenIMSDK.deleteFriend friendUserID ; friendUserID 是要删除的好友用户 ID。删除好友后会触发 OnFriendDeleted 事件,事件携带被删除好友的信息;好友列表的监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" + }, + { + "path": "/sdk/react-native/user/friend-applications/add-friend", + "title": "发送好友申请", + "description": "OpenIM React Native SDK 发送好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications add-friend", + "content": "调用 addFriend 向指定用户发送好友申请。 await OpenIMSDK.addFriend toUserID, reqMsg, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 要申请添加的用户 ID。 | | reqMsg | string | 是 | 申请附言;没有内容时传空字符串。 | 发送成功只表示好友申请已提交,不表示对方已经同意。申请状态变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听相关事件。" + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "获取收到的好友申请", + "description": "OpenIM React Native SDK 获取收到的好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-recipient", + "content": "调用 getFriendApplicationListAsRecipient 分页查询当前用户收到的好友申请。 const applications = await OpenIMSDK.getFriendApplicationListAsRecipient handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | handleResults | number | 是 | 要查询的申请处理结果。 | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的申请数量。 | | 枚举值 | 数值 | 含义 | | | | | | ApplicationHandleResult.Unprocessed | 0 | 待处理。 | | ApplicationHandleResult.Agree | 1 | 已同意。 | | ApplicationHandleResult.Reject | 1 | 已拒绝。 | 返回当前页的 FriendApplicationItem 。 好友申请字段 FriendApplicationItem 类型字段说明: | 字段 | 类型 | 说明 | | | | | | fromUserID | string | 申请发起人的用户 ID。 | | fromNickname | string | 申请发起人的昵称。 | | fromFaceURL | string | 申请发起人的头像地址。 | | toUserID | string | 申请接收人的用户 ID。 | | toNickname | string | 申请接收人的昵称。 | | toFaceURL | string | 申请接收人的头像地址。 | | reqMsg | string | 申请附言。 | | handleResult | ApplicationHandleResult | 当前处理结果。 | | handlerUserID | string | 执行处理的用户 ID。 | | handleMsg | string | 处理时填写的说明。 | | handleTime | number | 处理时间。 | | createTime | number | 申请记录创建时间。 | | ex | string | 申请记录扩展字符串。 | 监听好友申请变化 好友申请变化时,触发 OnFriendApplicationAdded 、 OnFriendApplicationAccepted 、 OnFriendApplicationRejected 或 OnFriendApplicationDeleted 事件。事件直接携带 FriendApplicationItem : const handleApplicationChanged = application: FriendApplicationItem = // 按 fromUserID 和 toUserID 更新申请记录 ; const handleApplicationDeleted = application: FriendApplicationItem = // 按 fromUserID 和 toUserID 移除申请记录 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; 申请记录使用 fromUserID 和 toUserID 共同定位。退出登录、切换账号或销毁申请列表状态时,取消这些监听。" + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "获取发出的好友申请", + "description": "OpenIM React Native SDK 获取发出的好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-applicant", + "content": "调用 getFriendApplicationListAsApplicant 分页查询当前用户发出的好友申请。 const applications = await OpenIMSDK.getFriendApplicationListAsApplicant offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的申请数量。 | 返回当前页的 FriendApplicationItem 。申请记录字段见 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 。" + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "获取未处理好友申请数", + "description": "OpenIM React Native SDK 获取未处理好友申请数。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-unhandled-count", + "content": "调用 getFriendApplicationUnhandledCount 查询指定时间点之后未处理的好友申请数量。 const count = await OpenIMSDK.getFriendApplicationUnhandledCount time, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | time | number | 是 | 查询起始时间,通常使用上次查看申请列表的时间。 | 返回该时间点之后的未处理好友申请数量。" + }, + { + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "接受好友申请", + "description": "OpenIM React Native SDK 接受好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications accept-friend-application", + "content": "调用 acceptFriendApplication 接受好友申请。 await OpenIMSDK.acceptFriendApplication toUserID: applicantUserID, handleMsg: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 申请发起人的用户 ID。 | | handleMsg | string | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | 接受后会建立好友关系,并触发好友申请状态变化和 OnFriendAdded 事件。好友列表变化的监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" + }, + { + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "拒绝好友申请", + "description": "OpenIM React Native SDK 拒绝好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications refuse-friend-application", + "content": "调用 refuseFriendApplication 拒绝好友申请。 await OpenIMSDK.refuseFriendApplication toUserID: applicantUserID, handleMsg: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 申请发起人的用户 ID。 | | handleMsg | string | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | 申请状态变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听相关事件。" + }, + { + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "删除好友申请", + "description": "OpenIM React Native SDK 删除好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications delete-friend-requests", + "content": "调用 deleteFriendRequests 批量删除好友申请记录。 参数说明 数组中的每一项使用以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | fromUserID | string | 是 | 申请发起人的用户 ID。 | | toUserID | string | 是 | 申请接收人的用户 ID。 | await OpenIMSDK.deleteFriendRequests fromUserID, toUserID , ; 删除记录不等于拒绝申请,也不会删除已经建立的好友关系。申请记录变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听 OnFriendApplicationDeleted 。" + }, + { + "path": "/sdk/react-native/user/blacklist/get-black-list", + "title": "获取黑名单", + "description": "OpenIM React Native SDK 获取黑名单。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist get-black-list", + "content": "调用 getBlackList 获取当前账号的黑名单。 const blockedUsers = await OpenIMSDK.getBlackList ; 返回 BlackUserItem ,常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 被拉黑的用户 ID。 | | nickname | string | 被拉黑用户的昵称。 | | faceURL | string | 被拉黑用户的头像地址。 | | ownerUserID | string | 黑名单关系所属用户 ID。 | | operatorUserID | string | 执行拉黑操作的用户 ID。 | | createTime | number | 黑名单创建时间。 | | addSource | number | 黑名单添加来源。 | | ex | string | 黑名单扩展字段。 | 资料卡或联系人列表判断黑名单关系时,应使用 userID 。黑名单与群组管理是独立能力,群成员禁言或移除请使用群组相关 API。 监听黑名单变化 黑名单变化时,触发 OnBlackAdded 或 OnBlackDeleted 事件,事件直接携带对应的黑名单用户信息: const handleBlackAdded = blackUser: BlackUserItem = // 按 blackUser.userID 加入或更新记录 ; const handleBlackDeleted = blackUser: BlackUserItem = // 按 blackUser.userID 移除记录 ; OpenIMSDK.on OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.on OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; OpenIMSDK.off OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.off OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; 退出登录、切换账号或销毁黑名单状态时,取消这些监听。" + }, + { + "path": "/sdk/react-native/user/blacklist/add-black", + "title": "将用户加入黑名单", + "description": "OpenIM React Native SDK 将用户加入黑名单。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist add-black", + "content": "调用 addBlack 将指定用户加入当前账号的黑名单。 await OpenIMSDK.addBlack toUserID, ex, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 要加入黑名单的用户 ID。 | | ex | string | 否 | 黑名单关系的扩展信息。 | 加入黑名单后会触发 OnBlackAdded 事件。黑名单列表和事件监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + }, + { + "path": "/sdk/react-native/user/blacklist/remove-black", + "title": "将用户移出黑名单", + "description": "OpenIM React Native SDK 将用户移出黑名单。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", + "content": "调用 removeBlack 将指定用户移出当前账号的黑名单。 await OpenIMSDK.removeBlack blackUserID ; blackUserID 是要移出黑名单的用户 ID。移出后会触发 OnBlackDeleted 事件,监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 1bc347fcab..91394241bc 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -6678,5 +6678,213 @@ "context": "SDKs · WASM · v4", "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations hide-all-conversations", "content": "hideAllConversations resets the list state, unread count, latest message summary, and draft of every conversation on the current device so that those conversations no longer appear in the paginated conversation list: await openimsdk.hideAllConversations ; When the Promise resolves, only the local conversation state has been reset. The operation does not delete local message records or server messages, and it does not remove groups, friend relationships, or conversations on other clients. A conversation can appear again after a new message arrives or valid conversation state is established again. After the bulk hide operation, query the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and total unread count /sdk/wasm/conversation/managing conversations/get total unread count again, then update the UI with the latest results. Do not treat Promise resolution as a remote state event." + }, + { + "path": "/sdk/react-native/user/overview-user", + "title": "User overview", + "description": "Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-user", + "content": "The OpenIM React Native SDK identifies users by userID . User APIs read and update the signed in account's profile, retrieve public user profiles, and subscribe to user online status. Friends, friend requests, and the blocklist belong to relationships between users. See Relationships overview /sdk/react native/user/overview relationships . User types The React Native SDK returns different user objects for different scenarios: | Type | Use case | Main APIs | | | | | | SelfUserInfo | The signed in user's profile, avatar, nickname, and account level message reception setting | getSelfUserInfo , setSelfInfo | | PublicUserItem | Looking up users and displaying public profile cards | getUsersInfo | | UserOnlineState | A user's online status and online platform list | subscribeUsersStatus , getSubscribeUsersStatus , unsubscribeUsersStatus | SelfUserInfo represents the signed in user, while PublicUserItem represents public information available for lookup. Friend profiles, blocklist relationships, and group member profiles use objects from the relationships or group capabilities. Feature entry points | Need | Recommended page | | | | | Look up a public profile by userID for a profile card | Get user profiles /sdk/react native/user/profile/get users info | | Read or update the current user's nickname, avatar, and extension data | Get your profile /sdk/react native/user/profile/get self user info , Update your profile /sdk/react native/user/profile/set self info | | Set the account level message reception option | Set global message reception /sdk/react native/user/profile/set global message reception | | Set how requests to add the current account are handled | Set friend request permissions /sdk/react native/user/profile/set friend add permission | | Subscribe to, read, and cancel online status subscriptions | Subscribe to online status /sdk/react native/user/online status/subscribe users status , Get subscribed user status /sdk/react native/user/online status/get subscribe users status , Unsubscribe from online status /sdk/react native/user/online status/unsubscribe users status | | Manage friends, friend requests, or the blocklist | Relationships overview /sdk/react native/user/overview relationships | Event listeners User state changes emit events. See the following pages for listener examples: Current user profile changes: Update your profile /sdk/react native/user/profile/set self info . User online status changes: Subscribe to online status /sdk/react native/user/online status/subscribe users status . Friend, friend request, and blocklist changes: Relationships overview /sdk/react native/user/overview relationships ." + }, + { + "path": "/sdk/react-native/user/overview-relationships", + "title": "Relationships overview", + "description": "Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-relationships", + "content": "Relationships record the current user's friendships, friend requests, and blocklist relationships with other users. User profiles, account settings, and online status are covered by the User overview /sdk/react native/user/overview user . Relationship objects The React Native SDK returns different objects for different relationship scenarios: | Type | Use case | Main APIs | | | | | | PublicUserItem | Looking up public profiles and displaying friend candidates or stranger profile cards | getUsersInfo | | FriendUserItem | Friend lists, friend remarks, pinned friends, and relationship extension data | getFriendListPage , getSpecifiedFriendsInfo | | FriendshipInfo | Checking the friendship between the current user and target users | checkFriend | | FriendApplicationItem | Received or sent friend requests and their handling status | getFriendApplicationListAsRecipient , getFriendApplicationListAsApplicant | | BlackUserItem | Blocklist relationships maintained by the current account | getBlackList , addBlack , removeBlack | Feature entry points | Need | Recommended page | | | | | Look up public user profiles | Get user profiles /sdk/react native/user/profile/get users info | | Page through, search, or look up friends by ID | Get the friend list /sdk/react native/user/friends/get friend list page , Search friends /sdk/react native/user/friends/search friends , Get friend profiles /sdk/react native/user/friends/get specified friends info | | Check a friendship | Check friendship /sdk/react native/user/friends/check friend | | Update or delete a friendship | Update friend information /sdk/react native/user/friends/update friends , Delete a friend /sdk/react native/user/friends/delete friend | | Send or handle a friend request | Send a friend request /sdk/react native/user/friend applications/add friend , Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient , Accept a friend request /sdk/react native/user/friend applications/accept friend application , Reject a friend request /sdk/react native/user/friend applications/refuse friend application | | View and maintain the blocklist | Get the blocklist /sdk/react native/user/blacklist/get black list , Block a user /sdk/react native/user/blacklist/add black , Unblock a user /sdk/react native/user/blacklist/remove black | Event listeners Relationship changes emit events. Listener examples are documented on the following pages: Friend request changes: Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient . Friend and friend profile changes: Get the friend list /sdk/react native/user/friends/get friend list page . Blocklist changes: Get the blocklist /sdk/react native/user/blacklist/get black list ." + }, + { + "path": "/sdk/react-native/user/profile/get-users-info", + "title": "Get user profiles", + "description": "Get public user profiles with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-users-info", + "content": "Call getUsersInfo to retrieve public user information for a batch of user IDs. This is useful for friend candidates and stranger profile cards. If your product needs to search by nickname, phone number, organization, email, or another business field, have your backend perform the search and authorization checks first, then pass the returned user IDs to getUsersInfo . const userIDList = Array.from new Set 'user a', 'user b' ; const users = await OpenIMSDK.getUsersInfo userIDList ; Parameter description userIDList is the array of user IDs to retrieve. Deduplicate the IDs before calling the API and keep the number of IDs in a single request within a reasonable limit. Return result The method returns the matching PublicUserItem : | Field | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Public account nickname. | | faceURL | string | Public account avatar URL. | | ex | string | Account extension field whose format is defined by your business. | The returned array is not guaranteed to follow the order of the input IDs. To retrieve the signed in user's information, see Get your profile /sdk/react native/user/profile/get self user info and Update your profile /sdk/react native/user/profile/set self info ." + }, + { + "path": "/sdk/react-native/user/profile/get-self-user-info", + "title": "Get your profile", + "description": "Get the current user profile with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-self-user-info", + "content": "Call getSelfUserInfo to get the signed in account's user information. const currentUser = await OpenIMSDK.getSelfUserInfo ; Return result The method returns the current account's SelfUserInfo : | Field | Type | Description | | | | | | userID | string | The OpenIM user ID of the signed in user. | | nickname | string | Account nickname. | | faceURL | string | Account avatar URL. | | createTime | number | Time when the user record was created. | | globalRecvMsgOpt | MessageReceiveOptType | The account's global message reception option. | | ex | string | An account extension string defined by your business. | Call this method after initialization and login to display the current account's avatar, nickname, and global message reception setting. Clear the stored current user information when switching accounts." + }, + { + "path": "/sdk/react-native/user/profile/set-self-info", + "title": "Update your profile", + "description": "Update the current user profile with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-self-info", + "content": "Call setSelfInfo to update the signed in account's basic display profile. Pass only the nickname , faceURL , or ex fields that should change in this request. await OpenIMSDK.setSelfInfo nickname: nickname.trim , faceURL, ex: mergedExtra, ; Parameter description | Parameter | Type | Required | Description | | | | | | | nickname | string | No | New nickname. | | faceURL | string | No | New avatar URL. | | ex | string | No | Extended user information. | Pass at least one profile field that should be updated. ex is a string. You can pass a JSON string or another business defined format for extended user information. After the profile is updated, the OnSelfInfoUpdated event carries the updated user information. Listen for current user profile changes When the user's profile changes, OnSelfInfoUpdated is emitted with the updated SelfUserInfo : function handleSelfInfoUpdated selfUserInfo: SelfUserInfo // ... // Add the listener OpenIMSDK.on OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; Remove the listener when the user logs out, switches accounts, or the user state is torn down." + }, + { + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "Set global message reception", + "description": "Set the global message reception option with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-global-message-reception", + "content": "globalRecvMsgOpt controls the current account's global message reception option. Use setSelfInfo to update the field: await OpenIMSDK.setSelfInfo globalRecvMsgOpt: MessageReceiveOptType.NotNotify, ; Parameter description | Enum value | Numeric value | Description | | | | | | MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. | | MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. | After the setting is updated, the current user information is delivered through OnSelfInfoUpdated . See Update your profile /sdk/react native/user/profile/set self info for the listener example. The global message reception option applies to the account. A conversation can also have its own message reception setting." + }, + { + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "description": "Set friend request permissions with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-friend-add-permission", + "content": "addFriendPermission controls whether users who add the current account must wait for the current user to review the request. Use setSelfInfo to update this account level setting: await OpenIMSDK.setSelfInfo addFriendPermission: AddFriendPermission.AddFriendAllowed, ; Parameter description | Enum value | Numeric value | Description | | | | | | AddFriendPermission.AddFriendAllowed | 0 | Allow requests, but require the current user to review them. | | AddFriendPermission.AddFriendAllowedNoReview | 1 | Allow requests and establish the friendship without review. | | AddFriendPermission.AddFriendDenied | 2 | Do not allow other users to add the current account. | This setting applies to future add friend actions. It does not remove existing friends or automatically process pending requests. After the setting is updated, the current user information is delivered through OnSelfInfoUpdated ; see Update your profile /sdk/react native/user/profile/set self info for the listener example." + }, + { + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "description": "Subscribe to user online status with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status subscribe-users-status", + "content": "Call subscribeUsersStatus to subscribe to the online status of specific users. Subscribe only to users whose status the current screen needs to display. const userIDs = ...new Set visibleUserIDs.filter Boolean ; const states = await OpenIMSDK.subscribeUsersStatus userIDs ; The method returns the current UserOnlineState for these users: | Field | Type | Description | | | | | | userID | string | ID of the user whose status is reported. | | status | OnlineState | OnlineState.Online means online; OnlineState.Offline means offline. | | platformIDs | Platform optional | Platforms on which the user is currently online. | Online status indicates whether the user is connected to OpenIMServer. It does not indicate whether the user is viewing the app or a conversation. Listen for online status changes When a subscribed user's status changes, OnUserStatusChanged is emitted: const handleStatusChanged = state: UserOnlineState = // Update the status for state.userID ; // Add the listener OpenIMSDK.on OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; Cancel subscriptions and remove the listener when logging out, switching accounts, or when those users no longer need to be displayed." + }, + { + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "description": "Get the status of subscribed users with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status get-subscribe-users-status", + "content": "Call getSubscribeUsersStatus to get the online status of users subscribed by the current account. const states = await OpenIMSDK.getSubscribeUsersStatus ; The method returns UserOnlineState for the subscribed users. Subscribe to a target user first with Subscribe to online status /sdk/react native/user/online status/subscribe users status ." + }, + { + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "description": "Cancel user online-status subscriptions with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status unsubscribe-users-status", + "content": "Call unsubscribeUsersStatus to cancel online status subscriptions for specific users. await OpenIMSDK.unsubscribeUsersStatus userIDs ; Cancel the corresponding subscriptions when a page changes, search results change, the user logs out, or those users no longer need to be displayed." + }, + { + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "Get the friend list", + "description": "Get the friend list with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-friend-list-page", + "content": "Call getFriendListPage to retrieve the current user's friends page by page. const friends = await OpenIMSDK.getFriendListPage offset: 0, count: 50, filterBlack: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of friends to request. | | filterBlack | boolean | No | Whether to filter out blocked users. | The method returns the current page as FriendUserItem . Increase offset by the number of returned items to load the next page. Query the list again after friends are added or deleted. Friend fields FriendUserItem contains the following fields: | Field | Type | Description | | | | | | userID | string | Friend user ID. | | nickname | string | Friend nickname. | | faceURL | string | Friend avatar URL. | | remark | string | Remark set for the friend by the current user. | | isPinned | boolean | Whether the friend is pinned. | | ownerUserID | string | User ID that owns the friendship. | | operatorUserID | string | User ID that most recently changed the relationship. | | addSource | number | Source from which the friendship was added. | | createTime | number | Time when the friendship was created. | | ex | string | Friendship extension field. | | attachedInfo | string | Information attached by the SDK. | remark , isPinned , and ex belong to the friendship and are not account level user information. Listen for friend changes When a friendship changes, OnFriendAdded , OnFriendInfoChanged , or OnFriendDeleted is emitted with the corresponding friend information: const handleFriendAdd = friend: FriendUserItem = // Add the friend ; const handleFriendChanged = friend: FriendUserItem = // Update the friend by friend.userID ; const handleFriendDeleted = friend: FriendUserItem = // Remove the friend by friend.userID ; // Add listeners OpenIMSDK.on OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.on OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.on OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; // Remove listeners OpenIMSDK.off OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.off OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.off OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; Remove these listeners when logging out, switching accounts, or tearing down the friend list state." + }, + { + "path": "/sdk/react-native/user/friends/search-friends", + "title": "Search friends", + "description": "Search the current user's friends with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends search-friends", + "content": "Call searchFriends to search the current user's friends. Trim leading and trailing whitespace before submitting a search. The current request uses the first non empty value in keywordList . const friends = await OpenIMSDK.searchFriends keywordList: keyword.trim , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | keywordList | string | Yes | Search keywords. The current request uses the first non empty keyword. | | isSearchUserID | boolean | Yes | Whether to match user IDs. | | isSearchNickname | boolean | Yes | Whether to match friend nicknames. | | isSearchRemark | boolean | Yes | Whether to match friend remarks. | The method returns SearchedFriendsInfo . Each item contains friend fields and relationship : 0 indicates a blocklist relationship and 1 indicates a friendship." + }, + { + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "description": "Get specified friend profiles with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-specified-friends-info", + "content": "Call getSpecifiedFriendsInfo to retrieve relationship information for specified user IDs. const friends = await OpenIMSDK.getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | userIDList | string | Yes | User IDs to retrieve. | | filterBlack | boolean | No | Whether to filter out blocked users. | The method returns matching FriendUserItem ; the array is not guaranteed to follow the order of the input IDs. See Get the friend list /sdk/react native/user/friends/get friend list page for field descriptions. For public information about users who are not your friends, use Get user profiles /sdk/react native/user/profile/get users info ." + }, + { + "path": "/sdk/react-native/user/friends/check-friend", + "title": "Check friendship status", + "description": "Check friendships with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends check-friend", + "content": "Call checkFriend to check the friendship between the current user and multiple target users. const checks = await OpenIMSDK.checkFriend 'user a', 'user b' ; The returned FriendshipInfo corresponds to the input IDs by userID : | Field | Type | Description | | | | | | userID | string | ID of the user being checked. | | result | number | 1 means the users are friends; 0 means they are not. | To determine a blocklist relationship, call Get the blocklist /sdk/react native/user/blacklist/get black list separately." + }, + { + "path": "/sdk/react-native/user/friends/update-friends", + "title": "Update friend information", + "description": "Update friend information with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends update-friends", + "content": "Call updateFriends to update every friend in friendUserIDs . await OpenIMSDK.updateFriends friendUserIDs: friendUserID , remark: remark, isPinned: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | friendUserIDs | string | Yes | Friend user IDs to update. | | remark | string | No | New remark. | | isPinned | boolean | No | Whether to pin the friend. | | ex | string | No | New extension string. | Pass at least one field to update in addition to friendUserIDs . Call the method separately when different friends need different values. After friend information changes, OnFriendInfoChanged is emitted; see Get the friend list /sdk/react native/user/friends/get friend list page for the listener example." + }, + { + "path": "/sdk/react-native/user/friends/delete-friend", + "title": "Delete a friend", + "description": "Delete a friend with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends delete-friend", + "content": "Call deleteFriend to delete the friendship between the current user and a specified user. await OpenIMSDK.deleteFriend friendUserID ; friendUserID is the user ID of the friend to delete. After the friend is deleted, OnFriendDeleted is emitted with the deleted friend's information. See Get the friend list /sdk/react native/user/friends/get friend list page for the listener example." + }, + { + "path": "/sdk/react-native/user/friend-applications/add-friend", + "title": "Send a friend application", + "description": "Send a friend request with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications add-friend", + "content": "Call addFriend to send a friend request to a specified user. await OpenIMSDK.addFriend toUserID, reqMsg, ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID to add. | | reqMsg | string | Yes | Message attached to the request. Pass an empty string when there is no message. | A successful call means that the friend request was submitted; it does not mean that the recipient has accepted it. For request status changes, see the listener examples in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "description": "Get received friend requests with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-recipient", + "content": "Call getFriendApplicationListAsRecipient to page through friend requests received by the current user. const applications = await OpenIMSDK.getFriendApplicationListAsRecipient handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; Parameter description | Parameter | Type | Required | Description | | | | | | | handleResults | number | Yes | Request handling results to retrieve. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of requests to retrieve. | | Enum value | Numeric value | Meaning | | | | | | ApplicationHandleResult.Unprocessed | 0 | Pending. | | ApplicationHandleResult.Agree | 1 | Accepted. | | ApplicationHandleResult.Reject | 1 | Rejected. | The method returns the current page as FriendApplicationItem . Friend request fields FriendApplicationItem contains the following fields: | Field | Type | Description | | | | | | fromUserID | string | Applicant's user ID. | | fromNickname | string | Applicant's nickname. | | fromFaceURL | string | Applicant's avatar URL. | | toUserID | string | Recipient's user ID. | | toNickname | string | Recipient's nickname. | | toFaceURL | string | Recipient's avatar URL. | | reqMsg | string | Message attached to the request. | | handleResult | ApplicationHandleResult | Current handling result. | | handlerUserID | string | User ID that handled the request. | | handleMsg | string | Message entered when handling the request. | | handleTime | number | Time when the request was handled. | | createTime | number | Time when the request record was created. | | ex | string | Request record extension string. | Listen for friend request changes When a friend request changes, OnFriendApplicationAdded , OnFriendApplicationAccepted , OnFriendApplicationRejected , or OnFriendApplicationDeleted is emitted with a FriendApplicationItem : const handleApplicationChanged = application: FriendApplicationItem = // Update the request by fromUserID and toUserID ; const handleApplicationDeleted = application: FriendApplicationItem = // Remove the request by fromUserID and toUserID ; // Add listeners OpenIMSDK.on OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; // Remove listeners OpenIMSDK.off OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; Identify a request with both fromUserID and toUserID . Remove these listeners when logging out, switching accounts, or tearing down the request list state." + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "description": "Get sent friend requests with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-applicant", + "content": "Call getFriendApplicationListAsApplicant to page through friend requests sent by the current user. const applications = await OpenIMSDK.getFriendApplicationListAsApplicant offset: 0, count: 20, ; Parameter description | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of requests to retrieve. | The method returns the current page as FriendApplicationItem . See Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient for request fields." + }, + { + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get pending application count", + "description": "Get the unhandled friend-request count with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-unhandled-count", + "content": "Call getFriendApplicationUnhandledCount to get the number of unhandled friend requests after a specified time. const count = await OpenIMSDK.getFriendApplicationUnhandledCount time, ; Parameter description | Parameter | Type | Required | Description | | | | | | | time | number | Yes | Start time for the query, normally the last time the request list was viewed. | The method returns the number of unhandled friend requests after the specified time." + }, + { + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "Accept a friend application", + "description": "Accept a friend request with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications accept-friend-application", + "content": "Call acceptFriendApplication to accept a friend request. await OpenIMSDK.acceptFriendApplication toUserID: applicantUserID, handleMsg: '', ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID of the applicant. | | handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. | Accepting the request establishes a friendship and emits friend request status changes and OnFriendAdded . See Get the friend list /sdk/react native/user/friends/get friend list page for the friend list listener." + }, + { + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "Reject a friend application", + "description": "Reject a friend request with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications refuse-friend-application", + "content": "Call refuseFriendApplication to reject a friend request. await OpenIMSDK.refuseFriendApplication toUserID: applicantUserID, handleMsg: '', ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID of the applicant. | | handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. | For request status changes, see the listener examples in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." + }, + { + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "Delete friend applications", + "description": "Delete friend-request records with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications delete-friend-requests", + "content": "Call deleteFriendRequests to delete multiple friend request records. Parameter description Each item in the array contains the following fields: | Parameter | Type | Required | Description | | | | | | | fromUserID | string | Yes | Applicant's user ID. | | toUserID | string | Yes | Recipient's user ID. | await OpenIMSDK.deleteFriendRequests fromUserID, toUserID , ; Deleting a record is not the same as rejecting the request, and it does not delete an established friendship. For request record changes, see OnFriendApplicationDeleted in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." + }, + { + "path": "/sdk/react-native/user/blacklist/get-black-list", + "title": "Get the blacklist", + "description": "Get the blocklist with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist get-black-list", + "content": "Call getBlackList to get the current account's blocklist. const blockedUsers = await OpenIMSDK.getBlackList ; The method returns BlackUserItem : | Field | Type | Description | | | | | | userID | string | ID of the blocked user. | | nickname | string | Nickname of the blocked user. | | faceURL | string | Avatar URL of the blocked user. | | ownerUserID | string | User ID that owns the blocklist relationship. | | operatorUserID | string | User ID that performed the block operation. | | createTime | number | Time when the blocklist record was created. | | addSource | number | Source from which the user was blocked. | | ex | string | Blocklist extension field. | Use userID when checking a blocklist relationship in a profile card or contact list. Blocklist management is separate from group management; use group APIs for muting or removing group members. Listen for blocklist changes When the blocklist changes, OnBlackAdded or OnBlackDeleted is emitted with the corresponding blocked user information: const handleBlackAdded = blackUser: BlackUserItem = // Add or update the record by blackUser.userID ; const handleBlackDeleted = blackUser: BlackUserItem = // Remove the record by blackUser.userID ; OpenIMSDK.on OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.on OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; OpenIMSDK.off OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.off OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; Remove these listeners when logging out, switching accounts, or tearing down the blocklist state." + }, + { + "path": "/sdk/react-native/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "description": "Block a user with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist add-black", + "content": "Call addBlack to add a specified user to the current account's blocklist. await OpenIMSDK.addBlack toUserID, ex, ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID to block. | | ex | string | No | Blocklist relationship extension information. | After the user is blocked, OnBlackAdded is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the blocklist and listener example." + }, + { + "path": "/sdk/react-native/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "description": "Unblock a user with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", + "content": "Call removeBlack to remove a specified user from the current account's blocklist. await OpenIMSDK.removeBlack blackUserID ; blackUserID is the user ID to unblock. After the user is removed, OnBlackDeleted is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the listener example." } ] diff --git a/src/lib/client-sdk-commercial.ts b/src/lib/client-sdk-commercial.ts index 7f0c125136..2e9895142c 100644 --- a/src/lib/client-sdk-commercial.ts +++ b/src/lib/client-sdk-commercial.ts @@ -1,6 +1,7 @@ import flutterAudit from '@/data/structure/flutter-content-audit.json'; import iosAudit from '@/data/structure/ios-content-audit.json'; import androidAudit from '@/data/structure/android-content-audit.json'; +import reactNativeAudit from '@/data/structure/react-native-content-audit.json'; import ownership from '@/data/structure/wasm-api-ownership.json'; type OwnershipEntry = { @@ -10,7 +11,7 @@ type OwnershipEntry = { commercial?: boolean; }; -type NativePlatform = 'android' | 'flutter' | 'ios'; +type NativePlatform = 'android' | 'flutter' | 'ios' | 'react-native'; type ClientSdkAuditPage = { currentPath: string; @@ -40,6 +41,7 @@ const nativeAudits: Record = { android: androidAudit.pages as ClientSdkAuditPage[], flutter: flutterAudit.pages as ClientSdkAuditPage[], ios: iosAudit.pages as ClientSdkAuditPage[], + 'react-native': reactNativeAudit.pages as ClientSdkAuditPage[], }; const platformSymbolAliases: Record> = { @@ -72,6 +74,7 @@ const platformSymbolAliases: Record> = { Open_im_sdkUpdateConversationGroup: 'updateConversationGroup', setConversationPinnedMsgWithConversationID: 'setConversationPinnedMsg', }, + 'react-native': {}, }; const partialCommercialConceptSources: Record = { @@ -120,6 +123,7 @@ const fullCommercialConceptPages = new Set([ '/sdk/android/conversation/managing-conversations/set-burn-duration', '/sdk/android/conversation/managing-conversations/set-message-destruct', '/sdk/android/user/user-profile/set-friend-add-permission', + '/sdk/react-native/user/profile/set-friend-add-permission', ]); function applyCommercialConceptOverride( @@ -166,7 +170,7 @@ function parseClientSdkPath( | { platform: 'wasm'; wasmPath: string } | { platform: NativePlatform; wasmPath: string } | undefined { - const match = pagePath.match(/^\/sdk\/(android|wasm|flutter|ios)(\/.*)$/); + const match = pagePath.match(/^\/sdk\/(android|wasm|flutter|ios|react-native)(\/.*)$/); if (!match) return undefined; const platform = match[1] as 'wasm' | NativePlatform; diff --git a/src/lib/client-sdk-publication.ts b/src/lib/client-sdk-publication.ts index 83c31ee0fc..94dedfbf62 100644 --- a/src/lib/client-sdk-publication.ts +++ b/src/lib/client-sdk-publication.ts @@ -6,9 +6,11 @@ import iosAuditData from '../../data/structure/ios-content-audit.json' with { ty import iosSidebarData from '../../data/structure/ios-sidebar.json' with { type: 'json' }; import wasmAuditData from '../../data/structure/wasm-content-audit.json' with { type: 'json' }; import wasmSidebarData from '../../data/structure/wasm-sidebar.json' with { type: 'json' }; +import reactNativeAuditData from '../../data/structure/react-native-content-audit.json' with { type: 'json' }; +import reactNativeSidebarData from '../../data/structure/react-native-sidebar.json' with { type: 'json' }; export type ReviewLocale = 'en' | 'zh'; -export type ClientSdkPlatform = 'android' | 'flutter' | 'ios' | 'wasm'; +export type ClientSdkPlatform = 'android' | 'flutter' | 'ios' | 'wasm' | 'react-native'; type ReviewStatus = | 'deferred' @@ -87,6 +89,10 @@ const publicationLookup = createClientSdkPublicationLookup({ pages: wasmAuditData.pages as ClientSdkAuditPage[], activePaths: flattenSidebarPaths(wasmSidebarData.nodes), }, + 'react-native': { + pages: reactNativeAuditData.pages as ClientSdkAuditPage[], + activePaths: flattenSidebarPaths(reactNativeSidebarData.nodes), + }, }); const platformNames: Record = { @@ -94,6 +100,7 @@ const platformNames: Record = { flutter: 'Flutter', ios: 'iOS', wasm: 'WASM', + 'react-native': 'React Native', }; export function getClientSdkPendingReviewBody(platform: ClientSdkPlatform): string { diff --git a/src/lib/localized-docs.ts b/src/lib/localized-docs.ts index c2789920b2..aef394ef6b 100644 --- a/src/lib/localized-docs.ts +++ b/src/lib/localized-docs.ts @@ -6,6 +6,7 @@ import androidSdkData from '@/src/generated/android-sdk-zh-content.json'; import flutterSdkData from '@/src/generated/flutter-sdk-zh-content.json'; import iosSdkData from '@/src/generated/ios-sdk-zh-content.json'; import wasmSdkData from '@/src/generated/wasm-sdk-zh-content.json'; +import reactNativeSdkData from '@/src/generated/react-native-sdk-zh-content.json'; import localizedPlatformApiData from '@/src/generated/platform-api-zh-content.json'; import { extractMarkdownHeadings } from '@/src/lib/heading-ids'; import type { Locale } from '@/src/lib/i18n'; @@ -34,6 +35,7 @@ const sdkZhByContext: Record = { 'chat/sdk/flutter': flutterSdkData as LocalizedSdkData, 'chat/sdk/ios': iosSdkData as LocalizedSdkData, 'chat/sdk/wasm': wasmSdkData as LocalizedSdkData, + 'chat/sdk/react-native': reactNativeSdkData as LocalizedSdkData, }; const platformApiZh = localizedPlatformApiData as { navigationLabels: Record }; const localizedPageCache = new Map(); From 0e0fdc17885e1b415b93d3f8e1824040cb12d788 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Mon, 24 Aug 2026 17:54:42 +0800 Subject: [PATCH 02/15] docs(react-native): add conversation documentation --- .../add-conversations-to-groups.mdx | 31 + .../create-conversation-group.mdx | 36 + .../delete-conversation-group.mdx | 23 + ...versation-group-ids-by-conversation-id.mdx | 25 + ...ersation-group-info-with-conversations.mdx | 43 + .../get-conversation-groups.mdx | 27 + .../overview-conversation-groups.mdx | 75 + .../remove-conversations-from-groups.mdx | 31 + .../set-conversation-group-order.mdx | 33 + .../update-conversation-group.mdx | 34 + .../clear-conversation-messages.mdx | 25 + .../clear-group-mentions.mdx | 27 + .../delete-conversation-with-messages.mdx | 25 + .../get-total-unread-count.mdx | 36 + .../hide-a-conversation.mdx | 25 + .../hide-all-conversations.mdx | 19 + .../mark-conversation-read.mdx | 25 + .../mark-conversation.mdx | 33 + .../pin-conversation.mdx | 31 + .../set-burn-duration.mdx | 31 + .../set-conversation-draft.mdx | 33 + .../set-conversation-extension.mdx | 35 + .../set-conversation-remark.mdx | 33 + .../set-message-destruct.mdx | 37 + .../set-message-receive-option.mdx | 39 + .../set-private-chat.mdx | 31 + .../conversation/overview-conversation.mdx | 67 + .../get-conversation-by-target.mdx | 31 + .../get-conversation-id.mdx | 31 + .../get-conversations-by-id.mdx | 25 + .../retrieve-conversation-list.mdx | 85 + .../add-conversations-to-groups.mdx | 31 + .../create-conversation-group.mdx | 36 + .../delete-conversation-group.mdx | 23 + ...versation-group-ids-by-conversation-id.mdx | 25 + ...ersation-group-info-with-conversations.mdx | 43 + .../get-conversation-groups.mdx | 27 + .../overview-conversation-groups.mdx | 81 + .../remove-conversations-from-groups.mdx | 31 + .../set-conversation-group-order.mdx | 33 + .../update-conversation-group.mdx | 34 + .../clear-conversation-messages.mdx | 25 + .../clear-group-mentions.mdx | 27 + .../delete-conversation-with-messages.mdx | 25 + .../get-total-unread-count.mdx | 39 + .../hide-a-conversation.mdx | 25 + .../hide-all-conversations.mdx | 19 + .../mark-conversation-read.mdx | 25 + .../mark-conversation.mdx | 33 + .../pin-conversation.mdx | 31 + .../set-burn-duration.mdx | 31 + .../set-conversation-draft.mdx | 33 + .../set-conversation-extension.mdx | 35 + .../set-conversation-remark.mdx | 33 + .../set-message-destruct.mdx | 37 + .../set-message-receive-option.mdx | 39 + .../set-private-chat.mdx | 31 + .../conversation/overview-conversation.mdx | 67 + .../get-conversation-by-target.mdx | 31 + .../get-conversation-id.mdx | 31 + .../get-conversations-by-id.mdx | 25 + .../retrieve-conversation-list.mdx | 87 + .../structure/react-native-content-audit.json | 1489 +++++++++++++++-- .../react-native-navigation-labels.json | 44 +- data/structure/react-native-sidebar.json | 169 ++ src/generated/navigation.json | 381 ++++- .../react-native-sdk-zh-content.json | 663 +++++++- src/generated/routes.json | 558 ++++++ src/generated/search-index-zh.json | 248 +++ src/generated/search-index.json | 248 +++ src/lib/client-sdk-commercial.ts | 9 +- 71 files changed, 5809 insertions(+), 175 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx create mode 100644 content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/overview-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx new file mode 100644 index 0000000000..fb4e4323fd --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -0,0 +1,31 @@ +--- +title: 'Add conversations to groups' +description: 'Add one or more conversations to conversation groups.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups' +--- + +Call `addConversationsToGroups()` to add one or more conversations to one or more conversation groups. + +```ts +await OpenIMSDK.addConversationsToGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: [conversationGroupID], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationIDs` | `string[]` | Yes | Conversation IDs to add. | +| `conversationGroupIDs` | `string[]` | Yes | Target conversation-group IDs. | + +## Return result + +After the call completes, the conversation-group membership request is complete. Membership changes are delivered through `OnConversationGroupMemberAdded`; the callback includes the group, conversation IDs, and conversation details. See [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) for the listener. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx new file mode 100644 index 0000000000..f5b20c46c4 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -0,0 +1,36 @@ +--- +title: 'Create a conversation group' +description: 'Create a conversation group for the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group' +--- + +Call `createConversationGroup()` to create a conversation group for the current account. A normal group requires at least `name`; you can also add a conversation when creating it. + +```ts +const group = await OpenIMSDK.createConversationGroup({ + name: 'Work', + order: 100, + conversationID, + conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `name` | `string` | Yes | Group name. | +| `order` | `number` | No | Group sort value. | +| `ex` | `string` | No | Group extension string. | +| `conversationID` | `string` | No | Conversation ID to add immediately after creation. | +| `conversationGroupType` | `ConversationGroupType` | No | Group type. Use `ConversationGroupTypeNormal` for a normal custom group. | + +## Return result + +The call returns the new `ConversationGroupResp`, including fields such as `conversationGroupID`, `name`, `order`, and `conversationIDs`. Group creation is delivered through `OnConversationGroupAdded`; see [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx new file mode 100644 index 0000000000..8b8f1b248d --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -0,0 +1,23 @@ +--- +title: 'Delete a conversation group' +description: 'Delete a conversation group and its conversation membership.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group' +--- + +Call `deleteConversationGroup()` to delete a conversation group and its conversation membership. + +```ts +await OpenIMSDK.deleteConversationGroup(conversationGroupID); +``` + +`conversationGroupID` is the ID of the conversation group. + +## Return result + +After the call completes, the group deletion request is complete. The operation does not delete conversations or messages. Group changes are delivered through `OnConversationGroupDeleted`; see [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx new file mode 100644 index 0000000000..39bf93ccd2 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx @@ -0,0 +1,25 @@ +--- +title: 'Get groups for a conversation' +description: 'Query the conversation groups that contain a conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id' +--- + +A conversation can belong to multiple conversation groups. Call `getConversationGroupByConversationID()` to get the groups that contain it. To query all groups or filter by type, use [Get conversation groups](/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups). + +```ts +const groups = await OpenIMSDK.getConversationGroupByConversationID(conversationID); +``` + +## Parameters + +`conversationID` is an OpenIM conversation ID, not a chat group ID. + +## Return result + +The call returns `ConversationGroup[]`; each item is a complete group object. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx new file mode 100644 index 0000000000..f43fc004c2 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -0,0 +1,43 @@ +--- +title: 'Get conversations in a group' +description: 'Query a conversation group and its paginated conversations.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations' +--- + +Call `getConversationGroupInfoWithConversations()` to get a conversation group and its paginated conversation list. + +```ts +const result = await OpenIMSDK.getConversationGroupInfoWithConversations({ + conversationGroupID, + pagination: { + pageNumber: 1, + showNumber: 20, + }, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | Yes | Conversation-group ID to query. | +| `pagination.pageNumber` | `number` | Yes | Page number, starting at `1`. | +| `pagination.showNumber` | `number` | Yes | Number of conversations per page. | + +## Return result + +The call returns an object with these fields: + +| Field | Type | Description | +| --- | --- | --- | +| `group` | `ConversationGroup` | Current group information. | +| `conversationTotal` | `number` | Total number of conversations in the group. | +| `conversationElems` | `ConversationItem[]` | Conversation details for the current page. | + +Stop requesting pages after the number of loaded conversations reaches `conversationTotal`. See [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for conversation fields and [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) for group fields. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx new file mode 100644 index 0000000000..524a174a4d --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -0,0 +1,27 @@ +--- +title: 'Get conversation groups' +description: 'Query the current account's conversation groups by type.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups' +--- + +Call `getConversationGroups()` to get the current account's conversation groups by type. + +```ts +const groups = await OpenIMSDK.getConversationGroups( + ConversationGroupType.ConversationGroupTypeNormal, +); +``` + +## Parameters + +The parameter is a `ConversationGroupType`: use `ConversationGroupTypeNormal` for normal custom groups or `ConversationGroupTypeAll` to query all group types. + +## Return result + +The call returns the matching `ConversationGroup[]`. See [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) for fields. Groups store conversation IDs; use [Get conversations in a group](/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) when conversation details are also needed. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx new file mode 100644 index 0000000000..c19cef2437 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -0,0 +1,75 @@ +--- +title: 'Conversation group overview' +description: 'Learn about conversation groups in the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups' +--- + +Conversation groups classify the current account's conversation list by business scenario, such as work, pending tasks, or custom categories. + +## Group types + +`ConversationGroupType` contains these values: + +| Enum value | Numeric value | Description | +| --- | --- | --- | +| `ConversationGroupType.ConversationGroupTypeNormal` | `0` | Normal custom group. | +| `ConversationGroupType.ConversationGroupTypeFilter` | `1` | Group filtered by rules. | +| `ConversationGroupType.ConversationGroupTypeAll` | `2` | Query all group types. | + +## Group fields + +`ConversationGroup` uses `conversationGroupID` as its identifier: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationGroupID` | `string` | Conversation-group ID. | +| `name` | `string` | Group name. | +| `serial` | `number` | Group sort value. | +| `version` | `number` | Group data version. | +| `conversationGroupType` | `ConversationGroupType` | Group type. | +| `hidden` | `boolean` | Whether the group is hidden. | +| `unreadCount` | `number` | Total unread count in the group. | +| `conversationIDs` | `string[]` | Conversation IDs currently in the group. | +| `ex` | `string` (optional) | Application extension string. | + +## Listen for group changes + +Group operations emit events for added, updated, or deleted groups. Membership events include the group, conversation IDs, and conversation details. Event callbacks receive the entities directly, without a `data` field. Update groups by `conversationGroupID` and membership by the event's `conversationIDs`. + +```ts +const handleGroupAdded = (groups: ConversationGroup[]) => { + // ... +}; +const handleGroupChanged = (groups: ConversationGroup[]) => { + // ... +}; +const handleGroupDeleted = (groups: ConversationGroup[]) => { + // ... +}; +const handleGroupMemberAdded = (payload: ConversationGroupMemberChangedCallbackData) => { + // ... +}; +const handleGroupMemberDeleted = (payload: ConversationGroupMemberChangedCallbackData) => { + // ... +}; + +OpenIMSDK.on(OpenIMEvent.OnConversationGroupAdded, handleGroupAdded); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupChanged, handleGroupChanged); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted); + +OpenIMSDK.off(OpenIMEvent.OnConversationGroupAdded, handleGroupAdded); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupChanged, handleGroupChanged); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted); +``` + +Remove the listeners when the component is destroyed, the user logs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx new file mode 100644 index 0000000000..e431d24bd0 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -0,0 +1,31 @@ +--- +title: 'Remove conversations from groups' +description: 'Remove one or more conversations from conversation groups.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups' +--- + +Call `removeConversationsFromGroups()` to remove one or more conversations from the specified groups. + +```ts +await OpenIMSDK.removeConversationsFromGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: [conversationGroupID], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationIDs` | `string[]` | Yes | Conversation IDs to remove. | +| `conversationGroupIDs` | `string[]` | Yes | Target conversation-group IDs. | + +## Return result + +After the call completes, the membership-removal request is complete. Membership changes are delivered through `OnConversationGroupMemberDeleted`; the callback includes the group and conversation IDs. See [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx new file mode 100644 index 0000000000..44ca06d9e9 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -0,0 +1,33 @@ +--- +title: 'Reorder conversation groups' +description: 'Batch-update the sort values of conversation groups.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order' +--- + +Call `setConversationGroupOrder()` to batch-update the sort values of conversation groups. + +```ts +await OpenIMSDK.setConversationGroupOrder([ + { conversationGroupID: firstGroupID, order: 100 }, + { conversationGroupID: secondGroupID, order: 200 }, +]); +``` + +## Parameters + +The method receives an array. Each item contains: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | Yes | Group ID whose order should be updated. | +| `order` | `number` | Yes | New sort value. The application should use one consistent sort direction. | + +## Return result + +The call does not return group data. The UI can use the submitted values or obtain the latest groups from `OnConversationGroupChanged` or a new query. See [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx new file mode 100644 index 0000000000..f8311c84d4 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -0,0 +1,34 @@ +--- +title: 'Update a conversation group' +description: 'Update an existing conversation group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group' +--- + +Call `updateConversationGroup()` to update an existing conversation group. Pass only the fields that need to change. + +```ts +const group = await OpenIMSDK.updateConversationGroup({ + conversationGroupID, + name: 'Priority work', + hidden: false, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | Yes | Conversation-group ID to update. | +| `name` | `string` | No | New group name. | +| `ex` | `string` | No | New group extension string. | +| `hidden` | `boolean` | No | Whether the group is hidden. | + +## Return result + +The call returns the updated `ConversationGroupResp`. Group changes are delivered through `OnConversationGroupChanged`; see [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx new file mode 100644 index 0000000000..2b90554af1 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx @@ -0,0 +1,25 @@ +--- +title: 'Clear messages in a conversation' +description: 'Clear the current account's messages in a conversation without deleting the conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/clear-conversation-messages' +--- + +Call `clearConversationAndDeleteAllMsg()` to clear the current account's messages in a conversation without deleting the conversation. + +```ts +await OpenIMSDK.clearConversationAndDeleteAllMsg(conversationID); +``` + +## Parameters + +`conversationID` is the ID of the conversation whose messages should be cleared. + +## Return result + +After the call completes, clear the message list shown on the current screen. If the latest message, summary, or unread state changes, read the updated conversation from `OnConversationChanged` or query the conversation list again. See [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for listener cleanup. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx new file mode 100644 index 0000000000..fbf1ddad5a --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx @@ -0,0 +1,27 @@ +--- +title: 'Reset group mention status' +description: 'Reset the mention status of a group conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/clear-group-mentions' +--- + +After the user handles mention messages in a group conversation, call `resetConversationGroupAtType()` to reset the conversation's group mention status. + +```ts +await OpenIMSDK.resetConversationGroupAtType(conversationID); +``` + +## Parameters + +`conversationID` is the ID of the group conversation whose mention status should be reset. + +The method restores `groupAtType` to its normal state. It does not set states such as “mentioned me” or “mentioned everyone”. Resetting the group mention status and [marking a conversation as read](/sdk/react-native/conversation/managing-conversations/mark-conversation-read) are separate operations. + +## Return result + +After the call completes, the conversation's group mention status is reset. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for listener details. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx new file mode 100644 index 0000000000..e1eeaa0408 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -0,0 +1,25 @@ +--- +title: 'Delete a conversation and its messages' +description: 'Delete a conversation and the current account's messages in it.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages' +--- + +Call `deleteConversationAndDeleteAllMsg()` to delete the conversation record and the current account's messages in it. + +```ts +await OpenIMSDK.deleteConversationAndDeleteAllMsg(conversationID); +``` + +## Parameters + +`conversationID` is the ID of the conversation to delete. + +## Return result + +After the call completes, remove the conversation and its messages from the current screen. If `OnConversationChanged` is received later, update the list by `conversationID`. See [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for listener details. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx new file mode 100644 index 0000000000..fb7bb6c522 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx @@ -0,0 +1,36 @@ +--- +title: 'Track the total unread count' +description: 'Get the total unread message count across the current account's conversations.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/get-total-unread-count' +--- + +Call `getTotalUnreadMsgCount()` to get the total unread count across all conversations for the current account. Do not calculate it by adding `unreadCount` from loaded pages, because unloaded conversations would be omitted. + +```ts +const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount(); +``` + +## Return result + +The call returns the total unread count as a `number`. + +## Listen for changes + +When the app is in the foreground, use `OnTotalUnreadMessageCountChanged` to listen for changes: + +```ts +function handleTotalUnreadChanged(totalUnread: number) { + // ... +} + +OpenIMSDK.on(OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged); +OpenIMSDK.off(OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged); +``` + +Remove the listener when the component is destroyed, the user logs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx new file mode 100644 index 0000000000..2e59120faf --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx @@ -0,0 +1,25 @@ +--- +title: 'Hide a conversation' +description: 'Hide a conversation from the current account's conversation list.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/hide-a-conversation' +--- + +Call `hideConversation()` to hide a conversation from the current account's conversation list. A new message or later conversation synchronization may make it appear again. + +```ts +await OpenIMSDK.hideConversation(conversationID); +``` + +## Parameters + +`conversationID` is the ID of the conversation to hide. + +## Return result + +After the call completes, remove the conversation with the matching `conversationID` from the current list. If `OnConversationChanged` is received later, update the list by `conversationID`. See [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for listener details. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx new file mode 100644 index 0000000000..c996598fe8 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx @@ -0,0 +1,19 @@ +--- +title: 'Hide all conversations' +description: 'Hide all conversations for the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/hide-all-conversations' +--- + +Call `hideAllConversations()` to hide all conversations for the current account. + +```ts +await OpenIMSDK.hideAllConversations(); +``` + +After the call completes, query [the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) and [the total unread count](/sdk/react-native/conversation/managing-conversations/get-total-unread-count) to refresh the UI. A conversation may reappear when a new message arrives or its state is synchronized again. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx new file mode 100644 index 0000000000..fd0c164eb0 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx @@ -0,0 +1,25 @@ +--- +title: 'Mark a conversation as read' +description: 'Mark a conversation as read for the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/mark-conversation-read' +--- + +After the user opens a conversation and reads its messages, call `markConversationMessageAsRead()` to mark it as read. + +```ts +await OpenIMSDK.markConversationMessageAsRead(conversationID); +``` + +## Parameters + +`conversationID` is the ID of the conversation to mark as read. + +## Return result + +After the call completes, the current account's unread state for the conversation is updated. Unread-count changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). For group conversations, this method changes only the current account's conversation unread state. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx new file mode 100644 index 0000000000..3d3c45f8fe --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx @@ -0,0 +1,33 @@ +--- +title: 'Mark or unmark a conversation' +description: 'Mark or unmark a conversation for the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/mark-conversation' +--- + +Call `setConversation()` to set the marked state of a conversation. + +```ts +await OpenIMSDK.setConversation({ + conversationID, + isMarked: true, +}); +``` + +Set `isMarked` to `false` to unmark the conversation. The marked state belongs to the current account, and marked conversations appear in the built-in marked-conversation group. See [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) for group management. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `isMarked` | `boolean` | No | Set `true` to mark or `false` to unmark. | + +## Return result + +After the call completes, the conversation's `isMarked` state is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx new file mode 100644 index 0000000000..0d401825a2 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx @@ -0,0 +1,31 @@ +--- +title: 'Pin or unpin a conversation' +description: 'Pin or unpin a conversation for the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/pin-conversation' +--- + +Call `pinConversation()` to set whether a conversation is pinned. + +```ts +await OpenIMSDK.pinConversation({ + conversationID, + isPinned: true, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `isPinned` | `boolean` | Yes | Set `true` to pin or `false` to unpin. | + +## Return result + +After the call completes, the conversation's `isPinned` state is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx new file mode 100644 index 0000000000..1e4727a4f7 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx @@ -0,0 +1,31 @@ +--- +title: 'Set the burn duration' +description: 'Set the burn-after-reading duration for a conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-burn-duration' +--- + +Call `setConversationBurnDuration()` to set the burn-after-reading duration in seconds. This method sets only the duration; use [Enable or disable burn after reading](/sdk/react-native/conversation/managing-conversations/set-private-chat) to enable the mode. Do not confuse `burnDuration` with the server-side deletion period `msgDestructTime`. + +```ts +await OpenIMSDK.setConversationBurnDuration({ + conversationID, + burnDuration: 30, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `burnDuration` | `number` | Yes | Burn-after-reading duration in seconds. | + +## Return result + +After the call completes, the conversation's burn-after-reading duration is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx new file mode 100644 index 0000000000..791410e9b5 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx @@ -0,0 +1,33 @@ +--- +title: 'Set a conversation draft' +description: 'Save a draft for a conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-conversation-draft' +--- + +Use `setConversationDraft()` to save a conversation draft. Submit the current editor content when the user leaves the chat screen, switches conversations, or is about to log out. + +```ts +await OpenIMSDK.setConversationDraft({ + conversationID, + draftText: editorValue, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID for the draft. | +| `draftText` | `string` | Yes | Draft content. Pass an empty string to clear the draft. | + +Keep the editor state in the application while the user is typing, then save the latest value before leaving the screen. + +## Return result + +After the call completes, the draft is saved. Changes to `draftText` and `draftTextTime` in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). Clear the application's editor state when the account changes or the user logs out. diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx new file mode 100644 index 0000000000..89938889ce --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx @@ -0,0 +1,35 @@ +--- +title: 'Set conversation extra data' +description: 'Set the conversation extension string.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-conversation-extension' +--- + +Use `setConversation()` to set the conversation extension field `ex`. + +```ts +await OpenIMSDK.setConversation({ + conversationID, + ex: JSON.stringify({ + category: 'work', + }), +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `ex` | `string` | No | Conversation extension string. Pass a JSON string or another format of extension data as needed by the application. | + +If existing extension data must be preserved, read the current `ex`, update it according to the application's rules, and write the complete value back. + +## Return result + +After the call completes, the conversation's `ex` is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx new file mode 100644 index 0000000000..692582ce8f --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx @@ -0,0 +1,33 @@ +--- +title: 'Set a conversation remark' +description: 'Set a remark for a conversation for the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-conversation-remark' +--- + +Call `setConversation()` to set a conversation remark for the current account. + +```ts +await OpenIMSDK.setConversation({ + conversationID, + remark: 'Project discussion', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `remark` | `string` | No | Conversation remark. Pass an empty string to clear the existing remark. | + +When displaying a conversation name, the application can prefer `remark` and fall back to `showName` when no remark is set. A conversation remark does not update the user's profile or the group name. + +## Return result + +After the call completes, the conversation's `remark` is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx new file mode 100644 index 0000000000..8670edc48c --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx @@ -0,0 +1,37 @@ +--- +title: 'Schedule server message deletion' +description: 'Configure scheduled deletion of messages stored on the server.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-message-destruct' +--- + +Call `setConversation()` to configure scheduled server-side message deletion for a conversation. + +```ts +await OpenIMSDK.setConversation({ + conversationID, + isMsgDestruct: true, + msgDestructTime: 3600, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `isMsgDestruct` | `boolean` | No | Whether scheduled server-side message deletion is enabled. | +| `msgDestructTime` | `number` | No | Message deletion period in seconds. | + +Pass `isMsgDestruct: true` together with `msgDestructTime` to enable the policy. Pass `isMsgDestruct: false` to disable it. This policy is different from burn after reading, which uses `isPrivateChat` and `burnDuration`. + +Scheduled deletion affects messages stored on the server. Messages already synchronized to a device are not actively removed; after local data is cleared or the device changes, messages deleted from the server cannot be retrieved again. + +## Return result + +After the call completes, the scheduled server-side message deletion policy is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx new file mode 100644 index 0000000000..56421b4220 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx @@ -0,0 +1,39 @@ +--- +title: 'Set conversation message reception' +description: 'Set the message reception option for a conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-message-receive-option' +--- + +Call `setConversationRecvMessageOpt()` to set the message reception option for one conversation. + +```ts +await OpenIMSDK.setConversationRecvMessageOpt({ + conversationID, + opt: MessageReceiveOptType.NotNotify, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `opt` | `MessageReceiveOptType` | Yes | Message reception option for the conversation. | + +Common `MessageReceiveOptType` values are: + +| Enum value | Numeric value | Description | +| --- | --- | --- | +| `MessageReceiveOptType.Normal` | `0` | Receive messages normally and allow notifications. | +| `MessageReceiveOptType.NotReceive` | `1` | Do not receive messages from this conversation. | +| `MessageReceiveOptType.NotNotify` | `2` | Receive messages without notifications. | + +## Return result + +After the call completes, the conversation's `recvMsgOpt` is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). For the account-level default, see [Set global message reception](/sdk/react-native/user/profile/set-global-message-reception). diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx new file mode 100644 index 0000000000..1627c8987e --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx @@ -0,0 +1,31 @@ +--- +title: 'Enable or disable burn after reading' +description: 'Enable or disable burn after reading for a conversation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-private-chat' +--- + +Call `setConversationPrivateChat()` to enable or disable burn after reading for a conversation. Set the duration separately with `setConversationBurnDuration()`; see [Set the burn duration](/sdk/react-native/conversation/managing-conversations/set-burn-duration). + +```ts +await OpenIMSDK.setConversationPrivateChat({ + conversationID, + isPrivate: true, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation ID to update. | +| `isPrivate` | `boolean` | Yes | Set `true` to enable or `false` to disable. | + +## Return result + +After the call completes, the conversation's burn-after-reading state is updated. Changes in the conversation list are delivered through `OnConversationChanged`; see [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx b/content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx new file mode 100644 index 0000000000..0ea2b44561 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx @@ -0,0 +1,67 @@ +--- +title: 'Conversation overview' +description: 'Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/overview-conversation' +--- + +In the OpenIM React Native SDK, a conversation is a chat state maintained by the current account. Both one-to-one and group chats correspond to a `ConversationItem`, which contains list presentation data, unread state, drafts, and message reception settings. + +Conversation records and chat targets use different identifiers. `conversationID` identifies the current account's conversation record, while a one-to-one target uses the other user's `userID` and a group target uses `groupID`. Group profiles, members, and permissions are managed through group APIs. + +## Conversation identifiers + +| Identifier | Meaning | +| --- | --- | +| `conversationID` | Conversation record ID for the current account. | +| `userID` | The other user's ID in a one-to-one conversation. | +| `groupID` | Group ID for a group conversation. | +| `sourceID` | Chat target used when querying by type: pass `userID` for one-to-one conversations or `groupID` for group conversations. | + +To generate a `conversationID` from a chat target, call [Resolve a conversation ID](/sdk/react-native/conversation/retrieving-conversations/get-conversation-id) with `sourceID` and `sessionType`. + +## Conversation data + +`ConversationItem` contains list presentation data and settings for the current account: + +| Category | Fields | Description | +| --- | --- | --- | +| Identity and type | `conversationID`, `conversationType` | Identify the conversation record and distinguish one-to-one and group conversations. | +| List presentation | `showName`, `faceURL`, `latestMsg`, `latestMsgSendTime` | Display the conversation name, avatar, and latest message. | +| Unread and mentions | `unreadCount`, `groupAtType` | Display unread counts and group mention status. | +| List organization | `isPinned`, `isMarked`, `draftText`, `remark` | Manage pinning, marking, drafts, and the current account's remark. | +| Message policies | `recvMsgOpt`, `isPrivateChat`, `burnDuration`, `isMsgDestruct`, `msgDestructTime` | Configure message reception, burn after reading, and server-side deletion. | +| Other state and extensions | `isNotInGroup`, `attachedInfo`, `ex` | Indicate group membership state, SDK-attached information, and application extensions. | + +## Find a page by task + +| Task | Related page | +| --- | --- | +| Get one or more conversations | [Open a conversation](/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target), [Get conversations by ID](/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id), [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) | +| Organize the conversation list | [Pin or unpin a conversation](/sdk/react-native/conversation/managing-conversations/pin-conversation), [Mark or unmark a conversation](/sdk/react-native/conversation/managing-conversations/mark-conversation), [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) | +| Manage drafts, remarks, and extensions | [Set a conversation draft](/sdk/react-native/conversation/managing-conversations/set-conversation-draft), [Set a conversation remark](/sdk/react-native/conversation/managing-conversations/set-conversation-remark), [Set conversation extra data](/sdk/react-native/conversation/managing-conversations/set-conversation-extension) | +| Configure message reception and retention | [Set conversation message reception](/sdk/react-native/conversation/managing-conversations/set-message-receive-option), [Enable or disable burn after reading](/sdk/react-native/conversation/managing-conversations/set-private-chat), [Schedule server message deletion](/sdk/react-native/conversation/managing-conversations/set-message-destruct) | +| Handle unread counts and group mentions | [Mark a conversation as read](/sdk/react-native/conversation/managing-conversations/mark-conversation-read), [Track the total unread count](/sdk/react-native/conversation/managing-conversations/get-total-unread-count), [Reset group mention status](/sdk/react-native/conversation/managing-conversations/clear-group-mentions) | + +## Hide, delete, and clear + +These operations have different scopes: + +| Operation | Effect | +| --- | --- | +| [Hide a conversation](/sdk/react-native/conversation/managing-conversations/hide-a-conversation) | Hide one conversation from the current account's list; it may reappear when a new message arrives. | +| [Delete a conversation and its messages](/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages) | Delete the conversation record and the current account's messages in it. | +| [Clear messages in a conversation](/sdk/react-native/conversation/managing-conversations/clear-conversation-messages) | Keep the conversation record and clear only the current account's messages. | + +## Events + +Conversation state changes are delivered through events: + +- [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) covers new conversations and conversation-field changes. +- [Track the total unread count](/sdk/react-native/conversation/managing-conversations/get-total-unread-count) covers total unread-count changes. +- [Conversation group overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) covers conversation-group and membership changes. diff --git a/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx new file mode 100644 index 0000000000..62ebe12d6a --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -0,0 +1,31 @@ +--- +title: 'Open a conversation' +description: 'Query a conversation by its chat target and session type.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target' +--- + +Call `getOneConversation()` to query a conversation by its chat target and session type. + +```ts +const conversation = await OpenIMSDK.getOneConversation({ + sourceID: targetUserID, + sessionType: SessionType.Single, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `sourceID` | `string` | Yes | Pass the other user's ID for a one-to-one conversation or the group ID for a group conversation. | +| `sessionType` | `SessionType` | Yes | Conversation type. Use `SessionType.Single` for one-to-one conversations and `SessionType.Group` for group conversations. | + +## Return result + +The call returns a `ConversationItem`. See [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for conversation fields. diff --git a/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx new file mode 100644 index 0000000000..07fb652514 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx @@ -0,0 +1,31 @@ +--- +title: 'Resolve a conversation ID' +description: 'Generate a conversation ID from a chat target and session type.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/get-conversation-id' +--- + +Call `getConversationIDBySessionType()` to generate a conversation ID from a chat target and session type. + +```ts +const conversationID = await OpenIMSDK.getConversationIDBySessionType({ + sourceID: targetUserID, + sessionType: SessionType.Single, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `sourceID` | `string` | Yes | Pass the other user's ID for a one-to-one conversation or the group ID for a group conversation. | +| `sessionType` | `SessionType` | Yes | Conversation type. Use `SessionType.Single` for one-to-one conversations and `SessionType.Group` for group conversations. | + +## Return result + +The call returns the conversation ID as a `string`. diff --git a/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx new file mode 100644 index 0000000000..12644f702e --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx @@ -0,0 +1,25 @@ +--- +title: 'Get conversations by ID' +description: 'Retrieve multiple conversations by their conversation IDs.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id' +--- + +When you already have a set of conversation IDs, call `getMultipleConversation()` to retrieve their conversation information. + +```ts +const conversations = await OpenIMSDK.getMultipleConversation(conversationIDList); +``` + +## Parameters + +`conversationIDList` is the array of conversation IDs to query. + +## Return result + +The call returns `ConversationItem[]`. The result may contain fewer items than the input IDs; an ID that is not returned was not found by the SDK. See [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) for conversation fields. diff --git a/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx new file mode 100644 index 0000000000..174f6a3958 --- /dev/null +++ b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -0,0 +1,85 @@ +--- +title: 'Retrieve the conversation list' +description: 'Retrieve the current user's conversation list with pagination.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list' +--- + +Use `getConversationListSplit()` to retrieve the conversation list page by page. + +```ts +const conversations = await OpenIMSDK.getConversationListSplit({ + offset: 0, + count: 50, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page and increase it by the number of items already requested. | +| `count` | `number` | Yes | Number of conversations to request. | + +## Return result + +The call returns the current page as `ConversationItem[]`. When fewer than `count` items are returned, the current list has reached its end. + +### Conversation fields + +`ConversationItem` contains the chat target, list presentation data, and settings for the current account: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationID` | `string` | Conversation ID. | +| `conversationType` | `SessionType` | Conversation type, such as one-to-one or group. | +| `userID` | `string` | The other user's ID in a one-to-one conversation; usually empty for group conversations. | +| `groupID` | `string` | Group ID for a group conversation; usually empty for one-to-one conversations. | +| `showName` | `string` | Display name of the conversation. | +| `faceURL` | `string` | Display avatar URL of the conversation. | +| `recvMsgOpt` | `MessageReceiveOptType` | Message reception setting for the conversation. | +| `unreadCount` | `number` | Number of unread messages in the conversation. | +| `groupAtType` | `GroupAtType` | Mention status for a group conversation; not used for one-to-one conversations. | +| `latestMsg` | `string` | JSON-serialized content of the latest message. | +| `latestMsgSendTime` | `number` | Time when the latest message was sent. | +| `draftText` | `string` | Draft saved on the current device. | +| `draftTextTime` | `number` | Time when the draft was updated. | +| `isPrivateChat` | `boolean` | Whether burn-after-reading is enabled for the one-to-one conversation. | +| `burnDuration` | `number` | Burn-after-reading duration for the one-to-one conversation. | +| `isMsgDestruct` | `boolean` | Whether scheduled server-side message deletion is enabled. | +| `msgDestructTime` | `number` | Server-side message deletion period. | +| `isPinned` | `boolean` | Whether the conversation is pinned. | +| `isMarked` Enterprise | `boolean` | Whether the conversation is marked. | +| `isNotInGroup` | `boolean` | Whether the current account is no longer in the group. | +| `attachedInfo` | `string` | Additional information attached by the SDK. | +| `ex` | `string` (optional) | Conversation extension string. | +| `remark` Enterprise | `string` (optional) | Conversation remark. | + +When loading multiple pages, deduplicate them by `conversationID`. Start again from `offset: 0` when refreshing the list. + +## Listen for conversation changes + +`OnNewConversation` is emitted when a conversation is created. `OnConversationChanged` is emitted when an existing conversation changes. Both callbacks receive `ConversationItem[]`. + +```ts +function handleNewConversation(conversations: ConversationItem[]) { + // ... +} + +function handleConversationChanged(conversations: ConversationItem[]) { + // ... +} + +OpenIMSDK.on(OpenIMEvent.OnNewConversation, handleNewConversation); +OpenIMSDK.on(OpenIMEvent.OnConversationChanged, handleConversationChanged); + +OpenIMSDK.off(OpenIMEvent.OnNewConversation, handleNewConversation); +OpenIMSDK.off(OpenIMEvent.OnConversationChanged, handleConversationChanged); +``` + +Remove the listeners when logging out, switching accounts, or tearing down the conversation-list state. diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx new file mode 100644 index 0000000000..2b8e0cb0f3 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -0,0 +1,31 @@ +--- +title: '添加会话到分组' +description: '添加会话到分组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups' +--- + +调用 `addConversationsToGroups()` 将一个或多个会话添加到一个或多个会话分组。 + +```ts +await OpenIMSDK.addConversationsToGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: [conversationGroupID], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------------- | ---------- | -------- | ----------------- | +| `conversationIDs` | `string[]` | 是 | 要添加的会话 ID。 | +| `conversationGroupIDs` | `string[]` | 是 | 目标会话分组 ID。 | + +## 返回结果 + +调用完成后,分组与会话的关联请求已完成。关联变化会通过 `OnConversationGroupMemberAdded` 事件通知,事件参数包含分组、会话 ID 和会话详情;完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx new file mode 100644 index 0000000000..2cbcb6829d --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -0,0 +1,36 @@ +--- +title: '创建会话分组' +description: '创建会话分组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group' +--- + +调用 `createConversationGroup()` 为当前账号创建会话分组。创建普通分组时至少传入 `name`,也可以同时将一个会话加入新分组。 + +```ts +const group = await OpenIMSDK.createConversationGroup({ + name: '工作', + order: 100, + conversationID, + conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ----------------------- | ----------------------- | -------- | ------------------------------------------------------------ | +| `name` | `string` | 是 | 分组名称。 | +| `order` | `number` | 否 | 分组排序值。 | +| `ex` | `string` | 否 | 分组扩展字符串。 | +| `conversationID` | `string` | 否 | 创建后立即加入分组的会话 ID。 | +| `conversationGroupType` | `ConversationGroupType` | 否 | 分组类型,普通自定义分组使用 `ConversationGroupTypeNormal`。 | + +## 返回结果 + +调用完成后返回新建的 `ConversationGroupResp`,其中包含 `conversationGroupID`、`name`、`order` 和 `conversationIDs` 等分组信息。分组变化会通过 `OnConversationGroupAdded` 事件通知,完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx new file mode 100644 index 0000000000..074239d016 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -0,0 +1,23 @@ +--- +title: '删除会话分组' +description: '删除会话分组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group' +--- + +调用 `deleteConversationGroup()` 删除会话分组及其会话关联。 + +```ts +await OpenIMSDK.deleteConversationGroup(conversationGroupID); +``` + +参数 `conversationGroupID` 为会话分组 ID。 + +## 返回结果 + +调用完成后,分组删除请求已完成。该操作不会删除会话或消息。分组变化会通过 `OnConversationGroupDeleted` 事件通知,完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx new file mode 100644 index 0000000000..b6ef7515ba --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx @@ -0,0 +1,25 @@ +--- +title: '查询会话所属分组' +description: '查询会话所属分组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id' +--- + +一个会话可以属于多个会话分组。调用 `getConversationGroupByConversationID()` 获取该会话所属的分组。需要查询所有分组或按类型筛选时,使用[查询会话分组列表](/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups)。 + +```ts +const groups = await OpenIMSDK.getConversationGroupByConversationID(conversationID); +``` + +## 参数说明 + +`conversationID` 为 OpenIM 会话 ID,不是聊天群组 ID。 + +## 返回结果 + +调用完成后返回 `ConversationGroup[]`,每个元素都是一个完整的分组对象。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx new file mode 100644 index 0000000000..f2e52acee4 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -0,0 +1,43 @@ +--- +title: '查询分组内会话' +description: '查询分组内会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations' +--- + +调用 `getConversationGroupInfoWithConversations()` 获取一个会话分组的信息以及该分组的分页会话列表。 + +```ts +const result = await OpenIMSDK.getConversationGroupInfoWithConversations({ + conversationGroupID, + pagination: { + pageNumber: 1, + showNumber: 20, + }, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ----------------------- | -------- | -------- | --------------------- | +| `conversationGroupID` | `string` | 是 | 要查询的会话分组 ID。 | +| `pagination.pageNumber` | `number` | 是 | 页码,从 `1` 开始。 | +| `pagination.showNumber` | `number` | 是 | 每页返回的会话数量。 | + +## 返回结果 + +调用完成后返回包含以下字段的对象: + +| 字段 | 类型 | 说明 | +| ------------------- | -------------------- | ------------------ | +| `group` | `ConversationGroup` | 当前分组信息。 | +| `conversationTotal` | `number` | 分组中的会话总数。 | +| `conversationElems` | `ConversationItem[]` | 当前页的会话详情。 | + +当已加载会话数量达到 `conversationTotal` 时,可以停止继续请求。会话字段说明见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list),分组字段说明见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx new file mode 100644 index 0000000000..a514b232cd --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -0,0 +1,27 @@ +--- +title: '查询会话分组列表' +description: '查询会话分组列表。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups' +--- + +调用 `getConversationGroups()` 按分组类型获取当前账号的会话分组。 + +```ts +const groups = await OpenIMSDK.getConversationGroups( + ConversationGroupType.ConversationGroupTypeNormal, +); +``` + +## 参数说明 + +参数为 `ConversationGroupType`:普通自定义分组使用 `ConversationGroupTypeNormal`,查询全部类型使用 `ConversationGroupTypeAll`。 + +## 返回结果 + +调用完成后返回匹配的 `ConversationGroup[]`。字段说明见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。分组只保存会话 ID;需要同时读取会话详情时,使用[查询分组内会话](/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx new file mode 100644 index 0000000000..ae88bf6cf7 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -0,0 +1,81 @@ +--- +title: '会话分组概览' +description: '会话分组概览。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups' +--- + +会话分组用于将当前账号的会话列表按业务场景分类,例如工作、待处理或自定义类别。 + +## 分组类型 + +`ConversationGroupType` 包含以下类型: + +| 枚举值 | 数值 | 说明 | +| --------------------------------------------------- | ---- | -------------------- | +| `ConversationGroupType.ConversationGroupTypeNormal` | `0` | 普通自定义分组。 | +| `ConversationGroupType.ConversationGroupTypeFilter` | `1` | 按规则筛选的分组。 | +| `ConversationGroupType.ConversationGroupTypeAll` | `2` | 查询全部类型的分组。 | + +## 分组字段 + +`ConversationGroup` 通过 `conversationGroupID` 作为分组标识: + +| 字段 | 类型 | 说明 | +| ----------------------- | ----------------------- | ------------------------- | +| `conversationGroupID` | `string` | 会话分组 ID。 | +| `name` | `string` | 分组名称。 | +| `serial` | `number` | 分组排序值。 | +| `version` | `number` | 分组数据版本。 | +| `conversationGroupType` | `ConversationGroupType` | 分组类型。 | +| `hidden` | `boolean` | 分组是否隐藏。 | +| `unreadCount` | `number` | 分组内会话的未读总数。 | +| `conversationIDs` | `string[]` | 当前属于该分组的会话 ID。 | +| `ex` | `string`(可选) | 业务扩展字符串。 | + +## 监听分组变化 + +分组操作完成后,相关事件会返回新增、更新或删除的分组;分组成员变化事件会返回分组、会话 ID 和会话详情。事件回调参数直接传递实体,不包含 `data` 字段。应用应按 `conversationGroupID` 更新分组,按事件中的 `conversationIDs` 更新成员关系。 + +```ts +const handleGroupAdded = (groups: ConversationGroup[]) => { + // ... +}; + +const handleGroupChanged = (groups: ConversationGroup[]) => { + // ... +}; + +const handleGroupDeleted = (groups: ConversationGroup[]) => { + // ... +}; + +const handleGroupMemberAdded = (payload: ConversationGroupMemberChangedCallbackData) => { + // ... +}; + +const handleGroupMemberDeleted = (payload: ConversationGroupMemberChangedCallbackData) => { + // ... +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnConversationGroupAdded, handleGroupAdded); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupChanged, handleGroupChanged); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded); +OpenIMSDK.on(OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnConversationGroupAdded, handleGroupAdded); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupChanged, handleGroupChanged); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded); +OpenIMSDK.off(OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx new file mode 100644 index 0000000000..fcfef78fa1 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -0,0 +1,31 @@ +--- +title: '从分组移除会话' +description: '从分组移除会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups' +--- + +调用 `removeConversationsFromGroups()` 将一个或多个会话从指定会话分组中移除。 + +```ts +await OpenIMSDK.removeConversationsFromGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: [conversationGroupID], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------------- | ---------- | -------- | ----------------- | +| `conversationIDs` | `string[]` | 是 | 要移除的会话 ID。 | +| `conversationGroupIDs` | `string[]` | 是 | 目标会话分组 ID。 | + +## 返回结果 + +调用完成后,分组与会话的关联移除请求已完成。关联变化会通过 `OnConversationGroupMemberDeleted` 事件通知,事件参数包含分组和会话 ID;完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx new file mode 100644 index 0000000000..fb47c0b067 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -0,0 +1,33 @@ +--- +title: '调整会话分组顺序' +description: '调整会话分组顺序。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order' +--- + +调用 `setConversationGroupOrder()` 批量调整会话分组的排序值。 + +```ts +await OpenIMSDK.setConversationGroupOrder([ + { conversationGroupID: firstGroupID, order: 100 }, + { conversationGroupID: secondGroupID, order: 200 }, +]); +``` + +## 参数说明 + +方法接收数组,每个元素包含以下字段: + +| 参数 | 类型 | 是否必填 | 说明 | +| --------------------- | -------- | -------- | ---------------------------------- | +| `conversationGroupID` | `string` | 是 | 要调整顺序的分组 ID。 | +| `order` | `number` | 是 | 新的排序值,产品侧应统一排序方向。 | + +## 返回结果 + +调用完成后不返回分组数据。界面可以按提交的排序值更新,也可以通过 `OnConversationGroupChanged` 事件或重新查询分组获取最新信息;完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx new file mode 100644 index 0000000000..544b12775d --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -0,0 +1,34 @@ +--- +title: '更新会话分组' +description: '更新会话分组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group' +--- + +调用 `updateConversationGroup()` 修改已有会话分组。只传入需要更新的字段。 + +```ts +const group = await OpenIMSDK.updateConversationGroup({ + conversationGroupID, + name: '重点工作', + hidden: false, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --------------------- | --------- | -------- | --------------------- | +| `conversationGroupID` | `string` | 是 | 要更新的会话分组 ID。 | +| `name` | `string` | 否 | 新的分组名称。 | +| `ex` | `string` | 否 | 新的分组扩展字符串。 | +| `hidden` | `boolean` | 否 | 是否隐藏分组。 | + +## 返回结果 + +调用完成后返回更新后的 `ConversationGroupResp`。分组变化会通过 `OnConversationGroupChanged` 事件通知,完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx new file mode 100644 index 0000000000..7152a7d1eb --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx @@ -0,0 +1,25 @@ +--- +title: '清空会话消息' +description: '清空会话消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/clear-conversation-messages' +--- + +调用 `clearConversationAndDeleteAllMsg()` 清除当前账号的会话消息,不会删除会话。 + +```ts +await OpenIMSDK.clearConversationAndDeleteAllMsg(conversationID); +``` + +## 参数说明 + +`conversationID` 为要清空消息的会话 ID。 + +## 返回结果 + +调用完成后,清空当前页面的消息列表。会话的最新消息、摘要和未读状态如有变化,可通过 `OnConversationChanged` 事件或重新查询会话列表获取最新数据;完整监听和清理方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx new file mode 100644 index 0000000000..ef752ac209 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx @@ -0,0 +1,27 @@ +--- +title: '重置群聊 @ 状态' +description: '重置群聊 @ 状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/clear-group-mentions' +--- + +用户处理群聊中的提及消息后,调用 `resetConversationGroupAtType()` 重置会话的群组提醒状态。 + +```ts +await OpenIMSDK.resetConversationGroupAtType(conversationID); +``` + +## 参数说明 + +`conversationID` 为要重置提醒状态的群聊会话 ID。 + +该方法将会话的 `groupAtType` 恢复为普通状态,不用于主动设置“有人提及我”或“提及所有人”等状态。重置群组提醒和[标记会话已读](/sdk/react-native/conversation/managing-conversations/mark-conversation-read)是两个独立操作。 + +## 返回结果 + +调用完成后,会话的群组提醒状态已重置。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx new file mode 100644 index 0000000000..a960df9ed6 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -0,0 +1,25 @@ +--- +title: '删除会话及消息' +description: '删除会话及消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages' +--- + +调用 `deleteConversationAndDeleteAllMsg()` 删除会话记录和当前账号下的会话消息。 + +```ts +await OpenIMSDK.deleteConversationAndDeleteAllMsg(conversationID); +``` + +## 参数说明 + +`conversationID` 为要删除的会话 ID。 + +## 返回结果 + +调用完成后,可以清除当前页面的消息列表和会话列表项。后续如收到 `OnConversationChanged`,按 `conversationID` 更新列表;完整监听和清理方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx new file mode 100644 index 0000000000..5e890feb7a --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx @@ -0,0 +1,39 @@ +--- +title: '获取消息总未读数' +description: '获取消息总未读数。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/get-total-unread-count' +--- + +调用 `getTotalUnreadMsgCount()` 获取当前账号所有会话的总未读数。不要尝试通过累加已加载会话分页中的 `unreadCount` 来计算会话总未读数,这样会遗漏未加载的会话的未读数。 + +```ts +const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount(); +``` + +## 返回结果 + +调用完成后返回 `number` 类型的总未读数。 + +## 事件监听 + +应用处于前台时,可通过 `OnTotalUnreadMessageCountChanged` 监听总未读数变化: + +```ts +function handleTotalUnreadChanged(totalUnread: number) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx new file mode 100644 index 0000000000..ffbbe83393 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx @@ -0,0 +1,25 @@ +--- +title: '隐藏会话' +description: '隐藏会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/hide-a-conversation' +--- + +调用 `hideConversation()` 隐藏当前账号会话列表中的一个会话。新消息到达或会话状态再次同步后,该会话可能重新出现在会话列表中。 + +```ts +await OpenIMSDK.hideConversation(conversationID); +``` + +## 参数说明 + +`conversationID` 为要隐藏的会话 ID。 + +## 返回结果 + +调用完成后,可以先从当前会话列表中移除对应的 `conversationID` 的会话。如果后续收到 `OnConversationChanged`,按 `conversationID` 更新列表;完整监听和清理方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx new file mode 100644 index 0000000000..a783703d63 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx @@ -0,0 +1,19 @@ +--- +title: '隐藏全部会话' +description: '隐藏全部会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/hide-all-conversations' +--- + +调用 `hideAllConversations()` 隐藏当前账号的全部会话。 + +```ts +await OpenIMSDK.hideAllConversations(); +``` + +调用完成后,重新查询[会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)和[获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count),刷新界面数据。新消息到达或会话状态再次同步后,会话可能重新出现在列表中。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx new file mode 100644 index 0000000000..66a8becca8 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx @@ -0,0 +1,25 @@ +--- +title: '标记会话已读' +description: '标记会话已读。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/mark-conversation-read' +--- + +用户打开会话并阅读当前消息后,调用 `markConversationMessageAsRead()` 标记会话已读。 + +```ts +await OpenIMSDK.markConversationMessageAsRead(conversationID); +``` + +## 参数说明 + +`conversationID` 为要标记已读的会话 ID。 + +## 返回结果 + +调用完成后,当前账号在该会话中的未读状态已更新。会话列表中的未读数变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。群聊中该方法只处理当前账号的会话未读状态。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx new file mode 100644 index 0000000000..cd90c1d3af --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx @@ -0,0 +1,33 @@ +--- +title: '标记或取消标记会话' +description: '标记或取消标记会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/mark-conversation' +--- + +调用 `setConversation()` 设置会话的标记状态。 + +```ts +await OpenIMSDK.setConversation({ + conversationID, + isMarked: true, +}); +``` + +将 `isMarked` 设置为 `false` 可取消标记。标记状态属于当前登录账号,会话标记后会出现在内置的标记会话分组中。会话分组的查询和管理方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | --------- | -------- | ------------------------------- | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `isMarked` | `boolean` | 否 | `true` 标记,`false` 取消标记。 | + +## 返回结果 + +调用完成后,会话的 `isMarked` 状态已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx new file mode 100644 index 0000000000..309f96d38d --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx @@ -0,0 +1,31 @@ +--- +title: '置顶或取消置顶会话' +description: '置顶或取消置顶会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/pin-conversation' +--- + +调用 `pinConversation()` 设置会话是否置顶。 + +```ts +await OpenIMSDK.pinConversation({ + conversationID, + isPinned: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | --------- | -------- | ------------------------------- | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `isPinned` | `boolean` | 是 | `true` 置顶,`false` 取消置顶。 | + +## 返回结果 + +调用完成后,会话的 `isPinned` 状态已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx new file mode 100644 index 0000000000..685be5a956 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx @@ -0,0 +1,31 @@ +--- +title: '设置阅后即焚时长' +description: '设置阅后即焚时长。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-burn-duration' +--- + +调用 `setConversationBurnDuration()` 设置会话的阅后即焚时长,单位为秒。该方法只设置持续时长,是否启用阅后即焚由[开启或关闭阅后即焚](/sdk/react-native/conversation/managing-conversations/set-private-chat)控制。不要将 `burnDuration` 与服务端消息定期删除的 `msgDestructTime` 混淆。 + +```ts +await OpenIMSDK.setConversationBurnDuration({ + conversationID, + burnDuration: 30, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | -------- | -------- | ---------------------------- | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `burnDuration` | `number` | 是 | 阅后即焚持续时长,单位为秒。 | + +## 返回结果 + +调用完成后,会话的阅后即焚时长已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx new file mode 100644 index 0000000000..ec507fc3a3 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx @@ -0,0 +1,33 @@ +--- +title: '设置会话草稿' +description: '设置会话草稿。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-conversation-draft' +--- + +使用 `setConversationDraft()` 保存会话草稿。用户离开聊天页面、切换会话或准备退出时,可以提交当前编辑内容。 + +```ts +await OpenIMSDK.setConversationDraft({ + conversationID, + draftText: editorValue, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | -------- | -------- | ---------------------------------- | +| `conversationID` | `string` | 是 | 要保存草稿的会话 ID。 | +| `draftText` | `string` | 是 | 草稿内容。传入空字符串可清除草稿。 | + +输入过程中建议由业务侧维护编辑器状态并合并保存,离开页面前再提交最新内容。 + +## 返回结果 + +调用完成后,草稿已保存。会话列表中的 `draftText` 和 `draftTextTime` 变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。切换账号或退出登录时,同时清理业务侧的编辑器状态。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx new file mode 100644 index 0000000000..896f56cb89 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx @@ -0,0 +1,35 @@ +--- +title: '设置会话扩展字段' +description: '设置会话扩展字段。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-conversation-extension' +--- + +使用 `setConversation()` 设置会话的扩展字段 `ex`。 + +```ts +await OpenIMSDK.setConversation({ + conversationID, + ex: JSON.stringify({ + category: 'work', + }), +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | -------- | -------- | ------------------------------------------------------------------ | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `ex` | `string` | 否 | 会话扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 | + +如果业务需要保留已有扩展内容,应先读取当前 `ex`,再按业务规则更新后写回。 + +## 返回结果 + +调用完成后,会话的 `ex` 已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx new file mode 100644 index 0000000000..d4d933a735 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx @@ -0,0 +1,33 @@ +--- +title: '设置会话备注' +description: '设置会话备注。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-conversation-remark' +--- + +调用 `setConversation()` 设置当前账号的会话备注。 + +```ts +await OpenIMSDK.setConversation({ + conversationID, + remark: '项目讨论', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | -------- | -------- | -------------------------------------- | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `remark` | `string` | 否 | 会话备注。传入空字符串可清除已有备注。 | + +显示会话名称时,可根据产品规则优先使用 `remark`,没有备注时使用会话原有的 `showName`。会话备注不会更新用户资料或群组名称。 + +## 返回结果 + +调用完成后,会话的 `remark` 已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx new file mode 100644 index 0000000000..8c3c2accb4 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx @@ -0,0 +1,37 @@ +--- +title: '定期删除服务端消息' +description: '定期删除服务端消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-message-destruct' +--- + +调用 `setConversation()` 设置会话的服务端消息定期删除策略。 + +```ts +await OpenIMSDK.setConversation({ + conversationID, + isMsgDestruct: true, + msgDestructTime: 3600, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ----------------- | --------- | -------- | ---------------------------- | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `isMsgDestruct` | `boolean` | 否 | 是否开启服务端消息定期删除。 | +| `msgDestructTime` | `number` | 否 | 消息删除周期,单位为秒。 | + +启用策略时同时传入 `isMsgDestruct: true` 和 `msgDestructTime`。传入 `isMsgDestruct: false` 可关闭策略。注意该策略与阅后即焚的区别,阅后即焚使用 `isPrivateChat` 和 `burnDuration`。 + +服务端消息定期删除只影响服务端保存的消息。已经同步到设备的本地消息不会被主动删除;在清理本地数据或更换设备后,已从服务端删除的消息无法再次获取。 + +## 返回结果 + +调用完成后,服务端消息定期删除策略已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx new file mode 100644 index 0000000000..c23ab2051a --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx @@ -0,0 +1,39 @@ +--- +title: '设置会话消息接收方式' +description: '设置会话消息接收方式。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-message-receive-option' +--- + +调用 `setConversationRecvMessageOpt()` 设置单个会话的消息接收方式。 + +```ts +await OpenIMSDK.setConversationRecvMessageOpt({ + conversationID, + opt: MessageReceiveOptType.NotNotify, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | ----------------------- | -------- | ------------------ | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `opt` | `MessageReceiveOptType` | 是 | 会话消息接收方式。 | + +`MessageReceiveOptType` 常用值如下: + +| 枚举值 | 数值 | 说明 | +| ---------------------------------- | ---- | ------------------------ | +| `MessageReceiveOptType.Normal` | `0` | 正常接收消息并允许提醒。 | +| `MessageReceiveOptType.NotReceive` | `1` | 不接收该会话的消息。 | +| `MessageReceiveOptType.NotNotify` | `2` | 接收消息但不提醒。 | + +## 返回结果 + +调用完成后,会话的 `recvMsgOpt` 已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。账号级默认接收策略请参考用户资料中的[设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx new file mode 100644 index 0000000000..1c670ca201 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx @@ -0,0 +1,31 @@ +--- +title: '开启或关闭阅后即焚' +description: '开启或关闭阅后即焚。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/managing-conversations/set-private-chat' +--- + +调用 `setConversationPrivateChat()` 开启或关闭会话的阅后即焚模式。阅后即焚的持续时长通过 `setConversationBurnDuration()` 单独设置,详见[设置阅后即焚时长](/sdk/react-native/conversation/managing-conversations/set-burn-duration)。 + +```ts +await OpenIMSDK.setConversationPrivateChat({ + conversationID, + isPrivate: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ---------------- | --------- | -------- | --------------------------- | +| `conversationID` | `string` | 是 | 要设置的会话 ID。 | +| `isPrivate` | `boolean` | 是 | `true` 开启,`false` 关闭。 | + +## 返回结果 + +调用完成后,会话的阅后即焚状态已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/overview-conversation.mdx b/content/zh/docs/chat/sdk/react-native/conversation/overview-conversation.mdx new file mode 100644 index 0000000000..c8984bfed5 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/overview-conversation.mdx @@ -0,0 +1,67 @@ +--- +title: '会话概览' +description: '了解 React Native SDK 中的会话、会话状态和会话分组能力。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/overview-conversation' +--- + +在 OpenIM React Native SDK 中,会话表示当前登录账号维护的一条聊天状态。单聊和群聊都会对应一个 `ConversationItem`,其中包含会话列表展示信息、未读状态、草稿和消息接收设置等内容。 + +会话记录与聊天目标使用不同的标识:`conversationID` 标识当前账号的会话记录,单聊目标使用对方的 `userID`,群聊目标使用 `groupID`。群组资料、成员和权限仍通过群组相关 API 管理。 + +## 会话标识 + +| 标识 | 用途 | +| ---------------- | ------------------------------------------------------------------- | +| `conversationID` | 当前账号的会话记录 ID,用于会话设置、消息历史和未读状态。 | +| `userID` | 单聊中的对方用户 ID。 | +| `groupID` | 群聊对应的群组 ID。 | +| `sourceID` | 按类型查询会话时传入的聊天目标:单聊传 `userID`,群聊传 `groupID`。 | + +如需根据聊天目标获取 `conversationID`,可调用[生成会话 ID](/sdk/react-native/conversation/retrieving-conversations/get-conversation-id),传入 `sourceID` 和 `sessionType`。 + +## 会话数据 + +`ConversationItem` 同时包含列表展示信息和当前账号的会话设置: + +| 分类 | 字段 | 说明 | +| -------------- | --------------------------------------------------------------------------------- | ------------------------------------------ | +| 标识和类型 | `conversationID`、`conversationType` | 定位会话记录并区分单聊和群聊。 | +| 列表展示 | `showName`、`faceURL`、`latestMsg`、`latestMsgSendTime` | 展示会话名称、头像和最后一条消息。 | +| 未读和提醒 | `unreadCount`、`groupAtType` | 展示未读数和群聊 @ 提醒状态。 | +| 列表组织 | `isPinned`、`isMarked`、`draftText`、`remark` | 管理置顶、标记、草稿和当前账号的会话备注。 | +| 消息策略 | `recvMsgOpt`、`isPrivateChat`、`burnDuration`、`isMsgDestruct`、`msgDestructTime` | 设置消息接收、阅后即焚和服务端消息删除。 | +| 其他状态和扩展 | `isNotInGroup`、`attachedInfo`、`ex` | 表示群组关系状态、SDK 附加信息和业务扩展。 | + +## 按任务查找 + +| 任务 | 相关页面 | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 获取一个或多个会话 | [查询指定会话](/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target)、[按 ID 批量获取会话](/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id)、[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) | +| 整理会话列表 | [置顶或取消置顶会话](/sdk/react-native/conversation/managing-conversations/pin-conversation)、[标记或取消标记会话](/sdk/react-native/conversation/managing-conversations/mark-conversation)、[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) | +| 管理草稿、备注和扩展字段 | [设置会话草稿](/sdk/react-native/conversation/managing-conversations/set-conversation-draft)、[设置会话备注](/sdk/react-native/conversation/managing-conversations/set-conversation-remark)、[设置会话扩展字段](/sdk/react-native/conversation/managing-conversations/set-conversation-extension) | +| 设置消息接收和保留策略 | [设置会话消息接收方式](/sdk/react-native/conversation/managing-conversations/set-message-receive-option)、[开启或关闭阅后即焚](/sdk/react-native/conversation/managing-conversations/set-private-chat)、[定期删除服务端消息](/sdk/react-native/conversation/managing-conversations/set-message-destruct) | +| 处理未读数和群组提醒 | [标记会话已读](/sdk/react-native/conversation/managing-conversations/mark-conversation-read)、[获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count)、[重置群聊 @ 状态](/sdk/react-native/conversation/managing-conversations/clear-group-mentions) | + +## 隐藏、删除和清空 + +隐藏、删除和清空作用范围不同: + +| 操作 | 作用 | +| ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| [隐藏会话](/sdk/react-native/conversation/managing-conversations/hide-a-conversation) | 从当前账号的会话列表中隐藏一条会话,新消息到达后可能重新出现。 | +| [删除会话及消息](/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages) | 删除会话记录和当前账号在该会话中的消息。 | +| [清空会话消息](/sdk/react-native/conversation/managing-conversations/clear-conversation-messages) | 保留会话记录,只清除当前账号在该会话中的消息。 | + +## 事件监听 + +会话状态变化会触发事件,具体的事件监听详见: + +- [获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)介绍会话新增和会话字段变化的监听方式。 +- [获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count)介绍当前账号总未读数的监听方式。 +- [会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)介绍会话分组和分组成员变化的监听方式。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx new file mode 100644 index 0000000000..3218a93ffb --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -0,0 +1,31 @@ +--- +title: '查询指定会话' +description: '根据聊天目标和会话类型查询指定会话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target' +--- + +调用 `getOneConversation()` 根据聊天目标和会话类型获取一个会话。 + +```ts +const conversation = await OpenIMSDK.getOneConversation({ + sourceID: targetUserID, + sessionType: SessionType.Single, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ------------- | ------------- | -------- | ----------------------------------------------------------------------- | +| `sourceID` | `string` | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | +| `sessionType` | `SessionType` | 是 | 会话类型。单聊使用 `SessionType.Single`,群聊使用 `SessionType.Group`。 | + +## 返回结果 + +调用完成后返回 `ConversationItem`。会话字段说明见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx new file mode 100644 index 0000000000..6d9655c292 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx @@ -0,0 +1,31 @@ +--- +title: '生成会话 ID' +description: '根据聊天目标和会话类型生成会话 ID。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/get-conversation-id' +--- + +调用 `getConversationIDBySessionType()` 根据聊天目标和会话类型获取会话 ID。 + +```ts +const conversationID = await OpenIMSDK.getConversationIDBySessionType({ + sourceID: targetUserID, + sessionType: SessionType.Single, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| ------------- | ------------- | -------- | ----------------------------------------------------------------------- | +| `sourceID` | `string` | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | +| `sessionType` | `SessionType` | 是 | 会话类型。单聊使用 `SessionType.Single`,群聊使用 `SessionType.Group`。 | + +## 返回结果 + +调用完成后返回 `string` 类型的 `conversationID`。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx new file mode 100644 index 0000000000..5ea1fb18fb --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx @@ -0,0 +1,25 @@ +--- +title: '按 ID 批量获取会话' +description: '按 conversationID 批量获取会话信息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id' +--- + +已经持有一组会话 ID 时,调用 `getMultipleConversation()` 批量获取会话信息。 + +```ts +const conversations = await OpenIMSDK.getMultipleConversation(conversationIDList); +``` + +## 参数说明 + +`conversationIDList` 是要查询的会话 ID 数组。 + +## 返回结果 + +调用完成后返回 `ConversationItem[]`,返回结果可能少于传入的会话 ID 数量,未返回的会话 ID 表示 SDK 当前未找到对应会话。单个会话的字段说明见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx new file mode 100644 index 0000000000..369575549f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -0,0 +1,87 @@ +--- +title: '获取会话列表' +description: '分页获取当前登录账号的会话列表。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list' +--- + +使用 `getConversationListSplit()` 分页获取会话。 + +```ts +const conversations = await OpenIMSDK.getConversationListSplit({ + offset: 0, + count: 50, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| -------- | -------- | -------- | -------------------------------------------------------- | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。继续加载时按已请求的条目数递增。 | +| `count` | `number` | 是 | 本次请求的会话数量。 | + +## 返回结果 + +调用完成后返回当前页的 `ConversationItem[]`。当返回数量小于 `count` 时,表示已经读取到当前列表末尾。 + +### 会话字段 + +`ConversationItem` 同时包含聊天目标、列表展示和当前账号的会话设置: + +| 字段 | 类型 | 说明 | +| ----------------------------------------------------------------- | ----------------------- | --------------------------------------- | +| `conversationID` | `string` | 会话 ID。 | +| `conversationType` | `SessionType` | 会话类型,单聊或群聊。 | +| `userID` | `string` | 单聊对方的用户 ID;群聊中通常为空。 | +| `groupID` | `string` | 群聊对应的群组 ID;单聊中通常为空。 | +| `showName` | `string` | 会话的展示名称。 | +| `faceURL` | `string` | 会话的展示头像地址。 | +| `recvMsgOpt` | `MessageReceiveOptType` | 当前会话的消息接收方式。 | +| `unreadCount` | `number` | 当前会话的未读消息数。 | +| `groupAtType` | `GroupAtType` | 群聊中的提醒状态;单聊不使用。 | +| `latestMsg` | `string` | 最后一条消息的 JSON 序列化内容。 | +| `latestMsgSendTime` | `number` | 最后一条消息的发送时间。 | +| `draftText` | `string` | 当前设备保存的会话草稿。 | +| `draftTextTime` | `number` | 草稿更新时间。 | +| `isPrivateChat` | `boolean` | 是否开启私聊阅后即焚。 | +| `burnDuration` | `number` | 私聊阅后即焚时长。 | +| `isMsgDestruct` | `boolean` | 是否开启服务端消息定期删除。 | +| `msgDestructTime` | `number` | 服务端消息定期删除周期。 | +| `isPinned` | `boolean` | 会话是否置顶。 | +| `isMarked` 商业版 | `boolean` | 会话是否已标记。 | +| `isNotInGroup` | `boolean` | 当前账号是否已不在该群组中。 | +| `attachedInfo` | `string` | SDK 附加信息。 | +| `ex` | `string`(可选) | 会话扩展字符串。 | +| `remark` 商业版 | `string`(可选) | 会话备注。 | + +拉取会话列表时,应按 `conversationID` 合并分页结果去重,避免同一会话重复出现在列表中。刷新列表时从 `offset: 0` 重新读取。 + +## 监听会话变化 + +新建会话时触发 `OnNewConversation`,已有会话发生变化时触发 `OnConversationChanged`。两个事件的回调参数都是 `ConversationItem[]`。 + +```ts +function handleNewConversation(conversations: ConversationItem[]) { + // ... +} + +function handleConversationChanged(conversations: ConversationItem[]) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnNewConversation, handleNewConversation); +OpenIMSDK.on(OpenIMEvent.OnConversationChanged, handleConversationChanged); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnNewConversation, handleNewConversation); +OpenIMSDK.off(OpenIMEvent.OnConversationChanged, handleConversationChanged); +``` + +退出登录、切换账号或销毁会话列表状态时,取消监听。 diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index d07debe9d6..981f8d8a4b 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -48,9 +48,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/overview-user", @@ -86,9 +84,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/profile/get-users-info", @@ -99,9 +95,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getUsersInfo" - ], + "sdkMethods": ["getUsersInfo"], "sdkEvents": [], "locales": { "zh": { @@ -130,9 +124,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/profile/get-self-user-info", @@ -143,9 +135,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getSelfUserInfo" - ], + "sdkMethods": ["getSelfUserInfo"], "sdkEvents": [], "locales": { "zh": { @@ -174,9 +164,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/profile/set-self-info", @@ -187,12 +175,8 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "setSelfInfo" - ], - "sdkEvents": [ - "OnSelfInfoUpdated" - ], + "sdkMethods": ["setSelfInfo"], + "sdkEvents": ["OnSelfInfoUpdated"], "locales": { "zh": { "reviewStatus": "published", @@ -220,9 +204,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/profile/set-global-message-reception", @@ -262,9 +244,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/profile/set-friend-add-permission", @@ -304,9 +284,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/online-status/subscribe-users-status", @@ -317,12 +295,8 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "subscribeUsersStatus" - ], - "sdkEvents": [ - "OnUserStatusChanged" - ], + "sdkMethods": ["subscribeUsersStatus"], + "sdkEvents": ["OnUserStatusChanged"], "locales": { "zh": { "reviewStatus": "published", @@ -350,9 +324,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/online-status/get-subscribe-users-status", @@ -363,9 +335,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getSubscribeUsersStatus" - ], + "sdkMethods": ["getSubscribeUsersStatus"], "sdkEvents": [], "locales": { "zh": { @@ -394,9 +364,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/online-status/unsubscribe-users-status", @@ -407,9 +375,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "unsubscribeUsersStatus" - ], + "sdkMethods": ["unsubscribeUsersStatus"], "sdkEvents": [], "locales": { "zh": { @@ -438,9 +404,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/overview-relationships", @@ -476,9 +440,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friends/get-friend-list-page", @@ -489,14 +451,8 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getFriendListPage" - ], - "sdkEvents": [ - "OnFriendInfoChanged", - "OnFriendAdded", - "OnFriendDeleted" - ], + "sdkMethods": ["getFriendListPage"], + "sdkEvents": ["OnFriendInfoChanged", "OnFriendAdded", "OnFriendDeleted"], "locales": { "zh": { "reviewStatus": "published", @@ -524,9 +480,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friends/search-friends", @@ -537,9 +491,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "searchFriends" - ], + "sdkMethods": ["searchFriends"], "sdkEvents": [], "locales": { "zh": { @@ -568,9 +520,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friends/get-specified-friends-info", @@ -581,9 +531,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getSpecifiedFriendsInfo" - ], + "sdkMethods": ["getSpecifiedFriendsInfo"], "sdkEvents": [], "locales": { "zh": { @@ -612,9 +560,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friends/check-friend", @@ -625,9 +571,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "checkFriend" - ], + "sdkMethods": ["checkFriend"], "sdkEvents": [], "locales": { "zh": { @@ -656,9 +600,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friends/update-friends", @@ -669,9 +611,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "updateFriends" - ], + "sdkMethods": ["updateFriends"], "sdkEvents": [], "locales": { "zh": { @@ -700,9 +640,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friends/delete-friend", @@ -713,9 +651,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "deleteFriend" - ], + "sdkMethods": ["deleteFriend"], "sdkEvents": [], "locales": { "zh": { @@ -744,9 +680,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/add-friend", @@ -757,9 +691,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "addFriend" - ], + "sdkMethods": ["addFriend"], "sdkEvents": [], "locales": { "zh": { @@ -788,9 +720,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", @@ -801,9 +731,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getFriendApplicationListAsRecipient" - ], + "sdkMethods": ["getFriendApplicationListAsRecipient"], "sdkEvents": [ "OnFriendApplicationAccepted", "OnFriendApplicationAdded", @@ -837,9 +765,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", @@ -850,9 +776,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getFriendApplicationListAsApplicant" - ], + "sdkMethods": ["getFriendApplicationListAsApplicant"], "sdkEvents": [], "locales": { "zh": { @@ -881,9 +805,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", @@ -894,9 +816,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getFriendApplicationUnhandledCount" - ], + "sdkMethods": ["getFriendApplicationUnhandledCount"], "sdkEvents": [], "locales": { "zh": { @@ -925,9 +845,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/accept-friend-application", @@ -938,9 +856,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "acceptFriendApplication" - ], + "sdkMethods": ["acceptFriendApplication"], "sdkEvents": [], "locales": { "zh": { @@ -969,9 +885,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/refuse-friend-application", @@ -982,9 +896,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "refuseFriendApplication" - ], + "sdkMethods": ["refuseFriendApplication"], "sdkEvents": [], "locales": { "zh": { @@ -1013,9 +925,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/friend-applications/delete-friend-requests", @@ -1026,9 +936,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "deleteFriendRequests" - ], + "sdkMethods": ["deleteFriendRequests"], "sdkEvents": [], "locales": { "zh": { @@ -1057,9 +965,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/blacklist/get-black-list", @@ -1070,13 +976,8 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "getBlackList" - ], - "sdkEvents": [ - "OnBlackAdded", - "OnBlackDeleted" - ], + "sdkMethods": ["getBlackList"], + "sdkEvents": ["OnBlackAdded", "OnBlackDeleted"], "locales": { "zh": { "reviewStatus": "published", @@ -1104,9 +1005,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/blacklist/add-black", @@ -1117,9 +1016,7 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "addBlack" - ], + "sdkMethods": ["addBlack"], "sdkEvents": [], "locales": { "zh": { @@ -1148,9 +1045,7 @@ } }, "redirectTo": null, - "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" - ] + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] }, { "currentPath": "/sdk/react-native/user/blacklist/remove-black", @@ -1161,9 +1056,125 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": [ - "removeBlack" + "sdkMethods": ["removeBlack"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + }, + { + "currentPath": "/sdk/react-native/conversation/overview-conversation", + "targetPath": "/sdk/react-native/conversation/overview-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只建立会话领域的页面结构。" + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍会话领域的页面结构,不包含 SDK 调用示例。" + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对会话模型和导航链接,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "targetPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getOneConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "targetPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], + "sdkMethods": ["getConversationIDBySessionType"], "sdkEvents": [], "locales": { "zh": { @@ -1179,6 +1190,36 @@ } }, "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "targetPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getMultipleConversation"], + "sdkEvents": [], + "locales": { + "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-21", @@ -1189,12 +1230,1142 @@ ], "reason": null } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } } }, "redirectTo": null, "notes": [ - "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" ] + }, + { + "currentPath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "targetPath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getConversationListSplit"], + "sdkEvents": ["OnNewConversation", "OnConversationChanged"], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "targetPath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["pinConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "targetPath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversationDraft"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversationRecvMessageOpt"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "targetPath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["resetConversationGroupAtType"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "targetPath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["markConversationMessageAsRead"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "targetPath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getTotalUnreadMsgCount"], + "sdkEvents": ["OnTotalUnreadMessageCountChanged"], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "targetPath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "targetPath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["hideConversation"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "targetPath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["hideAllConversations"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "targetPath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["deleteConversationAndDeleteAllMsg"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "targetPath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["clearConversationAndDeleteAllMsg"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [ + "OnConversationGroupAdded", + "OnConversationGroupChanged", + "OnConversationGroupDeleted", + "OnConversationGroupMemberAdded", + "OnConversationGroupMemberDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对分组模型、事件和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["createConversationGroup"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getConversationGroups"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getConversationGroupInfoWithConversations"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 RN 返回类型和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["getConversationGroupByConversationID"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["updateConversationGroup"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["setConversationGroupOrder"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["addConversationsToGroups"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["removeConversationsFromGroups"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + }, + { + "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "targetPath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": ["deleteConversationGroup"], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-21", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] } ] } diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json index 74269b1b8b..b59abb0fdf 100644 --- a/data/structure/react-native-navigation-labels.json +++ b/data/structure/react-native-navigation-labels.json @@ -12,9 +12,9 @@ "Get your profile": "获取当前用户资料", "Update your profile": "更新当前用户资料", "Set global message reception": "设置全局消息接收方式", - "Set friend request permissions": "设置好友申请权限", + "Set friend request permissions": "设置好友添加权限", "Subscribe to online status": "订阅用户在线状态", - "Get subscribed user status": "查询已订阅用户状态", + "Get subscribed user status": "获取已订阅用户状态", "Unsubscribe from online status": "取消订阅用户状态", "Relationships overview": "关系链概览", "Get the friend list": "分页获取好友列表", @@ -43,5 +43,43 @@ "Block a user": "将用户加入黑名单", "Add a user to the blacklist": "将用户加入黑名单", "Unblock a user": "将用户移出黑名单", - "Remove a user from the blacklist": "将用户移出黑名单" + "Remove a user from the blacklist": "将用户移出黑名单", + "Conversation": "会话", + "Retrieving conversations": "获取会话", + "Conversation organization": "会话管理", + "Unread status and notifications": "未读状态和提醒", + "Message retention and privacy": "消息保留和隐私", + "Hiding and deleting conversations": "隐藏和删除会话", + "Conversation groups": "会话分组", + "Conversation overview": "会话概览", + "Open a conversation": "查询指定会话", + "Resolve a conversation ID": "生成会话 ID", + "Get conversations by ID": "按 ID 批量获取会话", + "Retrieve the conversation list": "获取会话列表", + "Pin or unpin a conversation": "置顶或取消置顶会话", + "Mark or unmark a conversation": "标记或取消标记会话", + "Set a conversation remark": "设置会话备注", + "Set conversation extra data": "设置会话扩展字段", + "Set a conversation draft": "设置会话草稿", + "Set conversation message reception": "设置会话消息接收方式", + "Reset group mention status": "重置群聊 @ 状态", + "Mark a conversation as read": "标记会话已读", + "Track the total unread count": "获取消息总未读数", + "Enable or disable burn after reading": "开启或关闭阅后即焚", + "Set the burn duration": "设置阅后即焚时长", + "Schedule server message deletion": "定期删除服务端消息", + "Hide a conversation": "隐藏会话", + "Hide all conversations": "隐藏全部会话", + "Delete a conversation and its messages": "删除会话及消息", + "Clear messages in a conversation": "清空会话消息", + "Conversation group overview": "会话分组概览", + "Create a conversation group": "创建会话分组", + "Get conversation groups": "查询会话分组列表", + "Get conversations in a group": "查询分组内会话", + "Get groups for a conversation": "查询会话所属分组", + "Update a conversation group": "更新会话分组", + "Reorder conversation groups": "调整会话分组顺序", + "Add conversations to groups": "添加会话到分组", + "Remove conversations from groups": "从分组移除会话", + "Delete a conversation group": "删除会话分组" } diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index c0e3037447..1e83a3d24c 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -147,6 +147,175 @@ ] } ] + }, + { + "id": "conversation", + "title": "Conversation", + "children": [ + "/sdk/react-native/conversation/overview-conversation", + { + "id": "conversation/retrieving-conversations", + "title": "Retrieving conversations", + "children": [ + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "navigationTitle": "Open a conversation" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "navigationTitle": "Resolve a conversation ID" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "navigationTitle": "Get conversations by ID" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "navigationTitle": "Retrieve the conversation list" + } + ] + }, + { + "id": "conversation/conversation-organization", + "title": "Conversation organization", + "children": [ + { + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "navigationTitle": "Pin or unpin a conversation" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "navigationTitle": "Mark or unmark a conversation", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "navigationTitle": "Set a conversation remark", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "navigationTitle": "Set conversation extra data" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "navigationTitle": "Set a conversation draft" + } + ] + }, + { + "id": "conversation/unread-status-and-notifications", + "title": "Unread status and notifications", + "children": [ + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "navigationTitle": "Set conversation message reception" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "navigationTitle": "Reset group mention status" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "navigationTitle": "Mark a conversation as read" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "navigationTitle": "Track the total unread count" + } + ] + }, + { + "id": "conversation/message-retention-and-privacy", + "title": "Message retention and privacy", + "children": [ + { + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "navigationTitle": "Enable or disable burn after reading", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "navigationTitle": "Set the burn duration", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "navigationTitle": "Schedule server message deletion", + "edition": "enterprise" + } + ] + }, + { + "id": "conversation/hiding-and-deleting-conversations", + "title": "Hiding and deleting conversations", + "children": [ + { + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "navigationTitle": "Hide a conversation" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "navigationTitle": "Hide all conversations" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "navigationTitle": "Delete a conversation and its messages" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "navigationTitle": "Clear messages in a conversation" + } + ] + }, + { + "id": "conversation/conversation-groups", + "title": "Conversation groups", + "edition": "enterprise", + "children": [ + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "navigationTitle": "Conversation group overview" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "navigationTitle": "Create a conversation group" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "navigationTitle": "Get conversation groups" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "navigationTitle": "Get conversations in a group" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "navigationTitle": "Get groups for a conversation" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "navigationTitle": "Update a conversation group" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "navigationTitle": "Reorder conversation groups" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "navigationTitle": "Add conversations to groups" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "navigationTitle": "Remove conversations from groups" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "navigationTitle": "Delete a conversation group" + } + ] + } + ] } ] } diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 0e1e750ee6..9a677e187e 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -10381,9 +10381,388 @@ } ], "minIndex": 529 + }, + { + "id": "conversation", + "segment": "conversation", + "title": "Conversation", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/overview-conversation", + "segment": "overview-conversation", + "title": "Conversation overview", + "href": "/sdk/react-native/conversation/overview-conversation", + "type": "page", + "children": [], + "minIndex": 546 + }, + { + "id": "conversation/retrieving-conversations", + "segment": "retrieving-conversations", + "title": "Retrieving conversations", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/retrieving-conversations/get-conversation-by-target", + "segment": "get-conversation-by-target", + "title": "Open a conversation", + "href": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "type": "page", + "children": [], + "minIndex": 547, + "navigationTitle": "Open a conversation" + }, + { + "id": "conversation/retrieving-conversations/get-conversation-id", + "segment": "get-conversation-id", + "title": "Resolve a conversation ID", + "href": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "type": "page", + "children": [], + "minIndex": 548, + "navigationTitle": "Resolve a conversation ID" + }, + { + "id": "conversation/retrieving-conversations/get-conversations-by-id", + "segment": "get-conversations-by-id", + "title": "Get conversations by ID", + "href": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "type": "page", + "children": [], + "minIndex": 549, + "navigationTitle": "Get conversations by ID" + }, + { + "id": "conversation/retrieving-conversations/retrieve-conversation-list", + "segment": "retrieve-conversation-list", + "title": "Retrieve the conversation list", + "href": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "type": "page", + "children": [], + "minIndex": 550, + "navigationTitle": "Retrieve the conversation list" + } + ], + "minIndex": 547 + }, + { + "id": "conversation/conversation-organization", + "segment": "conversation-organization", + "title": "Conversation organization", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/pin-conversation", + "segment": "pin-conversation", + "title": "Pin or unpin a conversation", + "href": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "type": "page", + "children": [], + "minIndex": 551, + "navigationTitle": "Pin or unpin a conversation" + }, + { + "id": "conversation/managing-conversations/mark-conversation", + "segment": "mark-conversation", + "title": "Mark or unmark a conversation", + "href": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "type": "page", + "children": [], + "minIndex": 552, + "navigationTitle": "Mark or unmark a conversation" + }, + { + "id": "conversation/managing-conversations/set-conversation-remark", + "segment": "set-conversation-remark", + "title": "Set a conversation remark", + "href": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "type": "page", + "children": [], + "minIndex": 553, + "navigationTitle": "Set a conversation remark" + }, + { + "id": "conversation/managing-conversations/set-conversation-extension", + "segment": "set-conversation-extension", + "title": "Set conversation extra data", + "href": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "type": "page", + "children": [], + "minIndex": 554, + "navigationTitle": "Set conversation extra data" + }, + { + "id": "conversation/managing-conversations/set-conversation-draft", + "segment": "set-conversation-draft", + "title": "Set a conversation draft", + "href": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "type": "page", + "children": [], + "minIndex": 555, + "navigationTitle": "Set a conversation draft" + } + ], + "minIndex": 551 + }, + { + "id": "conversation/unread-status-and-notifications", + "segment": "unread-status-and-notifications", + "title": "Unread status and notifications", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/set-message-receive-option", + "segment": "set-message-receive-option", + "title": "Set conversation message reception", + "href": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "type": "page", + "children": [], + "minIndex": 556, + "navigationTitle": "Set conversation message reception" + }, + { + "id": "conversation/managing-conversations/clear-group-mentions", + "segment": "clear-group-mentions", + "title": "Reset group mention status", + "href": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "type": "page", + "children": [], + "minIndex": 557, + "navigationTitle": "Reset group mention status" + }, + { + "id": "conversation/managing-conversations/mark-conversation-read", + "segment": "mark-conversation-read", + "title": "Mark a conversation as read", + "href": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "type": "page", + "children": [], + "minIndex": 558, + "navigationTitle": "Mark a conversation as read" + }, + { + "id": "conversation/managing-conversations/get-total-unread-count", + "segment": "get-total-unread-count", + "title": "Track the total unread count", + "href": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "type": "page", + "children": [], + "minIndex": 559, + "navigationTitle": "Track the total unread count" + } + ], + "minIndex": 556 + }, + { + "id": "conversation/message-retention-and-privacy", + "segment": "message-retention-and-privacy", + "title": "Message retention and privacy", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/set-private-chat", + "segment": "set-private-chat", + "title": "Enable or disable burn after reading", + "href": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "type": "page", + "children": [], + "minIndex": 560, + "navigationTitle": "Enable or disable burn after reading" + }, + { + "id": "conversation/managing-conversations/set-burn-duration", + "segment": "set-burn-duration", + "title": "Set the burn duration", + "href": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "type": "page", + "children": [], + "minIndex": 561, + "navigationTitle": "Set the burn duration" + }, + { + "id": "conversation/managing-conversations/set-message-destruct", + "segment": "set-message-destruct", + "title": "Schedule server message deletion", + "href": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "type": "page", + "children": [], + "minIndex": 562, + "navigationTitle": "Schedule server message deletion" + } + ], + "minIndex": 560 + }, + { + "id": "conversation/hiding-and-deleting-conversations", + "segment": "hiding-and-deleting-conversations", + "title": "Hiding and deleting conversations", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/hide-a-conversation", + "segment": "hide-a-conversation", + "title": "Hide a conversation", + "href": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "type": "page", + "children": [], + "minIndex": 563, + "navigationTitle": "Hide a conversation" + }, + { + "id": "conversation/managing-conversations/hide-all-conversations", + "segment": "hide-all-conversations", + "title": "Hide all conversations", + "href": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "type": "page", + "children": [], + "minIndex": 564, + "navigationTitle": "Hide all conversations" + }, + { + "id": "conversation/managing-conversations/delete-conversation-with-messages", + "segment": "delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "href": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "type": "page", + "children": [], + "minIndex": 565, + "navigationTitle": "Delete a conversation and its messages" + }, + { + "id": "conversation/managing-conversations/clear-conversation-messages", + "segment": "clear-conversation-messages", + "title": "Clear messages in a conversation", + "href": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "type": "page", + "children": [], + "minIndex": 566, + "navigationTitle": "Clear messages in a conversation" + } + ], + "minIndex": 563 + }, + { + "id": "conversation/conversation-groups", + "segment": "conversation-groups", + "title": "Conversation groups", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversation-groups/overview-conversation-groups", + "segment": "overview-conversation-groups", + "title": "Conversation group overview", + "href": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "type": "page", + "children": [], + "minIndex": 567, + "navigationTitle": "Conversation group overview" + }, + { + "id": "conversation/managing-conversation-groups/create-conversation-group", + "segment": "create-conversation-group", + "title": "Create a conversation group", + "href": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "type": "page", + "children": [], + "minIndex": 568, + "navigationTitle": "Create a conversation group" + }, + { + "id": "conversation/managing-conversation-groups/get-conversation-groups", + "segment": "get-conversation-groups", + "title": "Get conversation groups", + "href": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "type": "page", + "children": [], + "minIndex": 569, + "navigationTitle": "Get conversation groups" + }, + { + "id": "conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "segment": "get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "href": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "type": "page", + "children": [], + "minIndex": 570, + "navigationTitle": "Get conversations in a group" + }, + { + "id": "conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "segment": "get-conversation-group-ids-by-conversation-id", + "title": "Get groups for a conversation", + "href": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "type": "page", + "children": [], + "minIndex": 571, + "navigationTitle": "Get groups for a conversation" + }, + { + "id": "conversation/managing-conversation-groups/update-conversation-group", + "segment": "update-conversation-group", + "title": "Update a conversation group", + "href": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "type": "page", + "children": [], + "minIndex": 572, + "navigationTitle": "Update a conversation group" + }, + { + "id": "conversation/managing-conversation-groups/set-conversation-group-order", + "segment": "set-conversation-group-order", + "title": "Reorder conversation groups", + "href": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "type": "page", + "children": [], + "minIndex": 573, + "navigationTitle": "Reorder conversation groups" + }, + { + "id": "conversation/managing-conversation-groups/add-conversations-to-groups", + "segment": "add-conversations-to-groups", + "title": "Add conversations to groups", + "href": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "type": "page", + "children": [], + "minIndex": 574, + "navigationTitle": "Add conversations to groups" + }, + { + "id": "conversation/managing-conversation-groups/remove-conversations-from-groups", + "segment": "remove-conversations-from-groups", + "title": "Remove conversations from groups", + "href": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "type": "page", + "children": [], + "minIndex": 575, + "navigationTitle": "Remove conversations from groups" + }, + { + "id": "conversation/managing-conversation-groups/delete-conversation-group", + "segment": "delete-conversation-group", + "title": "Delete a conversation group", + "href": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "type": "page", + "children": [], + "minIndex": 576, + "navigationTitle": "Delete a conversation group" + } + ], + "minIndex": 567 + } + ], + "minIndex": 546 } ], - "pageCount": 27, + "pageCount": 58, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index a56495e261..0625b52bb9 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,8 +1,8 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 27, - "manualPageCount": 27, + "pageCount": 58, + "manualPageCount": 58, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", @@ -31,7 +31,38 @@ "/sdk/react-native/user/friend-applications/delete-friend-requests": "published", "/sdk/react-native/user/blacklist/get-black-list": "published", "/sdk/react-native/user/blacklist/add-black": "published", - "/sdk/react-native/user/blacklist/remove-black": "published" + "/sdk/react-native/user/blacklist/remove-black": "published", + "/sdk/react-native/conversation/overview-conversation": "published", + "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target": "published", + "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id": "published", + "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id": "published", + "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list": "published", + "/sdk/react-native/conversation/managing-conversations/pin-conversation": "published", + "/sdk/react-native/conversation/managing-conversations/mark-conversation": "published", + "/sdk/react-native/conversation/managing-conversations/set-conversation-remark": "published", + "/sdk/react-native/conversation/managing-conversations/set-conversation-extension": "published", + "/sdk/react-native/conversation/managing-conversations/set-conversation-draft": "published", + "/sdk/react-native/conversation/managing-conversations/set-message-receive-option": "published", + "/sdk/react-native/conversation/managing-conversations/clear-group-mentions": "published", + "/sdk/react-native/conversation/managing-conversations/mark-conversation-read": "published", + "/sdk/react-native/conversation/managing-conversations/get-total-unread-count": "published", + "/sdk/react-native/conversation/managing-conversations/set-private-chat": "published", + "/sdk/react-native/conversation/managing-conversations/set-burn-duration": "published", + "/sdk/react-native/conversation/managing-conversations/set-message-destruct": "published", + "/sdk/react-native/conversation/managing-conversations/hide-a-conversation": "published", + "/sdk/react-native/conversation/managing-conversations/hide-all-conversations": "published", + "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages": "published", + "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages": "published", + "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups": "published", + "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group": "published", + "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups": "published", + "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": "published", + "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id": "published", + "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group": "published", + "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order": "published", + "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups": "published", + "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups": "published", + "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group": "published" }, "navigationLabels": { "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", @@ -47,9 +78,9 @@ "Get your profile": "获取当前用户资料", "Update your profile": "更新当前用户资料", "Set global message reception": "设置全局消息接收方式", - "Set friend request permissions": "设置好友申请权限", + "Set friend request permissions": "设置好友添加权限", "Subscribe to online status": "订阅用户在线状态", - "Get subscribed user status": "查询已订阅用户状态", + "Get subscribed user status": "获取已订阅用户状态", "Unsubscribe from online status": "取消订阅用户状态", "Relationships overview": "关系链概览", "Get the friend list": "分页获取好友列表", @@ -78,7 +109,45 @@ "Block a user": "将用户加入黑名单", "Add a user to the blacklist": "将用户加入黑名单", "Unblock a user": "将用户移出黑名单", - "Remove a user from the blacklist": "将用户移出黑名单" + "Remove a user from the blacklist": "将用户移出黑名单", + "Conversation": "会话", + "Retrieving conversations": "获取会话", + "Conversation organization": "会话管理", + "Unread status and notifications": "未读状态和提醒", + "Message retention and privacy": "消息保留和隐私", + "Hiding and deleting conversations": "隐藏和删除会话", + "Conversation groups": "会话分组", + "Conversation overview": "会话概览", + "Open a conversation": "查询指定会话", + "Resolve a conversation ID": "生成会话 ID", + "Get conversations by ID": "按 ID 批量获取会话", + "Retrieve the conversation list": "获取会话列表", + "Pin or unpin a conversation": "置顶或取消置顶会话", + "Mark or unmark a conversation": "标记或取消标记会话", + "Set a conversation remark": "设置会话备注", + "Set conversation extra data": "设置会话扩展字段", + "Set a conversation draft": "设置会话草稿", + "Set conversation message reception": "设置会话消息接收方式", + "Reset group mention status": "重置群聊 @ 状态", + "Mark a conversation as read": "标记会话已读", + "Track the total unread count": "获取消息总未读数", + "Enable or disable burn after reading": "开启或关闭阅后即焚", + "Set the burn duration": "设置阅后即焚时长", + "Schedule server message deletion": "定期删除服务端消息", + "Hide a conversation": "隐藏会话", + "Hide all conversations": "隐藏全部会话", + "Delete a conversation and its messages": "删除会话及消息", + "Clear messages in a conversation": "清空会话消息", + "Conversation group overview": "会话分组概览", + "Create a conversation group": "创建会话分组", + "Get conversation groups": "查询会话分组列表", + "Get conversations in a group": "查询分组内会话", + "Get groups for a conversation": "查询会话所属分组", + "Update a conversation group": "更新会话分组", + "Reorder conversation groups": "调整会话分组顺序", + "Add conversations to groups": "添加会话到分组", + "Remove conversations from groups": "从分组移除会话", + "Delete a conversation group": "删除会话分组" }, "pages": { "/sdk/react-native/overview": { @@ -110,7 +179,7 @@ "title": "OpenIM React Native SDK 概览" }, "/sdk/react-native/user/overview-user": { - "body": "OpenIM React Native SDK 使用 `userID` 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。\n\n好友、好友申请和黑名单属于用户之间的关系链能力,见[关系链概览](/sdk/react-native/user/overview-relationships)。\n\n## 用户相关类型\n\nReact Native SDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要 API |\n| --- | --- | --- |\n| `SelfUserInfo` | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `PublicUserItem` | 查询应用用户和展示公开资料卡 | `getUsersInfo()` |\n| `UserOnlineState` | 用户在线状态和在线平台列表 | `subscribeUsersStatus()`、`getSubscribeUsersStatus()`、`unsubscribeUsersStatus()` |\n\n`SelfUserInfo` 表示当前登录用户,`PublicUserItem` 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于展示资料卡 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) |\n| 读取或更新当前用户的昵称、头像和扩展信息 | [获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info) |\n| 设置账号级消息接收方式 | [设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception) |\n| 设置其他用户添加当前账号时的处理策略 | [设置好友申请权限](/sdk/react-native/user/profile/set-friend-add-permission) |\n| 订阅、读取和取消订阅在线状态 | [订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)、[查询已订阅用户状态](/sdk/react-native/user/online-status/get-subscribe-users-status)、[取消订阅用户状态](/sdk/react-native/user/online-status/unsubscribe-users-status) |\n| 管理好友、好友申请或黑名单 | [关系链概览](/sdk/react-native/user/overview-relationships) |\n\n## 事件监听\n\n用户状态变化会触发事件,具体的事件监听详见:\n\n- 当前用户资料变化见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。\n- 用户在线状态变化见[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。\n- 好友、好友申请和黑名单变化见[关系链概览](/sdk/react-native/user/overview-relationships)。", + "body": "OpenIM React Native SDK 使用 `userID` 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。\n\n好友、好友申请和黑名单属于用户之间的关系链能力,见[关系链概览](/sdk/react-native/user/overview-relationships)。\n\n## 用户相关类型\n\nReact Native SDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要 API |\n| --- | --- | --- |\n| `SelfUserInfo` | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `PublicUserItem` | 查询应用用户和展示公开资料卡 | `getUsersInfo()` |\n| `UserOnlineState` | 用户在线状态和在线平台列表 | `subscribeUsersStatus()`、`getSubscribeUsersStatus()`、`unsubscribeUsersStatus()` |\n\n`SelfUserInfo` 表示当前登录用户,`PublicUserItem` 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于展示资料卡 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) |\n| 读取或更新当前用户的昵称、头像和扩展信息 | [获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info) |\n| 设置账号级消息接收方式 | [设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception) |\n| 设置其他用户添加当前账号时的处理策略 | [设置好友添加权限](/sdk/react-native/user/profile/set-friend-add-permission) |\n| 订阅、读取和取消订阅在线状态 | [订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)、[获取已订阅用户状态](/sdk/react-native/user/online-status/get-subscribe-users-status)、[取消订阅用户状态](/sdk/react-native/user/online-status/unsubscribe-users-status) |\n| 管理好友、好友申请或黑名单 | [关系链概览](/sdk/react-native/user/overview-relationships) |\n\n## 事件监听\n\n用户状态变化会触发事件,具体的事件监听详见:\n\n- 当前用户资料变化见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。\n- 用户在线状态变化见[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。\n- 好友、好友申请和黑名单变化见[关系链概览](/sdk/react-native/user/overview-relationships)。", "description": "了解 React Native SDK 中的当前用户资料、公开用户资料、账号设置和在线状态。", "headings": [ { @@ -196,7 +265,7 @@ }, "/sdk/react-native/user/profile/set-friend-add-permission": { "body": "`addFriendPermission` 控制其他用户添加当前账号时,是否需要当前用户确认。使用 `setSelfInfo()` 更新该账号级设置:\n\n```ts\nawait OpenIMSDK.setSelfInfo({\n addFriendPermission: AddFriendPermission.AddFriendAllowed,\n});\n```\n\n## 参数说明\n\n| 枚举值 | 数值 | 含义 |\n| --- | --- | --- |\n| `AddFriendPermission.AddFriendAllowed` | `0` | 允许添加,但需要当前用户审核好友申请。 |\n| `AddFriendPermission.AddFriendAllowedNoReview` | `1` | 允许添加,并直接建立好友关系,无需当前用户审核。 |\n| `AddFriendPermission.AddFriendDenied` | `2` | 不允许其他用户添加当前账号。 |\n\n此设置只影响后续的添加行为,不会删除已有好友关系,也不会自动处理已经存在的待审核申请。设置完成后,当前用户信息会通过 `OnSelfInfoUpdated` 事件更新,监听方式见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。", - "description": "OpenIM React Native SDK 设置好友申请权限。", + "description": "OpenIM React Native SDK 设置好友添加权限。", "headings": [ { "depth": 2, @@ -205,7 +274,7 @@ } ], "sourcePath": "/sdk/react-native/user/profile/set-friend-add-permission", - "title": "设置好友申请权限" + "title": "设置好友添加权限" }, "/sdk/react-native/user/online-status/subscribe-users-status": { "body": "调用 `subscribeUsersStatus()` 订阅指定用户的在线状态。建议只订阅当前界面需要展示的用户。\n\n```ts\nconst userIDs = [...new Set(visibleUserIDs.filter(Boolean))];\nconst states = await OpenIMSDK.subscribeUsersStatus(userIDs);\n```\n\n返回这些用户当前的 `UserOnlineState[]`,字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 状态所属用户的 ID。 |\n| `status` | `OnlineState` | `OnlineState.Online` 表示在线,`OnlineState.Offline` 表示离线。 |\n| `platformIDs` | `Platform[]`(可选) | 用户当前在线的平台列表。 |\n\n在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看应用或某个会话。\n\n## 监听在线状态变化\n\n订阅用户的在线状态变化时,触发 `OnUserStatusChanged` 事件:\n\n```ts\nconst handleStatusChanged = (state: UserOnlineState) => {\n // 按 state.userID 更新在线状态\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnUserStatusChanged, handleStatusChanged);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnUserStatusChanged, handleStatusChanged);\n```\n\n退出登录、切换账号或不再需要展示这些用户时,取消订阅并移除监听。", @@ -222,10 +291,10 @@ }, "/sdk/react-native/user/online-status/get-subscribe-users-status": { "body": "调用 `getSubscribeUsersStatus()` 获取当前账号已订阅用户的在线状态。\n\n```ts\nconst states = await OpenIMSDK.getSubscribeUsersStatus();\n```\n\n返回已订阅用户的 `UserOnlineState[]`。目标用户尚未订阅时,请先调用[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。", - "description": "OpenIM React Native SDK 查询已订阅用户状态。", + "description": "OpenIM React Native SDK 获取已订阅用户状态。", "headings": [], "sourcePath": "/sdk/react-native/user/online-status/get-subscribe-users-status", - "title": "查询已订阅用户状态" + "title": "获取已订阅用户状态" }, "/sdk/react-native/user/online-status/unsubscribe-users-status": { "body": "调用 `unsubscribeUsersStatus()` 取消订阅指定用户的在线状态。\n\n```ts\nawait OpenIMSDK.unsubscribeUsersStatus(userIDs);\n```\n\n页面翻页、搜索结果变化、退出登录或不再需要展示这些用户时,应取消对应订阅。", @@ -466,6 +535,578 @@ "headings": [], "sourcePath": "/sdk/react-native/user/blacklist/remove-black", "title": "将用户移出黑名单" + }, + "/sdk/react-native/conversation/overview-conversation": { + "body": "在 OpenIM React Native SDK 中,会话表示当前登录账号维护的一条聊天状态。单聊和群聊都会对应一个 `ConversationItem`,其中包含会话列表展示信息、未读状态、草稿和消息接收设置等内容。\n\n会话记录与聊天目标使用不同的标识:`conversationID` 标识当前账号的会话记录,单聊目标使用对方的 `userID`,群聊目标使用 `groupID`。群组资料、成员和权限仍通过群组相关 API 管理。\n\n## 会话标识\n\n| 标识 | 用途 |\n| ---------------- | ------------------------------------------------------------------- |\n| `conversationID` | 当前账号的会话记录 ID,用于会话设置、消息历史和未读状态。 |\n| `userID` | 单聊中的对方用户 ID。 |\n| `groupID` | 群聊对应的群组 ID。 |\n| `sourceID` | 按类型查询会话时传入的聊天目标:单聊传 `userID`,群聊传 `groupID`。 |\n\n如需根据聊天目标获取 `conversationID`,可调用[生成会话 ID](/sdk/react-native/conversation/retrieving-conversations/get-conversation-id),传入 `sourceID` 和 `sessionType`。\n\n## 会话数据\n\n`ConversationItem` 同时包含列表展示信息和当前账号的会话设置:\n\n| 分类 | 字段 | 说明 |\n| -------------- | --------------------------------------------------------------------------------- | ------------------------------------------ |\n| 标识和类型 | `conversationID`、`conversationType` | 定位会话记录并区分单聊和群聊。 |\n| 列表展示 | `showName`、`faceURL`、`latestMsg`、`latestMsgSendTime` | 展示会话名称、头像和最后一条消息。 |\n| 未读和提醒 | `unreadCount`、`groupAtType` | 展示未读数和群聊 @ 提醒状态。 |\n| 列表组织 | `isPinned`、`isMarked`、`draftText`、`remark` | 管理置顶、标记、草稿和当前账号的会话备注。 |\n| 消息策略 | `recvMsgOpt`、`isPrivateChat`、`burnDuration`、`isMsgDestruct`、`msgDestructTime` | 设置消息接收、阅后即焚和服务端消息删除。 |\n| 其他状态和扩展 | `isNotInGroup`、`attachedInfo`、`ex` | 表示群组关系状态、SDK 附加信息和业务扩展。 |\n\n## 按任务查找\n\n| 任务 | 相关页面 |\n| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 获取一个或多个会话 | [查询指定会话](/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target)、[按 ID 批量获取会话](/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id)、[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list) |\n| 整理会话列表 | [置顶或取消置顶会话](/sdk/react-native/conversation/managing-conversations/pin-conversation)、[标记或取消标记会话](/sdk/react-native/conversation/managing-conversations/mark-conversation)、[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) |\n| 管理草稿、备注和扩展字段 | [设置会话草稿](/sdk/react-native/conversation/managing-conversations/set-conversation-draft)、[设置会话备注](/sdk/react-native/conversation/managing-conversations/set-conversation-remark)、[设置会话扩展字段](/sdk/react-native/conversation/managing-conversations/set-conversation-extension) |\n| 设置消息接收和保留策略 | [设置会话消息接收方式](/sdk/react-native/conversation/managing-conversations/set-message-receive-option)、[开启或关闭阅后即焚](/sdk/react-native/conversation/managing-conversations/set-private-chat)、[定期删除服务端消息](/sdk/react-native/conversation/managing-conversations/set-message-destruct) |\n| 处理未读数和群组提醒 | [标记会话已读](/sdk/react-native/conversation/managing-conversations/mark-conversation-read)、[获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count)、[重置群聊 @ 状态](/sdk/react-native/conversation/managing-conversations/clear-group-mentions) |\n\n## 隐藏、删除和清空\n\n隐藏、删除和清空作用范围不同:\n\n| 操作 | 作用 |\n| ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |\n| [隐藏会话](/sdk/react-native/conversation/managing-conversations/hide-a-conversation) | 从当前账号的会话列表中隐藏一条会话,新消息到达后可能重新出现。 |\n| [删除会话及消息](/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages) | 删除会话记录和当前账号在该会话中的消息。 |\n| [清空会话消息](/sdk/react-native/conversation/managing-conversations/clear-conversation-messages) | 保留会话记录,只清除当前账号在该会话中的消息。 |\n\n## 事件监听\n\n会话状态变化会触发事件,具体的事件监听详见:\n\n- [获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)介绍会话新增和会话字段变化的监听方式。\n- [获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count)介绍当前账号总未读数的监听方式。\n- [会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)介绍会话分组和分组成员变化的监听方式。", + "description": "了解 React Native SDK 中的会话、会话状态和会话分组能力。", + "headings": [ + { + "depth": 2, + "title": "会话标识", + "url": "#会话标识" + }, + { + "depth": 2, + "title": "会话数据", + "url": "#会话数据" + }, + { + "depth": 2, + "title": "按任务查找", + "url": "#按任务查找" + }, + { + "depth": 2, + "title": "隐藏、删除和清空", + "url": "#隐藏-删除和清空" + }, + { + "depth": 2, + "title": "事件监听", + "url": "#事件监听" + } + ], + "sourcePath": "/sdk/react-native/conversation/overview-conversation", + "title": "会话概览" + }, + "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target": { + "body": "调用 `getOneConversation()` 根据聊天目标和会话类型获取一个会话。\n\n```ts\nconst conversation = await OpenIMSDK.getOneConversation({\n sourceID: targetUserID,\n sessionType: SessionType.Single,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ------------- | ------------- | -------- | ----------------------------------------------------------------------- |\n| `sourceID` | `string` | 是 | 单聊传对方用户 ID,群聊传群组 ID。 |\n| `sessionType` | `SessionType` | 是 | 会话类型。单聊使用 `SessionType.Single`,群聊使用 `SessionType.Group`。 |\n\n## 返回结果\n\n调用完成后返回 `ConversationItem`。会话字段说明见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "根据聊天目标和会话类型查询指定会话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "查询指定会话" + }, + "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id": { + "body": "调用 `getConversationIDBySessionType()` 根据聊天目标和会话类型获取会话 ID。\n\n```ts\nconst conversationID = await OpenIMSDK.getConversationIDBySessionType({\n sourceID: targetUserID,\n sessionType: SessionType.Single,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ------------- | ------------- | -------- | ----------------------------------------------------------------------- |\n| `sourceID` | `string` | 是 | 单聊传对方用户 ID,群聊传群组 ID。 |\n| `sessionType` | `SessionType` | 是 | 会话类型。单聊使用 `SessionType.Single`,群聊使用 `SessionType.Group`。 |\n\n## 返回结果\n\n调用完成后返回 `string` 类型的 `conversationID`。", + "description": "根据聊天目标和会话类型生成会话 ID。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "生成会话 ID" + }, + "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id": { + "body": "已经持有一组会话 ID 时,调用 `getMultipleConversation()` 批量获取会话信息。\n\n```ts\nconst conversations = await OpenIMSDK.getMultipleConversation(conversationIDList);\n```\n\n## 参数说明\n\n`conversationIDList` 是要查询的会话 ID 数组。\n\n## 返回结果\n\n调用完成后返回 `ConversationItem[]`,返回结果可能少于传入的会话 ID 数量,未返回的会话 ID 表示 SDK 当前未找到对应会话。单个会话的字段说明见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "按 conversationID 批量获取会话信息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "按 ID 批量获取会话" + }, + "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list": { + "body": "使用 `getConversationListSplit()` 分页获取会话。\n\n```ts\nconst conversations = await OpenIMSDK.getConversationListSplit({\n offset: 0,\n count: 50,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| -------- | -------- | -------- | -------------------------------------------------------- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。继续加载时按已请求的条目数递增。 |\n| `count` | `number` | 是 | 本次请求的会话数量。 |\n\n## 返回结果\n\n调用完成后返回当前页的 `ConversationItem[]`。当返回数量小于 `count` 时,表示已经读取到当前列表末尾。\n\n### 会话字段\n\n`ConversationItem` 同时包含聊天目标、列表展示和当前账号的会话设置:\n\n| 字段 | 类型 | 说明 |\n| ----------------------------------------------------------------- | ----------------------- | --------------------------------------- |\n| `conversationID` | `string` | 会话 ID。 |\n| `conversationType` | `SessionType` | 会话类型,单聊或群聊。 |\n| `userID` | `string` | 单聊对方的用户 ID;群聊中通常为空。 |\n| `groupID` | `string` | 群聊对应的群组 ID;单聊中通常为空。 |\n| `showName` | `string` | 会话的展示名称。 |\n| `faceURL` | `string` | 会话的展示头像地址。 |\n| `recvMsgOpt` | `MessageReceiveOptType` | 当前会话的消息接收方式。 |\n| `unreadCount` | `number` | 当前会话的未读消息数。 |\n| `groupAtType` | `GroupAtType` | 群聊中的提醒状态;单聊不使用。 |\n| `latestMsg` | `string` | 最后一条消息的 JSON 序列化内容。 |\n| `latestMsgSendTime` | `number` | 最后一条消息的发送时间。 |\n| `draftText` | `string` | 当前设备保存的会话草稿。 |\n| `draftTextTime` | `number` | 草稿更新时间。 |\n| `isPrivateChat` | `boolean` | 是否开启私聊阅后即焚。 |\n| `burnDuration` | `number` | 私聊阅后即焚时长。 |\n| `isMsgDestruct` | `boolean` | 是否开启服务端消息定期删除。 |\n| `msgDestructTime` | `number` | 服务端消息定期删除周期。 |\n| `isPinned` | `boolean` | 会话是否置顶。 |\n| `isMarked` 商业版 | `boolean` | 会话是否已标记。 |\n| `isNotInGroup` | `boolean` | 当前账号是否已不在该群组中。 |\n| `attachedInfo` | `string` | SDK 附加信息。 |\n| `ex` | `string`(可选) | 会话扩展字符串。 |\n| `remark` 商业版 | `string`(可选) | 会话备注。 |\n\n拉取会话列表时,应按 `conversationID` 合并分页结果去重,避免同一会话重复出现在列表中。刷新列表时从 `offset: 0` 重新读取。\n\n## 监听会话变化\n\n新建会话时触发 `OnNewConversation`,已有会话发生变化时触发 `OnConversationChanged`。两个事件的回调参数都是 `ConversationItem[]`。\n\n```ts\nfunction handleNewConversation(conversations: ConversationItem[]) {\n // ...\n}\n\nfunction handleConversationChanged(conversations: ConversationItem[]) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnNewConversation, handleNewConversation);\nOpenIMSDK.on(OpenIMEvent.OnConversationChanged, handleConversationChanged);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnNewConversation, handleNewConversation);\nOpenIMSDK.off(OpenIMEvent.OnConversationChanged, handleConversationChanged);\n```\n\n退出登录、切换账号或销毁会话列表状态时,取消监听。", + "description": "分页获取当前登录账号的会话列表。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 3, + "title": "会话字段", + "url": "#会话字段" + }, + { + "depth": 2, + "title": "监听会话变化", + "url": "#监听会话变化" + } + ], + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "获取会话列表" + }, + "/sdk/react-native/conversation/managing-conversations/pin-conversation": { + "body": "调用 `pinConversation()` 设置会话是否置顶。\n\n```ts\nawait OpenIMSDK.pinConversation({\n conversationID,\n isPinned: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | --------- | -------- | ------------------------------- |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `isPinned` | `boolean` | 是 | `true` 置顶,`false` 取消置顶。 |\n\n## 返回结果\n\n调用完成后,会话的 `isPinned` 状态已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "置顶或取消置顶会话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "置顶或取消置顶会话" + }, + "/sdk/react-native/conversation/managing-conversations/mark-conversation": { + "body": "调用 `setConversation()` 设置会话的标记状态。\n\n```ts\nawait OpenIMSDK.setConversation({\n conversationID,\n isMarked: true,\n});\n```\n\n将 `isMarked` 设置为 `false` 可取消标记。标记状态属于当前登录账号,会话标记后会出现在内置的标记会话分组中。会话分组的查询和管理方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | --------- | -------- | ------------------------------- |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `isMarked` | `boolean` | 否 | `true` 标记,`false` 取消标记。 |\n\n## 返回结果\n\n调用完成后,会话的 `isMarked` 状态已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "标记或取消标记会话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "标记或取消标记会话" + }, + "/sdk/react-native/conversation/managing-conversations/set-conversation-remark": { + "body": "调用 `setConversation()` 设置当前账号的会话备注。\n\n```ts\nawait OpenIMSDK.setConversation({\n conversationID,\n remark: '项目讨论',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | -------- | -------- | -------------------------------------- |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `remark` | `string` | 否 | 会话备注。传入空字符串可清除已有备注。 |\n\n显示会话名称时,可根据产品规则优先使用 `remark`,没有备注时使用会话原有的 `showName`。会话备注不会更新用户资料或群组名称。\n\n## 返回结果\n\n调用完成后,会话的 `remark` 已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "设置会话备注。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "设置会话备注" + }, + "/sdk/react-native/conversation/managing-conversations/set-conversation-extension": { + "body": "使用 `setConversation()` 设置会话的扩展字段 `ex`。\n\n```ts\nawait OpenIMSDK.setConversation({\n conversationID,\n ex: JSON.stringify({\n category: 'work',\n }),\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | -------- | -------- | ------------------------------------------------------------------ |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `ex` | `string` | 否 | 会话扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 |\n\n如果业务需要保留已有扩展内容,应先读取当前 `ex`,再按业务规则更新后写回。\n\n## 返回结果\n\n调用完成后,会话的 `ex` 已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "设置会话扩展字段。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "设置会话扩展字段" + }, + "/sdk/react-native/conversation/managing-conversations/set-conversation-draft": { + "body": "使用 `setConversationDraft()` 保存会话草稿。用户离开聊天页面、切换会话或准备退出时,可以提交当前编辑内容。\n\n```ts\nawait OpenIMSDK.setConversationDraft({\n conversationID,\n draftText: editorValue,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | -------- | -------- | ---------------------------------- |\n| `conversationID` | `string` | 是 | 要保存草稿的会话 ID。 |\n| `draftText` | `string` | 是 | 草稿内容。传入空字符串可清除草稿。 |\n\n输入过程中建议由业务侧维护编辑器状态并合并保存,离开页面前再提交最新内容。\n\n## 返回结果\n\n调用完成后,草稿已保存。会话列表中的 `draftText` 和 `draftTextTime` 变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。切换账号或退出登录时,同时清理业务侧的编辑器状态。", + "description": "设置会话草稿。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "设置会话草稿" + }, + "/sdk/react-native/conversation/managing-conversations/set-message-receive-option": { + "body": "调用 `setConversationRecvMessageOpt()` 设置单个会话的消息接收方式。\n\n```ts\nawait OpenIMSDK.setConversationRecvMessageOpt({\n conversationID,\n opt: MessageReceiveOptType.NotNotify,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | ----------------------- | -------- | ------------------ |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `opt` | `MessageReceiveOptType` | 是 | 会话消息接收方式。 |\n\n`MessageReceiveOptType` 常用值如下:\n\n| 枚举值 | 数值 | 说明 |\n| ---------------------------------- | ---- | ------------------------ |\n| `MessageReceiveOptType.Normal` | `0` | 正常接收消息并允许提醒。 |\n| `MessageReceiveOptType.NotReceive` | `1` | 不接收该会话的消息。 |\n| `MessageReceiveOptType.NotNotify` | `2` | 接收消息但不提醒。 |\n\n## 返回结果\n\n调用完成后,会话的 `recvMsgOpt` 已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。账号级默认接收策略请参考用户资料中的[设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception)。", + "description": "设置会话消息接收方式。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "设置会话消息接收方式" + }, + "/sdk/react-native/conversation/managing-conversations/clear-group-mentions": { + "body": "用户处理群聊中的提及消息后,调用 `resetConversationGroupAtType()` 重置会话的群组提醒状态。\n\n```ts\nawait OpenIMSDK.resetConversationGroupAtType(conversationID);\n```\n\n## 参数说明\n\n`conversationID` 为要重置提醒状态的群聊会话 ID。\n\n该方法将会话的 `groupAtType` 恢复为普通状态,不用于主动设置“有人提及我”或“提及所有人”等状态。重置群组提醒和[标记会话已读](/sdk/react-native/conversation/managing-conversations/mark-conversation-read)是两个独立操作。\n\n## 返回结果\n\n调用完成后,会话的群组提醒状态已重置。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "重置群聊 @ 状态。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "重置群聊 @ 状态" + }, + "/sdk/react-native/conversation/managing-conversations/mark-conversation-read": { + "body": "用户打开会话并阅读当前消息后,调用 `markConversationMessageAsRead()` 标记会话已读。\n\n```ts\nawait OpenIMSDK.markConversationMessageAsRead(conversationID);\n```\n\n## 参数说明\n\n`conversationID` 为要标记已读的会话 ID。\n\n## 返回结果\n\n调用完成后,当前账号在该会话中的未读状态已更新。会话列表中的未读数变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。群聊中该方法只处理当前账号的会话未读状态。", + "description": "标记会话已读。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "标记会话已读" + }, + "/sdk/react-native/conversation/managing-conversations/get-total-unread-count": { + "body": "调用 `getTotalUnreadMsgCount()` 获取当前账号所有会话的总未读数。不要尝试通过累加已加载会话分页中的 `unreadCount` 来计算会话总未读数,这样会遗漏未加载的会话的未读数。\n\n```ts\nconst totalUnread = await OpenIMSDK.getTotalUnreadMsgCount();\n```\n\n## 返回结果\n\n调用完成后返回 `number` 类型的总未读数。\n\n## 事件监听\n\n应用处于前台时,可通过 `OnTotalUnreadMessageCountChanged` 监听总未读数变化:\n\n```ts\nfunction handleTotalUnreadChanged(totalUnread: number) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "获取消息总未读数。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 2, + "title": "事件监听", + "url": "#事件监听" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "获取消息总未读数" + }, + "/sdk/react-native/conversation/managing-conversations/set-private-chat": { + "body": "调用 `setConversationPrivateChat()` 开启或关闭会话的阅后即焚模式。阅后即焚的持续时长通过 `setConversationBurnDuration()` 单独设置,详见[设置阅后即焚时长](/sdk/react-native/conversation/managing-conversations/set-burn-duration)。\n\n```ts\nawait OpenIMSDK.setConversationPrivateChat({\n conversationID,\n isPrivate: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | --------- | -------- | --------------------------- |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `isPrivate` | `boolean` | 是 | `true` 开启,`false` 关闭。 |\n\n## 返回结果\n\n调用完成后,会话的阅后即焚状态已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "开启或关闭阅后即焚。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "开启或关闭阅后即焚" + }, + "/sdk/react-native/conversation/managing-conversations/set-burn-duration": { + "body": "调用 `setConversationBurnDuration()` 设置会话的阅后即焚时长,单位为秒。该方法只设置持续时长,是否启用阅后即焚由[开启或关闭阅后即焚](/sdk/react-native/conversation/managing-conversations/set-private-chat)控制。不要将 `burnDuration` 与服务端消息定期删除的 `msgDestructTime` 混淆。\n\n```ts\nawait OpenIMSDK.setConversationBurnDuration({\n conversationID,\n burnDuration: 30,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------- | -------- | -------- | ---------------------------- |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `burnDuration` | `number` | 是 | 阅后即焚持续时长,单位为秒。 |\n\n## 返回结果\n\n调用完成后,会话的阅后即焚时长已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "设置阅后即焚时长。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "设置阅后即焚时长" + }, + "/sdk/react-native/conversation/managing-conversations/set-message-destruct": { + "body": "调用 `setConversation()` 设置会话的服务端消息定期删除策略。\n\n```ts\nawait OpenIMSDK.setConversation({\n conversationID,\n isMsgDestruct: true,\n msgDestructTime: 3600,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ----------------- | --------- | -------- | ---------------------------- |\n| `conversationID` | `string` | 是 | 要设置的会话 ID。 |\n| `isMsgDestruct` | `boolean` | 否 | 是否开启服务端消息定期删除。 |\n| `msgDestructTime` | `number` | 否 | 消息删除周期,单位为秒。 |\n\n启用策略时同时传入 `isMsgDestruct: true` 和 `msgDestructTime`。传入 `isMsgDestruct: false` 可关闭策略。注意该策略与阅后即焚的区别,阅后即焚使用 `isPrivateChat` 和 `burnDuration`。\n\n服务端消息定期删除只影响服务端保存的消息。已经同步到设备的本地消息不会被主动删除;在清理本地数据或更换设备后,已从服务端删除的消息无法再次获取。\n\n## 返回结果\n\n调用完成后,服务端消息定期删除策略已更新。会话列表中的变化通过 `OnConversationChanged` 事件返回,事件监听方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "定期删除服务端消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "定期删除服务端消息" + }, + "/sdk/react-native/conversation/managing-conversations/hide-a-conversation": { + "body": "调用 `hideConversation()` 隐藏当前账号会话列表中的一个会话。新消息到达或会话状态再次同步后,该会话可能重新出现在会话列表中。\n\n```ts\nawait OpenIMSDK.hideConversation(conversationID);\n```\n\n## 参数说明\n\n`conversationID` 为要隐藏的会话 ID。\n\n## 返回结果\n\n调用完成后,可以先从当前会话列表中移除对应的 `conversationID` 的会话。如果后续收到 `OnConversationChanged`,按 `conversationID` 更新列表;完整监听和清理方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "隐藏会话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "隐藏会话" + }, + "/sdk/react-native/conversation/managing-conversations/hide-all-conversations": { + "body": "调用 `hideAllConversations()` 隐藏当前账号的全部会话。\n\n```ts\nawait OpenIMSDK.hideAllConversations();\n```\n\n调用完成后,重新查询[会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)和[获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count),刷新界面数据。新消息到达或会话状态再次同步后,会话可能重新出现在列表中。", + "description": "隐藏全部会话。", + "headings": [], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "隐藏全部会话" + }, + "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages": { + "body": "调用 `deleteConversationAndDeleteAllMsg()` 删除会话记录和当前账号下的会话消息。\n\n```ts\nawait OpenIMSDK.deleteConversationAndDeleteAllMsg(conversationID);\n```\n\n## 参数说明\n\n`conversationID` 为要删除的会话 ID。\n\n## 返回结果\n\n调用完成后,可以清除当前页面的消息列表和会话列表项。后续如收到 `OnConversationChanged`,按 `conversationID` 更新列表;完整监听和清理方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "删除会话及消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "删除会话及消息" + }, + "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages": { + "body": "调用 `clearConversationAndDeleteAllMsg()` 清除当前账号的会话消息,不会删除会话。\n\n```ts\nawait OpenIMSDK.clearConversationAndDeleteAllMsg(conversationID);\n```\n\n## 参数说明\n\n`conversationID` 为要清空消息的会话 ID。\n\n## 返回结果\n\n调用完成后,清空当前页面的消息列表。会话的最新消息、摘要和未读状态如有变化,可通过 `OnConversationChanged` 事件或重新查询会话列表获取最新数据;完整监听和清理方式见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)。", + "description": "清空会话消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "清空会话消息" + }, + "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups": { + "body": "会话分组用于将当前账号的会话列表按业务场景分类,例如工作、待处理或自定义类别。\n\n## 分组类型\n\n`ConversationGroupType` 包含以下类型:\n\n| 枚举值 | 数值 | 说明 |\n| --------------------------------------------------- | ---- | -------------------- |\n| `ConversationGroupType.ConversationGroupTypeNormal` | `0` | 普通自定义分组。 |\n| `ConversationGroupType.ConversationGroupTypeFilter` | `1` | 按规则筛选的分组。 |\n| `ConversationGroupType.ConversationGroupTypeAll` | `2` | 查询全部类型的分组。 |\n\n## 分组字段\n\n`ConversationGroup` 通过 `conversationGroupID` 作为分组标识:\n\n| 字段 | 类型 | 说明 |\n| ----------------------- | ----------------------- | ------------------------- |\n| `conversationGroupID` | `string` | 会话分组 ID。 |\n| `name` | `string` | 分组名称。 |\n| `serial` | `number` | 分组排序值。 |\n| `version` | `number` | 分组数据版本。 |\n| `conversationGroupType` | `ConversationGroupType` | 分组类型。 |\n| `hidden` | `boolean` | 分组是否隐藏。 |\n| `unreadCount` | `number` | 分组内会话的未读总数。 |\n| `conversationIDs` | `string[]` | 当前属于该分组的会话 ID。 |\n| `ex` | `string`(可选) | 业务扩展字符串。 |\n\n## 监听分组变化\n\n分组操作完成后,相关事件会返回新增、更新或删除的分组;分组成员变化事件会返回分组、会话 ID 和会话详情。事件回调参数直接传递实体,不包含 `data` 字段。应用应按 `conversationGroupID` 更新分组,按事件中的 `conversationIDs` 更新成员关系。\n\n```ts\nconst handleGroupAdded = (groups: ConversationGroup[]) => {\n // ...\n};\n\nconst handleGroupChanged = (groups: ConversationGroup[]) => {\n // ...\n};\n\nconst handleGroupDeleted = (groups: ConversationGroup[]) => {\n // ...\n};\n\nconst handleGroupMemberAdded = (payload: ConversationGroupMemberChangedCallbackData) => {\n // ...\n};\n\nconst handleGroupMemberDeleted = (payload: ConversationGroupMemberChangedCallbackData) => {\n // ...\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnConversationGroupAdded, handleGroupAdded);\nOpenIMSDK.on(OpenIMEvent.OnConversationGroupChanged, handleGroupChanged);\nOpenIMSDK.on(OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted);\nOpenIMSDK.on(OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded);\nOpenIMSDK.on(OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnConversationGroupAdded, handleGroupAdded);\nOpenIMSDK.off(OpenIMEvent.OnConversationGroupChanged, handleGroupChanged);\nOpenIMSDK.off(OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted);\nOpenIMSDK.off(OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded);\nOpenIMSDK.off(OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "会话分组概览。", + "headings": [ + { + "depth": 2, + "title": "分组类型", + "url": "#分组类型" + }, + { + "depth": 2, + "title": "分组字段", + "url": "#分组字段" + }, + { + "depth": 2, + "title": "监听分组变化", + "url": "#监听分组变化" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "会话分组概览" + }, + "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group": { + "body": "调用 `createConversationGroup()` 为当前账号创建会话分组。创建普通分组时至少传入 `name`,也可以同时将一个会话加入新分组。\n\n```ts\nconst group = await OpenIMSDK.createConversationGroup({\n name: '工作',\n order: 100,\n conversationID,\n conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ----------------------- | ----------------------- | -------- | ------------------------------------------------------------ |\n| `name` | `string` | 是 | 分组名称。 |\n| `order` | `number` | 否 | 分组排序值。 |\n| `ex` | `string` | 否 | 分组扩展字符串。 |\n| `conversationID` | `string` | 否 | 创建后立即加入分组的会话 ID。 |\n| `conversationGroupType` | `ConversationGroupType` | 否 | 分组类型,普通自定义分组使用 `ConversationGroupTypeNormal`。 |\n\n## 返回结果\n\n调用完成后返回新建的 `ConversationGroupResp`,其中包含 `conversationGroupID`、`name`、`order` 和 `conversationIDs` 等分组信息。分组变化会通过 `OnConversationGroupAdded` 事件通知,完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "创建会话分组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "创建会话分组" + }, + "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups": { + "body": "调用 `getConversationGroups()` 按分组类型获取当前账号的会话分组。\n\n```ts\nconst groups = await OpenIMSDK.getConversationGroups(\n ConversationGroupType.ConversationGroupTypeNormal,\n);\n```\n\n## 参数说明\n\n参数为 `ConversationGroupType`:普通自定义分组使用 `ConversationGroupTypeNormal`,查询全部类型使用 `ConversationGroupTypeAll`。\n\n## 返回结果\n\n调用完成后返回匹配的 `ConversationGroup[]`。字段说明见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。分组只保存会话 ID;需要同时读取会话详情时,使用[查询分组内会话](/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。", + "description": "查询会话分组列表。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "查询会话分组列表" + }, + "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": { + "body": "调用 `getConversationGroupInfoWithConversations()` 获取一个会话分组的信息以及该分组的分页会话列表。\n\n```ts\nconst result = await OpenIMSDK.getConversationGroupInfoWithConversations({\n conversationGroupID,\n pagination: {\n pageNumber: 1,\n showNumber: 20,\n },\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ----------------------- | -------- | -------- | --------------------- |\n| `conversationGroupID` | `string` | 是 | 要查询的会话分组 ID。 |\n| `pagination.pageNumber` | `number` | 是 | 页码,从 `1` 开始。 |\n| `pagination.showNumber` | `number` | 是 | 每页返回的会话数量。 |\n\n## 返回结果\n\n调用完成后返回包含以下字段的对象:\n\n| 字段 | 类型 | 说明 |\n| ------------------- | -------------------- | ------------------ |\n| `group` | `ConversationGroup` | 当前分组信息。 |\n| `conversationTotal` | `number` | 分组中的会话总数。 |\n| `conversationElems` | `ConversationItem[]` | 当前页的会话详情。 |\n\n当已加载会话数量达到 `conversationTotal` 时,可以停止继续请求。会话字段说明见[获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list),分组字段说明见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "查询分组内会话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "查询分组内会话" + }, + "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id": { + "body": "一个会话可以属于多个会话分组。调用 `getConversationGroupByConversationID()` 获取该会话所属的分组。需要查询所有分组或按类型筛选时,使用[查询会话分组列表](/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups)。\n\n```ts\nconst groups = await OpenIMSDK.getConversationGroupByConversationID(conversationID);\n```\n\n## 参数说明\n\n`conversationID` 为 OpenIM 会话 ID,不是聊天群组 ID。\n\n## 返回结果\n\n调用完成后返回 `ConversationGroup[]`,每个元素都是一个完整的分组对象。", + "description": "查询会话所属分组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "查询会话所属分组" + }, + "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group": { + "body": "调用 `updateConversationGroup()` 修改已有会话分组。只传入需要更新的字段。\n\n```ts\nconst group = await OpenIMSDK.updateConversationGroup({\n conversationGroupID,\n name: '重点工作',\n hidden: false,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --------------------- | --------- | -------- | --------------------- |\n| `conversationGroupID` | `string` | 是 | 要更新的会话分组 ID。 |\n| `name` | `string` | 否 | 新的分组名称。 |\n| `ex` | `string` | 否 | 新的分组扩展字符串。 |\n| `hidden` | `boolean` | 否 | 是否隐藏分组。 |\n\n## 返回结果\n\n调用完成后返回更新后的 `ConversationGroupResp`。分组变化会通过 `OnConversationGroupChanged` 事件通知,完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "更新会话分组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "更新会话分组" + }, + "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order": { + "body": "调用 `setConversationGroupOrder()` 批量调整会话分组的排序值。\n\n```ts\nawait OpenIMSDK.setConversationGroupOrder([\n { conversationGroupID: firstGroupID, order: 100 },\n { conversationGroupID: secondGroupID, order: 200 },\n]);\n```\n\n## 参数说明\n\n方法接收数组,每个元素包含以下字段:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --------------------- | -------- | -------- | ---------------------------------- |\n| `conversationGroupID` | `string` | 是 | 要调整顺序的分组 ID。 |\n| `order` | `number` | 是 | 新的排序值,产品侧应统一排序方向。 |\n\n## 返回结果\n\n调用完成后不返回分组数据。界面可以按提交的排序值更新,也可以通过 `OnConversationGroupChanged` 事件或重新查询分组获取最新信息;完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "调整会话分组顺序。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "调整会话分组顺序" + }, + "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups": { + "body": "调用 `addConversationsToGroups()` 将一个或多个会话添加到一个或多个会话分组。\n\n```ts\nawait OpenIMSDK.addConversationsToGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: [conversationGroupID],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------------- | ---------- | -------- | ----------------- |\n| `conversationIDs` | `string[]` | 是 | 要添加的会话 ID。 |\n| `conversationGroupIDs` | `string[]` | 是 | 目标会话分组 ID。 |\n\n## 返回结果\n\n调用完成后,分组与会话的关联请求已完成。关联变化会通过 `OnConversationGroupMemberAdded` 事件通知,事件参数包含分组、会话 ID 和会话详情;完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "添加会话到分组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "添加会话到分组" + }, + "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups": { + "body": "调用 `removeConversationsFromGroups()` 将一个或多个会话从指定会话分组中移除。\n\n```ts\nawait OpenIMSDK.removeConversationsFromGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: [conversationGroupID],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| ---------------------- | ---------- | -------- | ----------------- |\n| `conversationIDs` | `string[]` | 是 | 要移除的会话 ID。 |\n| `conversationGroupIDs` | `string[]` | 是 | 目标会话分组 ID。 |\n\n## 返回结果\n\n调用完成后,分组与会话的关联移除请求已完成。关联变化会通过 `OnConversationGroupMemberDeleted` 事件通知,事件参数包含分组和会话 ID;完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "从分组移除会话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "从分组移除会话" + }, + "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group": { + "body": "调用 `deleteConversationGroup()` 删除会话分组及其会话关联。\n\n```ts\nawait OpenIMSDK.deleteConversationGroup(conversationGroupID);\n```\n\n参数 `conversationGroupID` 为会话分组 ID。\n\n## 返回结果\n\n调用完成后,分组删除请求已完成。该操作不会删除会话或消息。分组变化会通过 `OnConversationGroupDeleted` 事件通知,完整监听方式见[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "删除会话分组。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "删除会话分组" } } } diff --git a/src/generated/routes.json b/src/generated/routes.json index 2c3c30f0ff..d689ab7fc0 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -15569,5 +15569,563 @@ "sourceIndex": 2750, "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx", "navOrder": 545 + }, + { + "id": 1401, + "path": "/sdk/react-native/conversation/overview-conversation", + "relativePath": "sdk/react-native/conversation/overview-conversation", + "sourcePath": "/sdk/react-native/conversation/overview-conversation", + "title": "Conversation overview", + "description": "Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2751, + "contentFile": "content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx", + "navOrder": 546 + }, + { + "id": 1402, + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "description": "Query a conversation by its chat target and session type.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2752, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx", + "navOrder": 547 + }, + { + "id": 1403, + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "description": "Generate a conversation ID from a chat target and session type.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2753, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx", + "navOrder": 548 + }, + { + "id": 1404, + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "description": "Retrieve multiple conversations by their conversation IDs.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2754, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx", + "navOrder": 549 + }, + { + "id": 1405, + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Retrieve the conversation list", + "description": "Retrieve the current user's conversation list with pagination.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2755, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx", + "navOrder": 550 + }, + { + "id": 1406, + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "relativePath": "sdk/react-native/conversation/managing-conversations/pin-conversation", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "description": "Pin or unpin a conversation for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2756, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx", + "navOrder": 551 + }, + { + "id": 1407, + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "relativePath": "sdk/react-native/conversation/managing-conversations/mark-conversation", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "description": "Mark or unmark a conversation for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2757, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx", + "navOrder": 552 + }, + { + "id": 1408, + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "description": "Set a remark for a conversation for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2758, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx", + "navOrder": 553 + }, + { + "id": 1409, + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "description": "Set the conversation extension string.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2759, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx", + "navOrder": 554 + }, + { + "id": 1410, + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "description": "Save a draft for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2760, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx", + "navOrder": 555 + }, + { + "id": 1411, + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "description": "Set the message reception option for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2761, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx", + "navOrder": 556 + }, + { + "id": 1412, + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "relativePath": "sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "description": "Reset the mention status of a group conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2762, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx", + "navOrder": 557 + }, + { + "id": 1413, + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "relativePath": "sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "description": "Mark a conversation as read for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2763, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx", + "navOrder": 558 + }, + { + "id": 1414, + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "relativePath": "sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "description": "Get the total unread message count across the current account's conversations.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2764, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx", + "navOrder": 559 + }, + { + "id": 1415, + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-private-chat", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "description": "Enable or disable burn after reading for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2765, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx", + "navOrder": 560 + }, + { + "id": 1416, + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-burn-duration", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "description": "Set the burn-after-reading duration for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2766, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx", + "navOrder": 561 + }, + { + "id": 1417, + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-message-destruct", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "description": "Configure scheduled deletion of messages stored on the server.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2767, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx", + "navOrder": 562 + }, + { + "id": 1418, + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "relativePath": "sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "description": "Hide a conversation from the current account's conversation list.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2768, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx", + "navOrder": 563 + }, + { + "id": 1419, + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "relativePath": "sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "Hide all conversations for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2769, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx", + "navOrder": 564 + }, + { + "id": 1420, + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "relativePath": "sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "description": "Delete a conversation and the current account's messages in it.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2770, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx", + "navOrder": 565 + }, + { + "id": 1421, + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "relativePath": "sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "description": "Clear the current account's messages in a conversation without deleting the conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2771, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx", + "navOrder": 566 + }, + { + "id": 1422, + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "description": "Learn about conversation groups in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2772, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx", + "navOrder": 567 + }, + { + "id": 1423, + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "Create a conversation group for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2773, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx", + "navOrder": 568 + }, + { + "id": 1424, + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "description": "Query the current account's conversation groups by type.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2774, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx", + "navOrder": 569 + }, + { + "id": 1425, + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "description": "Query a conversation group and its paginated conversations.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2775, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx", + "navOrder": 570 + }, + { + "id": 1426, + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "Get groups for a conversation", + "description": "Query the conversation groups that contain a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2776, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx", + "navOrder": 571 + }, + { + "id": 1427, + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "Update an existing conversation group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2777, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx", + "navOrder": 572 + }, + { + "id": 1428, + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "description": "Batch-update the sort values of conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2778, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx", + "navOrder": 573 + }, + { + "id": 1429, + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "Add one or more conversations to conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2779, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx", + "navOrder": 574 + }, + { + "id": 1430, + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "Remove one or more conversations from conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2780, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx", + "navOrder": 575 + }, + { + "id": 1431, + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "Delete a conversation group and its conversation membership.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2781, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx", + "navOrder": 576 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index e06216d619..cc83a7b847 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -6886,5 +6886,253 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", "content": "调用 removeBlack 将指定用户移出当前账号的黑名单。 await OpenIMSDK.removeBlack blackUserID ; blackUserID 是要移出黑名单的用户 ID。移出后会触发 OnBlackDeleted 事件,监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + }, + { + "path": "/sdk/react-native/conversation/overview-conversation", + "title": "会话概览", + "description": "了解 React Native SDK 中的会话、会话状态和会话分组能力。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation overview-conversation", + "content": "在 OpenIM React Native SDK 中,会话表示当前登录账号维护的一条聊天状态。单聊和群聊都会对应一个 ConversationItem ,其中包含会话列表展示信息、未读状态、草稿和消息接收设置等内容。 会话记录与聊天目标使用不同的标识: conversationID 标识当前账号的会话记录,单聊目标使用对方的 userID ,群聊目标使用 groupID 。群组资料、成员和权限仍通过群组相关 API 管理。 会话标识 | 标识 | 用途 | | | | | conversationID | 当前账号的会话记录 ID,用于会话设置、消息历史和未读状态。 | | userID | 单聊中的对方用户 ID。 | | groupID | 群聊对应的群组 ID。 | | sourceID | 按类型查询会话时传入的聊天目标:单聊传 userID ,群聊传 groupID 。 | 如需根据聊天目标获取 conversationID ,可调用 生成会话 ID /sdk/react native/conversation/retrieving conversations/get conversation id ,传入 sourceID 和 sessionType 。 会话数据 ConversationItem 同时包含列表展示信息和当前账号的会话设置: | 分类 | 字段 | 说明 | | | | | | 标识和类型 | conversationID 、 conversationType | 定位会话记录并区分单聊和群聊。 | | 列表展示 | showName 、 faceURL 、 latestMsg 、 latestMsgSendTime | 展示会话名称、头像和最后一条消息。 | | 未读和提醒 | unreadCount 、 groupAtType | 展示未读数和群聊 @ 提醒状态。 | | 列表组织 | isPinned 、 isMarked 、 draftText 、 remark | 管理置顶、标记、草稿和当前账号的会话备注。 | | 消息策略 | recvMsgOpt 、 isPrivateChat 、 burnDuration 、 isMsgDestruct 、 msgDestructTime | 设置消息接收、阅后即焚和服务端消息删除。 | | 其他状态和扩展 | isNotInGroup 、 attachedInfo 、 ex | 表示群组关系状态、SDK 附加信息和业务扩展。 | 按任务查找 | 任务 | 相关页面 | | | | | 获取一个或多个会话 | 查询指定会话 /sdk/react native/conversation/retrieving conversations/get conversation by target 、 按 ID 批量获取会话 /sdk/react native/conversation/retrieving conversations/get conversations by id 、 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list | | 整理会话列表 | 置顶或取消置顶会话 /sdk/react native/conversation/managing conversations/pin conversation 、 标记或取消标记会话 /sdk/react native/conversation/managing conversations/mark conversation 、 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups | | 管理草稿、备注和扩展字段 | 设置会话草稿 /sdk/react native/conversation/managing conversations/set conversation draft 、 设置会话备注 /sdk/react native/conversation/managing conversations/set conversation remark 、 设置会话扩展字段 /sdk/react native/conversation/managing conversations/set conversation extension | | 设置消息接收和保留策略 | 设置会话消息接收方式 /sdk/react native/conversation/managing conversations/set message receive option 、 开启或关闭阅后即焚 /sdk/react native/conversation/managing conversations/set private chat 、 定期删除服务端消息 /sdk/react native/conversation/managing conversations/set message destruct | | 处理未读数和群组提醒 | 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 、 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 、 重置群聊 @ 状态 /sdk/react native/conversation/managing conversations/clear group mentions | 隐藏、删除和清空 隐藏、删除和清空作用范围不同: | 操作 | 作用 | | | | | 隐藏会话 /sdk/react native/conversation/managing conversations/hide a conversation | 从当前账号的会话列表中隐藏一条会话,新消息到达后可能重新出现。 | | 删除会话及消息 /sdk/react native/conversation/managing conversations/delete conversation with messages | 删除会话记录和当前账号在该会话中的消息。 | | 清空会话消息 /sdk/react native/conversation/managing conversations/clear conversation messages | 保留会话记录,只清除当前账号在该会话中的消息。 | 事件监听 会话状态变化会触发事件,具体的事件监听详见: 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 介绍会话新增和会话字段变化的监听方式。 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 介绍当前账号总未读数的监听方式。 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 介绍会话分组和分组成员变化的监听方式。" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "查询指定会话", + "description": "根据聊天目标和会话类型查询指定会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-by-target", + "content": "调用 getOneConversation 根据聊天目标和会话类型获取一个会话。 const conversation = await OpenIMSDK.getOneConversation sourceID: targetUserID, sessionType: SessionType.Single, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | | sessionType | SessionType | 是 | 会话类型。单聊使用 SessionType.Single ,群聊使用 SessionType.Group 。 | 返回结果 调用完成后返回 ConversationItem 。会话字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "生成会话 ID", + "description": "根据聊天目标和会话类型生成会话 ID。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-id", + "content": "调用 getConversationIDBySessionType 根据聊天目标和会话类型获取会话 ID。 const conversationID = await OpenIMSDK.getConversationIDBySessionType sourceID: targetUserID, sessionType: SessionType.Single, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | | sessionType | SessionType | 是 | 会话类型。单聊使用 SessionType.Single ,群聊使用 SessionType.Group 。 | 返回结果 调用完成后返回 string 类型的 conversationID 。" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "按 ID 批量获取会话", + "description": "按 conversationID 批量获取会话信息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversations-by-id", + "content": "已经持有一组会话 ID 时,调用 getMultipleConversation 批量获取会话信息。 const conversations = await OpenIMSDK.getMultipleConversation conversationIDList ; 参数说明 conversationIDList 是要查询的会话 ID 数组。 返回结果 调用完成后返回 ConversationItem ,返回结果可能少于传入的会话 ID 数量,未返回的会话 ID 表示 SDK 当前未找到对应会话。单个会话的字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "获取会话列表", + "description": "分页获取当前登录账号的会话列表。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations retrieve-conversation-list", + "content": "使用 getConversationListSplit 分页获取会话。 const conversations = await OpenIMSDK.getConversationListSplit offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。继续加载时按已请求的条目数递增。 | | count | number | 是 | 本次请求的会话数量。 | 返回结果 调用完成后返回当前页的 ConversationItem 。当返回数量小于 count 时,表示已经读取到当前列表末尾。 会话字段 ConversationItem 同时包含聊天目标、列表展示和当前账号的会话设置: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 会话 ID。 | | conversationType | SessionType | 会话类型,单聊或群聊。 | | userID | string | 单聊对方的用户 ID;群聊中通常为空。 | | groupID | string | 群聊对应的群组 ID;单聊中通常为空。 | | showName | string | 会话的展示名称。 | | faceURL | string | 会话的展示头像地址。 | | recvMsgOpt | MessageReceiveOptType | 当前会话的消息接收方式。 | | unreadCount | number | 当前会话的未读消息数。 | | groupAtType | GroupAtType | 群聊中的提醒状态;单聊不使用。 | | latestMsg | string | 最后一条消息的 JSON 序列化内容。 | | latestMsgSendTime | number | 最后一条消息的发送时间。 | | draftText | string | 当前设备保存的会话草稿。 | | draftTextTime | number | 草稿更新时间。 | | isPrivateChat | boolean | 是否开启私聊阅后即焚。 | | burnDuration | number | 私聊阅后即焚时长。 | | isMsgDestruct | boolean | 是否开启服务端消息定期删除。 | | msgDestructTime | number | 服务端消息定期删除周期。 | | isPinned | boolean | 会话是否置顶。 | | isMarked 商业版 | boolean | 会话是否已标记。 | | isNotInGroup | boolean | 当前账号是否已不在该群组中。 | | attachedInfo | string | SDK 附加信息。 | | ex | string (可选) | 会话扩展字符串。 | | remark 商业版 | string (可选) | 会话备注。 | 拉取会话列表时,应按 conversationID 合并分页结果去重,避免同一会话重复出现在列表中。刷新列表时从 offset: 0 重新读取。 监听会话变化 新建会话时触发 OnNewConversation ,已有会话发生变化时触发 OnConversationChanged 。两个事件的回调参数都是 ConversationItem 。 function handleNewConversation conversations: ConversationItem // ... function handleConversationChanged conversations: ConversationItem // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleConversationChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleConversationChanged ; 退出登录、切换账号或销毁会话列表状态时,取消监听。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "置顶或取消置顶会话", + "description": "置顶或取消置顶会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations pin-conversation", + "content": "调用 pinConversation 设置会话是否置顶。 await OpenIMSDK.pinConversation conversationID, isPinned: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isPinned | boolean | 是 | true 置顶, false 取消置顶。 | 返回结果 调用完成后,会话的 isPinned 状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "标记或取消标记会话", + "description": "标记或取消标记会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation", + "content": "调用 setConversation 设置会话的标记状态。 await OpenIMSDK.setConversation conversationID, isMarked: true, ; 将 isMarked 设置为 false 可取消标记。标记状态属于当前登录账号,会话标记后会出现在内置的标记会话分组中。会话分组的查询和管理方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isMarked | boolean | 否 | true 标记, false 取消标记。 | 返回结果 调用完成后,会话的 isMarked 状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "设置会话备注", + "description": "设置会话备注。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-remark", + "content": "调用 setConversation 设置当前账号的会话备注。 await OpenIMSDK.setConversation conversationID, remark: '项目讨论', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | remark | string | 否 | 会话备注。传入空字符串可清除已有备注。 | 显示会话名称时,可根据产品规则优先使用 remark ,没有备注时使用会话原有的 showName 。会话备注不会更新用户资料或群组名称。 返回结果 调用完成后,会话的 remark 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "设置会话扩展字段", + "description": "设置会话扩展字段。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-extension", + "content": "使用 setConversation 设置会话的扩展字段 ex 。 await OpenIMSDK.setConversation conversationID, ex: JSON.stringify category: 'work', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | ex | string | 否 | 会话扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 | 如果业务需要保留已有扩展内容,应先读取当前 ex ,再按业务规则更新后写回。 返回结果 调用完成后,会话的 ex 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "设置会话草稿", + "description": "设置会话草稿。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-draft", + "content": "使用 setConversationDraft 保存会话草稿。用户离开聊天页面、切换会话或准备退出时,可以提交当前编辑内容。 await OpenIMSDK.setConversationDraft conversationID, draftText: editorValue, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要保存草稿的会话 ID。 | | draftText | string | 是 | 草稿内容。传入空字符串可清除草稿。 | 输入过程中建议由业务侧维护编辑器状态并合并保存,离开页面前再提交最新内容。 返回结果 调用完成后,草稿已保存。会话列表中的 draftText 和 draftTextTime 变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。切换账号或退出登录时,同时清理业务侧的编辑器状态。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "设置会话消息接收方式", + "description": "设置会话消息接收方式。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-receive-option", + "content": "调用 setConversationRecvMessageOpt 设置单个会话的消息接收方式。 await OpenIMSDK.setConversationRecvMessageOpt conversationID, opt: MessageReceiveOptType.NotNotify, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | opt | MessageReceiveOptType | 是 | 会话消息接收方式。 | MessageReceiveOptType 常用值如下: | 枚举值 | 数值 | 说明 | | | | | | MessageReceiveOptType.Normal | 0 | 正常接收消息并允许提醒。 | | MessageReceiveOptType.NotReceive | 1 | 不接收该会话的消息。 | | MessageReceiveOptType.NotNotify | 2 | 接收消息但不提醒。 | 返回结果 调用完成后,会话的 recvMsgOpt 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。账号级默认接收策略请参考用户资料中的 设置全局消息接收方式 /sdk/react native/user/profile/set global message reception 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "重置群聊 @ 状态", + "description": "重置群聊 @ 状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-group-mentions", + "content": "用户处理群聊中的提及消息后,调用 resetConversationGroupAtType 重置会话的群组提醒状态。 await OpenIMSDK.resetConversationGroupAtType conversationID ; 参数说明 conversationID 为要重置提醒状态的群聊会话 ID。 该方法将会话的 groupAtType 恢复为普通状态,不用于主动设置“有人提及我”或“提及所有人”等状态。重置群组提醒和 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 是两个独立操作。 返回结果 调用完成后,会话的群组提醒状态已重置。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "标记会话已读", + "description": "标记会话已读。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation-read", + "content": "用户打开会话并阅读当前消息后,调用 markConversationMessageAsRead 标记会话已读。 await OpenIMSDK.markConversationMessageAsRead conversationID ; 参数说明 conversationID 为要标记已读的会话 ID。 返回结果 调用完成后,当前账号在该会话中的未读状态已更新。会话列表中的未读数变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。群聊中该方法只处理当前账号的会话未读状态。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "获取消息总未读数", + "description": "获取消息总未读数。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations get-total-unread-count", + "content": "调用 getTotalUnreadMsgCount 获取当前账号所有会话的总未读数。不要尝试通过累加已加载会话分页中的 unreadCount 来计算会话总未读数,这样会遗漏未加载的会话的未读数。 const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount ; 返回结果 调用完成后返回 number 类型的总未读数。 事件监听 应用处于前台时,可通过 OnTotalUnreadMessageCountChanged 监听总未读数变化: function handleTotalUnreadChanged totalUnread: number // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "开启或关闭阅后即焚", + "description": "开启或关闭阅后即焚。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-private-chat", + "content": "调用 setConversationPrivateChat 开启或关闭会话的阅后即焚模式。阅后即焚的持续时长通过 setConversationBurnDuration 单独设置,详见 设置阅后即焚时长 /sdk/react native/conversation/managing conversations/set burn duration 。 await OpenIMSDK.setConversationPrivateChat conversationID, isPrivate: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isPrivate | boolean | 是 | true 开启, false 关闭。 | 返回结果 调用完成后,会话的阅后即焚状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "设置阅后即焚时长", + "description": "设置阅后即焚时长。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-burn-duration", + "content": "调用 setConversationBurnDuration 设置会话的阅后即焚时长,单位为秒。该方法只设置持续时长,是否启用阅后即焚由 开启或关闭阅后即焚 /sdk/react native/conversation/managing conversations/set private chat 控制。不要将 burnDuration 与服务端消息定期删除的 msgDestructTime 混淆。 await OpenIMSDK.setConversationBurnDuration conversationID, burnDuration: 30, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | burnDuration | number | 是 | 阅后即焚持续时长,单位为秒。 | 返回结果 调用完成后,会话的阅后即焚时长已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "定期删除服务端消息", + "description": "定期删除服务端消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-destruct", + "content": "调用 setConversation 设置会话的服务端消息定期删除策略。 await OpenIMSDK.setConversation conversationID, isMsgDestruct: true, msgDestructTime: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isMsgDestruct | boolean | 否 | 是否开启服务端消息定期删除。 | | msgDestructTime | number | 否 | 消息删除周期,单位为秒。 | 启用策略时同时传入 isMsgDestruct: true 和 msgDestructTime 。传入 isMsgDestruct: false 可关闭策略。注意该策略与阅后即焚的区别,阅后即焚使用 isPrivateChat 和 burnDuration 。 服务端消息定期删除只影响服务端保存的消息。已经同步到设备的本地消息不会被主动删除;在清理本地数据或更换设备后,已从服务端删除的消息无法再次获取。 返回结果 调用完成后,服务端消息定期删除策略已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "隐藏会话", + "description": "隐藏会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-a-conversation", + "content": "调用 hideConversation 隐藏当前账号会话列表中的一个会话。新消息到达或会话状态再次同步后,该会话可能重新出现在会话列表中。 await OpenIMSDK.hideConversation conversationID ; 参数说明 conversationID 为要隐藏的会话 ID。 返回结果 调用完成后,可以先从当前会话列表中移除对应的 conversationID 的会话。如果后续收到 OnConversationChanged ,按 conversationID 更新列表;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "隐藏全部会话", + "description": "隐藏全部会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-all-conversations", + "content": "调用 hideAllConversations 隐藏当前账号的全部会话。 await OpenIMSDK.hideAllConversations ; 调用完成后,重新查询 会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 和 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count ,刷新界面数据。新消息到达或会话状态再次同步后,会话可能重新出现在列表中。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "删除会话及消息", + "description": "删除会话及消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations delete-conversation-with-messages", + "content": "调用 deleteConversationAndDeleteAllMsg 删除会话记录和当前账号下的会话消息。 await OpenIMSDK.deleteConversationAndDeleteAllMsg conversationID ; 参数说明 conversationID 为要删除的会话 ID。 返回结果 调用完成后,可以清除当前页面的消息列表和会话列表项。后续如收到 OnConversationChanged ,按 conversationID 更新列表;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "清空会话消息", + "description": "清空会话消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-conversation-messages", + "content": "调用 clearConversationAndDeleteAllMsg 清除当前账号的会话消息,不会删除会话。 await OpenIMSDK.clearConversationAndDeleteAllMsg conversationID ; 参数说明 conversationID 为要清空消息的会话 ID。 返回结果 调用完成后,清空当前页面的消息列表。会话的最新消息、摘要和未读状态如有变化,可通过 OnConversationChanged 事件或重新查询会话列表获取最新数据;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "会话分组概览", + "description": "会话分组概览。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups overview-conversation-groups", + "content": "会话分组用于将当前账号的会话列表按业务场景分类,例如工作、待处理或自定义类别。 分组类型 ConversationGroupType 包含以下类型: | 枚举值 | 数值 | 说明 | | | | | | ConversationGroupType.ConversationGroupTypeNormal | 0 | 普通自定义分组。 | | ConversationGroupType.ConversationGroupTypeFilter | 1 | 按规则筛选的分组。 | | ConversationGroupType.ConversationGroupTypeAll | 2 | 查询全部类型的分组。 | 分组字段 ConversationGroup 通过 conversationGroupID 作为分组标识: | 字段 | 类型 | 说明 | | | | | | conversationGroupID | string | 会话分组 ID。 | | name | string | 分组名称。 | | serial | number | 分组排序值。 | | version | number | 分组数据版本。 | | conversationGroupType | ConversationGroupType | 分组类型。 | | hidden | boolean | 分组是否隐藏。 | | unreadCount | number | 分组内会话的未读总数。 | | conversationIDs | string | 当前属于该分组的会话 ID。 | | ex | string (可选) | 业务扩展字符串。 | 监听分组变化 分组操作完成后,相关事件会返回新增、更新或删除的分组;分组成员变化事件会返回分组、会话 ID 和会话详情。事件回调参数直接传递实体,不包含 data 字段。应用应按 conversationGroupID 更新分组,按事件中的 conversationIDs 更新成员关系。 const handleGroupAdded = groups: ConversationGroup = // ... ; const handleGroupChanged = groups: ConversationGroup = // ... ; const handleGroupDeleted = groups: ConversationGroup = // ... ; const handleGroupMemberAdded = payload: ConversationGroupMemberChangedCallbackData = // ... ; const handleGroupMemberDeleted = payload: ConversationGroupMemberChangedCallbackData = // ... ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.on OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.off OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "创建会话分组", + "description": "创建会话分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups create-conversation-group", + "content": "调用 createConversationGroup 为当前账号创建会话分组。创建普通分组时至少传入 name ,也可以同时将一个会话加入新分组。 const group = await OpenIMSDK.createConversationGroup name: '工作', order: 100, conversationID, conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 分组名称。 | | order | number | 否 | 分组排序值。 | | ex | string | 否 | 分组扩展字符串。 | | conversationID | string | 否 | 创建后立即加入分组的会话 ID。 | | conversationGroupType | ConversationGroupType | 否 | 分组类型,普通自定义分组使用 ConversationGroupTypeNormal 。 | 返回结果 调用完成后返回新建的 ConversationGroupResp ,其中包含 conversationGroupID 、 name 、 order 和 conversationIDs 等分组信息。分组变化会通过 OnConversationGroupAdded 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "查询会话分组列表", + "description": "查询会话分组列表。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-groups", + "content": "调用 getConversationGroups 按分组类型获取当前账号的会话分组。 const groups = await OpenIMSDK.getConversationGroups ConversationGroupType.ConversationGroupTypeNormal, ; 参数说明 参数为 ConversationGroupType :普通自定义分组使用 ConversationGroupTypeNormal ,查询全部类型使用 ConversationGroupTypeAll 。 返回结果 调用完成后返回匹配的 ConversationGroup 。字段说明见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。分组只保存会话 ID;需要同时读取会话详情时,使用 查询分组内会话 /sdk/react native/conversation/managing conversation groups/get conversation group info with conversations 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "查询分组内会话", + "description": "查询分组内会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-info-with-conversations", + "content": "调用 getConversationGroupInfoWithConversations 获取一个会话分组的信息以及该分组的分页会话列表。 const result = await OpenIMSDK.getConversationGroupInfoWithConversations conversationGroupID, pagination: pageNumber: 1, showNumber: 20, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要查询的会话分组 ID。 | | pagination.pageNumber | number | 是 | 页码,从 1 开始。 | | pagination.showNumber | number | 是 | 每页返回的会话数量。 | 返回结果 调用完成后返回包含以下字段的对象: | 字段 | 类型 | 说明 | | | | | | group | ConversationGroup | 当前分组信息。 | | conversationTotal | number | 分组中的会话总数。 | | conversationElems | ConversationItem | 当前页的会话详情。 | 当已加载会话数量达到 conversationTotal 时,可以停止继续请求。会话字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list ,分组字段说明见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "查询会话所属分组", + "description": "查询会话所属分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-ids-by-conversation-id", + "content": "一个会话可以属于多个会话分组。调用 getConversationGroupByConversationID 获取该会话所属的分组。需要查询所有分组或按类型筛选时,使用 查询会话分组列表 /sdk/react native/conversation/managing conversation groups/get conversation groups 。 const groups = await OpenIMSDK.getConversationGroupByConversationID conversationID ; 参数说明 conversationID 为 OpenIM 会话 ID,不是聊天群组 ID。 返回结果 调用完成后返回 ConversationGroup ,每个元素都是一个完整的分组对象。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "更新会话分组", + "description": "更新会话分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups update-conversation-group", + "content": "调用 updateConversationGroup 修改已有会话分组。只传入需要更新的字段。 const group = await OpenIMSDK.updateConversationGroup conversationGroupID, name: '重点工作', hidden: false, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要更新的会话分组 ID。 | | name | string | 否 | 新的分组名称。 | | ex | string | 否 | 新的分组扩展字符串。 | | hidden | boolean | 否 | 是否隐藏分组。 | 返回结果 调用完成后返回更新后的 ConversationGroupResp 。分组变化会通过 OnConversationGroupChanged 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "调整会话分组顺序", + "description": "调整会话分组顺序。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups set-conversation-group-order", + "content": "调用 setConversationGroupOrder 批量调整会话分组的排序值。 await OpenIMSDK.setConversationGroupOrder conversationGroupID: firstGroupID, order: 100 , conversationGroupID: secondGroupID, order: 200 , ; 参数说明 方法接收数组,每个元素包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要调整顺序的分组 ID。 | | order | number | 是 | 新的排序值,产品侧应统一排序方向。 | 返回结果 调用完成后不返回分组数据。界面可以按提交的排序值更新,也可以通过 OnConversationGroupChanged 事件或重新查询分组获取最新信息;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "添加会话到分组", + "description": "添加会话到分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups add-conversations-to-groups", + "content": "调用 addConversationsToGroups 将一个或多个会话添加到一个或多个会话分组。 await OpenIMSDK.addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要添加的会话 ID。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID。 | 返回结果 调用完成后,分组与会话的关联请求已完成。关联变化会通过 OnConversationGroupMemberAdded 事件通知,事件参数包含分组、会话 ID 和会话详情;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "从分组移除会话", + "description": "从分组移除会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups remove-conversations-from-groups", + "content": "调用 removeConversationsFromGroups 将一个或多个会话从指定会话分组中移除。 await OpenIMSDK.removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要移除的会话 ID。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID。 | 返回结果 调用完成后,分组与会话的关联移除请求已完成。关联变化会通过 OnConversationGroupMemberDeleted 事件通知,事件参数包含分组和会话 ID;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "删除会话分组", + "description": "删除会话分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", + "content": "调用 deleteConversationGroup 删除会话分组及其会话关联。 await OpenIMSDK.deleteConversationGroup conversationGroupID ; 参数 conversationGroupID 为会话分组 ID。 返回结果 调用完成后,分组删除请求已完成。该操作不会删除会话或消息。分组变化会通过 OnConversationGroupDeleted 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 91394241bc..3520b2aafd 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -6886,5 +6886,253 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", "content": "Call removeBlack to remove a specified user from the current account's blocklist. await OpenIMSDK.removeBlack blackUserID ; blackUserID is the user ID to unblock. After the user is removed, OnBlackDeleted is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the listener example." + }, + { + "path": "/sdk/react-native/conversation/overview-conversation", + "title": "Conversation overview", + "description": "Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation overview-conversation", + "content": "In the OpenIM React Native SDK, a conversation is a chat state maintained by the current account. Both one to one and group chats correspond to a ConversationItem , which contains list presentation data, unread state, drafts, and message reception settings. Conversation records and chat targets use different identifiers. conversationID identifies the current account's conversation record, while a one to one target uses the other user's userID and a group target uses groupID . Group profiles, members, and permissions are managed through group APIs. Conversation identifiers | Identifier | Meaning | | | | | conversationID | Conversation record ID for the current account. | | userID | The other user's ID in a one to one conversation. | | groupID | Group ID for a group conversation. | | sourceID | Chat target used when querying by type: pass userID for one to one conversations or groupID for group conversations. | To generate a conversationID from a chat target, call Resolve a conversation ID /sdk/react native/conversation/retrieving conversations/get conversation id with sourceID and sessionType . Conversation data ConversationItem contains list presentation data and settings for the current account: | Category | Fields | Description | | | | | | Identity and type | conversationID , conversationType | Identify the conversation record and distinguish one to one and group conversations. | | List presentation | showName , faceURL , latestMsg , latestMsgSendTime | Display the conversation name, avatar, and latest message. | | Unread and mentions | unreadCount , groupAtType | Display unread counts and group mention status. | | List organization | isPinned , isMarked , draftText , remark | Manage pinning, marking, drafts, and the current account's remark. | | Message policies | recvMsgOpt , isPrivateChat , burnDuration , isMsgDestruct , msgDestructTime | Configure message reception, burn after reading, and server side deletion. | | Other state and extensions | isNotInGroup , attachedInfo , ex | Indicate group membership state, SDK attached information, and application extensions. | Find a page by task | Task | Related page | | | | | Get one or more conversations | Open a conversation /sdk/react native/conversation/retrieving conversations/get conversation by target , Get conversations by ID /sdk/react native/conversation/retrieving conversations/get conversations by id , Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list | | Organize the conversation list | Pin or unpin a conversation /sdk/react native/conversation/managing conversations/pin conversation , Mark or unmark a conversation /sdk/react native/conversation/managing conversations/mark conversation , Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups | | Manage drafts, remarks, and extensions | Set a conversation draft /sdk/react native/conversation/managing conversations/set conversation draft , Set a conversation remark /sdk/react native/conversation/managing conversations/set conversation remark , Set conversation extra data /sdk/react native/conversation/managing conversations/set conversation extension | | Configure message reception and retention | Set conversation message reception /sdk/react native/conversation/managing conversations/set message receive option , Enable or disable burn after reading /sdk/react native/conversation/managing conversations/set private chat , Schedule server message deletion /sdk/react native/conversation/managing conversations/set message destruct | | Handle unread counts and group mentions | Mark a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read , Track the total unread count /sdk/react native/conversation/managing conversations/get total unread count , Reset group mention status /sdk/react native/conversation/managing conversations/clear group mentions | Hide, delete, and clear These operations have different scopes: | Operation | Effect | | | | | Hide a conversation /sdk/react native/conversation/managing conversations/hide a conversation | Hide one conversation from the current account's list; it may reappear when a new message arrives. | | Delete a conversation and its messages /sdk/react native/conversation/managing conversations/delete conversation with messages | Delete the conversation record and the current account's messages in it. | | Clear messages in a conversation /sdk/react native/conversation/managing conversations/clear conversation messages | Keep the conversation record and clear only the current account's messages. | Events Conversation state changes are delivered through events: Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list covers new conversations and conversation field changes. Track the total unread count /sdk/react native/conversation/managing conversations/get total unread count covers total unread count changes. Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups covers conversation group and membership changes." + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "description": "Query a conversation by its chat target and session type.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-by-target", + "content": "Call getOneConversation to query a conversation by its chat target and session type. const conversation = await OpenIMSDK.getOneConversation sourceID: targetUserID, sessionType: SessionType.Single, ; Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Pass the other user's ID for a one to one conversation or the group ID for a group conversation. | | sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one to one conversations and SessionType.Group for group conversations. | Return result The call returns a ConversationItem . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields." + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "description": "Generate a conversation ID from a chat target and session type.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-id", + "content": "Call getConversationIDBySessionType to generate a conversation ID from a chat target and session type. const conversationID = await OpenIMSDK.getConversationIDBySessionType sourceID: targetUserID, sessionType: SessionType.Single, ; Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Pass the other user's ID for a one to one conversation or the group ID for a group conversation. | | sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one to one conversations and SessionType.Group for group conversations. | Return result The call returns the conversation ID as a string ." + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "description": "Retrieve multiple conversations by their conversation IDs.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversations-by-id", + "content": "When you already have a set of conversation IDs, call getMultipleConversation to retrieve their conversation information. const conversations = await OpenIMSDK.getMultipleConversation conversationIDList ; Parameters conversationIDList is the array of conversation IDs to query. Return result The call returns ConversationItem . The result may contain fewer items than the input IDs; an ID that is not returned was not found by the SDK. See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields." + }, + { + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Retrieve the conversation list", + "description": "Retrieve the current user's conversation list with pagination.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations retrieve-conversation-list", + "content": "Use getConversationListSplit to retrieve the conversation list page by page. const conversations = await OpenIMSDK.getConversationListSplit offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page and increase it by the number of items already requested. | | count | number | Yes | Number of conversations to request. | Return result The call returns the current page as ConversationItem . When fewer than count items are returned, the current list has reached its end. Conversation fields ConversationItem contains the chat target, list presentation data, and settings for the current account: | Field | Type | Description | | | | | | conversationID | string | Conversation ID. | | conversationType | SessionType | Conversation type, such as one to one or group. | | userID | string | The other user's ID in a one to one conversation; usually empty for group conversations. | | groupID | string | Group ID for a group conversation; usually empty for one to one conversations. | | showName | string | Display name of the conversation. | | faceURL | string | Display avatar URL of the conversation. | | recvMsgOpt | MessageReceiveOptType | Message reception setting for the conversation. | | unreadCount | number | Number of unread messages in the conversation. | | groupAtType | GroupAtType | Mention status for a group conversation; not used for one to one conversations. | | latestMsg | string | JSON serialized content of the latest message. | | latestMsgSendTime | number | Time when the latest message was sent. | | draftText | string | Draft saved on the current device. | | draftTextTime | number | Time when the draft was updated. | | isPrivateChat | boolean | Whether burn after reading is enabled for the one to one conversation. | | burnDuration | number | Burn after reading duration for the one to one conversation. | | isMsgDestruct | boolean | Whether scheduled server side message deletion is enabled. | | msgDestructTime | number | Server side message deletion period. | | isPinned | boolean | Whether the conversation is pinned. | | isMarked Enterprise | boolean | Whether the conversation is marked. | | isNotInGroup | boolean | Whether the current account is no longer in the group. | | attachedInfo | string | Additional information attached by the SDK. | | ex | string optional | Conversation extension string. | | remark Enterprise | string optional | Conversation remark. | When loading multiple pages, deduplicate them by conversationID . Start again from offset: 0 when refreshing the list. Listen for conversation changes OnNewConversation is emitted when a conversation is created. OnConversationChanged is emitted when an existing conversation changes. Both callbacks receive ConversationItem . function handleNewConversation conversations: ConversationItem // ... function handleConversationChanged conversations: ConversationItem // ... OpenIMSDK.on OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleConversationChanged ; OpenIMSDK.off OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleConversationChanged ; Remove the listeners when logging out, switching accounts, or tearing down the conversation list state." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "description": "Pin or unpin a conversation for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations pin-conversation", + "content": "Call pinConversation to set whether a conversation is pinned. await OpenIMSDK.pinConversation conversationID, isPinned: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isPinned | boolean | Yes | Set true to pin or false to unpin. | Return result After the call completes, the conversation's isPinned state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "description": "Mark or unmark a conversation for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation", + "content": "Call setConversation to set the marked state of a conversation. await OpenIMSDK.setConversation conversationID, isMarked: true, ; Set isMarked to false to unmark the conversation. The marked state belongs to the current account, and marked conversations appear in the built in marked conversation group. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for group management. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isMarked | boolean | No | Set true to mark or false to unmark. | Return result After the call completes, the conversation's isMarked state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "description": "Set a remark for a conversation for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-remark", + "content": "Call setConversation to set a conversation remark for the current account. await OpenIMSDK.setConversation conversationID, remark: 'Project discussion', ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | remark | string | No | Conversation remark. Pass an empty string to clear the existing remark. | When displaying a conversation name, the application can prefer remark and fall back to showName when no remark is set. A conversation remark does not update the user's profile or the group name. Return result After the call completes, the conversation's remark is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "description": "Set the conversation extension string.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-extension", + "content": "Use setConversation to set the conversation extension field ex . await OpenIMSDK.setConversation conversationID, ex: JSON.stringify category: 'work', , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | ex | string | No | Conversation extension string. Pass a JSON string or another format of extension data as needed by the application. | If existing extension data must be preserved, read the current ex , update it according to the application's rules, and write the complete value back. Return result After the call completes, the conversation's ex is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "description": "Save a draft for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-draft", + "content": "Use setConversationDraft to save a conversation draft. Submit the current editor content when the user leaves the chat screen, switches conversations, or is about to log out. await OpenIMSDK.setConversationDraft conversationID, draftText: editorValue, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID for the draft. | | draftText | string | Yes | Draft content. Pass an empty string to clear the draft. | Keep the editor state in the application while the user is typing, then save the latest value before leaving the screen. Return result After the call completes, the draft is saved. Changes to draftText and draftTextTime in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . Clear the application's editor state when the account changes or the user logs out." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "description": "Set the message reception option for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-receive-option", + "content": "Call setConversationRecvMessageOpt to set the message reception option for one conversation. await OpenIMSDK.setConversationRecvMessageOpt conversationID, opt: MessageReceiveOptType.NotNotify, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | opt | MessageReceiveOptType | Yes | Message reception option for the conversation. | Common MessageReceiveOptType values are: | Enum value | Numeric value | Description | | | | | | MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. | | MessageReceiveOptType.NotReceive | 1 | Do not receive messages from this conversation. | | MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. | Return result After the call completes, the conversation's recvMsgOpt is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . For the account level default, see Set global message reception /sdk/react native/user/profile/set global message reception ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "description": "Reset the mention status of a group conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-group-mentions", + "content": "After the user handles mention messages in a group conversation, call resetConversationGroupAtType to reset the conversation's group mention status. await OpenIMSDK.resetConversationGroupAtType conversationID ; Parameters conversationID is the ID of the group conversation whose mention status should be reset. The method restores groupAtType to its normal state. It does not set states such as “mentioned me” or “mentioned everyone”. Resetting the group mention status and marking a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read are separate operations. Return result After the call completes, the conversation's group mention status is reset. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "description": "Mark a conversation as read for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation-read", + "content": "After the user opens a conversation and reads its messages, call markConversationMessageAsRead to mark it as read. await OpenIMSDK.markConversationMessageAsRead conversationID ; Parameters conversationID is the ID of the conversation to mark as read. Return result After the call completes, the current account's unread state for the conversation is updated. Unread count changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . For group conversations, this method changes only the current account's conversation unread state." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "description": "Get the total unread message count across the current account's conversations.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations get-total-unread-count", + "content": "Call getTotalUnreadMsgCount to get the total unread count across all conversations for the current account. Do not calculate it by adding unreadCount from loaded pages, because unloaded conversations would be omitted. const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount ; Return result The call returns the total unread count as a number . Listen for changes When the app is in the foreground, use OnTotalUnreadMessageCountChanged to listen for changes: function handleTotalUnreadChanged totalUnread: number // ... OpenIMSDK.on OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; OpenIMSDK.off OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; Remove the listener when the component is destroyed, the user logs out, or the account changes." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "description": "Enable or disable burn after reading for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-private-chat", + "content": "Call setConversationPrivateChat to enable or disable burn after reading for a conversation. Set the duration separately with setConversationBurnDuration ; see Set the burn duration /sdk/react native/conversation/managing conversations/set burn duration . await OpenIMSDK.setConversationPrivateChat conversationID, isPrivate: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isPrivate | boolean | Yes | Set true to enable or false to disable. | Return result After the call completes, the conversation's burn after reading state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "description": "Set the burn-after-reading duration for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-burn-duration", + "content": "Call setConversationBurnDuration to set the burn after reading duration in seconds. This method sets only the duration; use Enable or disable burn after reading /sdk/react native/conversation/managing conversations/set private chat to enable the mode. Do not confuse burnDuration with the server side deletion period msgDestructTime . await OpenIMSDK.setConversationBurnDuration conversationID, burnDuration: 30, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | burnDuration | number | Yes | Burn after reading duration in seconds. | Return result After the call completes, the conversation's burn after reading duration is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "description": "Configure scheduled deletion of messages stored on the server.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-destruct", + "content": "Call setConversation to configure scheduled server side message deletion for a conversation. await OpenIMSDK.setConversation conversationID, isMsgDestruct: true, msgDestructTime: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isMsgDestruct | boolean | No | Whether scheduled server side message deletion is enabled. | | msgDestructTime | number | No | Message deletion period in seconds. | Pass isMsgDestruct: true together with msgDestructTime to enable the policy. Pass isMsgDestruct: false to disable it. This policy is different from burn after reading, which uses isPrivateChat and burnDuration . Scheduled deletion affects messages stored on the server. Messages already synchronized to a device are not actively removed; after local data is cleared or the device changes, messages deleted from the server cannot be retrieved again. Return result After the call completes, the scheduled server side message deletion policy is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "description": "Hide a conversation from the current account's conversation list.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-a-conversation", + "content": "Call hideConversation to hide a conversation from the current account's conversation list. A new message or later conversation synchronization may make it appear again. await OpenIMSDK.hideConversation conversationID ; Parameters conversationID is the ID of the conversation to hide. Return result After the call completes, remove the conversation with the matching conversationID from the current list. If OnConversationChanged is received later, update the list by conversationID . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "Hide all conversations for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-all-conversations", + "content": "Call hideAllConversations to hide all conversations for the current account. await OpenIMSDK.hideAllConversations ; After the call completes, query the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list and the total unread count /sdk/react native/conversation/managing conversations/get total unread count to refresh the UI. A conversation may reappear when a new message arrives or its state is synchronized again." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "description": "Delete a conversation and the current account's messages in it.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations delete-conversation-with-messages", + "content": "Call deleteConversationAndDeleteAllMsg to delete the conversation record and the current account's messages in it. await OpenIMSDK.deleteConversationAndDeleteAllMsg conversationID ; Parameters conversationID is the ID of the conversation to delete. Return result After the call completes, remove the conversation and its messages from the current screen. If OnConversationChanged is received later, update the list by conversationID . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "description": "Clear the current account's messages in a conversation without deleting the conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-conversation-messages", + "content": "Call clearConversationAndDeleteAllMsg to clear the current account's messages in a conversation without deleting the conversation. await OpenIMSDK.clearConversationAndDeleteAllMsg conversationID ; Parameters conversationID is the ID of the conversation whose messages should be cleared. Return result After the call completes, clear the message list shown on the current screen. If the latest message, summary, or unread state changes, read the updated conversation from OnConversationChanged or query the conversation list again. See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener cleanup." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "description": "Learn about conversation groups in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups overview-conversation-groups", + "content": "Conversation groups classify the current account's conversation list by business scenario, such as work, pending tasks, or custom categories. Group types ConversationGroupType contains these values: | Enum value | Numeric value | Description | | | | | | ConversationGroupType.ConversationGroupTypeNormal | 0 | Normal custom group. | | ConversationGroupType.ConversationGroupTypeFilter | 1 | Group filtered by rules. | | ConversationGroupType.ConversationGroupTypeAll | 2 | Query all group types. | Group fields ConversationGroup uses conversationGroupID as its identifier: | Field | Type | Description | | | | | | conversationGroupID | string | Conversation group ID. | | name | string | Group name. | | serial | number | Group sort value. | | version | number | Group data version. | | conversationGroupType | ConversationGroupType | Group type. | | hidden | boolean | Whether the group is hidden. | | unreadCount | number | Total unread count in the group. | | conversationIDs | string | Conversation IDs currently in the group. | | ex | string optional | Application extension string. | Listen for group changes Group operations emit events for added, updated, or deleted groups. Membership events include the group, conversation IDs, and conversation details. Event callbacks receive the entities directly, without a data field. Update groups by conversationGroupID and membership by the event's conversationIDs . const handleGroupAdded = groups: ConversationGroup = // ... ; const handleGroupChanged = groups: ConversationGroup = // ... ; const handleGroupDeleted = groups: ConversationGroup = // ... ; const handleGroupMemberAdded = payload: ConversationGroupMemberChangedCallbackData = // ... ; const handleGroupMemberDeleted = payload: ConversationGroupMemberChangedCallbackData = // ... ; OpenIMSDK.on OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.on OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.off OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; Remove the listeners when the component is destroyed, the user logs out, or the account changes." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "Create a conversation group for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups create-conversation-group", + "content": "Call createConversationGroup to create a conversation group for the current account. A normal group requires at least name ; you can also add a conversation when creating it. const group = await OpenIMSDK.createConversationGroup name: 'Work', order: 100, conversationID, conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | Group name. | | order | number | No | Group sort value. | | ex | string | No | Group extension string. | | conversationID | string | No | Conversation ID to add immediately after creation. | | conversationGroupType | ConversationGroupType | No | Group type. Use ConversationGroupTypeNormal for a normal custom group. | Return result The call returns the new ConversationGroupResp , including fields such as conversationGroupID , name , order , and conversationIDs . Group creation is delivered through OnConversationGroupAdded ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "description": "Query the current account's conversation groups by type.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-groups", + "content": "Call getConversationGroups to get the current account's conversation groups by type. const groups = await OpenIMSDK.getConversationGroups ConversationGroupType.ConversationGroupTypeNormal, ; Parameters The parameter is a ConversationGroupType : use ConversationGroupTypeNormal for normal custom groups or ConversationGroupTypeAll to query all group types. Return result The call returns the matching ConversationGroup . See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for fields. Groups store conversation IDs; use Get conversations in a group /sdk/react native/conversation/managing conversation groups/get conversation group info with conversations when conversation details are also needed." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "description": "Query a conversation group and its paginated conversations.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-info-with-conversations", + "content": "Call getConversationGroupInfoWithConversations to get a conversation group and its paginated conversation list. const result = await OpenIMSDK.getConversationGroupInfoWithConversations conversationGroupID, pagination: pageNumber: 1, showNumber: 20, , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Conversation group ID to query. | | pagination.pageNumber | number | Yes | Page number, starting at 1 . | | pagination.showNumber | number | Yes | Number of conversations per page. | Return result The call returns an object with these fields: | Field | Type | Description | | | | | | group | ConversationGroup | Current group information. | | conversationTotal | number | Total number of conversations in the group. | | conversationElems | ConversationItem | Conversation details for the current page. | Stop requesting pages after the number of loaded conversations reaches conversationTotal . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields and Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for group fields." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "Get groups for a conversation", + "description": "Query the conversation groups that contain a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-ids-by-conversation-id", + "content": "A conversation can belong to multiple conversation groups. Call getConversationGroupByConversationID to get the groups that contain it. To query all groups or filter by type, use Get conversation groups /sdk/react native/conversation/managing conversation groups/get conversation groups . const groups = await OpenIMSDK.getConversationGroupByConversationID conversationID ; Parameters conversationID is an OpenIM conversation ID, not a chat group ID. Return result The call returns ConversationGroup ; each item is a complete group object." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "Update an existing conversation group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups update-conversation-group", + "content": "Call updateConversationGroup to update an existing conversation group. Pass only the fields that need to change. const group = await OpenIMSDK.updateConversationGroup conversationGroupID, name: 'Priority work', hidden: false, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Conversation group ID to update. | | name | string | No | New group name. | | ex | string | No | New group extension string. | | hidden | boolean | No | Whether the group is hidden. | Return result The call returns the updated ConversationGroupResp . Group changes are delivered through OnConversationGroupChanged ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "description": "Batch-update the sort values of conversation groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups set-conversation-group-order", + "content": "Call setConversationGroupOrder to batch update the sort values of conversation groups. await OpenIMSDK.setConversationGroupOrder conversationGroupID: firstGroupID, order: 100 , conversationGroupID: secondGroupID, order: 200 , ; Parameters The method receives an array. Each item contains: | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Group ID whose order should be updated. | | order | number | Yes | New sort value. The application should use one consistent sort direction. | Return result The call does not return group data. The UI can use the submitted values or obtain the latest groups from OnConversationGroupChanged or a new query. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "Add one or more conversations to conversation groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups add-conversations-to-groups", + "content": "Call addConversationsToGroups to add one or more conversations to one or more conversation groups. await OpenIMSDK.addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversation IDs to add. | | conversationGroupIDs | string | Yes | Target conversation group IDs. | Return result After the call completes, the conversation group membership request is complete. Membership changes are delivered through OnConversationGroupMemberAdded ; the callback includes the group, conversation IDs, and conversation details. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for the listener." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "Remove one or more conversations from conversation groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups remove-conversations-from-groups", + "content": "Call removeConversationsFromGroups to remove one or more conversations from the specified groups. await OpenIMSDK.removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversation IDs to remove. | | conversationGroupIDs | string | Yes | Target conversation group IDs. | Return result After the call completes, the membership removal request is complete. Membership changes are delivered through OnConversationGroupMemberDeleted ; the callback includes the group and conversation IDs. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "Delete a conversation group and its conversation membership.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", + "content": "Call deleteConversationGroup to delete a conversation group and its conversation membership. await OpenIMSDK.deleteConversationGroup conversationGroupID ; conversationGroupID is the ID of the conversation group. Return result After the call completes, the group deletion request is complete. The operation does not delete conversations or messages. Group changes are delivered through OnConversationGroupDeleted ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." } ] diff --git a/src/lib/client-sdk-commercial.ts b/src/lib/client-sdk-commercial.ts index 2e9895142c..1c7c4bc16f 100644 --- a/src/lib/client-sdk-commercial.ts +++ b/src/lib/client-sdk-commercial.ts @@ -74,7 +74,9 @@ const platformSymbolAliases: Record> = { Open_im_sdkUpdateConversationGroup: 'updateConversationGroup', setConversationPinnedMsgWithConversationID: 'setConversationPinnedMsg', }, - 'react-native': {}, + 'react-native': { + getConversationGroupByConversationID: 'getConversationGroupIDsByConversationID', + }, }; const partialCommercialConceptSources: Record = { @@ -124,6 +126,11 @@ const fullCommercialConceptPages = new Set([ '/sdk/android/conversation/managing-conversations/set-message-destruct', '/sdk/android/user/user-profile/set-friend-add-permission', '/sdk/react-native/user/profile/set-friend-add-permission', + '/sdk/react-native/conversation/managing-conversations/mark-conversation', + '/sdk/react-native/conversation/managing-conversations/set-conversation-remark', + '/sdk/react-native/conversation/managing-conversations/set-private-chat', + '/sdk/react-native/conversation/managing-conversations/set-burn-duration', + '/sdk/react-native/conversation/managing-conversations/set-message-destruct', ]); function applyCommercialConceptOverride( From 0e7af8726c84db6fa62d2284f6f52d6743da92f9 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Tue, 25 Aug 2026 18:50:04 +0800 Subject: [PATCH 03/15] docs(react-native): add group documentation --- .../react-native/group/change-group-mute.mdx | 35 + .../sdk/react-native/group/create-group.mdx | 41 + .../sdk/react-native/group/dismiss-group.mdx | 23 + .../accept-group-application.mdx | 31 + .../delete-group-requests.mdx | 35 + ...et-group-application-list-as-applicant.mdx | 41 + ...et-group-application-list-as-recipient.mdx | 98 + .../get-group-application-unhandled-count.mdx | 29 + .../refuse-group-application.mdx | 31 + .../sdk/react-native/group/join-group.mdx | 44 + .../change-group-member-mute.mdx | 31 + .../invite-user-to-group.mdx | 31 + .../kick-group-member.mdx | 31 + .../set-group-member-avatar.mdx | 33 + .../set-group-member-extension.mdx | 33 + .../set-group-member-nickname.mdx | 33 + .../set-group-member-role-level.mdx | 39 + .../transfer-group-owner.mdx | 29 + .../sdk/react-native/group/overview-group.mdx | 96 + .../sdk/react-native/group/quit-group.mdx | 23 + .../get-group-member-list.mdx | 76 + .../get-specified-group-members-info.mdx | 31 + .../get-users-in-group.mdx | 31 + .../search-group-members.mdx | 39 + .../get-joined-group-list-page.mdx | 33 + .../get-joined-group-list.mdx | 21 + .../get-specified-groups-info.mdx | 30 + .../group/retrieving-groups/is-join-group.mdx | 27 + .../group/retrieving-groups/search-groups.mdx | 33 + .../group/set-group-announcement.mdx | 26 + .../group/set-group-extension.mdx | 28 + .../group/set-group-join-verification.mdx | 34 + .../set-group-member-friend-permission.mdx | 33 + .../group/set-group-member-profile-access.mdx | 33 + .../group/update-group-profile.mdx | 37 + .../react-native/group/change-group-mute.mdx | 35 + .../sdk/react-native/group/create-group.mdx | 41 + .../sdk/react-native/group/dismiss-group.mdx | 23 + .../accept-group-application.mdx | 31 + .../delete-group-requests.mdx | 35 + ...et-group-application-list-as-applicant.mdx | 41 + ...et-group-application-list-as-recipient.mdx | 100 + .../get-group-application-unhandled-count.mdx | 29 + .../refuse-group-application.mdx | 31 + .../sdk/react-native/group/join-group.mdx | 44 + .../change-group-member-mute.mdx | 31 + .../invite-user-to-group.mdx | 31 + .../kick-group-member.mdx | 31 + .../set-group-member-avatar.mdx | 33 + .../set-group-member-extension.mdx | 33 + .../set-group-member-nickname.mdx | 33 + .../set-group-member-role-level.mdx | 39 + .../transfer-group-owner.mdx | 29 + .../sdk/react-native/group/overview-group.mdx | 98 + .../sdk/react-native/group/quit-group.mdx | 23 + .../get-group-member-list.mdx | 78 + .../get-specified-group-members-info.mdx | 31 + .../get-users-in-group.mdx | 31 + .../search-group-members.mdx | 39 + .../get-joined-group-list-page.mdx | 33 + .../get-joined-group-list.mdx | 21 + .../get-specified-groups-info.mdx | 30 + .../group/retrieving-groups/is-join-group.mdx | 27 + .../group/retrieving-groups/search-groups.mdx | 33 + .../group/set-group-announcement.mdx | 26 + .../group/set-group-extension.mdx | 28 + .../group/set-group-join-verification.mdx | 34 + .../set-group-member-friend-permission.mdx | 33 + .../group/set-group-member-profile-access.mdx | 33 + .../group/update-group-profile.mdx | 37 + data/structure/chat-pages.json | 550 ++++- .../structure/react-native-content-audit.json | 1930 ++++++++++++++++- .../react-native-navigation-labels.json | 43 + data/structure/react-native-sidebar.json | 189 ++ src/generated/navigation.json | 432 +++- .../react-native-sdk-zh-content.json | 666 +++++- src/generated/routes.json | 630 ++++++ src/generated/search-index-zh.json | 280 +++ src/generated/search-index.json | 280 +++ 79 files changed, 7492 insertions(+), 112 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/group/change-group-mute.mdx create mode 100644 content/docs/chat/sdk/react-native/group/create-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/dismiss-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx create mode 100644 content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx create mode 100644 content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx create mode 100644 content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx create mode 100644 content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx create mode 100644 content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx create mode 100644 content/docs/chat/sdk/react-native/group/join-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx create mode 100644 content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx create mode 100644 content/docs/chat/sdk/react-native/group/overview-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/quit-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx create mode 100644 content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx create mode 100644 content/docs/chat/sdk/react-native/group/set-group-announcement.mdx create mode 100644 content/docs/chat/sdk/react-native/group/set-group-extension.mdx create mode 100644 content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx create mode 100644 content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx create mode 100644 content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx create mode 100644 content/docs/chat/sdk/react-native/group/update-group-profile.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/change-group-mute.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/create-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/dismiss-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/join-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/overview-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/quit-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/set-group-announcement.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/set-group-extension.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/set-group-join-verification.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/group/update-group-profile.mdx diff --git a/content/docs/chat/sdk/react-native/group/change-group-mute.mdx b/content/docs/chat/sdk/react-native/group/change-group-mute.mdx new file mode 100644 index 0000000000..1cc26aaae6 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/change-group-mute.mdx @@ -0,0 +1,35 @@ +--- +title: 'Change group mute status' +description: 'OpenIM React Native SDK guide for change group mute status.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/change-group-mute' +--- + +Call `changeGroupMute()` to enable or disable group-wide muting. + +```ts +await OpenIMSDK.changeGroupMute({ + groupID, + isMute: true, + muteBypassUserIDs: [serviceAccountUserID], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `isMute` | `boolean` | Yes | Use `true` to enable group-wide muting or `false` to disable it. | +| `muteBypassUserIDs` Enterprise | `string[]` | No | User IDs that can still send messages while the group is muted. | + +Do not add every member to `muteBypassUserIDs`. The server controls whether the group owner and administrators can send messages. + +## Return value + +When the call completes, the group-wide mute setting is updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/create-group.mdx b/content/docs/chat/sdk/react-native/group/create-group.mdx new file mode 100644 index 0000000000..cfb88f7729 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/create-group.mdx @@ -0,0 +1,41 @@ +--- +title: 'Create a group' +description: 'OpenIM React Native SDK guide for create a group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/create-group' +--- + +Call `createGroup()` to create a group and set its initial members, administrators, and owner. + +```ts +const group = await OpenIMSDK.createGroup({ + memberUserIDs: ['user-003', 'user-004'], + adminUserIDs: ['user-002'], + ownerUserID: currentUserID, + groupInfo: { + groupName: 'Project discussion group', + groupType: GroupType.WorkingGroup, + faceURL: 'https://example.com/group.png', + }, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `memberUserIDs` | `string[]` | Yes | User IDs of the initial regular members. | +| `adminUserIDs` | `string[]` | No | User IDs of the initial administrators. | +| `ownerUserID` | `string` | No | User ID of the group owner. The current user is used when omitted. | +| `groupInfo` | `Partial` | Yes | Initial group profile. Common fields include `groupName`, `groupType`, and `faceURL`. | + +A regular member, administrator, and owner cannot be the same user. Use `GroupType.WorkingGroup` for `groupInfo.groupType` to create a regular group. + +## Return value + +When the call completes, it returns the newly created `GroupItem`. Use the returned `groupID` to open the group profile or group chat. When the current account joins the group, `OnJoinedGroupAdded` returns the group information; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/dismiss-group.mdx b/content/docs/chat/sdk/react-native/group/dismiss-group.mdx new file mode 100644 index 0000000000..4f477c9c1b --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/dismiss-group.mdx @@ -0,0 +1,23 @@ +--- +title: 'Dismiss a group' +description: 'OpenIM React Native SDK guide for dismiss a group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/dismiss-group' +--- + +Call `dismissGroup()` to dismiss a group. + +```ts +await OpenIMSDK.dismissGroup(groupID); +``` + +`groupID` is the ID of the group to dismiss. Dismissing a group affects every member, and the server validates whether the caller has permission. + +## Return value + +When the call completes, the group is dismissed. After a group is dismissed, relevant clients receive `OnGroupDismissed`; its callback receives the dismissed group information. See [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx b/content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx new file mode 100644 index 0000000000..eba4b09a82 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx @@ -0,0 +1,31 @@ +--- +title: 'Accept a group application' +description: 'OpenIM React Native SDK guide for accept a group application.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/accept-group-application' +--- + +Call `acceptGroupApplication()` to accept a user's group application. + +```ts +await OpenIMSDK.acceptGroupApplication({ + groupID: application.groupID, + fromUserID: application.userID, + handleMsg: 'Approved', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the group in the application. | +| `fromUserID` | `string` | Yes | Applicant user ID, corresponding to `userID` in the application record. | +| `handleMsg` | `string` | Yes | Handling message. Pass an empty string when no message is needed. | + +When the call completes, the group application is accepted. Application status changes trigger `OnGroupApplicationAccepted`; see [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient) for complete event handling. diff --git a/content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx b/content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx new file mode 100644 index 0000000000..a9d8ee9960 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx @@ -0,0 +1,35 @@ +--- +title: 'Delete group applications' +description: 'OpenIM React Native SDK guide for delete group applications.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/delete-group-requests' +--- + +Call `deleteGroupRequests()` to delete specified group application records in batches. + +```ts +await OpenIMSDK.deleteGroupRequests([ + { + fromUserID: application.userID, + groupID: application.groupID, + }, +]); +``` + +## Parameters + +Each item in the array contains the following fields: + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `fromUserID` | `string` | Yes | Applicant user ID, corresponding to `userID` in the application record. | +| `groupID` | `string` | Yes | ID of the group in the application. | + +Deleting an application record does not handle a pending application. To accept or reject an application, use [Accept a group application](/sdk/react-native/group/group-applications/accept-group-application) or [Reject a group application](/sdk/react-native/group/group-applications/refuse-group-application), respectively. + +When the call completes, the request to delete the records is complete. Deleting an application record triggers `OnGroupApplicationDeleted`; see [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient) for complete event handling. diff --git a/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx b/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx new file mode 100644 index 0000000000..be69e68ebb --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx @@ -0,0 +1,41 @@ +--- +title: 'Get sent group applications' +description: 'OpenIM React Native SDK guide for get sent group applications.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/get-group-application-list-as-applicant' +--- + +Call `getGroupApplicationListAsApplicant()` to retrieve group applications sent by the current account. + +```ts +const applications = await OpenIMSDK.getGroupApplicationListAsApplicant({ + groupIDs: ['group-001'], + handleResults: [ + ApplicationHandleResult.Unprocessed, + ApplicationHandleResult.Agree, + ApplicationHandleResult.Reject, + ], + offset: 0, + count: 20, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupIDs` | `string[]` | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | +| `handleResults` | `number[]` | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of applications to retrieve. | + +For `ApplicationHandleResult` values, see [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient). + +## Return value + +When the call completes, it returns `GroupApplicationItem[]` sent by the current account. See [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient) for application fields and application-change event handling. diff --git a/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx b/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx new file mode 100644 index 0000000000..b13e1d8c69 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx @@ -0,0 +1,98 @@ +--- +title: 'Get received group applications' +description: 'OpenIM React Native SDK guide for get received group applications.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/get-group-application-list-as-recipient' +--- + +Group owners and administrators can call `getGroupApplicationListAsRecipient()` to retrieve received group applications. + +```ts +const applications = await OpenIMSDK.getGroupApplicationListAsRecipient({ + groupIDs: ['group-001'], + handleResults: [ApplicationHandleResult.Unprocessed], + offset: 0, + count: 20, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupIDs` | `string[]` | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | +| `handleResults` | `number[]` | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of applications to retrieve. | + +Common `ApplicationHandleResult` values are: + +| Enum value | Value | Meaning | +| --- | --- | --- | +| `ApplicationHandleResult.Unprocessed` | `0` | Pending. | +| `ApplicationHandleResult.Agree` | `1` | Accepted. | +| `ApplicationHandleResult.Reject` | `-1` | Rejected. | + +## Return value + +When the call completes, it returns `GroupApplicationItem[]` that the current account can handle. + +### Group application fields + +| Field | Type | Description | +| --- | --- | --- | +| `groupID` | `string` | ID of the group that the user applied to join. | +| `userID` | `string` | User ID of the applicant. | +| `nickname` | `string` | Applicant nickname recorded in the application. | +| `userFaceURL` | `string` | Applicant avatar URL recorded in the application. | +| `reqMsg` | `string` | Application message. | +| `reqTime` | `number` | Application time. | +| `joinSource` | `GroupJoinSource` | Source of the group application. | +| `handleResult` | `ApplicationHandleResult` | Current handling result. | +| `handleUserID` | `string` | User ID of the person who handled the application. | +| `handledMsg` | `string` | Message entered while handling the application. | +| `handledTime` | `number` | Time when the application was handled. | +| `groupName` | `string` | Group name recorded in the application. | +| `groupFaceURL` | `string` | Group avatar URL recorded in the application. | +| `groupType` | `GroupType` | Group type. | +| `ownerUserID` | `string` | Group owner user ID. | +| `creatorUserID` | `string` | Group creator user ID. | +| `introduction` | `string` | Group description recorded in the application. | +| `notification` | `string` | Group announcement recorded in the application. | +| `memberCount` | `number` | Group member count recorded in the application. | +| `status` | `GroupStatus` | Group status. | +| `createTime` | `number` | Application record creation time as a Unix timestamp in milliseconds. | +| `ex` | `string` | Application record extension string. | + +The nickname, avatar, and group information in an application record reflect the values when the record was created. Query the current user profile or group profile to show the latest information. + +## Listen for group application changes + +When a group application is added, handled, or deleted, `OnGroupApplicationAdded`, `OnGroupApplicationAccepted`, `OnGroupApplicationRejected`, or `OnGroupApplicationDeleted` is triggered respectively. Each callback receives a `GroupApplicationItem` directly: + +```ts +const handleApplicationChanged = (application: GroupApplicationItem) => { + // Update the application record by groupID and userID +}; + +const handleApplicationDeleted = (application: GroupApplicationItem) => { + // Delete the application record by groupID and userID +}; + +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted); + +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted); +``` + +Remove these listeners when signing out, switching accounts, or discarding application-list state. diff --git a/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx b/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx new file mode 100644 index 0000000000..49b6e936d6 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx @@ -0,0 +1,29 @@ +--- +title: 'Get pending group application count' +description: 'OpenIM React Native SDK guide for get pending group application count.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/get-group-application-unhandled-count' +--- + +Call `getGroupApplicationUnhandledCount()` to retrieve the number of group applications that remain unhandled after a specified time. + +```ts +const count = await OpenIMSDK.getGroupApplicationUnhandledCount({ + time: 0, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `time` | `number` | Yes | Start time as a Unix timestamp in milliseconds. Pass `0` to count every pending application. | + +## Return value + +When the call completes, it returns a `number` representing the number of pending group applications after the specified time. diff --git a/content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx b/content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx new file mode 100644 index 0000000000..d848860f3b --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx @@ -0,0 +1,31 @@ +--- +title: 'Reject a group application' +description: 'OpenIM React Native SDK guide for reject a group application.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/refuse-group-application' +--- + +Call `refuseGroupApplication()` to reject a user's group application. + +```ts +await OpenIMSDK.refuseGroupApplication({ + groupID: application.groupID, + fromUserID: application.userID, + handleMsg: 'The application cannot be accepted at this time', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the group in the application. | +| `fromUserID` | `string` | Yes | Applicant user ID, corresponding to `userID` in the application record. | +| `handleMsg` | `string` | Yes | Rejection reason. Pass an empty string when no reason is needed. | + +When the call completes, the group application is rejected. Application status changes trigger `OnGroupApplicationRejected`; see [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient) for complete event handling. diff --git a/content/docs/chat/sdk/react-native/group/join-group.mdx b/content/docs/chat/sdk/react-native/group/join-group.mdx new file mode 100644 index 0000000000..32341bfcda --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/join-group.mdx @@ -0,0 +1,44 @@ +--- +title: 'Apply to join a group' +description: 'OpenIM React Native SDK guide for apply to join a group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/join-group' +--- + +Call `joinGroup()` with a group ID, application message, and join source to apply to join a group. + +```ts +await OpenIMSDK.joinGroup({ + groupID, + reqMsg: 'Request to join the project discussion group', + joinSource: GroupJoinSource.Search, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `reqMsg` | `string` | Yes | Application message. Pass an empty string when no message is needed. | +| `joinSource` | `GroupJoinSource` | Yes | How the user initiated joining the group. | +| `ex` | `string` | No | Business-specific extension string. | + +Common `joinSource` values are: + +| Enum value | Value | Description | +| --- | --- | --- | +| `GroupJoinSource.Invitation` | `2` | Joined through an invitation. | +| `GroupJoinSource.Search` | `3` | Joined through search. | +| `GroupJoinSource.QrCode` | `4` | Joined through a QR code. | + +`joinSource` records how the user joined; it does not determine whether approval is required. + +## Return value + +When the call completes, the join request is submitted. After the current account joins the group successfully, `OnJoinedGroupAdded` returns the group information; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx new file mode 100644 index 0000000000..e37f302265 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx @@ -0,0 +1,31 @@ +--- +title: 'Mute or unmute a group member' +description: 'OpenIM React Native SDK guide for mute or unmute a group member.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/change-group-member-mute' +--- + +Call `changeGroupMemberMute()` to set a mute duration for a member. Pass `0` to remove the mute. + +```ts +await OpenIMSDK.changeGroupMemberMute({ + groupID: 'group-001', + userID: 'user-002', + mutedSeconds: 3600, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userID` | `string` | Yes | User ID of the member to mute or unmute. | +| `mutedSeconds` | `number` | Yes | Mute duration in seconds. Pass `0` to remove the mute. | + +When the call completes, the member mute state is updated. Member profile changes trigger `OnGroupMemberInfoChanged`; read `muteEndTime` from the event parameter to get the mute end time. See [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx new file mode 100644 index 0000000000..65728fdd3d --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx @@ -0,0 +1,31 @@ +--- +title: 'Invite users to a group' +description: 'OpenIM React Native SDK guide for invite users to a group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/invite-user-to-group' +--- + +Call `inviteUserToGroup()` to invite one or more users to a group. + +```ts +await OpenIMSDK.inviteUserToGroup({ + groupID: 'group-001', + reason: 'Invitation to join the project discussion group', + userIDList: ['user-002', 'user-003'], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `reason` | `string` | Yes | Invitation message. Pass an empty string when no message is needed. | +| `userIDList` | `string[]` | Yes | User IDs to invite. | + +When the call completes, the invitation request is submitted. When a user actually joins the group, `OnGroupMemberAdded` is triggered; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx new file mode 100644 index 0000000000..efede75eb1 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx @@ -0,0 +1,31 @@ +--- +title: 'Remove group members' +description: 'OpenIM React Native SDK guide for remove group members.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/kick-group-member' +--- + +Call `kickGroupMember()` to remove one or more members from a group. + +```ts +await OpenIMSDK.kickGroupMember({ + groupID: 'group-001', + reason: 'No longer involved in the project', + userIDList: ['user-002'], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `reason` | `string` | Yes | Removal reason. Pass an empty string when no reason is needed. | +| `userIDList` | `string[]` | Yes | User IDs of the members to remove. | + +When the call completes, the specified members are removed from the group. Removing a member triggers `OnGroupMemberDeleted`; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx new file mode 100644 index 0000000000..84850f364a --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx @@ -0,0 +1,33 @@ +--- +title: 'Update a group member avatar' +description: 'OpenIM React Native SDK guide for update a group member avatar.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-avatar' +--- + +Call `setGroupMemberInfo()` to update a member's group avatar. + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + faceURL: 'https://example.com/avatar.png', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userID` | `string` | Yes | User ID of the member whose avatar to update. | +| `faceURL` | `string` | Yes | Member avatar URL for this group. | + +A group avatar applies only to the specified group. To update an account avatar, use [Update your profile](/sdk/react-native/user/profile/set-self-info). + +When the call completes, the group avatar is updated. Member profile changes trigger `OnGroupMemberInfoChanged`; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx new file mode 100644 index 0000000000..821e965a83 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx @@ -0,0 +1,33 @@ +--- +title: 'Set group member extra data' +description: 'OpenIM React Native SDK guide for set group member extra data.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-extension' +--- + +Call `setGroupMemberInfo()` to set a member's `ex` extension field. + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + ex: JSON.stringify({ + title: 'maintainer', + }), +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userID` | `string` | Yes | User ID of the member whose extension data to set. | +| `ex` | `string` | Yes | Group member extension string. It can contain JSON or another string format for business-specific data. | + +When the call completes, the member extension field is updated. Member profile changes trigger `OnGroupMemberInfoChanged`; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx new file mode 100644 index 0000000000..95fa42e72a --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx @@ -0,0 +1,33 @@ +--- +title: 'Update a group nickname' +description: 'OpenIM React Native SDK guide for update a group nickname.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-nickname' +--- + +Call `setGroupMemberInfo()` to update a member's group nickname. + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + nickname: 'Project owner', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userID` | `string` | Yes | User ID of the member whose nickname to update. | +| `nickname` | `string` | Yes | New nickname for the member in the group. | + +A group nickname applies only to this group and does not change the user's account nickname. + +When the call completes, the group nickname is updated. Member profile changes trigger `OnGroupMemberInfoChanged`; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx new file mode 100644 index 0000000000..2962bb2650 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx @@ -0,0 +1,39 @@ +--- +title: 'Manage group administrators' +description: 'OpenIM React Native SDK guide for manage group administrators.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-role-level' +--- + +Call `setGroupMemberInfo()` to make a member an administrator or remove administrator status. + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + roleLevel: GroupMemberRole.Admin, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userID` | `string` | Yes | User ID of the member whose role to set. | +| `roleLevel` | `GroupMemberRole` | Yes | Member role to set. | + +| Enum value | Value | Description | +| --- | --- | --- | +| `GroupMemberRole.Normal` | `20` | Regular member. Pass this value to remove administrator status. | +| `GroupMemberRole.Admin` | `60` | Administrator. | +| `GroupMemberRole.Owner` | `100` | Group owner role, used only to identify the current role. | + +You cannot transfer group ownership by setting `GroupMemberRole.Owner`. Use [Transfer group ownership](/sdk/react-native/group/managing-group-members/transfer-group-owner) instead. + +When the call completes, the member role is updated. Member profile changes trigger `OnGroupMemberInfoChanged`; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx b/content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx new file mode 100644 index 0000000000..c0b78f5776 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx @@ -0,0 +1,29 @@ +--- +title: 'Transfer group ownership' +description: 'OpenIM React Native SDK guide for transfer group ownership.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/transfer-group-owner' +--- + +Call `transferGroupOwner()` to transfer group ownership to another member. + +```ts +await OpenIMSDK.transferGroupOwner({ + groupID: 'group-001', + newOwnerUserID: 'user-002', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `newOwnerUserID` | `string` | Yes | User ID of the new group owner. This user must already be a member of the group. | + +When the call completes, group ownership is transferred. The member roles of the former and new owners change through `OnGroupMemberInfoChanged`; see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/overview-group.mdx b/content/docs/chat/sdk/react-native/group/overview-group.mdx new file mode 100644 index 0000000000..bbb03ba453 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/overview-group.mdx @@ -0,0 +1,96 @@ +--- +title: 'Group overview' +description: 'OpenIM React Native SDK guide for group overview.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/overview-group' +--- + +In OpenIM, group chats are organized as groups. In group APIs, use `groupID` to identify the target group, for example when querying group profiles, managing members, or handling group applications. After you create a group, obtain its `groupID` from the returned group information. A group chat session uses `conversationID` for conversation settings, message history, and unread status. `conversationID` identifies a conversation, whereas `groupID` identifies a group; do not confuse them when supplying API parameters. + +## Core data types + +| Type | Purpose | +| --- | --- | +| `GroupItem` | A group's name, avatar, announcement, owner, join-verification setting, member count, and extension data. | +| `GroupMemberItem` | A user's nickname, role, mute state, and join information in a specific group. | + +Member roles use `GroupMemberRole`: `Normal` is a regular member, `Admin` is an administrator, and `Owner` is the group owner. + +## Common `GroupItem` fields + +| Field | Type | Description | +| --- | --- | --- | +| `groupID` | `string` | Group ID. | +| `groupName` | `string` | Group name. | +| `notification` | `string` | Group announcement. | +| `friendUserIDs` | `string` | Group friend user ID information. | +| `remark` | `string` | Group remark set by the current account. | + +## Common `GroupMemberItem` fields + +| Field | Type | Description | +| --- | --- | --- | +| `groupID` | `string` | ID of the group that the member belongs to. | +| `userID` | `string` | Member user ID. | +| `nickname` | `string` | The user's nickname in the current group. | +| `faceURL` | `string` | The user's avatar URL in the current group. | +| `roleLevel` | `GroupMemberRole` | Member role. | +| `muteEndTime` | `number` | Time when the mute ends. | +| `joinTime` | `number` | Time when the member joined the group. | +| `joinSource` | `GroupJoinSource` | How the member joined the group. | +| `inviterUserID` | `string` | User ID of the member who invited this user. | +| `operatorUserID` | `string` | User ID of the user who last updated this member profile. | +| `ex` | `string` | Group member extension string. | + +`nickname`, `faceURL`, and `roleLevel` belong to the member profile in the current group. They can differ for the same user in another group. + +## Find a page by task + +| Task | Pages | +| --- | --- | +| Create and maintain group profiles | [Create a group](/sdk/react-native/group/create-group), [Update group profile](/sdk/react-native/group/update-group-profile), [Publish a group announcement](/sdk/react-native/group/set-group-announcement), [Set group extra data](/sdk/react-native/group/set-group-extension) | +| Configure join and member permissions | [Set group join verification](/sdk/react-native/group/set-group-join-verification), [Set member profile access](/sdk/react-native/group/set-group-member-profile-access), [Set group member friend-request permissions](/sdk/react-native/group/set-group-member-friend-permission) | +| Join, leave, or dismiss groups | [Apply to join a group](/sdk/react-native/group/join-group), [Leave a group](/sdk/react-native/group/quit-group), [Dismiss a group](/sdk/react-native/group/dismiss-group) | +| Retrieve groups | [Get group information](/sdk/react-native/group/retrieving-groups/get-specified-groups-info), [Get joined groups by page](/sdk/react-native/group/retrieving-groups/get-joined-group-list-page), [Search groups](/sdk/react-native/group/retrieving-groups/search-groups) | +| Retrieve and handle group applications | [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient), [Get sent group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-applicant) | +| Retrieve and manage group members | [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list), [Invite users to a group](/sdk/react-native/group/managing-group-members/invite-user-to-group), [Remove group members](/sdk/react-native/group/managing-group-members/kick-group-member), [Manage group administrators](/sdk/react-native/group/managing-group-members/set-group-member-role-level), [Transfer group ownership](/sdk/react-native/group/managing-group-members/transfer-group-owner) | +| Manage group chat messaging permissions | [Change group mute status](/sdk/react-native/group/change-group-mute), [Mute or unmute a group member](/sdk/react-native/group/managing-group-members/change-group-member-mute) | + +## Listen for group changes + +When the current account joins or leaves a group, when group profile information changes, or when a group is dismissed, `OnJoinedGroupAdded`, `OnJoinedGroupDeleted`, `OnGroupInfoChanged`, and `OnGroupDismissed` are triggered respectively. Each callback receives a `GroupItem` directly: + +```ts +const handleJoinedGroupAdded = (group: GroupItem) => { + // Add group to the joined group list +}; + +const handleJoinedGroupDeleted = (group: GroupItem) => { + // Remove the group from the joined group list by group.groupID +}; + +const handleGroupInfoChanged = (group: GroupItem) => { + // Update the group profile by group.groupID +}; + +const handleGroupDismissed = (group: GroupItem) => { + // Close or remove the dismissed group by group.groupID +}; + +OpenIMSDK.on(OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded); +OpenIMSDK.on(OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted); +OpenIMSDK.on(OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupDismissed, handleGroupDismissed); + +OpenIMSDK.off(OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded); +OpenIMSDK.off(OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted); +OpenIMSDK.off(OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupDismissed, handleGroupDismissed); +``` + +Remove these listeners when signing out, switching accounts, or discarding group-related state. For member-change listeners, see [Get group members](/sdk/react-native/group/retrieving-group-members/get-group-member-list). For group application change listeners, see [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient). diff --git a/content/docs/chat/sdk/react-native/group/quit-group.mdx b/content/docs/chat/sdk/react-native/group/quit-group.mdx new file mode 100644 index 0000000000..e609488e7b --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/quit-group.mdx @@ -0,0 +1,23 @@ +--- +title: 'Leave a group' +description: 'OpenIM React Native SDK guide for leave a group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/quit-group' +--- + +Call `quitGroup()` to leave a group that the current account has joined. + +```ts +await OpenIMSDK.quitGroup(groupID); +``` + +`groupID` is the ID of the group to leave. A group owner must transfer ownership before leaving the group. + +## Return value + +When the call completes, the current account has left the target group. After the current account leaves successfully, `OnJoinedGroupDeleted` is triggered and its callback receives the corresponding group information. See [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx b/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx new file mode 100644 index 0000000000..edb38c0a1d --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx @@ -0,0 +1,76 @@ +--- +title: 'Get group members' +description: 'OpenIM React Native SDK guide for get group members.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/get-group-member-list' +--- + +Call `getGroupMemberList()` to retrieve members of a group in pages and filter them by role. + +```ts +const members = await OpenIMSDK.getGroupMemberList({ + groupID: 'group-001', + filter: GroupMemberFilter.All, + offset: 0, + count: 50, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `filter` | `GroupMemberFilter` | Yes | Member role filter. | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of members to retrieve. | + +`GroupMemberFilter` values are: + +| Enum value | Value | Description | +| --- | --- | --- | +| `GroupMemberFilter.All` | `0` | All members. | +| `GroupMemberFilter.Owner` | `1` | Group owner only. | +| `GroupMemberFilter.Admin` | `2` | Administrators only. | +| `GroupMemberFilter.Normal` | `3` | Regular members only. | +| `GroupMemberFilter.AdminAndNormal` | `4` | Administrators and regular members. | +| `GroupMemberFilter.AdminAndOwner` | `5` | Administrators and the group owner. | + +To retrieve the next page, set `offset` to the number of members already retrieved. + +## Return value + +When the call completes, it returns `GroupMemberItem[]` for the current page. See [Group overview](/sdk/react-native/group/overview-group) for field descriptions. + +## Listen for group member changes + +When a member joins, leaves, or has profile information changed, `OnGroupMemberAdded`, `OnGroupMemberDeleted`, and `OnGroupMemberInfoChanged` are triggered respectively. Each callback receives a `GroupMemberItem` directly: + +```ts +const handleMemberAdded = (member: GroupMemberItem) => { + // Add the member to the corresponding group member list +}; + +const handleMemberDeleted = (member: GroupMemberItem) => { + // Delete the member by member.groupID and member.userID +}; + +const handleMemberChanged = (member: GroupMemberItem) => { + // Update the member profile by member.groupID and member.userID +}; + +OpenIMSDK.on(OpenIMEvent.OnGroupMemberAdded, handleMemberAdded); +OpenIMSDK.on(OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted); +OpenIMSDK.on(OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged); + +OpenIMSDK.off(OpenIMEvent.OnGroupMemberAdded, handleMemberAdded); +OpenIMSDK.off(OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted); +OpenIMSDK.off(OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged); +``` + +Remove these listeners when signing out, switching accounts, or discarding member-list state. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx new file mode 100644 index 0000000000..e31cad4d1a --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -0,0 +1,31 @@ +--- +title: 'Get group member profiles' +description: 'OpenIM React Native SDK guide for get group member profiles.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info' +--- + +Call `getSpecifiedGroupMembersInfo()` to retrieve member profiles for specified users in a group. + +```ts +const members = await OpenIMSDK.getSpecifiedGroupMembersInfo({ + groupID: 'group-001', + userIDList: ['user-001', 'user-002'], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userIDList` | `string[]` | Yes | User IDs of the members to retrieve. | + +## Return value + +When the call completes, it returns matching `GroupMemberItem[]` entries. See [Group overview](/sdk/react-native/group/overview-group) for field descriptions. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx b/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx new file mode 100644 index 0000000000..2cd3d56e06 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx @@ -0,0 +1,31 @@ +--- +title: 'Check users in a group' +description: 'OpenIM React Native SDK guide for check users in a group.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/get-users-in-group' +--- + +Call `getUsersInGroup()` to retrieve the user IDs from a specified set that have joined a group. + +```ts +const userIDs = await OpenIMSDK.getUsersInGroup({ + groupID: 'group-001', + userIDList: ['user-001', 'user-002', 'user-003'], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `userIDList` | `string[]` | Yes | User IDs to check. | + +## Return value + +When the call completes, it returns `string[]` containing the user IDs that have joined the target group. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx b/content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx new file mode 100644 index 0000000000..1b5f538e4e --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx @@ -0,0 +1,39 @@ +--- +title: 'Search group members' +description: 'OpenIM React Native SDK guide for search group members.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/search-group-members' +--- + +Call `searchGroupMembers()` to search members of a group by user ID or group nickname. + +```ts +const members = await OpenIMSDK.searchGroupMembers({ + groupID: 'group-001', + keywordList: ['Zhang'], + isSearchUserID: false, + isSearchMemberNickname: true, + offset: 0, + count: 50, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the target group. | +| `keywordList` | `string[]` | Yes | Search keywords. | +| `isSearchUserID` | `boolean` | Yes | Whether to match user IDs. | +| `isSearchMemberNickname` | `boolean` | Yes | Whether to match group nicknames. | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of members to retrieve. | + +## Return value + +When the call completes, it returns matching `GroupMemberItem[]` entries for the current page. See [Group overview](/sdk/react-native/group/overview-group) for field descriptions. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx b/content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx new file mode 100644 index 0000000000..5859177fbb --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx @@ -0,0 +1,33 @@ +--- +title: 'Get joined groups by page' +description: 'OpenIM React Native SDK guide for get joined groups by page.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/get-joined-group-list-page' +--- + +Call `getJoinedGroupListPage()` to retrieve groups joined by the current account in pages. + +```ts +const groups = await OpenIMSDK.getJoinedGroupListPage({ + offset: 0, + count: 50, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `offset` | `number` | Yes | Pagination offset. Use `0` for the first page. | +| `count` | `number` | Yes | Number of groups to retrieve. | + +To retrieve the next page, set `offset` to the number of groups already retrieved. + +## Return value + +When the call completes, it returns `GroupItem[]` for the current page. See [Group overview](/sdk/react-native/group/overview-group) for field descriptions. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx b/content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx new file mode 100644 index 0000000000..e689ff7651 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx @@ -0,0 +1,21 @@ +--- +title: 'Get joined groups' +description: 'OpenIM React Native SDK guide for get joined groups.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/get-joined-group-list' +--- + +Call `getJoinedGroupList()` to retrieve every group that the current account has joined. + +```ts +const groups = await OpenIMSDK.getJoinedGroupList(); +``` + +## Return value + +When the call completes, it returns `GroupItem[]`. For many groups, use [Get joined groups by page](/sdk/react-native/group/retrieving-groups/get-joined-group-list-page) to retrieve them in batches. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx b/content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx new file mode 100644 index 0000000000..5168c8dd30 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx @@ -0,0 +1,30 @@ +--- +title: 'Get group information' +description: 'OpenIM React Native SDK guide for get group information.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/get-specified-groups-info' +--- + +Call `getSpecifiedGroupsInfo()` to retrieve information for specific groups by group ID. + +```ts +const groups = await OpenIMSDK.getSpecifiedGroupsInfo([ + 'group-001', + 'group-002', +]); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupIDs` | `string[]` | Yes | IDs of the groups to retrieve. | + +## Return value + +When the call completes, it returns matching `GroupItem[]` entries. See [Group overview](/sdk/react-native/group/overview-group) for field descriptions. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx b/content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx new file mode 100644 index 0000000000..daa1f90657 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx @@ -0,0 +1,27 @@ +--- +title: 'Check group membership' +description: 'OpenIM React Native SDK guide for check group membership.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/is-join-group' +--- + +Call `isJoinGroup()` to check whether the current account has joined a group. + +```ts +const isJoined = await OpenIMSDK.isJoinGroup('group-001'); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the group to check. | + +## Return value + +When the call completes, it returns a `boolean`: `true` if the current account has joined the group, or `false` otherwise. diff --git a/content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx b/content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx new file mode 100644 index 0000000000..48ab953591 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx @@ -0,0 +1,33 @@ +--- +title: 'Search groups' +description: 'OpenIM React Native SDK guide for search groups.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/search-groups' +--- + +Call `searchGroups()` to search groups by group ID or group name. + +```ts +const groups = await OpenIMSDK.searchGroups({ + keywordList: ['project'], + isSearchGroupID: false, + isSearchGroupName: true, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `keywordList` | `string[]` | Yes | Search keywords. | +| `isSearchGroupID` | `boolean` | Yes | Whether to match group IDs. | +| `isSearchGroupName` | `boolean` | Yes | Whether to match group names. | + +## Return value + +When the call completes, it returns matching `GroupItem[]` entries. See [Group overview](/sdk/react-native/group/overview-group) for field descriptions. diff --git a/content/docs/chat/sdk/react-native/group/set-group-announcement.mdx b/content/docs/chat/sdk/react-native/group/set-group-announcement.mdx new file mode 100644 index 0000000000..ebba5f78f5 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/set-group-announcement.mdx @@ -0,0 +1,26 @@ +--- +title: 'Publish a group announcement' +description: 'OpenIM React Native SDK guide for publish a group announcement.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-announcement' +--- + +Call `setGroupInfo()` to set or update a group announcement. + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + notification: announcement, +}); +``` + +`groupID` is the target group ID and `notification` is the announcement content. Pass an empty string to clear the announcement. The announcement and the group description, `introduction`, are separate fields. + +## Return value + +When the call completes, the group announcement is updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/set-group-extension.mdx b/content/docs/chat/sdk/react-native/group/set-group-extension.mdx new file mode 100644 index 0000000000..6aca2bfaf5 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/set-group-extension.mdx @@ -0,0 +1,28 @@ +--- +title: 'Set group extra data' +description: 'OpenIM React Native SDK guide for set group extra data.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-extension' +--- + +Call `setGroupInfo()` to set the group's `ex` extension field. + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + ex: JSON.stringify({ + projectID: 'project-42', + }), +}); +``` + +`groupID` is the target group ID. `ex` is a string and can contain JSON or another string format for business-specific data. + +## Return value + +When the call completes, the group extension field is updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx b/content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx new file mode 100644 index 0000000000..a3d5e2e6a6 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx @@ -0,0 +1,34 @@ +--- +title: 'Set group join verification' +description: 'OpenIM React Native SDK guide for set group join verification.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-join-verification' +--- + +Call `setGroupInfo()` to configure verification for group applications and invitations. + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + needVerification: GroupVerificationType.AllNeed, +}); +``` + +## Parameters + +`groupID` is the target group ID. `needVerification` uses `GroupVerificationType`: + +| Enum value | Value | Description | +| --- | --- | --- | +| `GroupVerificationType.ApplyNeedInviteNot` | `0` | Applications require approval, while member invitations let users join directly. | +| `GroupVerificationType.AllNeed` | `1` | Applications and regular-member invitations require approval. Invitations from the owner or an administrator are excluded. | +| `GroupVerificationType.AllNot` | `2` | Applications and invitations let users join directly. | + +## Return value + +When the call completes, the group join verification setting is updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx b/content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx new file mode 100644 index 0000000000..9a2db123e2 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx @@ -0,0 +1,33 @@ +--- +title: 'Set member friend request permission' +description: 'OpenIM React Native SDK guide for set member friend request permission.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-member-friend-permission' +--- + +Call `setGroupInfo()` to configure whether members can send friend requests to other members through the group. This setting controls only friend requests initiated from the member relationship and is independent of [setting member profile visibility](/sdk/react-native/group/set-group-member-profile-access). + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + applyMemberFriend: AllowType.NotAllowed, +}); +``` + +## Parameters + +`groupID` is the target group ID. `applyMemberFriend` uses `AllowType`: + +| Enum value | Value | Description | +| --- | --- | --- | +| `AllowType.Allowed` | `0` | Members can send friend requests through the group member relationship. | +| `AllowType.NotAllowed` | `1` | Members cannot send friend requests through the group member relationship. | + +## Return value + +When the call completes, group member friend-request permissions are updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx b/content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx new file mode 100644 index 0000000000..16ff5089c3 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx @@ -0,0 +1,33 @@ +--- +title: 'Set member profile access' +description: 'OpenIM React Native SDK guide for set member profile access.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-member-profile-access' +--- + +Call `setGroupInfo()` to configure whether group members can view other members' profiles. This setting controls only member profile visibility and is independent of [setting group member friend-request permissions](/sdk/react-native/group/set-group-member-friend-permission). + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + lookMemberInfo: AllowType.NotAllowed, +}); +``` + +## Parameters + +`groupID` is the target group ID. `lookMemberInfo` uses `AllowType`: + +| Enum value | Value | Description | +| --- | --- | --- | +| `AllowType.Allowed` | `0` | Members can view other members' profiles. | +| `AllowType.NotAllowed` | `1` | Members cannot view other members' profiles. | + +## Return value + +When the call completes, member profile visibility is updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/docs/chat/sdk/react-native/group/update-group-profile.mdx b/content/docs/chat/sdk/react-native/group/update-group-profile.mdx new file mode 100644 index 0000000000..b8e00cd4d1 --- /dev/null +++ b/content/docs/chat/sdk/react-native/group/update-group-profile.mdx @@ -0,0 +1,37 @@ +--- +title: 'Update group profile' +description: 'OpenIM React Native SDK guide for update group profile.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/update-group-profile' +--- + +Call `setGroupInfo()` to update a group name, description, or avatar. Provide only the fields that need to change. + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + groupName: groupName.trim(), + introduction: introduction.trim(), + faceURL, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | +| `groupID` | `string` | Yes | ID of the group to update. | +| `groupName` | `string` | No | New group name. | +| `introduction` | `string` | No | New group description. | +| `faceURL` | `string` | No | URL of the new group avatar. | + +In addition to `groupID`, provide at least one group profile field to update. Fields that are not provided keep their current values. + +## Return value + +When the call completes, the group profile is updated. Group profile changes trigger `OnGroupInfoChanged`; see [Group overview](/sdk/react-native/group/overview-group) for event handling. diff --git a/content/zh/docs/chat/sdk/react-native/group/change-group-mute.mdx b/content/zh/docs/chat/sdk/react-native/group/change-group-mute.mdx new file mode 100644 index 0000000000..13d98b0cfe --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/change-group-mute.mdx @@ -0,0 +1,35 @@ +--- +title: '设置群组全员禁言' +description: 'OpenIM React Native SDK 修改群组禁言状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/change-group-mute' +--- + +调用 `changeGroupMute()` 开启或关闭群组全员禁言。 + +```ts +await OpenIMSDK.changeGroupMute({ + groupID, + isMute: true, + muteBypassUserIDs: [serviceAccountUserID], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `isMute` | `boolean` | 是 | `true` 开启群组禁言,`false` 关闭群组禁言。 | +| `muteBypassUserIDs` 商业版 | `string[]` | 否 | 群组禁言期间仍允许发言的用户 ID。 | + +不要把全部成员传入 `muteBypassUserIDs`。群主和管理员是否可以发言由服务端权限控制。 + +## 返回结果 + +调用完成后,群组全员禁言设置已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/create-group.mdx b/content/zh/docs/chat/sdk/react-native/group/create-group.mdx new file mode 100644 index 0000000000..b5fc22d272 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/create-group.mdx @@ -0,0 +1,41 @@ +--- +title: '创建群组' +description: 'OpenIM React Native SDK 创建群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/create-group' +--- + +调用 `createGroup()` 创建群组,并设置初始成员、管理员和群主。 + +```ts +const group = await OpenIMSDK.createGroup({ + memberUserIDs: ['user-003', 'user-004'], + adminUserIDs: ['user-002'], + ownerUserID: currentUserID, + groupInfo: { + groupName: '项目讨论组', + groupType: GroupType.WorkingGroup, + faceURL: 'https://example.com/group.png', + }, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `memberUserIDs` | `string[]` | 是 | 初始普通成员的用户 ID。 | +| `adminUserIDs` | `string[]` | 否 | 初始管理员的用户 ID。 | +| `ownerUserID` | `string` | 否 | 群主用户 ID;不传时使用当前用户。 | +| `groupInfo` | `Partial` | 是 | 初始群资料。常用字段包括 `groupName`、`groupType` 和 `faceURL`。 | + +普通成员、管理员和群主不能重复。`groupInfo.groupType` 使用 `GroupType.WorkingGroup` 创建普通群组。 + +## 返回结果 + +调用完成后返回新建群组的 `GroupItem`。可以使用返回对象中的 `groupID` 打开群资料或群聊页面。当前账号加入群组后,会通过 `OnJoinedGroupAdded` 返回群组信息,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/dismiss-group.mdx b/content/zh/docs/chat/sdk/react-native/group/dismiss-group.mdx new file mode 100644 index 0000000000..cd8608251f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/dismiss-group.mdx @@ -0,0 +1,23 @@ +--- +title: '解散群组' +description: 'OpenIM React Native SDK 解散群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/dismiss-group' +--- + +调用 `dismissGroup()` 解散群组。 + +```ts +await OpenIMSDK.dismissGroup(groupID); +``` + +`groupID` 为要解散的群组 ID。解散群组会影响所有成员,调用权限由服务端校验。 + +## 返回结果 + +调用完成后,群组已解散。群组解散后,相关客户端会触发 `OnGroupDismissed`,回调参数为已解散的群组信息;事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx b/content/zh/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx new file mode 100644 index 0000000000..ca8cc6a85c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx @@ -0,0 +1,31 @@ +--- +title: '接受入群申请' +description: '同意指定用户的入群申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/accept-group-application' +--- + +调用 `acceptGroupApplication()` 同意指定用户的入群申请。 + +```ts +await OpenIMSDK.acceptGroupApplication({ + groupID: application.groupID, + fromUserID: application.userID, + handleMsg: '同意加入', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 申请对应的群组 ID。 | +| `fromUserID` | `string` | 是 | 申请人的用户 ID,对应申请记录的 `userID`。 | +| `handleMsg` | `string` | 是 | 处理说明;没有说明时传空字符串。 | + +调用完成后,入群申请已被同意。申请状态变化时会触发 `OnGroupApplicationAccepted`,完整监听方式见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx b/content/zh/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx new file mode 100644 index 0000000000..0a750fe185 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx @@ -0,0 +1,35 @@ +--- +title: '删除入群申请' +description: '批量删除指定的入群申请记录。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/delete-group-requests' +--- + +调用 `deleteGroupRequests()` 批量删除指定的入群申请记录。 + +```ts +await OpenIMSDK.deleteGroupRequests([ + { + fromUserID: application.userID, + groupID: application.groupID, + }, +]); +``` + +## 参数说明 + +数组中的每一项包含以下字段: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `fromUserID` | `string` | 是 | 申请人的用户 ID,对应申请记录的 `userID`。 | +| `groupID` | `string` | 是 | 申请对应的群组 ID。 | + +删除申请记录不会处理待处理申请。如需同意或拒绝申请,分别使用[接受入群申请](/sdk/react-native/group/group-applications/accept-group-application)和[拒绝入群申请](/sdk/react-native/group/group-applications/refuse-group-application)。 + +调用完成后表示删除请求已完成。申请记录删除时会触发 `OnGroupApplicationDeleted`,完整监听方式见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx new file mode 100644 index 0000000000..f9a3db2cf4 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx @@ -0,0 +1,41 @@ +--- +title: '获取发出的入群申请' +description: '查询当前账号发出的入群申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/get-group-application-list-as-applicant' +--- + +调用 `getGroupApplicationListAsApplicant()` 查询当前账号发出的入群申请。 + +```ts +const applications = await OpenIMSDK.getGroupApplicationListAsApplicant({ + groupIDs: ['group-001'], + handleResults: [ + ApplicationHandleResult.Unprocessed, + ApplicationHandleResult.Agree, + ApplicationHandleResult.Reject, + ], + offset: 0, + count: 20, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupIDs` | `string[]` | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | +| `handleResults` | `number[]` | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | +| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 | +| `count` | `number` | 是 | 本次读取的申请数量。 | + +`ApplicationHandleResult` 的取值见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。 + +## 返回结果 + +调用完成后返回当前账号发出的 `GroupApplicationItem[]`。申请字段说明和申请变化事件监听见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx new file mode 100644 index 0000000000..8abced16ff --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx @@ -0,0 +1,100 @@ +--- +title: '获取收到的入群申请' +description: '查询当前账号收到的入群申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/get-group-application-list-as-recipient' +--- + +群主或管理员可以调用 `getGroupApplicationListAsRecipient()` 查询收到的入群申请。 + +```ts +const applications = await OpenIMSDK.getGroupApplicationListAsRecipient({ + groupIDs: ['group-001'], + handleResults: [ApplicationHandleResult.Unprocessed], + offset: 0, + count: 20, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupIDs` | `string[]` | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | +| `handleResults` | `number[]` | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | +| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 | +| `count` | `number` | 是 | 本次读取的申请数量。 | + +`ApplicationHandleResult` 的常用值如下: + +| 枚举值 | 数值 | 含义 | +| --- | --- | --- | +| `ApplicationHandleResult.Unprocessed` | `0` | 待处理。 | +| `ApplicationHandleResult.Agree` | `1` | 已同意。 | +| `ApplicationHandleResult.Reject` | `-1` | 已拒绝。 | + +## 返回结果 + +调用完成后返回当前账号有权处理的 `GroupApplicationItem[]`。 + +### 入群申请字段 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `groupID` | `string` | 申请加入的群组 ID。 | +| `userID` | `string` | 申请人的用户 ID。 | +| `nickname` | `string` | 申请记录中的申请人昵称。 | +| `userFaceURL` | `string` | 申请记录中的申请人头像地址。 | +| `reqMsg` | `string` | 入群申请附言。 | +| `reqTime` | `number` | 申请时间。 | +| `joinSource` | `GroupJoinSource` | 入群申请来源。 | +| `handleResult` | `ApplicationHandleResult` | 当前处理结果。 | +| `handleUserID` | `string` | 处理申请的用户 ID。 | +| `handledMsg` | `string` | 处理申请时填写的说明。 | +| `handledTime` | `number` | 处理时间。 | +| `groupName` | `string` | 申请记录中的群组名称。 | +| `groupFaceURL` | `string` | 申请记录中的群组头像地址。 | +| `groupType` | `GroupType` | 群组类型。 | +| `ownerUserID` | `string` | 群主用户 ID。 | +| `creatorUserID` | `string` | 群组创建者用户 ID。 | +| `introduction` | `string` | 申请记录中的群组简介。 | +| `notification` | `string` | 申请记录中的群组公告。 | +| `memberCount` | `number` | 申请记录中的群成员数量。 | +| `status` | `GroupStatus` | 申请记录中的群组状态。 | +| `createTime` | `number` | 申请记录创建时间,Unix 毫秒时间戳。 | +| `ex` | `string` | 申请记录扩展字符串。 | + +申请记录中的昵称、头像和群组资料以记录创建时的内容为准。需要展示最新资料时,分别查询当前用户资料或群组资料。 + +## 监听入群申请变化 + +新增、处理或删除入群申请时,分别触发 `OnGroupApplicationAdded`、`OnGroupApplicationAccepted`、`OnGroupApplicationRejected` 或 `OnGroupApplicationDeleted`。事件回调直接接收 `GroupApplicationItem`: + +```ts +const handleApplicationChanged = (application: GroupApplicationItem) => { + // 按 groupID 和 userID 更新申请记录 +}; + +const handleApplicationDeleted = (application: GroupApplicationItem) => { + // 按 groupID 和 userID 删除申请记录 +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted); +``` + +退出登录、切换账号或销毁申请列表状态时,取消这些监听。 diff --git a/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx b/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx new file mode 100644 index 0000000000..a1f7052342 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx @@ -0,0 +1,29 @@ +--- +title: '获取未处理入群申请数' +description: '查询指定时间点之后未处理的入群申请数量。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/get-group-application-unhandled-count' +--- + +调用 `getGroupApplicationUnhandledCount()` 查询指定时间点之后仍未处理的入群申请数量。 + +```ts +const count = await OpenIMSDK.getGroupApplicationUnhandledCount({ + time: 0, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `time` | `number` | 是 | 统计起点的 Unix 毫秒时间戳;传 `0` 表示统计全部待处理申请。 | + +## 返回结果 + +调用完成后返回 `number`,表示指定时间点之后待处理的入群申请数量。 diff --git a/content/zh/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx b/content/zh/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx new file mode 100644 index 0000000000..806f528ae2 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx @@ -0,0 +1,31 @@ +--- +title: '拒绝入群申请' +description: '拒绝指定用户的入群申请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/group-applications/refuse-group-application' +--- + +调用 `refuseGroupApplication()` 拒绝指定用户的入群申请。 + +```ts +await OpenIMSDK.refuseGroupApplication({ + groupID: application.groupID, + fromUserID: application.userID, + handleMsg: '暂不接受该申请', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 申请对应的群组 ID。 | +| `fromUserID` | `string` | 是 | 申请人的用户 ID,对应申请记录的 `userID`。 | +| `handleMsg` | `string` | 是 | 拒绝原因;没有说明时传空字符串。 | + +调用完成后,入群申请已被拒绝。申请状态变化时会触发 `OnGroupApplicationRejected`,完整监听方式见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/join-group.mdx b/content/zh/docs/chat/sdk/react-native/group/join-group.mdx new file mode 100644 index 0000000000..7176943108 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/join-group.mdx @@ -0,0 +1,44 @@ +--- +title: '申请加入群组' +description: 'OpenIM React Native SDK 申请加入群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/join-group' +--- + +调用 `joinGroup()` 使用群组 ID、申请说明和加入途径发起入群请求。 + +```ts +await OpenIMSDK.joinGroup({ + groupID, + reqMsg: '申请加入项目讨论组', + joinSource: GroupJoinSource.Search, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `reqMsg` | `string` | 是 | 入群申请说明;没有说明时传空字符串。 | +| `joinSource` | `GroupJoinSource` | 是 | 发起入群的途径。 | +| `ex` | `string` | 否 | 业务扩展字符串。 | + +`joinSource` 常用值如下: + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `GroupJoinSource.Invitation` | `2` | 通过邀请加入。 | +| `GroupJoinSource.Search` | `3` | 通过搜索加入。 | +| `GroupJoinSource.QrCode` | `4` | 通过二维码加入。 | + +`joinSource` 只记录加入途径,不决定是否需要审核。 + +## 返回结果 + +调用完成后,入群请求已提交。当前账号成功加入群组后,会通过 `OnJoinedGroupAdded` 返回群组信息;事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx new file mode 100644 index 0000000000..64b6a11dc5 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx @@ -0,0 +1,31 @@ +--- +title: '设置群成员禁言' +description: '设置或解除指定群成员的禁言状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/change-group-member-mute' +--- + +调用 `changeGroupMemberMute()` 设置指定成员的禁言时长;传入 `0` 可解除禁言。 + +```ts +await OpenIMSDK.changeGroupMemberMute({ + groupID: 'group-001', + userID: 'user-002', + mutedSeconds: 3600, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userID` | `string` | 是 | 要设置禁言的成员用户 ID。 | +| `mutedSeconds` | `number` | 是 | 禁言时长,单位为秒;传 `0` 解除禁言。 | + +调用完成后,成员禁言状态已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`,可读取事件参数的 `muteEndTime` 获取禁言结束时间;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx new file mode 100644 index 0000000000..50f4d775e0 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx @@ -0,0 +1,31 @@ +--- +title: '邀请用户加入群组' +description: '邀请一个或多个用户加入指定群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/invite-user-to-group' +--- + +调用 `inviteUserToGroup()` 邀请一个或多个用户加入群组。 + +```ts +await OpenIMSDK.inviteUserToGroup({ + groupID: 'group-001', + reason: '邀请加入项目讨论组', + userIDList: ['user-002', 'user-003'], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `reason` | `string` | 是 | 邀请说明;没有说明时传空字符串。 | +| `userIDList` | `string[]` | 是 | 要邀请的用户 ID 数组。 | + +调用完成后,邀请请求已提交。当用户实际加入群组时,会触发 `OnGroupMemberAdded`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx new file mode 100644 index 0000000000..8dcc6cc4a7 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx @@ -0,0 +1,31 @@ +--- +title: '移除群成员' +description: '从指定群组移除一个或多个成员。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/kick-group-member' +--- + +调用 `kickGroupMember()` 从群组中移除一个或多个成员。 + +```ts +await OpenIMSDK.kickGroupMember({ + groupID: 'group-001', + reason: '已离开项目', + userIDList: ['user-002'], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `reason` | `string` | 是 | 移除原因;没有说明时传空字符串。 | +| `userIDList` | `string[]` | 是 | 要移除的成员用户 ID 数组。 | + +调用完成后,指定成员已被移出群组。成员移除时会触发 `OnGroupMemberDeleted`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx new file mode 100644 index 0000000000..2185c1d262 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx @@ -0,0 +1,33 @@ +--- +title: '更新群成员头像' +description: '更新指定成员在一个群组中的头像。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-avatar' +--- + +调用 `setGroupMemberInfo()` 更新指定成员的群内头像。 + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + faceURL: 'https://example.com/avatar.png', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userID` | `string` | 是 | 要更新头像的成员用户 ID。 | +| `faceURL` | `string` | 是 | 成员在该群组中的头像地址。 | + +群内头像只作用于指定群组。需要修改账号头像时,使用[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。 + +调用完成后,群内头像已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx new file mode 100644 index 0000000000..2ddb754339 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx @@ -0,0 +1,33 @@ +--- +title: '设置群成员扩展字段' +description: '设置指定群成员的扩展字符串。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-extension' +--- + +调用 `setGroupMemberInfo()` 设置指定成员的 `ex` 扩展字段。 + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + ex: JSON.stringify({ + title: 'maintainer', + }), +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userID` | `string` | 是 | 要设置扩展字段的成员用户 ID。 | +| `ex` | `string` | 是 | 群成员扩展字符串,可按业务需要传递 JSON 字符串或其他格式的字符串。 | + +调用完成后,成员扩展字段已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx new file mode 100644 index 0000000000..4dcecd684e --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx @@ -0,0 +1,33 @@ +--- +title: '修改群内昵称' +description: '修改指定成员在一个群组中的昵称。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-nickname' +--- + +调用 `setGroupMemberInfo()` 修改指定成员的群内昵称。 + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + nickname: '项目负责人', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userID` | `string` | 是 | 要修改昵称的成员用户 ID。 | +| `nickname` | `string` | 是 | 成员在该群组中的新昵称。 | + +群内昵称只作用于指定群组,不会修改用户的账号昵称。 + +调用完成后,群内昵称已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx new file mode 100644 index 0000000000..5baaea15a0 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx @@ -0,0 +1,39 @@ +--- +title: '设置管理员' +description: '设置或取消指定成员的管理员身份。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/set-group-member-role-level' +--- + +调用 `setGroupMemberInfo()` 设置指定成员为管理员,或取消其管理员身份。 + +```ts +await OpenIMSDK.setGroupMemberInfo({ + groupID: 'group-001', + userID: 'user-002', + roleLevel: GroupMemberRole.Admin, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userID` | `string` | 是 | 要设置角色的成员用户 ID。 | +| `roleLevel` | `GroupMemberRole` | 是 | 要设置的成员角色。 | + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `GroupMemberRole.Normal` | `20` | 普通成员;传入该值可取消管理员身份。 | +| `GroupMemberRole.Admin` | `60` | 管理员。 | +| `GroupMemberRole.Owner` | `100` | 群主角色,仅用于识别当前角色。 | + +不能通过设置 `GroupMemberRole.Owner` 转让群主,应使用[转让群主](/sdk/react-native/group/managing-group-members/transfer-group-owner)。 + +调用完成后,成员角色已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx new file mode 100644 index 0000000000..f6739e44da --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx @@ -0,0 +1,29 @@ +--- +title: '转让群主' +description: '将群主身份转让给另一名群成员。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/managing-group-members/transfer-group-owner' +--- + +调用 `transferGroupOwner()` 将群主身份转让给另一名群成员。 + +```ts +await OpenIMSDK.transferGroupOwner({ + groupID: 'group-001', + newOwnerUserID: 'user-002', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `newOwnerUserID` | `string` | 是 | 新群主的用户 ID,必须是该群组的成员。 | + +调用完成后,群主身份已转让。原群主和新群主的成员角色变化会通过 `OnGroupMemberInfoChanged` 通知;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/overview-group.mdx b/content/zh/docs/chat/sdk/react-native/group/overview-group.mdx new file mode 100644 index 0000000000..6d65697f1f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/overview-group.mdx @@ -0,0 +1,98 @@ +--- +title: '群组概览' +description: '了解 React Native SDK 中的群组资料、成员、入群申请和群组事件。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/overview-group' +--- + +OpenIM 的多人聊天由群组承载。在群组相关 API 中,使用 `groupID` 标识目标群组,例如查询群资料、管理群成员和处理入群申请。创建群组后,可从返回的群组信息中获取 `groupID`。群聊会话使用 `conversationID` 标识,用于会话设置、消息历史和未读状态等操作。`conversationID` 与 `groupID` 分别表示会话和群组,调用时不要混淆。 + +## 核心数据类型 + +| 类型 | 用途 | +| --- | --- | +| `GroupItem` | 群名称、头像、公告、群主、入群验证方式、成员数和扩展字段。 | +| `GroupMemberItem` | 用户在指定群内的昵称、角色、禁言状态和入群信息。 | + +群成员角色由 `GroupMemberRole` 表示:`Normal` 为普通成员,`Admin` 为管理员,`Owner` 为群主。 + +## `GroupItem` 常用字段 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `groupID` | `string` | 群组 ID。 | +| `groupName` | `string` | 群组名称。 | +| `notification` | `string` | 群组公告。 | +| `friendUserIDs` | `string` | 群组好友用户 ID 信息。 | +| `remark` | `string` | 当前账号设置的群组备注。 | + +## `GroupMemberItem` 常用字段 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `groupID` | `string` | 成员所属的群组 ID。 | +| `userID` | `string` | 成员用户 ID。 | +| `nickname` | `string` | 用户在当前群内的昵称。 | +| `faceURL` | `string` | 用户在当前群内的头像地址。 | +| `roleLevel` | `GroupMemberRole` | 成员角色。 | +| `muteEndTime` | `number` | 禁言结束时间。 | +| `joinTime` | `number` | 加入群组的时间。 | +| `joinSource` | `GroupJoinSource` | 入群来源。 | +| `inviterUserID` | `string` | 邀请该成员入群的用户 ID。 | +| `operatorUserID` | `string` | 最近操作该成员资料的用户 ID。 | +| `ex` | `string` | 群成员扩展字符串。 | + +`nickname`、`faceURL` 和 `roleLevel` 均属于当前群组中的成员资料;同一用户在其他群组中可能不同。 + +## 按任务查找页面 + +| 任务 | 页面 | +| --- | --- | +| 创建和维护群资料 | [创建群组](/sdk/react-native/group/create-group)、[更新群名称、简介和头像](/sdk/react-native/group/update-group-profile)、[发布或更新群公告](/sdk/react-native/group/set-group-announcement)、[设置群组扩展字段](/sdk/react-native/group/set-group-extension) | +| 设置入群和成员权限 | [设置入群验证方式](/sdk/react-native/group/set-group-join-verification)、[设置成员资料查看权限](/sdk/react-native/group/set-group-member-profile-access)、[设置群内添加好友权限](/sdk/react-native/group/set-group-member-friend-permission) | +| 加入、退出或解散群组 | [申请加入群组](/sdk/react-native/group/join-group)、[退出群组](/sdk/react-native/group/quit-group)、[解散群组](/sdk/react-native/group/dismiss-group) | +| 查询群组 | [查询指定群组资料](/sdk/react-native/group/retrieving-groups/get-specified-groups-info)、[分页获取已加入群组](/sdk/react-native/group/retrieving-groups/get-joined-group-list-page)、[搜索群组](/sdk/react-native/group/retrieving-groups/search-groups) | +| 查询和处理入群申请 | [获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)、[获取发出的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-applicant) | +| 查询和管理群成员 | [分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)、[邀请用户加入群组](/sdk/react-native/group/managing-group-members/invite-user-to-group)、[移除群成员](/sdk/react-native/group/managing-group-members/kick-group-member)、[设置管理员](/sdk/react-native/group/managing-group-members/set-group-member-role-level)、[转让群主](/sdk/react-native/group/managing-group-members/transfer-group-owner) | +| 管理群聊发言权限 | [设置群组全员禁言](/sdk/react-native/group/change-group-mute)、[设置群成员禁言](/sdk/react-native/group/managing-group-members/change-group-member-mute) | + +## 监听群组变化 + +当前账号加入或退出群组、群资料变化以及群组解散时,分别触发 `OnJoinedGroupAdded`、`OnJoinedGroupDeleted`、`OnGroupInfoChanged` 和 `OnGroupDismissed`。这些事件回调直接接收 `GroupItem`: + +```ts +const handleJoinedGroupAdded = (group: GroupItem) => { + // 将 group 添加到已加入群组列表 +}; + +const handleJoinedGroupDeleted = (group: GroupItem) => { + // 根据 group.groupID 从已加入群组列表删除群组 +}; + +const handleGroupInfoChanged = (group: GroupItem) => { + // 根据 group.groupID 更新群组资料 +}; + +const handleGroupDismissed = (group: GroupItem) => { + // 根据 group.groupID 关闭或移除已解散的群组 +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded); +OpenIMSDK.on(OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted); +OpenIMSDK.on(OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged); +OpenIMSDK.on(OpenIMEvent.OnGroupDismissed, handleGroupDismissed); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded); +OpenIMSDK.off(OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted); +OpenIMSDK.off(OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged); +OpenIMSDK.off(OpenIMEvent.OnGroupDismissed, handleGroupDismissed); +``` + +退出登录、切换账号或销毁群组相关状态时,取消这些监听。群成员变化的监听见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list),入群申请变化的监听见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/quit-group.mdx b/content/zh/docs/chat/sdk/react-native/group/quit-group.mdx new file mode 100644 index 0000000000..0bca544b39 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/quit-group.mdx @@ -0,0 +1,23 @@ +--- +title: '退出群组' +description: 'OpenIM React Native SDK 退出群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/quit-group' +--- + +调用 `quitGroup()` 退出当前账号已加入的群组。 + +```ts +await OpenIMSDK.quitGroup(groupID); +``` + +`groupID` 为要退出的群组 ID。群主如果要退出群组,需要先转让群主身份。 + +## 返回结果 + +调用完成后,当前账号已退出目标群组。当前账号成功退出群组后,会触发 `OnJoinedGroupDeleted`,回调参数为对应的群组信息;事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx new file mode 100644 index 0000000000..968522a4e7 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx @@ -0,0 +1,78 @@ +--- +title: '分页查询群成员' +description: '分页查询指定群组的成员。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/get-group-member-list' +--- + +调用 `getGroupMemberList()` 分页查询指定群组的成员,并按成员角色筛选。 + +```ts +const members = await OpenIMSDK.getGroupMemberList({ + groupID: 'group-001', + filter: GroupMemberFilter.All, + offset: 0, + count: 50, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `filter` | `GroupMemberFilter` | 是 | 成员角色筛选条件。 | +| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 | +| `count` | `number` | 是 | 本次读取的成员数量。 | + +`GroupMemberFilter` 的取值如下: + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `GroupMemberFilter.All` | `0` | 全部成员。 | +| `GroupMemberFilter.Owner` | `1` | 仅群主。 | +| `GroupMemberFilter.Admin` | `2` | 仅管理员。 | +| `GroupMemberFilter.Normal` | `3` | 仅普通成员。 | +| `GroupMemberFilter.AdminAndNormal` | `4` | 管理员和普通成员。 | +| `GroupMemberFilter.AdminAndOwner` | `5` | 管理员和群主。 | + +继续读取下一页时,将 `offset` 设置为已读取的成员数量。 + +## 返回结果 + +调用完成后返回当前页的 `GroupMemberItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。 + +## 监听群成员变化 + +成员加入、退出或资料变化时,分别触发 `OnGroupMemberAdded`、`OnGroupMemberDeleted` 和 `OnGroupMemberInfoChanged`。事件回调直接接收 `GroupMemberItem`: + +```ts +const handleMemberAdded = (member: GroupMemberItem) => { + // 将 member 添加到对应群组的成员列表 +}; + +const handleMemberDeleted = (member: GroupMemberItem) => { + // 根据 member.groupID 和 member.userID 删除成员 +}; + +const handleMemberChanged = (member: GroupMemberItem) => { + // 根据 member.groupID 和 member.userID 更新成员资料 +}; + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnGroupMemberAdded, handleMemberAdded); +OpenIMSDK.on(OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted); +OpenIMSDK.on(OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnGroupMemberAdded, handleMemberAdded); +OpenIMSDK.off(OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted); +OpenIMSDK.off(OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged); +``` + +退出登录、切换账号或销毁成员列表状态时,取消这些监听。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx new file mode 100644 index 0000000000..b2a7d0752e --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -0,0 +1,31 @@ +--- +title: '查询指定群成员资料' +description: '查询指定用户在目标群组中的成员资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info' +--- + +调用 `getSpecifiedGroupMembersInfo()` 查询指定用户在一个群组中的成员资料。 + +```ts +const members = await OpenIMSDK.getSpecifiedGroupMembersInfo({ + groupID: 'group-001', + userIDList: ['user-001', 'user-002'], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userIDList` | `string[]` | 是 | 要查询的成员用户 ID 数组。 | + +## 返回结果 + +调用完成后返回匹配的 `GroupMemberItem[]`,字段说明见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx new file mode 100644 index 0000000000..18e018a110 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx @@ -0,0 +1,31 @@ +--- +title: '查询用户入群状态' +description: '查询一组用户中哪些用户属于指定群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/get-users-in-group' +--- + +调用 `getUsersInGroup()` 查询指定用户中已加入目标群组的用户 ID。 + +```ts +const userIDs = await OpenIMSDK.getUsersInGroup({ + groupID: 'group-001', + userIDList: ['user-001', 'user-002', 'user-003'], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userIDList` | `string[]` | 是 | 要检查的用户 ID 数组。 | + +## 返回结果 + +调用完成后返回 `string[]`,其中包含已加入目标群组的用户 ID。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx new file mode 100644 index 0000000000..2d3cdc04b2 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx @@ -0,0 +1,39 @@ +--- +title: '搜索群成员' +description: '在指定群组中搜索成员。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-group-members/search-group-members' +--- + +调用 `searchGroupMembers()`,按用户 ID 或群内昵称搜索指定群组中的成员。 + +```ts +const members = await OpenIMSDK.searchGroupMembers({ + groupID: 'group-001', + keywordList: ['张'], + isSearchUserID: false, + isSearchMemberNickname: true, + offset: 0, + count: 50, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `keywordList` | `string[]` | 是 | 搜索关键词列表。 | +| `isSearchUserID` | `boolean` | 是 | 是否匹配用户 ID。 | +| `isSearchMemberNickname` | `boolean` | 是 | 是否匹配群内昵称。 | +| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 | +| `count` | `number` | 是 | 本次读取的成员数量。 | + +## 返回结果 + +调用完成后返回当前页匹配的 `GroupMemberItem[]`,字段说明见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx new file mode 100644 index 0000000000..54ab296f62 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx @@ -0,0 +1,33 @@ +--- +title: '分页获取已加入群组' +description: '分页查询当前账号已加入的群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/get-joined-group-list-page' +--- + +调用 `getJoinedGroupListPage()` 分页获取当前账号已加入的群组。 + +```ts +const groups = await OpenIMSDK.getJoinedGroupListPage({ + offset: 0, + count: 50, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 | +| `count` | `number` | 是 | 本次读取的群组数量。 | + +继续读取下一页时,将 `offset` 设置为已读取的群组数量。 + +## 返回结果 + +调用完成后返回当前页的 `GroupItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx new file mode 100644 index 0000000000..c3560941b8 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx @@ -0,0 +1,21 @@ +--- +title: '获取已加入群组' +description: '查询当前账号已加入的全部群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/get-joined-group-list' +--- + +调用 `getJoinedGroupList()` 获取当前账号已加入的全部群组。 + +```ts +const groups = await OpenIMSDK.getJoinedGroupList(); +``` + +## 返回结果 + +调用完成后返回 `GroupItem[]`。群组数量较多时,可使用[分页获取已加入群组](/sdk/react-native/group/retrieving-groups/get-joined-group-list-page)分批读取。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx new file mode 100644 index 0000000000..4c6aa4d520 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx @@ -0,0 +1,30 @@ +--- +title: '查询指定群组资料' +description: '按群组 ID 批量查询群组资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/get-specified-groups-info' +--- + +调用 `getSpecifiedGroupsInfo()`,根据群组 ID 查询指定群组的资料。 + +```ts +const groups = await OpenIMSDK.getSpecifiedGroupsInfo([ + 'group-001', + 'group-002', +]); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupIDs` | `string[]` | 是 | 要查询的群组 ID 数组。 | + +## 返回结果 + +调用完成后返回匹配的 `GroupItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx new file mode 100644 index 0000000000..fd1767a7d8 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx @@ -0,0 +1,27 @@ +--- +title: '检查是否已加入群组' +description: '检查当前账号是否已加入指定群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/is-join-group' +--- + +调用 `isJoinGroup()` 检查当前账号是否已加入指定群组。 + +```ts +const isJoined = await OpenIMSDK.isJoinGroup('group-001'); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 要检查的群组 ID。 | + +## 返回结果 + +调用完成后返回 `boolean`:`true` 表示当前账号已加入群组,`false` 表示尚未加入。 diff --git a/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx new file mode 100644 index 0000000000..b2abcc8089 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx @@ -0,0 +1,33 @@ +--- +title: '搜索群组' +description: '搜索当前账号可查询的群组。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/retrieving-groups/search-groups' +--- + +调用 `searchGroups()`,按群组 ID 或群名称搜索群组。 + +```ts +const groups = await OpenIMSDK.searchGroups({ + keywordList: ['项目'], + isSearchGroupID: false, + isSearchGroupName: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | 是 | 搜索关键词列表。 | +| `isSearchGroupID` | `boolean` | 是 | 是否匹配群组 ID。 | +| `isSearchGroupName` | `boolean` | 是 | 是否匹配群组名称。 | + +## 返回结果 + +调用完成后返回匹配的 `GroupItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/set-group-announcement.mdx b/content/zh/docs/chat/sdk/react-native/group/set-group-announcement.mdx new file mode 100644 index 0000000000..ab47b9396c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/set-group-announcement.mdx @@ -0,0 +1,26 @@ +--- +title: '发布或更新群公告' +description: 'OpenIM React Native SDK 发布群公告。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-announcement' +--- + +调用 `setGroupInfo()` 设置或更新群公告。 + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + notification: announcement, +}); +``` + +`groupID` 为目标群组 ID,`notification` 为公告内容。传入空字符串可以清空群公告;群公告与群简介 `introduction` 是两个独立字段。 + +## 返回结果 + +调用完成后,群公告已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/set-group-extension.mdx b/content/zh/docs/chat/sdk/react-native/group/set-group-extension.mdx new file mode 100644 index 0000000000..7f7780af27 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/set-group-extension.mdx @@ -0,0 +1,28 @@ +--- +title: '设置群组扩展字段' +description: 'OpenIM React Native SDK 设置群组扩展字段。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-extension' +--- + +调用 `setGroupInfo()` 设置群组的 `ex` 扩展字段。 + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + ex: JSON.stringify({ + projectID: 'project-42', + }), +}); +``` + +`groupID` 为目标群组 ID,`ex` 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 + +## 返回结果 + +调用完成后,群组扩展字段已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/set-group-join-verification.mdx b/content/zh/docs/chat/sdk/react-native/group/set-group-join-verification.mdx new file mode 100644 index 0000000000..0716dc5b33 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/set-group-join-verification.mdx @@ -0,0 +1,34 @@ +--- +title: '设置入群验证方式' +description: 'OpenIM React Native SDK 设置进群验证。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-join-verification' +--- + +调用 `setGroupInfo()` 设置申请和邀请用户加入群组时的验证方式。 + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + needVerification: GroupVerificationType.AllNeed, +}); +``` + +## 参数说明 + +`groupID` 为目标群组 ID,`needVerification` 使用 `GroupVerificationType`: + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `GroupVerificationType.ApplyNeedInviteNot` | `0` | 用户申请需要审核,群成员邀请可直接入群。 | +| `GroupVerificationType.AllNeed` | `1` | 用户申请和普通成员邀请都需要审核;群主或管理员邀请除外。 | +| `GroupVerificationType.AllNot` | `2` | 用户申请和邀请都可直接入群。 | + +## 返回结果 + +调用完成后,群组入群验证方式已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx b/content/zh/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx new file mode 100644 index 0000000000..13b7cd625e --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx @@ -0,0 +1,33 @@ +--- +title: '设置群内添加好友权限' +description: 'OpenIM React Native SDK 设置群成员好友申请权限。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-member-friend-permission' +--- + +调用 `setGroupInfo()` 设置是否允许群成员通过群组关系向其他成员发送好友申请。该设置只控制从群成员关系发起好友申请的入口,与[设置成员资料查看权限](/sdk/react-native/group/set-group-member-profile-access)相互独立。 + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + applyMemberFriend: AllowType.NotAllowed, +}); +``` + +## 参数说明 + +`groupID` 为目标群组 ID,`applyMemberFriend` 使用 `AllowType`: + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `AllowType.Allowed` | `0` | 允许通过群成员关系发起好友申请。 | +| `AllowType.NotAllowed` | `1` | 不允许通过群成员关系发起好友申请。 | + +## 返回结果 + +调用完成后,群内添加好友权限已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx b/content/zh/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx new file mode 100644 index 0000000000..fe276e6221 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx @@ -0,0 +1,33 @@ +--- +title: '设置成员资料查看权限' +description: 'OpenIM React Native SDK 设置群成员资料权限。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/set-group-member-profile-access' +--- + +调用 `setGroupInfo()` 设置群成员资料查看权限。该设置只控制群成员资料查看权限,与[设置群内添加好友权限](/sdk/react-native/group/set-group-member-friend-permission)相互独立。 + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + lookMemberInfo: AllowType.NotAllowed, +}); +``` + +## 参数说明 + +`groupID` 为目标群组 ID,`lookMemberInfo` 使用 `AllowType`: + +| 枚举值 | 数值 | 说明 | +| --- | --- | --- | +| `AllowType.Allowed` | `0` | 允许成员查看其他成员资料。 | +| `AllowType.NotAllowed` | `1` | 不允许成员查看其他成员资料。 | + +## 返回结果 + +调用完成后,群成员资料查看权限已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/react-native/group/update-group-profile.mdx b/content/zh/docs/chat/sdk/react-native/group/update-group-profile.mdx new file mode 100644 index 0000000000..36f88d92a6 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/group/update-group-profile.mdx @@ -0,0 +1,37 @@ +--- +title: '更新群名称、简介和头像' +description: 'OpenIM React Native SDK 更新群组资料。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/group/update-group-profile' +--- + +调用 `setGroupInfo()` 更新群名称、群简介或群头像。只传入本次需要修改的字段。 + +```ts +await OpenIMSDK.setGroupInfo({ + groupID, + groupName: groupName.trim(), + introduction: introduction.trim(), + faceURL, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 要更新的群组 ID。 | +| `groupName` | `string` | 否 | 新群名称。 | +| `introduction` | `string` | 否 | 新群简介。 | +| `faceURL` | `string` | 否 | 新群头像地址。 | + +除 `groupID` 外,至少传入一个需要修改的群资料字段,未传入的字段保持原值。 + +## 返回结果 + +调用完成后,群组资料已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。 diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index 0a36a6049b..7d08c78d70 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -6786,7 +6786,7 @@ { "sourcePath": "/sdk/react-native/user/friends/check-friend", "openimPath": "/sdk/react-native/user/friends/check-friend", - "title": "Check friendship", + "title": "Check friendship status", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friends/check-friend.mdx" @@ -6810,7 +6810,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/add-friend", "openimPath": "/sdk/react-native/user/friend-applications/add-friend", - "title": "Send a friend request", + "title": "Send a friend application", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx" @@ -6818,7 +6818,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", "openimPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", - "title": "Get received friend requests", + "title": "Get received friend applications", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx" @@ -6826,7 +6826,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", "openimPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", - "title": "Get sent friend requests", + "title": "Get sent friend applications", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx" @@ -6834,7 +6834,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", "openimPath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", - "title": "Get the unhandled friend-request count", + "title": "Get pending application count", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx" @@ -6842,7 +6842,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/accept-friend-application", "openimPath": "/sdk/react-native/user/friend-applications/accept-friend-application", - "title": "Accept a friend request", + "title": "Accept a friend application", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx" @@ -6850,7 +6850,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/refuse-friend-application", "openimPath": "/sdk/react-native/user/friend-applications/refuse-friend-application", - "title": "Reject a friend request", + "title": "Reject a friend application", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx" @@ -6858,7 +6858,7 @@ { "sourcePath": "/sdk/react-native/user/friend-applications/delete-friend-requests", "openimPath": "/sdk/react-native/user/friend-applications/delete-friend-requests", - "title": "Delete friend requests", + "title": "Delete friend applications", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx" @@ -6866,7 +6866,7 @@ { "sourcePath": "/sdk/react-native/user/blacklist/get-black-list", "openimPath": "/sdk/react-native/user/blacklist/get-black-list", - "title": "Get the blocklist", + "title": "Get the blacklist", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx" @@ -6874,7 +6874,7 @@ { "sourcePath": "/sdk/react-native/user/blacklist/add-black", "openimPath": "/sdk/react-native/user/blacklist/add-black", - "title": "Block a user", + "title": "Add a user to the blacklist", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx" @@ -6882,9 +6882,537 @@ { "sourcePath": "/sdk/react-native/user/blacklist/remove-black", "openimPath": "/sdk/react-native/user/blacklist/remove-black", - "title": "Unblock a user", + "title": "Remove a user from the blacklist", "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/overview-conversation", + "openimPath": "/sdk/react-native/conversation/overview-conversation", + "title": "Conversation overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "openimPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "openimPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "openimPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "openimPath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Retrieve the conversation list", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "openimPath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "openimPath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "openimPath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "openimPath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "openimPath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "openimPath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "openimPath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "openimPath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "openimPath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "openimPath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "Get groups for a conversation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx" + }, + { + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "openimPath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/overview-group", + "openimPath": "/sdk/react-native/group/overview-group", + "title": "Group overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/overview-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/create-group", + "openimPath": "/sdk/react-native/group/create-group", + "title": "Create a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/create-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/update-group-profile", + "openimPath": "/sdk/react-native/group/update-group-profile", + "title": "Update group profile", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/update-group-profile.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/set-group-announcement", + "openimPath": "/sdk/react-native/group/set-group-announcement", + "title": "Publish a group announcement", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-announcement.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/set-group-extension", + "openimPath": "/sdk/react-native/group/set-group-extension", + "title": "Set group extra data", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-extension.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/set-group-join-verification", + "openimPath": "/sdk/react-native/group/set-group-join-verification", + "title": "Set group join verification", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/set-group-member-profile-access", + "openimPath": "/sdk/react-native/group/set-group-member-profile-access", + "title": "Set member profile access", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/set-group-member-friend-permission", + "openimPath": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/change-group-mute", + "openimPath": "/sdk/react-native/group/change-group-mute", + "title": "Change group mute status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/change-group-mute.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/join-group", + "openimPath": "/sdk/react-native/group/join-group", + "title": "Apply to join a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/join-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/quit-group", + "openimPath": "/sdk/react-native/group/quit-group", + "title": "Leave a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/quit-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/dismiss-group", + "openimPath": "/sdk/react-native/group/dismiss-group", + "title": "Dismiss a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/dismiss-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "openimPath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "openimPath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "openimPath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "openimPath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-groups/search-groups", + "openimPath": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "Search groups", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "openimPath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "openimPath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "openimPath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "Get pending group application count", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/group-applications/accept-group-application", + "openimPath": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "Accept a group application", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/group-applications/refuse-group-application", + "openimPath": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/group-applications/delete-group-requests", + "openimPath": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "openimPath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "Get group members", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "openimPath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get group member profiles", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "openimPath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "Check users in a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "openimPath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "openimPath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "openimPath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "openimPath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "Update a group nickname", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "openimPath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "openimPath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member avatar", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "openimPath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "Set group member extra data", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "openimPath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx" + }, + { + "sourcePath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "openimPath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx" } ] diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index 981f8d8a4b..ae807967cf 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -48,7 +48,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/overview-user", @@ -84,7 +86,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/profile/get-users-info", @@ -95,7 +99,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getUsersInfo"], + "sdkMethods": [ + "getUsersInfo" + ], "sdkEvents": [], "locales": { "zh": { @@ -124,7 +130,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/profile/get-self-user-info", @@ -135,7 +143,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getSelfUserInfo"], + "sdkMethods": [ + "getSelfUserInfo" + ], "sdkEvents": [], "locales": { "zh": { @@ -164,7 +174,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/profile/set-self-info", @@ -175,8 +187,12 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setSelfInfo"], - "sdkEvents": ["OnSelfInfoUpdated"], + "sdkMethods": [ + "setSelfInfo" + ], + "sdkEvents": [ + "OnSelfInfoUpdated" + ], "locales": { "zh": { "reviewStatus": "published", @@ -204,7 +220,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/profile/set-global-message-reception", @@ -244,7 +262,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/profile/set-friend-add-permission", @@ -284,7 +304,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/online-status/subscribe-users-status", @@ -295,8 +317,12 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["subscribeUsersStatus"], - "sdkEvents": ["OnUserStatusChanged"], + "sdkMethods": [ + "subscribeUsersStatus" + ], + "sdkEvents": [ + "OnUserStatusChanged" + ], "locales": { "zh": { "reviewStatus": "published", @@ -324,7 +350,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/online-status/get-subscribe-users-status", @@ -335,7 +363,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getSubscribeUsersStatus"], + "sdkMethods": [ + "getSubscribeUsersStatus" + ], "sdkEvents": [], "locales": { "zh": { @@ -364,7 +394,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/online-status/unsubscribe-users-status", @@ -375,7 +407,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["unsubscribeUsersStatus"], + "sdkMethods": [ + "unsubscribeUsersStatus" + ], "sdkEvents": [], "locales": { "zh": { @@ -404,7 +438,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/overview-relationships", @@ -440,7 +476,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friends/get-friend-list-page", @@ -451,8 +489,14 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getFriendListPage"], - "sdkEvents": ["OnFriendInfoChanged", "OnFriendAdded", "OnFriendDeleted"], + "sdkMethods": [ + "getFriendListPage" + ], + "sdkEvents": [ + "OnFriendInfoChanged", + "OnFriendAdded", + "OnFriendDeleted" + ], "locales": { "zh": { "reviewStatus": "published", @@ -480,7 +524,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friends/search-friends", @@ -491,7 +537,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["searchFriends"], + "sdkMethods": [ + "searchFriends" + ], "sdkEvents": [], "locales": { "zh": { @@ -520,7 +568,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friends/get-specified-friends-info", @@ -531,7 +581,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getSpecifiedFriendsInfo"], + "sdkMethods": [ + "getSpecifiedFriendsInfo" + ], "sdkEvents": [], "locales": { "zh": { @@ -560,7 +612,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friends/check-friend", @@ -571,7 +625,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["checkFriend"], + "sdkMethods": [ + "checkFriend" + ], "sdkEvents": [], "locales": { "zh": { @@ -600,7 +656,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friends/update-friends", @@ -611,7 +669,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["updateFriends"], + "sdkMethods": [ + "updateFriends" + ], "sdkEvents": [], "locales": { "zh": { @@ -640,7 +700,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friends/delete-friend", @@ -651,7 +713,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["deleteFriend"], + "sdkMethods": [ + "deleteFriend" + ], "sdkEvents": [], "locales": { "zh": { @@ -680,7 +744,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/add-friend", @@ -691,7 +757,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["addFriend"], + "sdkMethods": [ + "addFriend" + ], "sdkEvents": [], "locales": { "zh": { @@ -720,7 +788,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", @@ -731,7 +801,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getFriendApplicationListAsRecipient"], + "sdkMethods": [ + "getFriendApplicationListAsRecipient" + ], "sdkEvents": [ "OnFriendApplicationAccepted", "OnFriendApplicationAdded", @@ -765,7 +837,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", @@ -776,7 +850,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getFriendApplicationListAsApplicant"], + "sdkMethods": [ + "getFriendApplicationListAsApplicant" + ], "sdkEvents": [], "locales": { "zh": { @@ -805,7 +881,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", @@ -816,7 +894,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getFriendApplicationUnhandledCount"], + "sdkMethods": [ + "getFriendApplicationUnhandledCount" + ], "sdkEvents": [], "locales": { "zh": { @@ -845,7 +925,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/accept-friend-application", @@ -856,7 +938,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["acceptFriendApplication"], + "sdkMethods": [ + "acceptFriendApplication" + ], "sdkEvents": [], "locales": { "zh": { @@ -885,7 +969,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/refuse-friend-application", @@ -896,7 +982,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["refuseFriendApplication"], + "sdkMethods": [ + "refuseFriendApplication" + ], "sdkEvents": [], "locales": { "zh": { @@ -925,7 +1013,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/friend-applications/delete-friend-requests", @@ -936,7 +1026,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["deleteFriendRequests"], + "sdkMethods": [ + "deleteFriendRequests" + ], "sdkEvents": [], "locales": { "zh": { @@ -965,7 +1057,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/blacklist/get-black-list", @@ -976,8 +1070,13 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getBlackList"], - "sdkEvents": ["OnBlackAdded", "OnBlackDeleted"], + "sdkMethods": [ + "getBlackList" + ], + "sdkEvents": [ + "OnBlackAdded", + "OnBlackDeleted" + ], "locales": { "zh": { "reviewStatus": "published", @@ -1005,7 +1104,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/blacklist/add-black", @@ -1016,7 +1117,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["addBlack"], + "sdkMethods": [ + "addBlack" + ], "sdkEvents": [], "locales": { "zh": { @@ -1045,7 +1148,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/user/blacklist/remove-black", @@ -1056,7 +1161,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["removeBlack"], + "sdkMethods": [ + "removeBlack" + ], "sdkEvents": [], "locales": { "zh": { @@ -1085,7 +1192,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。"] + "notes": [ + "2026-08-21:按 React Native SDK 固定提交核对公开方法、事件和页面示例。" + ] }, { "currentPath": "/sdk/react-native/conversation/overview-conversation", @@ -1121,7 +1230,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对会话模型和导航链接,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对会话模型和导航链接,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", @@ -1132,7 +1243,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getOneConversation"], + "sdkMethods": [ + "getOneConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1174,7 +1287,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getConversationIDBySessionType"], + "sdkMethods": [ + "getConversationIDBySessionType" + ], "sdkEvents": [], "locales": { "zh": { @@ -1216,7 +1331,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getMultipleConversation"], + "sdkMethods": [ + "getMultipleConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1258,8 +1375,13 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getConversationListSplit"], - "sdkEvents": ["OnNewConversation", "OnConversationChanged"], + "sdkMethods": [ + "getConversationListSplit" + ], + "sdkEvents": [ + "OnNewConversation", + "OnConversationChanged" + ], "locales": { "zh": { "reviewStatus": "published", @@ -1287,7 +1409,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", @@ -1298,7 +1422,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["pinConversation"], + "sdkMethods": [ + "pinConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1340,7 +1466,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversation"], + "sdkMethods": [ + "setConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1382,7 +1510,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversation"], + "sdkMethods": [ + "setConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1424,7 +1554,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversation"], + "sdkMethods": [ + "setConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1466,7 +1598,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversationDraft"], + "sdkMethods": [ + "setConversationDraft" + ], "sdkEvents": [], "locales": { "zh": { @@ -1508,7 +1642,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversationRecvMessageOpt"], + "sdkMethods": [ + "setConversationRecvMessageOpt" + ], "sdkEvents": [], "locales": { "zh": { @@ -1550,7 +1686,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["resetConversationGroupAtType"], + "sdkMethods": [ + "resetConversationGroupAtType" + ], "sdkEvents": [], "locales": { "zh": { @@ -1592,7 +1730,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["markConversationMessageAsRead"], + "sdkMethods": [ + "markConversationMessageAsRead" + ], "sdkEvents": [], "locales": { "zh": { @@ -1634,8 +1774,12 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getTotalUnreadMsgCount"], - "sdkEvents": ["OnTotalUnreadMessageCountChanged"], + "sdkMethods": [ + "getTotalUnreadMsgCount" + ], + "sdkEvents": [ + "OnTotalUnreadMessageCountChanged" + ], "locales": { "zh": { "reviewStatus": "published", @@ -1676,7 +1820,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversation"], + "sdkMethods": [ + "setConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1718,7 +1864,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversation"], + "sdkMethods": [ + "setConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1760,7 +1908,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversation"], + "sdkMethods": [ + "setConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1802,7 +1952,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["hideConversation"], + "sdkMethods": [ + "hideConversation" + ], "sdkEvents": [], "locales": { "zh": { @@ -1844,7 +1996,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["hideAllConversations"], + "sdkMethods": [ + "hideAllConversations" + ], "sdkEvents": [], "locales": { "zh": { @@ -1886,7 +2040,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["deleteConversationAndDeleteAllMsg"], + "sdkMethods": [ + "deleteConversationAndDeleteAllMsg" + ], "sdkEvents": [], "locales": { "zh": { @@ -1928,7 +2084,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["clearConversationAndDeleteAllMsg"], + "sdkMethods": [ + "clearConversationAndDeleteAllMsg" + ], "sdkEvents": [], "locales": { "zh": { @@ -2005,7 +2163,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对分组模型、事件和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对分组模型、事件和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", @@ -2016,7 +2176,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["createConversationGroup"], + "sdkMethods": [ + "createConversationGroup" + ], "sdkEvents": [], "locales": { "zh": { @@ -2045,7 +2207,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", @@ -2056,7 +2220,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getConversationGroups"], + "sdkMethods": [ + "getConversationGroups" + ], "sdkEvents": [], "locales": { "zh": { @@ -2085,7 +2251,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", @@ -2096,7 +2264,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getConversationGroupInfoWithConversations"], + "sdkMethods": [ + "getConversationGroupInfoWithConversations" + ], "sdkEvents": [], "locales": { "zh": { @@ -2125,7 +2295,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 RN 返回类型和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 RN 返回类型和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", @@ -2136,7 +2308,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["getConversationGroupByConversationID"], + "sdkMethods": [ + "getConversationGroupByConversationID" + ], "sdkEvents": [], "locales": { "zh": { @@ -2165,7 +2339,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", @@ -2176,7 +2352,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["updateConversationGroup"], + "sdkMethods": [ + "updateConversationGroup" + ], "sdkEvents": [], "locales": { "zh": { @@ -2205,7 +2383,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API 和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", @@ -2216,7 +2396,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["setConversationGroupOrder"], + "sdkMethods": [ + "setConversationGroupOrder" + ], "sdkEvents": [], "locales": { "zh": { @@ -2245,7 +2427,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", @@ -2256,7 +2440,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["addConversationsToGroups"], + "sdkMethods": [ + "addConversationsToGroups" + ], "sdkEvents": [], "locales": { "zh": { @@ -2285,7 +2471,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", @@ -2296,7 +2484,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["removeConversationsFromGroups"], + "sdkMethods": [ + "removeConversationsFromGroups" + ], "sdkEvents": [], "locales": { "zh": { @@ -2325,7 +2515,9 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" + ] }, { "currentPath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", @@ -2336,7 +2528,9 @@ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" ], - "sdkMethods": ["deleteConversationGroup"], + "sdkMethods": [ + "deleteConversationGroup" + ], "sdkEvents": [], "locales": { "zh": { @@ -2365,7 +2559,1551 @@ } }, "redirectTo": null, - "notes": ["2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。"] + "notes": [ + "2026-08-21:已按 React Native SDK 固定提交核对 API、事件和示例,中文正文已补充;英文正文延后。" + ] + }, + { + "currentPath": "/sdk/react-native/group/overview-group", + "targetPath": "/sdk/react-native/group/overview-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [ + "OnJoinedGroupAdded", + "OnJoinedGroupDeleted", + "OnGroupInfoChanged", + "OnGroupDismissed" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对群组模型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/create-group", + "targetPath": "/sdk/react-native/group/create-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/update-group-profile", + "targetPath": "/sdk/react-native/group/update-group-profile", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setGroupInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/set-group-announcement", + "targetPath": "/sdk/react-native/group/set-group-announcement", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/set-group-extension", + "targetPath": "/sdk/react-native/group/set-group-extension", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/set-group-join-verification", + "targetPath": "/sdk/react-native/group/set-group-join-verification", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/set-group-member-profile-access", + "targetPath": "/sdk/react-native/group/set-group-member-profile-access", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/set-group-member-friend-permission", + "targetPath": "/sdk/react-native/group/set-group-member-friend-permission", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/change-group-mute", + "targetPath": "/sdk/react-native/group/change-group-mute", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "changeGroupMute" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/join-group", + "targetPath": "/sdk/react-native/group/join-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "joinGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/quit-group", + "targetPath": "/sdk/react-native/group/quit-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "quitGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/dismiss-group", + "targetPath": "/sdk/react-native/group/dismiss-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "dismissGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:已建立 React Native 群组文档结构,正文待补充。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "targetPath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getSpecifiedGroupsInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "targetPath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getJoinedGroupList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "targetPath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getJoinedGroupListPage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "targetPath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "isJoinGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-groups/search-groups", + "targetPath": "/sdk/react-native/group/retrieving-groups/search-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "searchGroups" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "targetPath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getGroupApplicationListAsRecipient" + ], + "sdkEvents": [ + "OnGroupApplicationAccepted", + "OnGroupApplicationAdded", + "OnGroupApplicationDeleted", + "OnGroupApplicationRejected" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "targetPath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getGroupApplicationListAsApplicant" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "targetPath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getGroupApplicationUnhandledCount" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/group-applications/accept-group-application", + "targetPath": "/sdk/react-native/group/group-applications/accept-group-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "acceptGroupApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/group-applications/refuse-group-application", + "targetPath": "/sdk/react-native/group/group-applications/refuse-group-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "refuseGroupApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/group-applications/delete-group-requests", + "targetPath": "/sdk/react-native/group/group-applications/delete-group-requests", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteGroupRequests" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-24", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-24:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "targetPath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getGroupMemberList" + ], + "sdkEvents": [ + "OnGroupMemberAdded", + "OnGroupMemberDeleted", + "OnGroupMemberInfoChanged" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型、事件和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "targetPath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getSpecifiedGroupMembersInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "targetPath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getUsersInGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "targetPath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "searchGroupMembers" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "targetPath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "inviteUserToGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "targetPath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "kickGroupMember" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "targetPath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setGroupMemberInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "targetPath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setGroupMemberInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "targetPath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setGroupMemberInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "targetPath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setGroupMemberInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "targetPath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "transferGroupOwner" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] + }, + { + "currentPath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "targetPath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "changeGroupMemberMute" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-25", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" + ] } ] } diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json index b59abb0fdf..964591d392 100644 --- a/data/structure/react-native-navigation-labels.json +++ b/data/structure/react-native-navigation-labels.json @@ -44,6 +44,49 @@ "Add a user to the blacklist": "将用户加入黑名单", "Unblock a user": "将用户移出黑名单", "Remove a user from the blacklist": "将用户移出黑名单", + "Group": "群组", + "Group profile and settings": "群资料与设置", + "Group permissions": "群权限与管理", + "Joining and leaving groups": "加入、退出与解散群组", + "Retrieving groups": "查询群组", + "Group applications": "入群申请", + "Retrieving group members": "查询群成员", + "Managing group members": "管理群成员", + "Group overview": "群组概览", + "Create a group": "创建群组", + "Update group profile": "更新群名称、简介和头像", + "Publish a group announcement": "发布或更新群公告", + "Set group extra data": "设置群组扩展字段", + "Set group join verification": "设置入群验证方式", + "Set member profile access": "设置成员资料查看权限", + "Set member friend request permission": "设置群内添加好友权限", + "Change group mute status": "设置群组全员禁言", + "Apply to join a group": "申请加入群组", + "Leave a group": "退出群组", + "Dismiss a group": "解散群组", + "Get group information": "查询指定群组资料", + "Get joined groups": "获取已加入群组", + "Get joined groups by page": "分页获取已加入群组", + "Check group membership": "检查是否已加入群组", + "Search groups": "搜索群组", + "Get received group applications": "获取收到的入群申请", + "Get sent group applications": "获取发出的入群申请", + "Get pending group application count": "获取未处理入群申请数", + "Accept a group application": "接受入群申请", + "Reject a group application": "拒绝入群申请", + "Delete group applications": "删除入群申请", + "Get group members": "分页查询群成员", + "Get group member profiles": "查询指定群成员资料", + "Check users in a group": "查询用户入群状态", + "Search group members": "搜索群成员", + "Invite users to a group": "邀请用户加入群组", + "Remove group members": "移除群成员", + "Update a group nickname": "修改群内昵称", + "Manage group administrators": "设置管理员", + "Update a group member avatar": "更新群成员头像", + "Set group member extra data": "设置群成员扩展字段", + "Transfer group ownership": "转让群主", + "Mute or unmute a group member": "设置群成员禁言", "Conversation": "会话", "Retrieving conversations": "获取会话", "Conversation organization": "会话管理", diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index 1e83a3d24c..fc531ba6f8 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -316,6 +316,195 @@ ] } ] + }, + { + "id": "group", + "title": "Group", + "children": [ + { + "path": "/sdk/react-native/group/overview-group", + "navigationTitle": "Group overview" + }, + { + "id": "group/profile-and-settings", + "title": "Group profile and settings", + "children": [ + { + "path": "/sdk/react-native/group/create-group", + "navigationTitle": "Create a group" + }, + { + "path": "/sdk/react-native/group/update-group-profile", + "navigationTitle": "Update group profile" + }, + { + "path": "/sdk/react-native/group/set-group-announcement", + "navigationTitle": "Publish a group announcement" + }, + { + "path": "/sdk/react-native/group/set-group-extension", + "navigationTitle": "Set group extra data" + } + ] + }, + { + "id": "group/permissions", + "title": "Group permissions", + "children": [ + { + "path": "/sdk/react-native/group/set-group-join-verification", + "navigationTitle": "Set group join verification" + }, + { + "path": "/sdk/react-native/group/set-group-member-profile-access", + "navigationTitle": "Set member profile access" + }, + { + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "navigationTitle": "Set member friend request permission" + }, + { + "path": "/sdk/react-native/group/change-group-mute", + "navigationTitle": "Change group mute status" + } + ] + }, + { + "id": "group/joining-and-leaving", + "title": "Joining and leaving groups", + "children": [ + { + "path": "/sdk/react-native/group/join-group", + "navigationTitle": "Apply to join a group" + }, + { + "path": "/sdk/react-native/group/quit-group", + "navigationTitle": "Leave a group" + }, + { + "path": "/sdk/react-native/group/dismiss-group", + "navigationTitle": "Dismiss a group" + } + ] + }, + { + "id": "group/retrieving-groups", + "title": "Retrieving groups", + "children": [ + { + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "navigationTitle": "Get group information" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "navigationTitle": "Get joined groups" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "navigationTitle": "Get joined groups by page" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "navigationTitle": "Check group membership" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "navigationTitle": "Search groups" + } + ] + }, + { + "id": "group/group-applications", + "title": "Group applications", + "children": [ + { + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "navigationTitle": "Get received group applications" + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "navigationTitle": "Get sent group applications" + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "navigationTitle": "Get pending group application count" + }, + { + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "navigationTitle": "Accept a group application" + }, + { + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "navigationTitle": "Reject a group application" + }, + { + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "navigationTitle": "Delete group applications", + "edition": "enterprise" + } + ] + }, + { + "id": "group/retrieving-group-members", + "title": "Retrieving group members", + "children": [ + { + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "navigationTitle": "Get group members" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "navigationTitle": "Get group member profiles" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "navigationTitle": "Check users in a group" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "navigationTitle": "Search group members" + } + ] + }, + { + "id": "group/managing-group-members", + "title": "Managing group members", + "children": [ + { + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "navigationTitle": "Invite users to a group" + }, + { + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "navigationTitle": "Remove group members" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "navigationTitle": "Update a group nickname" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "navigationTitle": "Manage group administrators" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "navigationTitle": "Update a group member avatar" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "navigationTitle": "Set group member extra data" + }, + { + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "navigationTitle": "Transfer group ownership" + }, + { + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "navigationTitle": "Mute or unmute a group member" + } + ] + } + ] } ] } diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 9a677e187e..4a738d7fae 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -10760,9 +10760,439 @@ } ], "minIndex": 546 + }, + { + "id": "group", + "segment": "group", + "title": "Group", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/overview-group", + "segment": "overview-group", + "title": "Group overview", + "href": "/sdk/react-native/group/overview-group", + "type": "page", + "children": [], + "minIndex": 577, + "navigationTitle": "Group overview" + }, + { + "id": "group/profile-and-settings", + "segment": "profile-and-settings", + "title": "Group profile and settings", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/create-group", + "segment": "create-group", + "title": "Create a group", + "href": "/sdk/react-native/group/create-group", + "type": "page", + "children": [], + "minIndex": 578, + "navigationTitle": "Create a group" + }, + { + "id": "group/update-group-profile", + "segment": "update-group-profile", + "title": "Update group profile", + "href": "/sdk/react-native/group/update-group-profile", + "type": "page", + "children": [], + "minIndex": 579, + "navigationTitle": "Update group profile" + }, + { + "id": "group/set-group-announcement", + "segment": "set-group-announcement", + "title": "Publish a group announcement", + "href": "/sdk/react-native/group/set-group-announcement", + "type": "page", + "children": [], + "minIndex": 580, + "navigationTitle": "Publish a group announcement" + }, + { + "id": "group/set-group-extension", + "segment": "set-group-extension", + "title": "Set group extra data", + "href": "/sdk/react-native/group/set-group-extension", + "type": "page", + "children": [], + "minIndex": 581, + "navigationTitle": "Set group extra data" + } + ], + "minIndex": 578 + }, + { + "id": "group/permissions", + "segment": "permissions", + "title": "Group permissions", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/set-group-join-verification", + "segment": "set-group-join-verification", + "title": "Set group join verification", + "href": "/sdk/react-native/group/set-group-join-verification", + "type": "page", + "children": [], + "minIndex": 582, + "navigationTitle": "Set group join verification" + }, + { + "id": "group/set-group-member-profile-access", + "segment": "set-group-member-profile-access", + "title": "Set member profile access", + "href": "/sdk/react-native/group/set-group-member-profile-access", + "type": "page", + "children": [], + "minIndex": 583, + "navigationTitle": "Set member profile access" + }, + { + "id": "group/set-group-member-friend-permission", + "segment": "set-group-member-friend-permission", + "title": "Set member friend request permission", + "href": "/sdk/react-native/group/set-group-member-friend-permission", + "type": "page", + "children": [], + "minIndex": 584, + "navigationTitle": "Set member friend request permission" + }, + { + "id": "group/change-group-mute", + "segment": "change-group-mute", + "title": "Change group mute status", + "href": "/sdk/react-native/group/change-group-mute", + "type": "page", + "children": [], + "minIndex": 585, + "navigationTitle": "Change group mute status" + } + ], + "minIndex": 582 + }, + { + "id": "group/joining-and-leaving", + "segment": "joining-and-leaving", + "title": "Joining and leaving groups", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/join-group", + "segment": "join-group", + "title": "Apply to join a group", + "href": "/sdk/react-native/group/join-group", + "type": "page", + "children": [], + "minIndex": 586, + "navigationTitle": "Apply to join a group" + }, + { + "id": "group/quit-group", + "segment": "quit-group", + "title": "Leave a group", + "href": "/sdk/react-native/group/quit-group", + "type": "page", + "children": [], + "minIndex": 587, + "navigationTitle": "Leave a group" + }, + { + "id": "group/dismiss-group", + "segment": "dismiss-group", + "title": "Dismiss a group", + "href": "/sdk/react-native/group/dismiss-group", + "type": "page", + "children": [], + "minIndex": 588, + "navigationTitle": "Dismiss a group" + } + ], + "minIndex": 586 + }, + { + "id": "group/retrieving-groups", + "segment": "retrieving-groups", + "title": "Retrieving groups", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/retrieving-groups/get-specified-groups-info", + "segment": "get-specified-groups-info", + "title": "Get group information", + "href": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "type": "page", + "children": [], + "minIndex": 589, + "navigationTitle": "Get group information" + }, + { + "id": "group/retrieving-groups/get-joined-group-list", + "segment": "get-joined-group-list", + "title": "Get joined groups", + "href": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "type": "page", + "children": [], + "minIndex": 590, + "navigationTitle": "Get joined groups" + }, + { + "id": "group/retrieving-groups/get-joined-group-list-page", + "segment": "get-joined-group-list-page", + "title": "Get joined groups by page", + "href": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "type": "page", + "children": [], + "minIndex": 591, + "navigationTitle": "Get joined groups by page" + }, + { + "id": "group/retrieving-groups/is-join-group", + "segment": "is-join-group", + "title": "Check group membership", + "href": "/sdk/react-native/group/retrieving-groups/is-join-group", + "type": "page", + "children": [], + "minIndex": 592, + "navigationTitle": "Check group membership" + }, + { + "id": "group/retrieving-groups/search-groups", + "segment": "search-groups", + "title": "Search groups", + "href": "/sdk/react-native/group/retrieving-groups/search-groups", + "type": "page", + "children": [], + "minIndex": 593, + "navigationTitle": "Search groups" + } + ], + "minIndex": 589 + }, + { + "id": "group/group-applications", + "segment": "group-applications", + "title": "Group applications", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/group-applications/get-group-application-list-as-recipient", + "segment": "get-group-application-list-as-recipient", + "title": "Get received group applications", + "href": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "type": "page", + "children": [], + "minIndex": 594, + "navigationTitle": "Get received group applications" + }, + { + "id": "group/group-applications/get-group-application-list-as-applicant", + "segment": "get-group-application-list-as-applicant", + "title": "Get sent group applications", + "href": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "type": "page", + "children": [], + "minIndex": 595, + "navigationTitle": "Get sent group applications" + }, + { + "id": "group/group-applications/get-group-application-unhandled-count", + "segment": "get-group-application-unhandled-count", + "title": "Get pending group application count", + "href": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "type": "page", + "children": [], + "minIndex": 596, + "navigationTitle": "Get pending group application count" + }, + { + "id": "group/group-applications/accept-group-application", + "segment": "accept-group-application", + "title": "Accept a group application", + "href": "/sdk/react-native/group/group-applications/accept-group-application", + "type": "page", + "children": [], + "minIndex": 597, + "navigationTitle": "Accept a group application" + }, + { + "id": "group/group-applications/refuse-group-application", + "segment": "refuse-group-application", + "title": "Reject a group application", + "href": "/sdk/react-native/group/group-applications/refuse-group-application", + "type": "page", + "children": [], + "minIndex": 598, + "navigationTitle": "Reject a group application" + }, + { + "id": "group/group-applications/delete-group-requests", + "segment": "delete-group-requests", + "title": "Delete group applications", + "href": "/sdk/react-native/group/group-applications/delete-group-requests", + "type": "page", + "children": [], + "minIndex": 599, + "navigationTitle": "Delete group applications" + } + ], + "minIndex": 594 + }, + { + "id": "group/retrieving-group-members", + "segment": "retrieving-group-members", + "title": "Retrieving group members", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/retrieving-group-members/get-group-member-list", + "segment": "get-group-member-list", + "title": "Get group members", + "href": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "type": "page", + "children": [], + "minIndex": 600, + "navigationTitle": "Get group members" + }, + { + "id": "group/retrieving-group-members/get-specified-group-members-info", + "segment": "get-specified-group-members-info", + "title": "Get group member profiles", + "href": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "type": "page", + "children": [], + "minIndex": 601, + "navigationTitle": "Get group member profiles" + }, + { + "id": "group/retrieving-group-members/get-users-in-group", + "segment": "get-users-in-group", + "title": "Check users in a group", + "href": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "type": "page", + "children": [], + "minIndex": 602, + "navigationTitle": "Check users in a group" + }, + { + "id": "group/retrieving-group-members/search-group-members", + "segment": "search-group-members", + "title": "Search group members", + "href": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "type": "page", + "children": [], + "minIndex": 603, + "navigationTitle": "Search group members" + } + ], + "minIndex": 600 + }, + { + "id": "group/managing-group-members", + "segment": "managing-group-members", + "title": "Managing group members", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/managing-group-members/invite-user-to-group", + "segment": "invite-user-to-group", + "title": "Invite users to a group", + "href": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "type": "page", + "children": [], + "minIndex": 604, + "navigationTitle": "Invite users to a group" + }, + { + "id": "group/managing-group-members/kick-group-member", + "segment": "kick-group-member", + "title": "Remove group members", + "href": "/sdk/react-native/group/managing-group-members/kick-group-member", + "type": "page", + "children": [], + "minIndex": 605, + "navigationTitle": "Remove group members" + }, + { + "id": "group/managing-group-members/set-group-member-nickname", + "segment": "set-group-member-nickname", + "title": "Update a group nickname", + "href": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "type": "page", + "children": [], + "minIndex": 606, + "navigationTitle": "Update a group nickname" + }, + { + "id": "group/managing-group-members/set-group-member-role-level", + "segment": "set-group-member-role-level", + "title": "Manage group administrators", + "href": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "type": "page", + "children": [], + "minIndex": 607, + "navigationTitle": "Manage group administrators" + }, + { + "id": "group/managing-group-members/set-group-member-avatar", + "segment": "set-group-member-avatar", + "title": "Update a group member avatar", + "href": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "type": "page", + "children": [], + "minIndex": 608, + "navigationTitle": "Update a group member avatar" + }, + { + "id": "group/managing-group-members/set-group-member-extension", + "segment": "set-group-member-extension", + "title": "Set group member extra data", + "href": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "type": "page", + "children": [], + "minIndex": 609, + "navigationTitle": "Set group member extra data" + }, + { + "id": "group/managing-group-members/transfer-group-owner", + "segment": "transfer-group-owner", + "title": "Transfer group ownership", + "href": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "type": "page", + "children": [], + "minIndex": 610, + "navigationTitle": "Transfer group ownership" + }, + { + "id": "group/managing-group-members/change-group-member-mute", + "segment": "change-group-member-mute", + "title": "Mute or unmute a group member", + "href": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "type": "page", + "children": [], + "minIndex": 611, + "navigationTitle": "Mute or unmute a group member" + } + ], + "minIndex": 604 + } + ], + "minIndex": 577 } ], - "pageCount": 58, + "pageCount": 93, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index 0625b52bb9..ae94ef9477 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,8 +1,8 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 58, - "manualPageCount": 58, + "pageCount": 93, + "manualPageCount": 93, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", @@ -62,7 +62,42 @@ "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order": "published", "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups": "published", "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups": "published", - "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group": "published" + "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group": "published", + "/sdk/react-native/group/overview-group": "published", + "/sdk/react-native/group/create-group": "published", + "/sdk/react-native/group/update-group-profile": "published", + "/sdk/react-native/group/set-group-announcement": "published", + "/sdk/react-native/group/set-group-extension": "published", + "/sdk/react-native/group/set-group-join-verification": "published", + "/sdk/react-native/group/set-group-member-profile-access": "published", + "/sdk/react-native/group/set-group-member-friend-permission": "published", + "/sdk/react-native/group/change-group-mute": "published", + "/sdk/react-native/group/join-group": "published", + "/sdk/react-native/group/quit-group": "published", + "/sdk/react-native/group/dismiss-group": "published", + "/sdk/react-native/group/retrieving-groups/get-specified-groups-info": "published", + "/sdk/react-native/group/retrieving-groups/get-joined-group-list": "published", + "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page": "published", + "/sdk/react-native/group/retrieving-groups/is-join-group": "published", + "/sdk/react-native/group/retrieving-groups/search-groups": "published", + "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient": "published", + "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant": "published", + "/sdk/react-native/group/group-applications/get-group-application-unhandled-count": "published", + "/sdk/react-native/group/group-applications/accept-group-application": "published", + "/sdk/react-native/group/group-applications/refuse-group-application": "published", + "/sdk/react-native/group/group-applications/delete-group-requests": "published", + "/sdk/react-native/group/retrieving-group-members/get-group-member-list": "published", + "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info": "published", + "/sdk/react-native/group/retrieving-group-members/get-users-in-group": "published", + "/sdk/react-native/group/retrieving-group-members/search-group-members": "published", + "/sdk/react-native/group/managing-group-members/invite-user-to-group": "published", + "/sdk/react-native/group/managing-group-members/kick-group-member": "published", + "/sdk/react-native/group/managing-group-members/set-group-member-nickname": "published", + "/sdk/react-native/group/managing-group-members/set-group-member-role-level": "published", + "/sdk/react-native/group/managing-group-members/set-group-member-avatar": "published", + "/sdk/react-native/group/managing-group-members/set-group-member-extension": "published", + "/sdk/react-native/group/managing-group-members/transfer-group-owner": "published", + "/sdk/react-native/group/managing-group-members/change-group-member-mute": "published" }, "navigationLabels": { "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", @@ -110,6 +145,49 @@ "Add a user to the blacklist": "将用户加入黑名单", "Unblock a user": "将用户移出黑名单", "Remove a user from the blacklist": "将用户移出黑名单", + "Group": "群组", + "Group profile and settings": "群资料与设置", + "Group permissions": "群权限与管理", + "Joining and leaving groups": "加入、退出与解散群组", + "Retrieving groups": "查询群组", + "Group applications": "入群申请", + "Retrieving group members": "查询群成员", + "Managing group members": "管理群成员", + "Group overview": "群组概览", + "Create a group": "创建群组", + "Update group profile": "更新群名称、简介和头像", + "Publish a group announcement": "发布或更新群公告", + "Set group extra data": "设置群组扩展字段", + "Set group join verification": "设置入群验证方式", + "Set member profile access": "设置成员资料查看权限", + "Set member friend request permission": "设置群内添加好友权限", + "Change group mute status": "设置群组全员禁言", + "Apply to join a group": "申请加入群组", + "Leave a group": "退出群组", + "Dismiss a group": "解散群组", + "Get group information": "查询指定群组资料", + "Get joined groups": "获取已加入群组", + "Get joined groups by page": "分页获取已加入群组", + "Check group membership": "检查是否已加入群组", + "Search groups": "搜索群组", + "Get received group applications": "获取收到的入群申请", + "Get sent group applications": "获取发出的入群申请", + "Get pending group application count": "获取未处理入群申请数", + "Accept a group application": "接受入群申请", + "Reject a group application": "拒绝入群申请", + "Delete group applications": "删除入群申请", + "Get group members": "分页查询群成员", + "Get group member profiles": "查询指定群成员资料", + "Check users in a group": "查询用户入群状态", + "Search group members": "搜索群成员", + "Invite users to a group": "邀请用户加入群组", + "Remove group members": "移除群成员", + "Update a group nickname": "修改群内昵称", + "Manage group administrators": "设置管理员", + "Update a group member avatar": "更新群成员头像", + "Set group member extra data": "设置群成员扩展字段", + "Transfer group ownership": "转让群主", + "Mute or unmute a group member": "设置群成员禁言", "Conversation": "会话", "Retrieving conversations": "获取会话", "Conversation organization": "会话管理", @@ -151,7 +229,7 @@ }, "pages": { "/sdk/react-native/overview": { - "body": "## 概览\n\n当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。\n\n## 接入模型\n\n客户端应在拿到后端为当前 `userID` 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。\n\n## 移动端注意事项\n\n- 验证应用前后台切换后的登录、重连和消息接收。\n- 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。\n- 推送 token 注册应通过可信后端和对应平台通知服务完成。\n- 排查移动端问题时记录 `operationID`、`errCode` 和 `errMsg`。\n\n## 相关 SDK\n\n- [iOS SDK](/sdk/ios/overview)\n- [Android SDK](/sdk/android/overview)\n- [Flutter SDK](/sdk/flutter/overview)", + "body": "## 概览\n\n当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。\n\n## 接入模型\n\n客户端应在拿到后端为当前 `userID` 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。\n\n## 移动端注意事项\n\n- 验证应用前后台切换后的登录、重连和消息接收。\n- 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。\n- 推送 token 注册应通过可信后端和对应平台通知服务完成。\n- 排查移动端问题时记录发生时间、用户 ID、操作名称、`errCode` 和 `errMsg`,但不要记录 Token 或消息正文。\n\n## 相关 SDK\n\n- [iOS SDK](/sdk/ios/overview)\n- [Android SDK](/sdk/android/overview)\n- [Flutter SDK](/sdk/flutter/overview)", "description": "OpenIM React Native SDK 入口,用于移动端应用。", "headings": [ { @@ -1107,6 +1185,586 @@ ], "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", "title": "删除会话分组" + }, + "/sdk/react-native/group/overview-group": { + "body": "OpenIM 的多人聊天由群组承载。在群组相关 API 中,使用 `groupID` 标识目标群组,例如查询群资料、管理群成员和处理入群申请。创建群组后,可从返回的群组信息中获取 `groupID`。群聊会话使用 `conversationID` 标识,用于会话设置、消息历史和未读状态等操作。`conversationID` 与 `groupID` 分别表示会话和群组,调用时不要混淆。\n\n## 核心数据类型\n\n| 类型 | 用途 |\n| --- | --- |\n| `GroupItem` | 群名称、头像、公告、群主、入群验证方式、成员数和扩展字段。 |\n| `GroupMemberItem` | 用户在指定群内的昵称、角色、禁言状态和入群信息。 |\n\n群成员角色由 `GroupMemberRole` 表示:`Normal` 为普通成员,`Admin` 为管理员,`Owner` 为群主。\n\n## `GroupItem` 常用字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `groupID` | `string` | 群组 ID。 |\n| `groupName` | `string` | 群组名称。 |\n| `notification` | `string` | 群组公告。 |\n| `friendUserIDs` | `string` | 群组好友用户 ID 信息。 |\n| `remark` | `string` | 当前账号设置的群组备注。 |\n\n## `GroupMemberItem` 常用字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `groupID` | `string` | 成员所属的群组 ID。 |\n| `userID` | `string` | 成员用户 ID。 |\n| `nickname` | `string` | 用户在当前群内的昵称。 |\n| `faceURL` | `string` | 用户在当前群内的头像地址。 |\n| `roleLevel` | `GroupMemberRole` | 成员角色。 |\n| `muteEndTime` | `number` | 禁言结束时间。 |\n| `joinTime` | `number` | 加入群组的时间。 |\n| `joinSource` | `GroupJoinSource` | 入群来源。 |\n| `inviterUserID` | `string` | 邀请该成员入群的用户 ID。 |\n| `operatorUserID` | `string` | 最近操作该成员资料的用户 ID。 |\n| `ex` | `string` | 群成员扩展字符串。 |\n\n`nickname`、`faceURL` 和 `roleLevel` 均属于当前群组中的成员资料;同一用户在其他群组中可能不同。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 创建和维护群资料 | [创建群组](/sdk/react-native/group/create-group)、[更新群名称、简介和头像](/sdk/react-native/group/update-group-profile)、[发布或更新群公告](/sdk/react-native/group/set-group-announcement)、[设置群组扩展字段](/sdk/react-native/group/set-group-extension) |\n| 设置入群和成员权限 | [设置入群验证方式](/sdk/react-native/group/set-group-join-verification)、[设置成员资料查看权限](/sdk/react-native/group/set-group-member-profile-access)、[设置群内添加好友权限](/sdk/react-native/group/set-group-member-friend-permission) |\n| 加入、退出或解散群组 | [申请加入群组](/sdk/react-native/group/join-group)、[退出群组](/sdk/react-native/group/quit-group)、[解散群组](/sdk/react-native/group/dismiss-group) |\n| 查询群组 | [查询指定群组资料](/sdk/react-native/group/retrieving-groups/get-specified-groups-info)、[分页获取已加入群组](/sdk/react-native/group/retrieving-groups/get-joined-group-list-page)、[搜索群组](/sdk/react-native/group/retrieving-groups/search-groups) |\n| 查询和处理入群申请 | [获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)、[获取发出的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-applicant) |\n| 查询和管理群成员 | [分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)、[邀请用户加入群组](/sdk/react-native/group/managing-group-members/invite-user-to-group)、[移除群成员](/sdk/react-native/group/managing-group-members/kick-group-member)、[设置管理员](/sdk/react-native/group/managing-group-members/set-group-member-role-level)、[转让群主](/sdk/react-native/group/managing-group-members/transfer-group-owner) |\n| 管理群聊发言权限 | [设置群组全员禁言](/sdk/react-native/group/change-group-mute)、[设置群成员禁言](/sdk/react-native/group/managing-group-members/change-group-member-mute) |\n\n## 监听群组变化\n\n当前账号加入或退出群组、群资料变化以及群组解散时,分别触发 `OnJoinedGroupAdded`、`OnJoinedGroupDeleted`、`OnGroupInfoChanged` 和 `OnGroupDismissed`。这些事件回调直接接收 `GroupItem`:\n\n```ts\nconst handleJoinedGroupAdded = (group: GroupItem) => {\n // 将 group 添加到已加入群组列表\n};\n\nconst handleJoinedGroupDeleted = (group: GroupItem) => {\n // 根据 group.groupID 从已加入群组列表删除群组\n};\n\nconst handleGroupInfoChanged = (group: GroupItem) => {\n // 根据 group.groupID 更新群组资料\n};\n\nconst handleGroupDismissed = (group: GroupItem) => {\n // 根据 group.groupID 关闭或移除已解散的群组\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded);\nOpenIMSDK.on(OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted);\nOpenIMSDK.on(OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged);\nOpenIMSDK.on(OpenIMEvent.OnGroupDismissed, handleGroupDismissed);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded);\nOpenIMSDK.off(OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted);\nOpenIMSDK.off(OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged);\nOpenIMSDK.off(OpenIMEvent.OnGroupDismissed, handleGroupDismissed);\n```\n\n退出登录、切换账号或销毁群组相关状态时,取消这些监听。群成员变化的监听见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list),入群申请变化的监听见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。", + "description": "了解 React Native SDK 中的群组资料、成员、入群申请和群组事件。", + "headings": [ + { + "depth": 2, + "title": "核心数据类型", + "url": "#核心数据类型" + }, + { + "depth": 2, + "title": "`GroupItem` 常用字段", + "url": "#groupitem-常用字段" + }, + { + "depth": 2, + "title": "`GroupMemberItem` 常用字段", + "url": "#groupmemberitem-常用字段" + }, + { + "depth": 2, + "title": "按任务查找页面", + "url": "#按任务查找页面" + }, + { + "depth": 2, + "title": "监听群组变化", + "url": "#监听群组变化" + } + ], + "sourcePath": "/sdk/react-native/group/overview-group", + "title": "群组概览" + }, + "/sdk/react-native/group/create-group": { + "body": "调用 `createGroup()` 创建群组,并设置初始成员、管理员和群主。\n\n```ts\nconst group = await OpenIMSDK.createGroup({\n memberUserIDs: ['user-003', 'user-004'],\n adminUserIDs: ['user-002'],\n ownerUserID: currentUserID,\n groupInfo: {\n groupName: '项目讨论组',\n groupType: GroupType.WorkingGroup,\n faceURL: 'https://example.com/group.png',\n },\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `memberUserIDs` | `string[]` | 是 | 初始普通成员的用户 ID。 |\n| `adminUserIDs` | `string[]` | 否 | 初始管理员的用户 ID。 |\n| `ownerUserID` | `string` | 否 | 群主用户 ID;不传时使用当前用户。 |\n| `groupInfo` | `Partial` | 是 | 初始群资料。常用字段包括 `groupName`、`groupType` 和 `faceURL`。 |\n\n普通成员、管理员和群主不能重复。`groupInfo.groupType` 使用 `GroupType.WorkingGroup` 创建普通群组。\n\n## 返回结果\n\n调用完成后返回新建群组的 `GroupItem`。可以使用返回对象中的 `groupID` 打开群资料或群聊页面。当前账号加入群组后,会通过 `OnJoinedGroupAdded` 返回群组信息,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 创建群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/create-group", + "title": "创建群组" + }, + "/sdk/react-native/group/update-group-profile": { + "body": "调用 `setGroupInfo()` 更新群名称、群简介或群头像。只传入本次需要修改的字段。\n\n```ts\nawait OpenIMSDK.setGroupInfo({\n groupID,\n groupName: groupName.trim(),\n introduction: introduction.trim(),\n faceURL,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要更新的群组 ID。 |\n| `groupName` | `string` | 否 | 新群名称。 |\n| `introduction` | `string` | 否 | 新群简介。 |\n| `faceURL` | `string` | 否 | 新群头像地址。 |\n\n除 `groupID` 外,至少传入一个需要修改的群资料字段,未传入的字段保持原值。\n\n## 返回结果\n\n调用完成后,群组资料已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 更新群组资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/update-group-profile", + "title": "更新群名称、简介和头像" + }, + "/sdk/react-native/group/set-group-announcement": { + "body": "调用 `setGroupInfo()` 设置或更新群公告。\n\n```ts\nawait OpenIMSDK.setGroupInfo({\n groupID,\n notification: announcement,\n});\n```\n\n`groupID` 为目标群组 ID,`notification` 为公告内容。传入空字符串可以清空群公告;群公告与群简介 `introduction` 是两个独立字段。\n\n## 返回结果\n\n调用完成后,群公告已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 发布群公告。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/set-group-announcement", + "title": "发布或更新群公告" + }, + "/sdk/react-native/group/set-group-extension": { + "body": "调用 `setGroupInfo()` 设置群组的 `ex` 扩展字段。\n\n```ts\nawait OpenIMSDK.setGroupInfo({\n groupID,\n ex: JSON.stringify({\n projectID: 'project-42',\n }),\n});\n```\n\n`groupID` 为目标群组 ID,`ex` 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展信息。\n\n## 返回结果\n\n调用完成后,群组扩展字段已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 设置群组扩展字段。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/set-group-extension", + "title": "设置群组扩展字段" + }, + "/sdk/react-native/group/set-group-join-verification": { + "body": "调用 `setGroupInfo()` 设置申请和邀请用户加入群组时的验证方式。\n\n```ts\nawait OpenIMSDK.setGroupInfo({\n groupID,\n needVerification: GroupVerificationType.AllNeed,\n});\n```\n\n## 参数说明\n\n`groupID` 为目标群组 ID,`needVerification` 使用 `GroupVerificationType`:\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `GroupVerificationType.ApplyNeedInviteNot` | `0` | 用户申请需要审核,群成员邀请可直接入群。 |\n| `GroupVerificationType.AllNeed` | `1` | 用户申请和普通成员邀请都需要审核;群主或管理员邀请除外。 |\n| `GroupVerificationType.AllNot` | `2` | 用户申请和邀请都可直接入群。 |\n\n## 返回结果\n\n调用完成后,群组入群验证方式已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 设置进群验证。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/set-group-join-verification", + "title": "设置入群验证方式" + }, + "/sdk/react-native/group/set-group-member-profile-access": { + "body": "调用 `setGroupInfo()` 设置群成员资料查看权限。该设置只控制群成员资料查看权限,与[设置群内添加好友权限](/sdk/react-native/group/set-group-member-friend-permission)相互独立。\n\n```ts\nawait OpenIMSDK.setGroupInfo({\n groupID,\n lookMemberInfo: AllowType.NotAllowed,\n});\n```\n\n## 参数说明\n\n`groupID` 为目标群组 ID,`lookMemberInfo` 使用 `AllowType`:\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `AllowType.Allowed` | `0` | 允许成员查看其他成员资料。 |\n| `AllowType.NotAllowed` | `1` | 不允许成员查看其他成员资料。 |\n\n## 返回结果\n\n调用完成后,群成员资料查看权限已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 设置群成员资料权限。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/set-group-member-profile-access", + "title": "设置成员资料查看权限" + }, + "/sdk/react-native/group/set-group-member-friend-permission": { + "body": "调用 `setGroupInfo()` 设置是否允许群成员通过群组关系向其他成员发送好友申请。该设置只控制从群成员关系发起好友申请的入口,与[设置成员资料查看权限](/sdk/react-native/group/set-group-member-profile-access)相互独立。\n\n```ts\nawait OpenIMSDK.setGroupInfo({\n groupID,\n applyMemberFriend: AllowType.NotAllowed,\n});\n```\n\n## 参数说明\n\n`groupID` 为目标群组 ID,`applyMemberFriend` 使用 `AllowType`:\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `AllowType.Allowed` | `0` | 允许通过群成员关系发起好友申请。 |\n| `AllowType.NotAllowed` | `1` | 不允许通过群成员关系发起好友申请。 |\n\n## 返回结果\n\n调用完成后,群内添加好友权限已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 设置群成员好友申请权限。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "设置群内添加好友权限" + }, + "/sdk/react-native/group/change-group-mute": { + "body": "调用 `changeGroupMute()` 开启或关闭群组全员禁言。\n\n```ts\nawait OpenIMSDK.changeGroupMute({\n groupID,\n isMute: true,\n muteBypassUserIDs: [serviceAccountUserID],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `isMute` | `boolean` | 是 | `true` 开启群组禁言,`false` 关闭群组禁言。 |\n| `muteBypassUserIDs` 商业版 | `string[]` | 否 | 群组禁言期间仍允许发言的用户 ID。 |\n\n不要把全部成员传入 `muteBypassUserIDs`。群主和管理员是否可以发言由服务端权限控制。\n\n## 返回结果\n\n调用完成后,群组全员禁言设置已更新。群资料变化会通过 `OnGroupInfoChanged` 返回,事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 修改群组禁言状态。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/change-group-mute", + "title": "设置群组全员禁言" + }, + "/sdk/react-native/group/join-group": { + "body": "调用 `joinGroup()` 使用群组 ID、申请说明和加入途径发起入群请求。\n\n```ts\nawait OpenIMSDK.joinGroup({\n groupID,\n reqMsg: '申请加入项目讨论组',\n joinSource: GroupJoinSource.Search,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `reqMsg` | `string` | 是 | 入群申请说明;没有说明时传空字符串。 |\n| `joinSource` | `GroupJoinSource` | 是 | 发起入群的途径。 |\n| `ex` | `string` | 否 | 业务扩展字符串。 |\n\n`joinSource` 常用值如下:\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `GroupJoinSource.Invitation` | `2` | 通过邀请加入。 |\n| `GroupJoinSource.Search` | `3` | 通过搜索加入。 |\n| `GroupJoinSource.QrCode` | `4` | 通过二维码加入。 |\n\n`joinSource` 只记录加入途径,不决定是否需要审核。\n\n## 返回结果\n\n调用完成后,入群请求已提交。当前账号成功加入群组后,会通过 `OnJoinedGroupAdded` 返回群组信息;事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 申请加入群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/join-group", + "title": "申请加入群组" + }, + "/sdk/react-native/group/quit-group": { + "body": "调用 `quitGroup()` 退出当前账号已加入的群组。\n\n```ts\nawait OpenIMSDK.quitGroup(groupID);\n```\n\n`groupID` 为要退出的群组 ID。群主如果要退出群组,需要先转让群主身份。\n\n## 返回结果\n\n调用完成后,当前账号已退出目标群组。当前账号成功退出群组后,会触发 `OnJoinedGroupDeleted`,回调参数为对应的群组信息;事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 退出群组。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/quit-group", + "title": "退出群组" + }, + "/sdk/react-native/group/dismiss-group": { + "body": "调用 `dismissGroup()` 解散群组。\n\n```ts\nawait OpenIMSDK.dismissGroup(groupID);\n```\n\n`groupID` 为要解散的群组 ID。解散群组会影响所有成员,调用权限由服务端校验。\n\n## 返回结果\n\n调用完成后,群组已解散。群组解散后,相关客户端会触发 `OnGroupDismissed`,回调参数为已解散的群组信息;事件监听方式见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "OpenIM React Native SDK 解散群组。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/dismiss-group", + "title": "解散群组" + }, + "/sdk/react-native/group/retrieving-groups/get-specified-groups-info": { + "body": "调用 `getSpecifiedGroupsInfo()`,根据群组 ID 查询指定群组的资料。\n\n```ts\nconst groups = await OpenIMSDK.getSpecifiedGroupsInfo([\n 'group-001',\n 'group-002',\n]);\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupIDs` | `string[]` | 是 | 要查询的群组 ID 数组。 |\n\n## 返回结果\n\n调用完成后返回匹配的 `GroupItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "按群组 ID 批量查询群组资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "查询指定群组资料" + }, + "/sdk/react-native/group/retrieving-groups/get-joined-group-list": { + "body": "调用 `getJoinedGroupList()` 获取当前账号已加入的全部群组。\n\n```ts\nconst groups = await OpenIMSDK.getJoinedGroupList();\n```\n\n## 返回结果\n\n调用完成后返回 `GroupItem[]`。群组数量较多时,可使用[分页获取已加入群组](/sdk/react-native/group/retrieving-groups/get-joined-group-list-page)分批读取。", + "description": "查询当前账号已加入的全部群组。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "获取已加入群组" + }, + "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page": { + "body": "调用 `getJoinedGroupListPage()` 分页获取当前账号已加入的群组。\n\n```ts\nconst groups = await OpenIMSDK.getJoinedGroupListPage({\n offset: 0,\n count: 50,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的群组数量。 |\n\n继续读取下一页时,将 `offset` 设置为已读取的群组数量。\n\n## 返回结果\n\n调用完成后返回当前页的 `GroupItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "分页查询当前账号已加入的群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "分页获取已加入群组" + }, + "/sdk/react-native/group/retrieving-groups/is-join-group": { + "body": "调用 `isJoinGroup()` 检查当前账号是否已加入指定群组。\n\n```ts\nconst isJoined = await OpenIMSDK.isJoinGroup('group-001');\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要检查的群组 ID。 |\n\n## 返回结果\n\n调用完成后返回 `boolean`:`true` 表示当前账号已加入群组,`false` 表示尚未加入。", + "description": "检查当前账号是否已加入指定群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "检查是否已加入群组" + }, + "/sdk/react-native/group/retrieving-groups/search-groups": { + "body": "调用 `searchGroups()`,按群组 ID 或群名称搜索群组。\n\n```ts\nconst groups = await OpenIMSDK.searchGroups({\n keywordList: ['项目'],\n isSearchGroupID: false,\n isSearchGroupName: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `keywordList` | `string[]` | 是 | 搜索关键词列表。 |\n| `isSearchGroupID` | `boolean` | 是 | 是否匹配群组 ID。 |\n| `isSearchGroupName` | `boolean` | 是 | 是否匹配群组名称。 |\n\n## 返回结果\n\n调用完成后返回匹配的 `GroupItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "搜索当前账号可查询的群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "搜索群组" + }, + "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient": { + "body": "群主或管理员可以调用 `getGroupApplicationListAsRecipient()` 查询收到的入群申请。\n\n```ts\nconst applications = await OpenIMSDK.getGroupApplicationListAsRecipient({\n groupIDs: ['group-001'],\n handleResults: [ApplicationHandleResult.Unprocessed],\n offset: 0,\n count: 20,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupIDs` | `string[]` | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 |\n| `handleResults` | `number[]` | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 |\n| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的申请数量。 |\n\n`ApplicationHandleResult` 的常用值如下:\n\n| 枚举值 | 数值 | 含义 |\n| --- | --- | --- |\n| `ApplicationHandleResult.Unprocessed` | `0` | 待处理。 |\n| `ApplicationHandleResult.Agree` | `1` | 已同意。 |\n| `ApplicationHandleResult.Reject` | `-1` | 已拒绝。 |\n\n## 返回结果\n\n调用完成后返回当前账号有权处理的 `GroupApplicationItem[]`。\n\n### 入群申请字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `groupID` | `string` | 申请加入的群组 ID。 |\n| `userID` | `string` | 申请人的用户 ID。 |\n| `nickname` | `string` | 申请记录中的申请人昵称。 |\n| `userFaceURL` | `string` | 申请记录中的申请人头像地址。 |\n| `reqMsg` | `string` | 入群申请附言。 |\n| `reqTime` | `number` | 申请时间。 |\n| `joinSource` | `GroupJoinSource` | 入群申请来源。 |\n| `handleResult` | `ApplicationHandleResult` | 当前处理结果。 |\n| `handleUserID` | `string` | 处理申请的用户 ID。 |\n| `handledMsg` | `string` | 处理申请时填写的说明。 |\n| `handledTime` | `number` | 处理时间。 |\n| `groupName` | `string` | 申请记录中的群组名称。 |\n| `groupFaceURL` | `string` | 申请记录中的群组头像地址。 |\n| `groupType` | `GroupType` | 群组类型。 |\n| `ownerUserID` | `string` | 群主用户 ID。 |\n| `creatorUserID` | `string` | 群组创建者用户 ID。 |\n| `introduction` | `string` | 申请记录中的群组简介。 |\n| `notification` | `string` | 申请记录中的群组公告。 |\n| `memberCount` | `number` | 申请记录中的群成员数量。 |\n| `status` | `GroupStatus` | 申请记录中的群组状态。 |\n| `createTime` | `number` | 申请记录创建时间,Unix 毫秒时间戳。 |\n| `ex` | `string` | 申请记录扩展字符串。 |\n\n申请记录中的昵称、头像和群组资料以记录创建时的内容为准。需要展示最新资料时,分别查询当前用户资料或群组资料。\n\n## 监听入群申请变化\n\n新增、处理或删除入群申请时,分别触发 `OnGroupApplicationAdded`、`OnGroupApplicationAccepted`、`OnGroupApplicationRejected` 或 `OnGroupApplicationDeleted`。事件回调直接接收 `GroupApplicationItem`:\n\n```ts\nconst handleApplicationChanged = (application: GroupApplicationItem) => {\n // 按 groupID 和 userID 更新申请记录\n};\n\nconst handleApplicationDeleted = (application: GroupApplicationItem) => {\n // 按 groupID 和 userID 删除申请记录\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged);\nOpenIMSDK.on(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged);\nOpenIMSDK.on(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged);\nOpenIMSDK.on(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged);\nOpenIMSDK.off(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged);\nOpenIMSDK.off(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged);\nOpenIMSDK.off(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted);\n```\n\n退出登录、切换账号或销毁申请列表状态时,取消这些监听。", + "description": "查询当前账号收到的入群申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 3, + "title": "入群申请字段", + "url": "#入群申请字段" + }, + { + "depth": 2, + "title": "监听入群申请变化", + "url": "#监听入群申请变化" + } + ], + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "获取收到的入群申请" + }, + "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant": { + "body": "调用 `getGroupApplicationListAsApplicant()` 查询当前账号发出的入群申请。\n\n```ts\nconst applications = await OpenIMSDK.getGroupApplicationListAsApplicant({\n groupIDs: ['group-001'],\n handleResults: [\n ApplicationHandleResult.Unprocessed,\n ApplicationHandleResult.Agree,\n ApplicationHandleResult.Reject,\n ],\n offset: 0,\n count: 20,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupIDs` | `string[]` | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 |\n| `handleResults` | `number[]` | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 |\n| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的申请数量。 |\n\n`ApplicationHandleResult` 的取值见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。\n\n## 返回结果\n\n调用完成后返回当前账号发出的 `GroupApplicationItem[]`。申请字段说明和申请变化事件监听见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。", + "description": "查询当前账号发出的入群申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "获取发出的入群申请" + }, + "/sdk/react-native/group/group-applications/get-group-application-unhandled-count": { + "body": "调用 `getGroupApplicationUnhandledCount()` 查询指定时间点之后仍未处理的入群申请数量。\n\n```ts\nconst count = await OpenIMSDK.getGroupApplicationUnhandledCount({\n time: 0,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `time` | `number` | 是 | 统计起点的 Unix 毫秒时间戳;传 `0` 表示统计全部待处理申请。 |\n\n## 返回结果\n\n调用完成后返回 `number`,表示指定时间点之后待处理的入群申请数量。", + "description": "查询指定时间点之后未处理的入群申请数量。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "获取未处理入群申请数" + }, + "/sdk/react-native/group/group-applications/accept-group-application": { + "body": "调用 `acceptGroupApplication()` 同意指定用户的入群申请。\n\n```ts\nawait OpenIMSDK.acceptGroupApplication({\n groupID: application.groupID,\n fromUserID: application.userID,\n handleMsg: '同意加入',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 申请对应的群组 ID。 |\n| `fromUserID` | `string` | 是 | 申请人的用户 ID,对应申请记录的 `userID`。 |\n| `handleMsg` | `string` | 是 | 处理说明;没有说明时传空字符串。 |\n\n调用完成后,入群申请已被同意。申请状态变化时会触发 `OnGroupApplicationAccepted`,完整监听方式见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。", + "description": "同意指定用户的入群申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "接受入群申请" + }, + "/sdk/react-native/group/group-applications/refuse-group-application": { + "body": "调用 `refuseGroupApplication()` 拒绝指定用户的入群申请。\n\n```ts\nawait OpenIMSDK.refuseGroupApplication({\n groupID: application.groupID,\n fromUserID: application.userID,\n handleMsg: '暂不接受该申请',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 申请对应的群组 ID。 |\n| `fromUserID` | `string` | 是 | 申请人的用户 ID,对应申请记录的 `userID`。 |\n| `handleMsg` | `string` | 是 | 拒绝原因;没有说明时传空字符串。 |\n\n调用完成后,入群申请已被拒绝。申请状态变化时会触发 `OnGroupApplicationRejected`,完整监听方式见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。", + "description": "拒绝指定用户的入群申请。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "拒绝入群申请" + }, + "/sdk/react-native/group/group-applications/delete-group-requests": { + "body": "调用 `deleteGroupRequests()` 批量删除指定的入群申请记录。\n\n```ts\nawait OpenIMSDK.deleteGroupRequests([\n {\n fromUserID: application.userID,\n groupID: application.groupID,\n },\n]);\n```\n\n## 参数说明\n\n数组中的每一项包含以下字段:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `fromUserID` | `string` | 是 | 申请人的用户 ID,对应申请记录的 `userID`。 |\n| `groupID` | `string` | 是 | 申请对应的群组 ID。 |\n\n删除申请记录不会处理待处理申请。如需同意或拒绝申请,分别使用[接受入群申请](/sdk/react-native/group/group-applications/accept-group-application)和[拒绝入群申请](/sdk/react-native/group/group-applications/refuse-group-application)。\n\n调用完成后表示删除请求已完成。申请记录删除时会触发 `OnGroupApplicationDeleted`,完整监听方式见[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)。", + "description": "批量删除指定的入群申请记录。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "删除入群申请" + }, + "/sdk/react-native/group/retrieving-group-members/get-group-member-list": { + "body": "调用 `getGroupMemberList()` 分页查询指定群组的成员,并按成员角色筛选。\n\n```ts\nconst members = await OpenIMSDK.getGroupMemberList({\n groupID: 'group-001',\n filter: GroupMemberFilter.All,\n offset: 0,\n count: 50,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `filter` | `GroupMemberFilter` | 是 | 成员角色筛选条件。 |\n| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的成员数量。 |\n\n`GroupMemberFilter` 的取值如下:\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `GroupMemberFilter.All` | `0` | 全部成员。 |\n| `GroupMemberFilter.Owner` | `1` | 仅群主。 |\n| `GroupMemberFilter.Admin` | `2` | 仅管理员。 |\n| `GroupMemberFilter.Normal` | `3` | 仅普通成员。 |\n| `GroupMemberFilter.AdminAndNormal` | `4` | 管理员和普通成员。 |\n| `GroupMemberFilter.AdminAndOwner` | `5` | 管理员和群主。 |\n\n继续读取下一页时,将 `offset` 设置为已读取的成员数量。\n\n## 返回结果\n\n调用完成后返回当前页的 `GroupMemberItem[]`。字段说明见[群组概览](/sdk/react-native/group/overview-group)。\n\n## 监听群成员变化\n\n成员加入、退出或资料变化时,分别触发 `OnGroupMemberAdded`、`OnGroupMemberDeleted` 和 `OnGroupMemberInfoChanged`。事件回调直接接收 `GroupMemberItem`:\n\n```ts\nconst handleMemberAdded = (member: GroupMemberItem) => {\n // 将 member 添加到对应群组的成员列表\n};\n\nconst handleMemberDeleted = (member: GroupMemberItem) => {\n // 根据 member.groupID 和 member.userID 删除成员\n};\n\nconst handleMemberChanged = (member: GroupMemberItem) => {\n // 根据 member.groupID 和 member.userID 更新成员资料\n};\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnGroupMemberAdded, handleMemberAdded);\nOpenIMSDK.on(OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted);\nOpenIMSDK.on(OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnGroupMemberAdded, handleMemberAdded);\nOpenIMSDK.off(OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted);\nOpenIMSDK.off(OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged);\n```\n\n退出登录、切换账号或销毁成员列表状态时,取消这些监听。", + "description": "分页查询指定群组的成员。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 2, + "title": "监听群成员变化", + "url": "#监听群成员变化" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "分页查询群成员" + }, + "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info": { + "body": "调用 `getSpecifiedGroupMembersInfo()` 查询指定用户在一个群组中的成员资料。\n\n```ts\nconst members = await OpenIMSDK.getSpecifiedGroupMembersInfo({\n groupID: 'group-001',\n userIDList: ['user-001', 'user-002'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userIDList` | `string[]` | 是 | 要查询的成员用户 ID 数组。 |\n\n## 返回结果\n\n调用完成后返回匹配的 `GroupMemberItem[]`,字段说明见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "查询指定用户在目标群组中的成员资料。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "查询指定群成员资料" + }, + "/sdk/react-native/group/retrieving-group-members/get-users-in-group": { + "body": "调用 `getUsersInGroup()` 查询指定用户中已加入目标群组的用户 ID。\n\n```ts\nconst userIDs = await OpenIMSDK.getUsersInGroup({\n groupID: 'group-001',\n userIDList: ['user-001', 'user-002', 'user-003'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userIDList` | `string[]` | 是 | 要检查的用户 ID 数组。 |\n\n## 返回结果\n\n调用完成后返回 `string[]`,其中包含已加入目标群组的用户 ID。", + "description": "查询一组用户中哪些用户属于指定群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "查询用户入群状态" + }, + "/sdk/react-native/group/retrieving-group-members/search-group-members": { + "body": "调用 `searchGroupMembers()`,按用户 ID 或群内昵称搜索指定群组中的成员。\n\n```ts\nconst members = await OpenIMSDK.searchGroupMembers({\n groupID: 'group-001',\n keywordList: ['张'],\n isSearchUserID: false,\n isSearchMemberNickname: true,\n offset: 0,\n count: 50,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `keywordList` | `string[]` | 是 | 搜索关键词列表。 |\n| `isSearchUserID` | `boolean` | 是 | 是否匹配用户 ID。 |\n| `isSearchMemberNickname` | `boolean` | 是 | 是否匹配群内昵称。 |\n| `offset` | `number` | 是 | 分页偏移量,第一页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的成员数量。 |\n\n## 返回结果\n\n调用完成后返回当前页匹配的 `GroupMemberItem[]`,字段说明见[群组概览](/sdk/react-native/group/overview-group)。", + "description": "在指定群组中搜索成员。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "搜索群成员" + }, + "/sdk/react-native/group/managing-group-members/invite-user-to-group": { + "body": "调用 `inviteUserToGroup()` 邀请一个或多个用户加入群组。\n\n```ts\nawait OpenIMSDK.inviteUserToGroup({\n groupID: 'group-001',\n reason: '邀请加入项目讨论组',\n userIDList: ['user-002', 'user-003'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `reason` | `string` | 是 | 邀请说明;没有说明时传空字符串。 |\n| `userIDList` | `string[]` | 是 | 要邀请的用户 ID 数组。 |\n\n调用完成后,邀请请求已提交。当用户实际加入群组时,会触发 `OnGroupMemberAdded`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "邀请一个或多个用户加入指定群组。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "邀请用户加入群组" + }, + "/sdk/react-native/group/managing-group-members/kick-group-member": { + "body": "调用 `kickGroupMember()` 从群组中移除一个或多个成员。\n\n```ts\nawait OpenIMSDK.kickGroupMember({\n groupID: 'group-001',\n reason: '已离开项目',\n userIDList: ['user-002'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `reason` | `string` | 是 | 移除原因;没有说明时传空字符串。 |\n| `userIDList` | `string[]` | 是 | 要移除的成员用户 ID 数组。 |\n\n调用完成后,指定成员已被移出群组。成员移除时会触发 `OnGroupMemberDeleted`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "从指定群组移除一个或多个成员。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "移除群成员" + }, + "/sdk/react-native/group/managing-group-members/set-group-member-nickname": { + "body": "调用 `setGroupMemberInfo()` 修改指定成员的群内昵称。\n\n```ts\nawait OpenIMSDK.setGroupMemberInfo({\n groupID: 'group-001',\n userID: 'user-002',\n nickname: '项目负责人',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userID` | `string` | 是 | 要修改昵称的成员用户 ID。 |\n| `nickname` | `string` | 是 | 成员在该群组中的新昵称。 |\n\n群内昵称只作用于指定群组,不会修改用户的账号昵称。\n\n调用完成后,群内昵称已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "修改指定成员在一个群组中的昵称。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "修改群内昵称" + }, + "/sdk/react-native/group/managing-group-members/set-group-member-role-level": { + "body": "调用 `setGroupMemberInfo()` 设置指定成员为管理员,或取消其管理员身份。\n\n```ts\nawait OpenIMSDK.setGroupMemberInfo({\n groupID: 'group-001',\n userID: 'user-002',\n roleLevel: GroupMemberRole.Admin,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userID` | `string` | 是 | 要设置角色的成员用户 ID。 |\n| `roleLevel` | `GroupMemberRole` | 是 | 要设置的成员角色。 |\n\n| 枚举值 | 数值 | 说明 |\n| --- | --- | --- |\n| `GroupMemberRole.Normal` | `20` | 普通成员;传入该值可取消管理员身份。 |\n| `GroupMemberRole.Admin` | `60` | 管理员。 |\n| `GroupMemberRole.Owner` | `100` | 群主角色,仅用于识别当前角色。 |\n\n不能通过设置 `GroupMemberRole.Owner` 转让群主,应使用[转让群主](/sdk/react-native/group/managing-group-members/transfer-group-owner)。\n\n调用完成后,成员角色已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "设置或取消指定成员的管理员身份。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "设置管理员" + }, + "/sdk/react-native/group/managing-group-members/set-group-member-avatar": { + "body": "调用 `setGroupMemberInfo()` 更新指定成员的群内头像。\n\n```ts\nawait OpenIMSDK.setGroupMemberInfo({\n groupID: 'group-001',\n userID: 'user-002',\n faceURL: 'https://example.com/avatar.png',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userID` | `string` | 是 | 要更新头像的成员用户 ID。 |\n| `faceURL` | `string` | 是 | 成员在该群组中的头像地址。 |\n\n群内头像只作用于指定群组。需要修改账号头像时,使用[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。\n\n调用完成后,群内头像已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "更新指定成员在一个群组中的头像。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "更新群成员头像" + }, + "/sdk/react-native/group/managing-group-members/set-group-member-extension": { + "body": "调用 `setGroupMemberInfo()` 设置指定成员的 `ex` 扩展字段。\n\n```ts\nawait OpenIMSDK.setGroupMemberInfo({\n groupID: 'group-001',\n userID: 'user-002',\n ex: JSON.stringify({\n title: 'maintainer',\n }),\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userID` | `string` | 是 | 要设置扩展字段的成员用户 ID。 |\n| `ex` | `string` | 是 | 群成员扩展字符串,可按业务需要传递 JSON 字符串或其他格式的字符串。 |\n\n调用完成后,成员扩展字段已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "设置指定群成员的扩展字符串。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "设置群成员扩展字段" + }, + "/sdk/react-native/group/managing-group-members/transfer-group-owner": { + "body": "调用 `transferGroupOwner()` 将群主身份转让给另一名群成员。\n\n```ts\nawait OpenIMSDK.transferGroupOwner({\n groupID: 'group-001',\n newOwnerUserID: 'user-002',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `newOwnerUserID` | `string` | 是 | 新群主的用户 ID,必须是该群组的成员。 |\n\n调用完成后,群主身份已转让。原群主和新群主的成员角色变化会通过 `OnGroupMemberInfoChanged` 通知;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "将群主身份转让给另一名群成员。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "转让群主" + }, + "/sdk/react-native/group/managing-group-members/change-group-member-mute": { + "body": "调用 `changeGroupMemberMute()` 设置指定成员的禁言时长;传入 `0` 可解除禁言。\n\n```ts\nawait OpenIMSDK.changeGroupMemberMute({\n groupID: 'group-001',\n userID: 'user-002',\n mutedSeconds: 3600,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userID` | `string` | 是 | 要设置禁言的成员用户 ID。 |\n| `mutedSeconds` | `number` | 是 | 禁言时长,单位为秒;传 `0` 解除禁言。 |\n\n调用完成后,成员禁言状态已更新。成员资料变化时会触发 `OnGroupMemberInfoChanged`,可读取事件参数的 `muteEndTime` 获取禁言结束时间;监听方式见[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list)。", + "description": "设置或解除指定群成员的禁言状态。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "设置群成员禁言" } } } diff --git a/src/generated/routes.json b/src/generated/routes.json index d689ab7fc0..e9900424f8 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -16127,5 +16127,635 @@ "sourceIndex": 2781, "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx", "navOrder": 576 + }, + { + "id": 1432, + "path": "/sdk/react-native/group/overview-group", + "relativePath": "sdk/react-native/group/overview-group", + "sourcePath": "/sdk/react-native/group/overview-group", + "title": "Group overview", + "description": "OpenIM React Native SDK guide for group overview.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2782, + "contentFile": "content/docs/chat/sdk/react-native/group/overview-group.mdx", + "navOrder": 577 + }, + { + "id": 1433, + "path": "/sdk/react-native/group/create-group", + "relativePath": "sdk/react-native/group/create-group", + "sourcePath": "/sdk/react-native/group/create-group", + "title": "Create a group", + "description": "OpenIM React Native SDK guide for create a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2783, + "contentFile": "content/docs/chat/sdk/react-native/group/create-group.mdx", + "navOrder": 578 + }, + { + "id": 1434, + "path": "/sdk/react-native/group/update-group-profile", + "relativePath": "sdk/react-native/group/update-group-profile", + "sourcePath": "/sdk/react-native/group/update-group-profile", + "title": "Update group profile", + "description": "OpenIM React Native SDK guide for update group profile.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2784, + "contentFile": "content/docs/chat/sdk/react-native/group/update-group-profile.mdx", + "navOrder": 579 + }, + { + "id": 1435, + "path": "/sdk/react-native/group/set-group-announcement", + "relativePath": "sdk/react-native/group/set-group-announcement", + "sourcePath": "/sdk/react-native/group/set-group-announcement", + "title": "Publish a group announcement", + "description": "OpenIM React Native SDK guide for publish a group announcement.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2785, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-announcement.mdx", + "navOrder": 580 + }, + { + "id": 1436, + "path": "/sdk/react-native/group/set-group-extension", + "relativePath": "sdk/react-native/group/set-group-extension", + "sourcePath": "/sdk/react-native/group/set-group-extension", + "title": "Set group extra data", + "description": "OpenIM React Native SDK guide for set group extra data.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2786, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-extension.mdx", + "navOrder": 581 + }, + { + "id": 1437, + "path": "/sdk/react-native/group/set-group-join-verification", + "relativePath": "sdk/react-native/group/set-group-join-verification", + "sourcePath": "/sdk/react-native/group/set-group-join-verification", + "title": "Set group join verification", + "description": "OpenIM React Native SDK guide for set group join verification.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2787, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx", + "navOrder": 582 + }, + { + "id": 1438, + "path": "/sdk/react-native/group/set-group-member-profile-access", + "relativePath": "sdk/react-native/group/set-group-member-profile-access", + "sourcePath": "/sdk/react-native/group/set-group-member-profile-access", + "title": "Set member profile access", + "description": "OpenIM React Native SDK guide for set member profile access.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2788, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx", + "navOrder": 583 + }, + { + "id": 1439, + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "relativePath": "sdk/react-native/group/set-group-member-friend-permission", + "sourcePath": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "description": "OpenIM React Native SDK guide for set member friend request permission.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2789, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx", + "navOrder": 584 + }, + { + "id": 1440, + "path": "/sdk/react-native/group/change-group-mute", + "relativePath": "sdk/react-native/group/change-group-mute", + "sourcePath": "/sdk/react-native/group/change-group-mute", + "title": "Change group mute status", + "description": "OpenIM React Native SDK guide for change group mute status.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2790, + "contentFile": "content/docs/chat/sdk/react-native/group/change-group-mute.mdx", + "navOrder": 585 + }, + { + "id": 1441, + "path": "/sdk/react-native/group/join-group", + "relativePath": "sdk/react-native/group/join-group", + "sourcePath": "/sdk/react-native/group/join-group", + "title": "Apply to join a group", + "description": "OpenIM React Native SDK guide for apply to join a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2791, + "contentFile": "content/docs/chat/sdk/react-native/group/join-group.mdx", + "navOrder": 586 + }, + { + "id": 1442, + "path": "/sdk/react-native/group/quit-group", + "relativePath": "sdk/react-native/group/quit-group", + "sourcePath": "/sdk/react-native/group/quit-group", + "title": "Leave a group", + "description": "OpenIM React Native SDK guide for leave a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2792, + "contentFile": "content/docs/chat/sdk/react-native/group/quit-group.mdx", + "navOrder": 587 + }, + { + "id": 1443, + "path": "/sdk/react-native/group/dismiss-group", + "relativePath": "sdk/react-native/group/dismiss-group", + "sourcePath": "/sdk/react-native/group/dismiss-group", + "title": "Dismiss a group", + "description": "OpenIM React Native SDK guide for dismiss a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2793, + "contentFile": "content/docs/chat/sdk/react-native/group/dismiss-group.mdx", + "navOrder": 588 + }, + { + "id": 1444, + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "relativePath": "sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "description": "OpenIM React Native SDK guide for get group information.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2794, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx", + "navOrder": 589 + }, + { + "id": 1445, + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "relativePath": "sdk/react-native/group/retrieving-groups/get-joined-group-list", + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "description": "OpenIM React Native SDK guide for get joined groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2795, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx", + "navOrder": 590 + }, + { + "id": 1446, + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "relativePath": "sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "description": "OpenIM React Native SDK guide for get joined groups by page.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2796, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx", + "navOrder": 591 + }, + { + "id": 1447, + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "relativePath": "sdk/react-native/group/retrieving-groups/is-join-group", + "sourcePath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "description": "OpenIM React Native SDK guide for check group membership.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2797, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx", + "navOrder": 592 + }, + { + "id": 1448, + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "relativePath": "sdk/react-native/group/retrieving-groups/search-groups", + "sourcePath": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "Search groups", + "description": "OpenIM React Native SDK guide for search groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2798, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx", + "navOrder": 593 + }, + { + "id": 1449, + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "relativePath": "sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "description": "OpenIM React Native SDK guide for get received group applications.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2799, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx", + "navOrder": 594 + }, + { + "id": 1450, + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "relativePath": "sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "description": "OpenIM React Native SDK guide for get sent group applications.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2800, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx", + "navOrder": 595 + }, + { + "id": 1451, + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "relativePath": "sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "Get pending group application count", + "description": "OpenIM React Native SDK guide for get pending group application count.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2801, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx", + "navOrder": 596 + }, + { + "id": 1452, + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "relativePath": "sdk/react-native/group/group-applications/accept-group-application", + "sourcePath": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "Accept a group application", + "description": "OpenIM React Native SDK guide for accept a group application.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2802, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx", + "navOrder": 597 + }, + { + "id": 1453, + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "relativePath": "sdk/react-native/group/group-applications/refuse-group-application", + "sourcePath": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "description": "OpenIM React Native SDK guide for reject a group application.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2803, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx", + "navOrder": 598 + }, + { + "id": 1454, + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "relativePath": "sdk/react-native/group/group-applications/delete-group-requests", + "sourcePath": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "description": "OpenIM React Native SDK guide for delete group applications.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2804, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx", + "navOrder": 599 + }, + { + "id": 1455, + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "relativePath": "sdk/react-native/group/retrieving-group-members/get-group-member-list", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "Get group members", + "description": "OpenIM React Native SDK guide for get group members.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2805, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx", + "navOrder": 600 + }, + { + "id": 1456, + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "relativePath": "sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get group member profiles", + "description": "OpenIM React Native SDK guide for get group member profiles.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2806, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx", + "navOrder": 601 + }, + { + "id": 1457, + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "relativePath": "sdk/react-native/group/retrieving-group-members/get-users-in-group", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "Check users in a group", + "description": "OpenIM React Native SDK guide for check users in a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2807, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx", + "navOrder": 602 + }, + { + "id": 1458, + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "relativePath": "sdk/react-native/group/retrieving-group-members/search-group-members", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "description": "OpenIM React Native SDK guide for search group members.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2808, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx", + "navOrder": 603 + }, + { + "id": 1459, + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "relativePath": "sdk/react-native/group/managing-group-members/invite-user-to-group", + "sourcePath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "description": "OpenIM React Native SDK guide for invite users to a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2809, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx", + "navOrder": 604 + }, + { + "id": 1460, + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "relativePath": "sdk/react-native/group/managing-group-members/kick-group-member", + "sourcePath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "description": "OpenIM React Native SDK guide for remove group members.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2810, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx", + "navOrder": 605 + }, + { + "id": 1461, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-nickname", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "Update a group nickname", + "description": "OpenIM React Native SDK guide for update a group nickname.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2811, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx", + "navOrder": 606 + }, + { + "id": 1462, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-role-level", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "description": "OpenIM React Native SDK guide for manage group administrators.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2812, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx", + "navOrder": 607 + }, + { + "id": 1463, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-avatar", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member avatar", + "description": "OpenIM React Native SDK guide for update a group member avatar.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2813, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx", + "navOrder": 608 + }, + { + "id": 1464, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-extension", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "Set group member extra data", + "description": "OpenIM React Native SDK guide for set group member extra data.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2814, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx", + "navOrder": 609 + }, + { + "id": 1465, + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "relativePath": "sdk/react-native/group/managing-group-members/transfer-group-owner", + "sourcePath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "description": "OpenIM React Native SDK guide for transfer group ownership.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2815, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx", + "navOrder": 610 + }, + { + "id": 1466, + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "relativePath": "sdk/react-native/group/managing-group-members/change-group-member-mute", + "sourcePath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "description": "OpenIM React Native SDK guide for mute or unmute a group member.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2816, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx", + "navOrder": 611 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index cc83a7b847..edcc2baa01 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -7134,5 +7134,285 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", "content": "调用 deleteConversationGroup 删除会话分组及其会话关联。 await OpenIMSDK.deleteConversationGroup conversationGroupID ; 参数 conversationGroupID 为会话分组 ID。 返回结果 调用完成后,分组删除请求已完成。该操作不会删除会话或消息。分组变化会通过 OnConversationGroupDeleted 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/react-native/group/overview-group", + "title": "群组概览", + "description": "了解 React Native SDK 中的群组资料、成员、入群申请和群组事件。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group overview-group", + "content": "OpenIM 的多人聊天由群组承载。在群组相关 API 中,使用 groupID 标识目标群组,例如查询群资料、管理群成员和处理入群申请。创建群组后,可从返回的群组信息中获取 groupID 。群聊会话使用 conversationID 标识,用于会话设置、消息历史和未读状态等操作。 conversationID 与 groupID 分别表示会话和群组,调用时不要混淆。 核心数据类型 | 类型 | 用途 | | | | | GroupItem | 群名称、头像、公告、群主、入群验证方式、成员数和扩展字段。 | | GroupMemberItem | 用户在指定群内的昵称、角色、禁言状态和入群信息。 | 群成员角色由 GroupMemberRole 表示: Normal 为普通成员, Admin 为管理员, Owner 为群主。 GroupItem 常用字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 群组 ID。 | | groupName | string | 群组名称。 | | notification | string | 群组公告。 | | friendUserIDs | string | 群组好友用户 ID 信息。 | | remark | string | 当前账号设置的群组备注。 | GroupMemberItem 常用字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 成员所属的群组 ID。 | | userID | string | 成员用户 ID。 | | nickname | string | 用户在当前群内的昵称。 | | faceURL | string | 用户在当前群内的头像地址。 | | roleLevel | GroupMemberRole | 成员角色。 | | muteEndTime | number | 禁言结束时间。 | | joinTime | number | 加入群组的时间。 | | joinSource | GroupJoinSource | 入群来源。 | | inviterUserID | string | 邀请该成员入群的用户 ID。 | | operatorUserID | string | 最近操作该成员资料的用户 ID。 | | ex | string | 群成员扩展字符串。 | nickname 、 faceURL 和 roleLevel 均属于当前群组中的成员资料;同一用户在其他群组中可能不同。 按任务查找页面 | 任务 | 页面 | | | | | 创建和维护群资料 | 创建群组 /sdk/react native/group/create group 、 更新群名称、简介和头像 /sdk/react native/group/update group profile 、 发布或更新群公告 /sdk/react native/group/set group announcement 、 设置群组扩展字段 /sdk/react native/group/set group extension | | 设置入群和成员权限 | 设置入群验证方式 /sdk/react native/group/set group join verification 、 设置成员资料查看权限 /sdk/react native/group/set group member profile access 、 设置群内添加好友权限 /sdk/react native/group/set group member friend permission | | 加入、退出或解散群组 | 申请加入群组 /sdk/react native/group/join group 、 退出群组 /sdk/react native/group/quit group 、 解散群组 /sdk/react native/group/dismiss group | | 查询群组 | 查询指定群组资料 /sdk/react native/group/retrieving groups/get specified groups info 、 分页获取已加入群组 /sdk/react native/group/retrieving groups/get joined group list page 、 搜索群组 /sdk/react native/group/retrieving groups/search groups | | 查询和处理入群申请 | 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 、 获取发出的入群申请 /sdk/react native/group/group applications/get group application list as applicant | | 查询和管理群成员 | 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 、 邀请用户加入群组 /sdk/react native/group/managing group members/invite user to group 、 移除群成员 /sdk/react native/group/managing group members/kick group member 、 设置管理员 /sdk/react native/group/managing group members/set group member role level 、 转让群主 /sdk/react native/group/managing group members/transfer group owner | | 管理群聊发言权限 | 设置群组全员禁言 /sdk/react native/group/change group mute 、 设置群成员禁言 /sdk/react native/group/managing group members/change group member mute | 监听群组变化 当前账号加入或退出群组、群资料变化以及群组解散时,分别触发 OnJoinedGroupAdded 、 OnJoinedGroupDeleted 、 OnGroupInfoChanged 和 OnGroupDismissed 。这些事件回调直接接收 GroupItem : const handleJoinedGroupAdded = group: GroupItem = // 将 group 添加到已加入群组列表 ; const handleJoinedGroupDeleted = group: GroupItem = // 根据 group.groupID 从已加入群组列表删除群组 ; const handleGroupInfoChanged = group: GroupItem = // 根据 group.groupID 更新群组资料 ; const handleGroupDismissed = group: GroupItem = // 根据 group.groupID 关闭或移除已解散的群组 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.on OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.off OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; 退出登录、切换账号或销毁群组相关状态时,取消这些监听。群成员变化的监听见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list ,入群申请变化的监听见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + }, + { + "path": "/sdk/react-native/group/create-group", + "title": "创建群组", + "description": "OpenIM React Native SDK 创建群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group create-group", + "content": "调用 createGroup 创建群组,并设置初始成员、管理员和群主。 const group = await OpenIMSDK.createGroup memberUserIDs: 'user 003', 'user 004' , adminUserIDs: 'user 002' , ownerUserID: currentUserID, groupInfo: groupName: '项目讨论组', groupType: GroupType.WorkingGroup, faceURL: 'https://example.com/group.png', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | memberUserIDs | string | 是 | 初始普通成员的用户 ID。 | | adminUserIDs | string | 否 | 初始管理员的用户 ID。 | | ownerUserID | string | 否 | 群主用户 ID;不传时使用当前用户。 | | groupInfo | Partial | 是 | 初始群资料。常用字段包括 groupName 、 groupType 和 faceURL 。 | 普通成员、管理员和群主不能重复。 groupInfo.groupType 使用 GroupType.WorkingGroup 创建普通群组。 返回结果 调用完成后返回新建群组的 GroupItem 。可以使用返回对象中的 groupID 打开群资料或群聊页面。当前账号加入群组后,会通过 OnJoinedGroupAdded 返回群组信息,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/update-group-profile", + "title": "更新群名称、简介和头像", + "description": "OpenIM React Native SDK 更新群组资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group update-group-profile", + "content": "调用 setGroupInfo 更新群名称、群简介或群头像。只传入本次需要修改的字段。 await OpenIMSDK.setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string | 否 | 新群名称。 | | introduction | string | 否 | 新群简介。 | | faceURL | string | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个需要修改的群资料字段,未传入的字段保持原值。 返回结果 调用完成后,群组资料已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/set-group-announcement", + "title": "发布或更新群公告", + "description": "OpenIM React Native SDK 发布群公告。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-announcement", + "content": "调用 setGroupInfo 设置或更新群公告。 await OpenIMSDK.setGroupInfo groupID, notification: announcement, ; groupID 为目标群组 ID, notification 为公告内容。传入空字符串可以清空群公告;群公告与群简介 introduction 是两个独立字段。 返回结果 调用完成后,群公告已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/set-group-extension", + "title": "设置群组扩展字段", + "description": "OpenIM React Native SDK 设置群组扩展字段。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-extension", + "content": "调用 setGroupInfo 设置群组的 ex 扩展字段。 await OpenIMSDK.setGroupInfo groupID, ex: JSON.stringify projectID: 'project 42', , ; groupID 为目标群组 ID, ex 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 返回结果 调用完成后,群组扩展字段已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/set-group-join-verification", + "title": "设置入群验证方式", + "description": "OpenIM React Native SDK 设置进群验证。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-join-verification", + "content": "调用 setGroupInfo 设置申请和邀请用户加入群组时的验证方式。 await OpenIMSDK.setGroupInfo groupID, needVerification: GroupVerificationType.AllNeed, ; 参数说明 groupID 为目标群组 ID, needVerification 使用 GroupVerificationType : | 枚举值 | 数值 | 说明 | | | | | | GroupVerificationType.ApplyNeedInviteNot | 0 | 用户申请需要审核,群成员邀请可直接入群。 | | GroupVerificationType.AllNeed | 1 | 用户申请和普通成员邀请都需要审核;群主或管理员邀请除外。 | | GroupVerificationType.AllNot | 2 | 用户申请和邀请都可直接入群。 | 返回结果 调用完成后,群组入群验证方式已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/set-group-member-profile-access", + "title": "设置成员资料查看权限", + "description": "OpenIM React Native SDK 设置群成员资料权限。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-profile-access", + "content": "调用 setGroupInfo 设置群成员资料查看权限。该设置只控制群成员资料查看权限,与 设置群内添加好友权限 /sdk/react native/group/set group member friend permission 相互独立。 await OpenIMSDK.setGroupInfo groupID, lookMemberInfo: AllowType.NotAllowed, ; 参数说明 groupID 为目标群组 ID, lookMemberInfo 使用 AllowType : | 枚举值 | 数值 | 说明 | | | | | | AllowType.Allowed | 0 | 允许成员查看其他成员资料。 | | AllowType.NotAllowed | 1 | 不允许成员查看其他成员资料。 | 返回结果 调用完成后,群成员资料查看权限已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "设置群内添加好友权限", + "description": "OpenIM React Native SDK 设置群成员好友申请权限。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-friend-permission", + "content": "调用 setGroupInfo 设置是否允许群成员通过群组关系向其他成员发送好友申请。该设置只控制从群成员关系发起好友申请的入口,与 设置成员资料查看权限 /sdk/react native/group/set group member profile access 相互独立。 await OpenIMSDK.setGroupInfo groupID, applyMemberFriend: AllowType.NotAllowed, ; 参数说明 groupID 为目标群组 ID, applyMemberFriend 使用 AllowType : | 枚举值 | 数值 | 说明 | | | | | | AllowType.Allowed | 0 | 允许通过群成员关系发起好友申请。 | | AllowType.NotAllowed | 1 | 不允许通过群成员关系发起好友申请。 | 返回结果 调用完成后,群内添加好友权限已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/change-group-mute", + "title": "设置群组全员禁言", + "description": "OpenIM React Native SDK 修改群组禁言状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group change-group-mute", + "content": "调用 changeGroupMute 开启或关闭群组全员禁言。 await OpenIMSDK.changeGroupMute groupID, isMute: true, muteBypassUserIDs: serviceAccountUserID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | isMute | boolean | 是 | true 开启群组禁言, false 关闭群组禁言。 | | muteBypassUserIDs 商业版 | string | 否 | 群组禁言期间仍允许发言的用户 ID。 | 不要把全部成员传入 muteBypassUserIDs 。群主和管理员是否可以发言由服务端权限控制。 返回结果 调用完成后,群组全员禁言设置已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/join-group", + "title": "申请加入群组", + "description": "OpenIM React Native SDK 申请加入群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group join-group", + "content": "调用 joinGroup 使用群组 ID、申请说明和加入途径发起入群请求。 await OpenIMSDK.joinGroup groupID, reqMsg: '申请加入项目讨论组', joinSource: GroupJoinSource.Search, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reqMsg | string | 是 | 入群申请说明;没有说明时传空字符串。 | | joinSource | GroupJoinSource | 是 | 发起入群的途径。 | | ex | string | 否 | 业务扩展字符串。 | joinSource 常用值如下: | 枚举值 | 数值 | 说明 | | | | | | GroupJoinSource.Invitation | 2 | 通过邀请加入。 | | GroupJoinSource.Search | 3 | 通过搜索加入。 | | GroupJoinSource.QrCode | 4 | 通过二维码加入。 | joinSource 只记录加入途径,不决定是否需要审核。 返回结果 调用完成后,入群请求已提交。当前账号成功加入群组后,会通过 OnJoinedGroupAdded 返回群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/quit-group", + "title": "退出群组", + "description": "OpenIM React Native SDK 退出群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group quit-group", + "content": "调用 quitGroup 退出当前账号已加入的群组。 await OpenIMSDK.quitGroup groupID ; groupID 为要退出的群组 ID。群主如果要退出群组,需要先转让群主身份。 返回结果 调用完成后,当前账号已退出目标群组。当前账号成功退出群组后,会触发 OnJoinedGroupDeleted ,回调参数为对应的群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/dismiss-group", + "title": "解散群组", + "description": "OpenIM React Native SDK 解散群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group dismiss-group", + "content": "调用 dismissGroup 解散群组。 await OpenIMSDK.dismissGroup groupID ; groupID 为要解散的群组 ID。解散群组会影响所有成员,调用权限由服务端校验。 返回结果 调用完成后,群组已解散。群组解散后,相关客户端会触发 OnGroupDismissed ,回调参数为已解散的群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "查询指定群组资料", + "description": "按群组 ID 批量查询群组资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-specified-groups-info", + "content": "调用 getSpecifiedGroupsInfo ,根据群组 ID 查询指定群组的资料。 const groups = await OpenIMSDK.getSpecifiedGroupsInfo 'group 001', 'group 002', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组。 | 返回结果 调用完成后返回匹配的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "获取已加入群组", + "description": "查询当前账号已加入的全部群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list", + "content": "调用 getJoinedGroupList 获取当前账号已加入的全部群组。 const groups = await OpenIMSDK.getJoinedGroupList ; 返回结果 调用完成后返回 GroupItem 。群组数量较多时,可使用 分页获取已加入群组 /sdk/react native/group/retrieving groups/get joined group list page 分批读取。" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "分页获取已加入群组", + "description": "分页查询当前账号已加入的群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list-page", + "content": "调用 getJoinedGroupListPage 分页获取当前账号已加入的群组。 const groups = await OpenIMSDK.getJoinedGroupListPage offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的群组数量。 | 继续读取下一页时,将 offset 设置为已读取的群组数量。 返回结果 调用完成后返回当前页的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "检查是否已加入群组", + "description": "检查当前账号是否已加入指定群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups is-join-group", + "content": "调用 isJoinGroup 检查当前账号是否已加入指定群组。 const isJoined = await OpenIMSDK.isJoinGroup 'group 001' ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要检查的群组 ID。 | 返回结果 调用完成后返回 boolean : true 表示当前账号已加入群组, false 表示尚未加入。" + }, + { + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "搜索群组", + "description": "搜索当前账号可查询的群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups search-groups", + "content": "调用 searchGroups ,按群组 ID 或群名称搜索群组。 const groups = await OpenIMSDK.searchGroups keywordList: '项目' , isSearchGroupID: false, isSearchGroupName: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词列表。 | | isSearchGroupID | boolean | 是 | 是否匹配群组 ID。 | | isSearchGroupName | boolean | 是 | 是否匹配群组名称。 | 返回结果 调用完成后返回匹配的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "获取收到的入群申请", + "description": "查询当前账号收到的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-recipient", + "content": "群主或管理员可以调用 getGroupApplicationListAsRecipient 查询收到的入群申请。 const applications = await OpenIMSDK.getGroupApplicationListAsRecipient groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | | handleResults | number | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的申请数量。 | ApplicationHandleResult 的常用值如下: | 枚举值 | 数值 | 含义 | | | | | | ApplicationHandleResult.Unprocessed | 0 | 待处理。 | | ApplicationHandleResult.Agree | 1 | 已同意。 | | ApplicationHandleResult.Reject | 1 | 已拒绝。 | 返回结果 调用完成后返回当前账号有权处理的 GroupApplicationItem 。 入群申请字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 申请加入的群组 ID。 | | userID | string | 申请人的用户 ID。 | | nickname | string | 申请记录中的申请人昵称。 | | userFaceURL | string | 申请记录中的申请人头像地址。 | | reqMsg | string | 入群申请附言。 | | reqTime | number | 申请时间。 | | joinSource | GroupJoinSource | 入群申请来源。 | | handleResult | ApplicationHandleResult | 当前处理结果。 | | handleUserID | string | 处理申请的用户 ID。 | | handledMsg | string | 处理申请时填写的说明。 | | handledTime | number | 处理时间。 | | groupName | string | 申请记录中的群组名称。 | | groupFaceURL | string | 申请记录中的群组头像地址。 | | groupType | GroupType | 群组类型。 | | ownerUserID | string | 群主用户 ID。 | | creatorUserID | string | 群组创建者用户 ID。 | | introduction | string | 申请记录中的群组简介。 | | notification | string | 申请记录中的群组公告。 | | memberCount | number | 申请记录中的群成员数量。 | | status | GroupStatus | 申请记录中的群组状态。 | | createTime | number | 申请记录创建时间,Unix 毫秒时间戳。 | | ex | string | 申请记录扩展字符串。 | 申请记录中的昵称、头像和群组资料以记录创建时的内容为准。需要展示最新资料时,分别查询当前用户资料或群组资料。 监听入群申请变化 新增、处理或删除入群申请时,分别触发 OnGroupApplicationAdded 、 OnGroupApplicationAccepted 、 OnGroupApplicationRejected 或 OnGroupApplicationDeleted 。事件回调直接接收 GroupApplicationItem : const handleApplicationChanged = application: GroupApplicationItem = // 按 groupID 和 userID 更新申请记录 ; const handleApplicationDeleted = application: GroupApplicationItem = // 按 groupID 和 userID 删除申请记录 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; 退出登录、切换账号或销毁申请列表状态时,取消这些监听。" + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "获取发出的入群申请", + "description": "查询当前账号发出的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-applicant", + "content": "调用 getGroupApplicationListAsApplicant 查询当前账号发出的入群申请。 const applications = await OpenIMSDK.getGroupApplicationListAsApplicant groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed, ApplicationHandleResult.Agree, ApplicationHandleResult.Reject, , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | | handleResults | number | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的申请数量。 | ApplicationHandleResult 的取值见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。 返回结果 调用完成后返回当前账号发出的 GroupApplicationItem 。申请字段说明和申请变化事件监听见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "获取未处理入群申请数", + "description": "查询指定时间点之后未处理的入群申请数量。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-unhandled-count", + "content": "调用 getGroupApplicationUnhandledCount 查询指定时间点之后仍未处理的入群申请数量。 const count = await OpenIMSDK.getGroupApplicationUnhandledCount time: 0, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | time | number | 是 | 统计起点的 Unix 毫秒时间戳;传 0 表示统计全部待处理申请。 | 返回结果 调用完成后返回 number ,表示指定时间点之后待处理的入群申请数量。" + }, + { + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "接受入群申请", + "description": "同意指定用户的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications accept-group-application", + "content": "调用 acceptGroupApplication 同意指定用户的入群申请。 await OpenIMSDK.acceptGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: '同意加入', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请对应的群组 ID。 | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | handleMsg | string | 是 | 处理说明;没有说明时传空字符串。 | 调用完成后,入群申请已被同意。申请状态变化时会触发 OnGroupApplicationAccepted ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + }, + { + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "拒绝入群申请", + "description": "拒绝指定用户的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications refuse-group-application", + "content": "调用 refuseGroupApplication 拒绝指定用户的入群申请。 await OpenIMSDK.refuseGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: '暂不接受该申请', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请对应的群组 ID。 | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | handleMsg | string | 是 | 拒绝原因;没有说明时传空字符串。 | 调用完成后,入群申请已被拒绝。申请状态变化时会触发 OnGroupApplicationRejected ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + }, + { + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "删除入群申请", + "description": "批量删除指定的入群申请记录。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications delete-group-requests", + "content": "调用 deleteGroupRequests 批量删除指定的入群申请记录。 await OpenIMSDK.deleteGroupRequests fromUserID: application.userID, groupID: application.groupID, , ; 参数说明 数组中的每一项包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | groupID | string | 是 | 申请对应的群组 ID。 | 删除申请记录不会处理待处理申请。如需同意或拒绝申请,分别使用 接受入群申请 /sdk/react native/group/group applications/accept group application 和 拒绝入群申请 /sdk/react native/group/group applications/refuse group application 。 调用完成后表示删除请求已完成。申请记录删除时会触发 OnGroupApplicationDeleted ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "分页查询群成员", + "description": "分页查询指定群组的成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-group-member-list", + "content": "调用 getGroupMemberList 分页查询指定群组的成员,并按成员角色筛选。 const members = await OpenIMSDK.getGroupMemberList groupID: 'group 001', filter: GroupMemberFilter.All, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | filter | GroupMemberFilter | 是 | 成员角色筛选条件。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的成员数量。 | GroupMemberFilter 的取值如下: | 枚举值 | 数值 | 说明 | | | | | | GroupMemberFilter.All | 0 | 全部成员。 | | GroupMemberFilter.Owner | 1 | 仅群主。 | | GroupMemberFilter.Admin | 2 | 仅管理员。 | | GroupMemberFilter.Normal | 3 | 仅普通成员。 | | GroupMemberFilter.AdminAndNormal | 4 | 管理员和普通成员。 | | GroupMemberFilter.AdminAndOwner | 5 | 管理员和群主。 | 继续读取下一页时,将 offset 设置为已读取的成员数量。 返回结果 调用完成后返回当前页的 GroupMemberItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。 监听群成员变化 成员加入、退出或资料变化时,分别触发 OnGroupMemberAdded 、 OnGroupMemberDeleted 和 OnGroupMemberInfoChanged 。事件回调直接接收 GroupMemberItem : const handleMemberAdded = member: GroupMemberItem = // 将 member 添加到对应群组的成员列表 ; const handleMemberDeleted = member: GroupMemberItem = // 根据 member.groupID 和 member.userID 删除成员 ; const handleMemberChanged = member: GroupMemberItem = // 根据 member.groupID 和 member.userID 更新成员资料 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.on OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.off OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; 退出登录、切换账号或销毁成员列表状态时,取消这些监听。" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "查询指定群成员资料", + "description": "查询指定用户在目标群组中的成员资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-specified-group-members-info", + "content": "调用 getSpecifiedGroupMembersInfo 查询指定用户在一个群组中的成员资料。 const members = await OpenIMSDK.getSpecifiedGroupMembersInfo groupID: 'group 001', userIDList: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要查询的成员用户 ID 数组。 | 返回结果 调用完成后返回匹配的 GroupMemberItem ,字段说明见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "查询用户入群状态", + "description": "查询一组用户中哪些用户属于指定群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-users-in-group", + "content": "调用 getUsersInGroup 查询指定用户中已加入目标群组的用户 ID。 const userIDs = await OpenIMSDK.getUsersInGroup groupID: 'group 001', userIDList: 'user 001', 'user 002', 'user 003' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要检查的用户 ID 数组。 | 返回结果 调用完成后返回 string ,其中包含已加入目标群组的用户 ID。" + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "搜索群成员", + "description": "在指定群组中搜索成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members search-group-members", + "content": "调用 searchGroupMembers ,按用户 ID 或群内昵称搜索指定群组中的成员。 const members = await OpenIMSDK.searchGroupMembers groupID: 'group 001', keywordList: '张' , isSearchUserID: false, isSearchMemberNickname: true, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | keywordList | string | 是 | 搜索关键词列表。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchMemberNickname | boolean | 是 | 是否匹配群内昵称。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的成员数量。 | 返回结果 调用完成后返回当前页匹配的 GroupMemberItem ,字段说明见 群组概览 /sdk/react native/group/overview group 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "邀请用户加入群组", + "description": "邀请一个或多个用户加入指定群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members invite-user-to-group", + "content": "调用 inviteUserToGroup 邀请一个或多个用户加入群组。 await OpenIMSDK.inviteUserToGroup groupID: 'group 001', reason: '邀请加入项目讨论组', userIDList: 'user 002', 'user 003' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 邀请说明;没有说明时传空字符串。 | | userIDList | string | 是 | 要邀请的用户 ID 数组。 | 调用完成后,邀请请求已提交。当用户实际加入群组时,会触发 OnGroupMemberAdded ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "移除群成员", + "description": "从指定群组移除一个或多个成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members kick-group-member", + "content": "调用 kickGroupMember 从群组中移除一个或多个成员。 await OpenIMSDK.kickGroupMember groupID: 'group 001', reason: '已离开项目', userIDList: 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 移除原因;没有说明时传空字符串。 | | userIDList | string | 是 | 要移除的成员用户 ID 数组。 | 调用完成后,指定成员已被移出群组。成员移除时会触发 OnGroupMemberDeleted ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "修改群内昵称", + "description": "修改指定成员在一个群组中的昵称。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-nickname", + "content": "调用 setGroupMemberInfo 修改指定成员的群内昵称。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', nickname: '项目负责人', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要修改昵称的成员用户 ID。 | | nickname | string | 是 | 成员在该群组中的新昵称。 | 群内昵称只作用于指定群组,不会修改用户的账号昵称。 调用完成后,群内昵称已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "设置管理员", + "description": "设置或取消指定成员的管理员身份。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-role-level", + "content": "调用 setGroupMemberInfo 设置指定成员为管理员,或取消其管理员身份。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', roleLevel: GroupMemberRole.Admin, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置角色的成员用户 ID。 | | roleLevel | GroupMemberRole | 是 | 要设置的成员角色。 | | 枚举值 | 数值 | 说明 | | | | | | GroupMemberRole.Normal | 20 | 普通成员;传入该值可取消管理员身份。 | | GroupMemberRole.Admin | 60 | 管理员。 | | GroupMemberRole.Owner | 100 | 群主角色,仅用于识别当前角色。 | 不能通过设置 GroupMemberRole.Owner 转让群主,应使用 转让群主 /sdk/react native/group/managing group members/transfer group owner 。 调用完成后,成员角色已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "更新群成员头像", + "description": "更新指定成员在一个群组中的头像。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-avatar", + "content": "调用 setGroupMemberInfo 更新指定成员的群内头像。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', faceURL: 'https://example.com/avatar.png', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要更新头像的成员用户 ID。 | | faceURL | string | 是 | 成员在该群组中的头像地址。 | 群内头像只作用于指定群组。需要修改账号头像时,使用 更新当前用户资料 /sdk/react native/user/profile/set self info 。 调用完成后,群内头像已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "设置群成员扩展字段", + "description": "设置指定群成员的扩展字符串。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-extension", + "content": "调用 setGroupMemberInfo 设置指定成员的 ex 扩展字段。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', ex: JSON.stringify title: 'maintainer', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置扩展字段的成员用户 ID。 | | ex | string | 是 | 群成员扩展字符串,可按业务需要传递 JSON 字符串或其他格式的字符串。 | 调用完成后,成员扩展字段已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "转让群主", + "description": "将群主身份转让给另一名群成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members transfer-group-owner", + "content": "调用 transferGroupOwner 将群主身份转让给另一名群成员。 await OpenIMSDK.transferGroupOwner groupID: 'group 001', newOwnerUserID: 'user 002', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | newOwnerUserID | string | 是 | 新群主的用户 ID,必须是该群组的成员。 | 调用完成后,群主身份已转让。原群主和新群主的成员角色变化会通过 OnGroupMemberInfoChanged 通知;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "设置群成员禁言", + "description": "设置或解除指定群成员的禁言状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", + "content": "调用 changeGroupMemberMute 设置指定成员的禁言时长;传入 0 可解除禁言。 await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置禁言的成员用户 ID。 | | mutedSeconds | number | 是 | 禁言时长,单位为秒;传 0 解除禁言。 | 调用完成后,成员禁言状态已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ,可读取事件参数的 muteEndTime 获取禁言结束时间;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 3520b2aafd..718512bac3 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -7134,5 +7134,285 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", "content": "Call deleteConversationGroup to delete a conversation group and its conversation membership. await OpenIMSDK.deleteConversationGroup conversationGroupID ; conversationGroupID is the ID of the conversation group. Return result After the call completes, the group deletion request is complete. The operation does not delete conversations or messages. Group changes are delivered through OnConversationGroupDeleted ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + }, + { + "path": "/sdk/react-native/group/overview-group", + "title": "Group overview", + "description": "OpenIM React Native SDK guide for group overview.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group overview-group", + "content": "In OpenIM, group chats are organized as groups. In group APIs, use groupID to identify the target group, for example when querying group profiles, managing members, or handling group applications. After you create a group, obtain its groupID from the returned group information. A group chat session uses conversationID for conversation settings, message history, and unread status. conversationID identifies a conversation, whereas groupID identifies a group; do not confuse them when supplying API parameters. Core data types | Type | Purpose | | | | | GroupItem | A group's name, avatar, announcement, owner, join verification setting, member count, and extension data. | | GroupMemberItem | A user's nickname, role, mute state, and join information in a specific group. | Member roles use GroupMemberRole : Normal is a regular member, Admin is an administrator, and Owner is the group owner. Common GroupItem fields | Field | Type | Description | | | | | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | friendUserIDs | string | Group friend user ID information. | | remark | string | Group remark set by the current account. | Common GroupMemberItem fields | Field | Type | Description | | | | | | groupID | string | ID of the group that the member belongs to. | | userID | string | Member user ID. | | nickname | string | The user's nickname in the current group. | | faceURL | string | The user's avatar URL in the current group. | | roleLevel | GroupMemberRole | Member role. | | muteEndTime | number | Time when the mute ends. | | joinTime | number | Time when the member joined the group. | | joinSource | GroupJoinSource | How the member joined the group. | | inviterUserID | string | User ID of the member who invited this user. | | operatorUserID | string | User ID of the user who last updated this member profile. | | ex | string | Group member extension string. | nickname , faceURL , and roleLevel belong to the member profile in the current group. They can differ for the same user in another group. Find a page by task | Task | Pages | | | | | Create and maintain group profiles | Create a group /sdk/react native/group/create group , Update group profile /sdk/react native/group/update group profile , Publish a group announcement /sdk/react native/group/set group announcement , Set group extra data /sdk/react native/group/set group extension | | Configure join and member permissions | Set group join verification /sdk/react native/group/set group join verification , Set member profile access /sdk/react native/group/set group member profile access , Set group member friend request permissions /sdk/react native/group/set group member friend permission | | Join, leave, or dismiss groups | Apply to join a group /sdk/react native/group/join group , Leave a group /sdk/react native/group/quit group , Dismiss a group /sdk/react native/group/dismiss group | | Retrieve groups | Get group information /sdk/react native/group/retrieving groups/get specified groups info , Get joined groups by page /sdk/react native/group/retrieving groups/get joined group list page , Search groups /sdk/react native/group/retrieving groups/search groups | | Retrieve and handle group applications | Get received group applications /sdk/react native/group/group applications/get group application list as recipient , Get sent group applications /sdk/react native/group/group applications/get group application list as applicant | | Retrieve and manage group members | Get group members /sdk/react native/group/retrieving group members/get group member list , Invite users to a group /sdk/react native/group/managing group members/invite user to group , Remove group members /sdk/react native/group/managing group members/kick group member , Manage group administrators /sdk/react native/group/managing group members/set group member role level , Transfer group ownership /sdk/react native/group/managing group members/transfer group owner | | Manage group chat messaging permissions | Change group mute status /sdk/react native/group/change group mute , Mute or unmute a group member /sdk/react native/group/managing group members/change group member mute | Listen for group changes When the current account joins or leaves a group, when group profile information changes, or when a group is dismissed, OnJoinedGroupAdded , OnJoinedGroupDeleted , OnGroupInfoChanged , and OnGroupDismissed are triggered respectively. Each callback receives a GroupItem directly: const handleJoinedGroupAdded = group: GroupItem = // Add group to the joined group list ; const handleJoinedGroupDeleted = group: GroupItem = // Remove the group from the joined group list by group.groupID ; const handleGroupInfoChanged = group: GroupItem = // Update the group profile by group.groupID ; const handleGroupDismissed = group: GroupItem = // Close or remove the dismissed group by group.groupID ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.on OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.off OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; Remove these listeners when signing out, switching accounts, or discarding group related state. For member change listeners, see Get group members /sdk/react native/group/retrieving group members/get group member list . For group application change listeners, see Get received group applications /sdk/react native/group/group applications/get group application list as recipient ." + }, + { + "path": "/sdk/react-native/group/create-group", + "title": "Create a group", + "description": "OpenIM React Native SDK guide for create a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group create-group", + "content": "Call createGroup to create a group and set its initial members, administrators, and owner. const group = await OpenIMSDK.createGroup memberUserIDs: 'user 003', 'user 004' , adminUserIDs: 'user 002' , ownerUserID: currentUserID, groupInfo: groupName: 'Project discussion group', groupType: GroupType.WorkingGroup, faceURL: 'https://example.com/group.png', , ; Parameters | Parameter | Type | Required | Description | | | | | | memberUserIDs | string | Yes | User IDs of the initial regular members. | | adminUserIDs | string | No | User IDs of the initial administrators. | | ownerUserID | string | No | User ID of the group owner. The current user is used when omitted. | | groupInfo | Partial | Yes | Initial group profile. Common fields include groupName , groupType , and faceURL . | A regular member, administrator, and owner cannot be the same user. Use GroupType.WorkingGroup for groupInfo.groupType to create a regular group. Return value When the call completes, it returns the newly created GroupItem . Use the returned groupID to open the group profile or group chat. When the current account joins the group, OnJoinedGroupAdded returns the group information; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/update-group-profile", + "title": "Update group profile", + "description": "OpenIM React Native SDK guide for update group profile.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group update-group-profile", + "content": "Call setGroupInfo to update a group name, description, or avatar. Provide only the fields that need to change. await OpenIMSDK.setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group to update. | | groupName | string | No | New group name. | | introduction | string | No | New group description. | | faceURL | string | No | URL of the new group avatar. | In addition to groupID , provide at least one group profile field to update. Fields that are not provided keep their current values. Return value When the call completes, the group profile is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/set-group-announcement", + "title": "Publish a group announcement", + "description": "OpenIM React Native SDK guide for publish a group announcement.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-announcement", + "content": "Call setGroupInfo to set or update a group announcement. await OpenIMSDK.setGroupInfo groupID, notification: announcement, ; groupID is the target group ID and notification is the announcement content. Pass an empty string to clear the announcement. The announcement and the group description, introduction , are separate fields. Return value When the call completes, the group announcement is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/set-group-extension", + "title": "Set group extra data", + "description": "OpenIM React Native SDK guide for set group extra data.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-extension", + "content": "Call setGroupInfo to set the group's ex extension field. await OpenIMSDK.setGroupInfo groupID, ex: JSON.stringify projectID: 'project 42', , ; groupID is the target group ID. ex is a string and can contain JSON or another string format for business specific data. Return value When the call completes, the group extension field is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/set-group-join-verification", + "title": "Set group join verification", + "description": "OpenIM React Native SDK guide for set group join verification.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-join-verification", + "content": "Call setGroupInfo to configure verification for group applications and invitations. await OpenIMSDK.setGroupInfo groupID, needVerification: GroupVerificationType.AllNeed, ; Parameters groupID is the target group ID. needVerification uses GroupVerificationType : | Enum value | Value | Description | | | | | | GroupVerificationType.ApplyNeedInviteNot | 0 | Applications require approval, while member invitations let users join directly. | | GroupVerificationType.AllNeed | 1 | Applications and regular member invitations require approval. Invitations from the owner or an administrator are excluded. | | GroupVerificationType.AllNot | 2 | Applications and invitations let users join directly. | Return value When the call completes, the group join verification setting is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/set-group-member-profile-access", + "title": "Set member profile access", + "description": "OpenIM React Native SDK guide for set member profile access.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-profile-access", + "content": "Call setGroupInfo to configure whether group members can view other members' profiles. This setting controls only member profile visibility and is independent of setting group member friend request permissions /sdk/react native/group/set group member friend permission . await OpenIMSDK.setGroupInfo groupID, lookMemberInfo: AllowType.NotAllowed, ; Parameters groupID is the target group ID. lookMemberInfo uses AllowType : | Enum value | Value | Description | | | | | | AllowType.Allowed | 0 | Members can view other members' profiles. | | AllowType.NotAllowed | 1 | Members cannot view other members' profiles. | Return value When the call completes, member profile visibility is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "description": "OpenIM React Native SDK guide for set member friend request permission.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-friend-permission", + "content": "Call setGroupInfo to configure whether members can send friend requests to other members through the group. This setting controls only friend requests initiated from the member relationship and is independent of setting member profile visibility /sdk/react native/group/set group member profile access . await OpenIMSDK.setGroupInfo groupID, applyMemberFriend: AllowType.NotAllowed, ; Parameters groupID is the target group ID. applyMemberFriend uses AllowType : | Enum value | Value | Description | | | | | | AllowType.Allowed | 0 | Members can send friend requests through the group member relationship. | | AllowType.NotAllowed | 1 | Members cannot send friend requests through the group member relationship. | Return value When the call completes, group member friend request permissions are updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/change-group-mute", + "title": "Change group mute status", + "description": "OpenIM React Native SDK guide for change group mute status.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group change-group-mute", + "content": "Call changeGroupMute to enable or disable group wide muting. await OpenIMSDK.changeGroupMute groupID, isMute: true, muteBypassUserIDs: serviceAccountUserID , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | isMute | boolean | Yes | Use true to enable group wide muting or false to disable it. | | muteBypassUserIDs Enterprise | string | No | User IDs that can still send messages while the group is muted. | Do not add every member to muteBypassUserIDs . The server controls whether the group owner and administrators can send messages. Return value When the call completes, the group wide mute setting is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/join-group", + "title": "Apply to join a group", + "description": "OpenIM React Native SDK guide for apply to join a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group join-group", + "content": "Call joinGroup with a group ID, application message, and join source to apply to join a group. await OpenIMSDK.joinGroup groupID, reqMsg: 'Request to join the project discussion group', joinSource: GroupJoinSource.Search, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reqMsg | string | Yes | Application message. Pass an empty string when no message is needed. | | joinSource | GroupJoinSource | Yes | How the user initiated joining the group. | | ex | string | No | Business specific extension string. | Common joinSource values are: | Enum value | Value | Description | | | | | | GroupJoinSource.Invitation | 2 | Joined through an invitation. | | GroupJoinSource.Search | 3 | Joined through search. | | GroupJoinSource.QrCode | 4 | Joined through a QR code. | joinSource records how the user joined; it does not determine whether approval is required. Return value When the call completes, the join request is submitted. After the current account joins the group successfully, OnJoinedGroupAdded returns the group information; see Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/quit-group", + "title": "Leave a group", + "description": "OpenIM React Native SDK guide for leave a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group quit-group", + "content": "Call quitGroup to leave a group that the current account has joined. await OpenIMSDK.quitGroup groupID ; groupID is the ID of the group to leave. A group owner must transfer ownership before leaving the group. Return value When the call completes, the current account has left the target group. After the current account leaves successfully, OnJoinedGroupDeleted is triggered and its callback receives the corresponding group information. See Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/dismiss-group", + "title": "Dismiss a group", + "description": "OpenIM React Native SDK guide for dismiss a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group dismiss-group", + "content": "Call dismissGroup to dismiss a group. await OpenIMSDK.dismissGroup groupID ; groupID is the ID of the group to dismiss. Dismissing a group affects every member, and the server validates whether the caller has permission. Return value When the call completes, the group is dismissed. After a group is dismissed, relevant clients receive OnGroupDismissed ; its callback receives the dismissed group information. See Group overview /sdk/react native/group/overview group for event handling." + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "description": "OpenIM React Native SDK guide for get group information.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-specified-groups-info", + "content": "Call getSpecifiedGroupsInfo to retrieve information for specific groups by group ID. const groups = await OpenIMSDK.getSpecifiedGroupsInfo 'group 001', 'group 002', ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | IDs of the groups to retrieve. | Return value When the call completes, it returns matching GroupItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "description": "OpenIM React Native SDK guide for get joined groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list", + "content": "Call getJoinedGroupList to retrieve every group that the current account has joined. const groups = await OpenIMSDK.getJoinedGroupList ; Return value When the call completes, it returns GroupItem . For many groups, use Get joined groups by page /sdk/react native/group/retrieving groups/get joined group list page to retrieve them in batches." + }, + { + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "description": "OpenIM React Native SDK guide for get joined groups by page.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list-page", + "content": "Call getJoinedGroupListPage to retrieve groups joined by the current account in pages. const groups = await OpenIMSDK.getJoinedGroupListPage offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of groups to retrieve. | To retrieve the next page, set offset to the number of groups already retrieved. Return value When the call completes, it returns GroupItem for the current page. See Group overview /sdk/react native/group/overview group for field descriptions." + }, + { + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "description": "OpenIM React Native SDK guide for check group membership.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups is-join-group", + "content": "Call isJoinGroup to check whether the current account has joined a group. const isJoined = await OpenIMSDK.isJoinGroup 'group 001' ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group to check. | Return value When the call completes, it returns a boolean : true if the current account has joined the group, or false otherwise." + }, + { + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "Search groups", + "description": "OpenIM React Native SDK guide for search groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups search-groups", + "content": "Call searchGroups to search groups by group ID or group name. const groups = await OpenIMSDK.searchGroups keywordList: 'project' , isSearchGroupID: false, isSearchGroupName: true, ; Parameters | Parameter | Type | Required | Description | | | | | | keywordList | string | Yes | Search keywords. | | isSearchGroupID | boolean | Yes | Whether to match group IDs. | | isSearchGroupName | boolean | Yes | Whether to match group names. | Return value When the call completes, it returns matching GroupItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "description": "OpenIM React Native SDK guide for get received group applications.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-recipient", + "content": "Group owners and administrators can call getGroupApplicationListAsRecipient to retrieve received group applications. const applications = await OpenIMSDK.getGroupApplicationListAsRecipient groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | | handleResults | number | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of applications to retrieve. | Common ApplicationHandleResult values are: | Enum value | Value | Meaning | | | | | | ApplicationHandleResult.Unprocessed | 0 | Pending. | | ApplicationHandleResult.Agree | 1 | Accepted. | | ApplicationHandleResult.Reject | 1 | Rejected. | Return value When the call completes, it returns GroupApplicationItem that the current account can handle. Group application fields | Field | Type | Description | | | | | | groupID | string | ID of the group that the user applied to join. | | userID | string | User ID of the applicant. | | nickname | string | Applicant nickname recorded in the application. | | userFaceURL | string | Applicant avatar URL recorded in the application. | | reqMsg | string | Application message. | | reqTime | number | Application time. | | joinSource | GroupJoinSource | Source of the group application. | | handleResult | ApplicationHandleResult | Current handling result. | | handleUserID | string | User ID of the person who handled the application. | | handledMsg | string | Message entered while handling the application. | | handledTime | number | Time when the application was handled. | | groupName | string | Group name recorded in the application. | | groupFaceURL | string | Group avatar URL recorded in the application. | | groupType | GroupType | Group type. | | ownerUserID | string | Group owner user ID. | | creatorUserID | string | Group creator user ID. | | introduction | string | Group description recorded in the application. | | notification | string | Group announcement recorded in the application. | | memberCount | number | Group member count recorded in the application. | | status | GroupStatus | Group status. | | createTime | number | Application record creation time as a Unix timestamp in milliseconds. | | ex | string | Application record extension string. | The nickname, avatar, and group information in an application record reflect the values when the record was created. Query the current user profile or group profile to show the latest information. Listen for group application changes When a group application is added, handled, or deleted, OnGroupApplicationAdded , OnGroupApplicationAccepted , OnGroupApplicationRejected , or OnGroupApplicationDeleted is triggered respectively. Each callback receives a GroupApplicationItem directly: const handleApplicationChanged = application: GroupApplicationItem = // Update the application record by groupID and userID ; const handleApplicationDeleted = application: GroupApplicationItem = // Delete the application record by groupID and userID ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; Remove these listeners when signing out, switching accounts, or discarding application list state." + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "description": "OpenIM React Native SDK guide for get sent group applications.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-applicant", + "content": "Call getGroupApplicationListAsApplicant to retrieve group applications sent by the current account. const applications = await OpenIMSDK.getGroupApplicationListAsApplicant groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed, ApplicationHandleResult.Agree, ApplicationHandleResult.Reject, , offset: 0, count: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | | handleResults | number | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of applications to retrieve. | For ApplicationHandleResult values, see Get received group applications /sdk/react native/group/group applications/get group application list as recipient . Return value When the call completes, it returns GroupApplicationItem sent by the current account. See Get received group applications /sdk/react native/group/group applications/get group application list as recipient for application fields and application change event handling." + }, + { + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "Get pending group application count", + "description": "OpenIM React Native SDK guide for get pending group application count.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-unhandled-count", + "content": "Call getGroupApplicationUnhandledCount to retrieve the number of group applications that remain unhandled after a specified time. const count = await OpenIMSDK.getGroupApplicationUnhandledCount time: 0, ; Parameters | Parameter | Type | Required | Description | | | | | | time | number | Yes | Start time as a Unix timestamp in milliseconds. Pass 0 to count every pending application. | Return value When the call completes, it returns a number representing the number of pending group applications after the specified time." + }, + { + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "Accept a group application", + "description": "OpenIM React Native SDK guide for accept a group application.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications accept-group-application", + "content": "Call acceptGroupApplication to accept a user's group application. await OpenIMSDK.acceptGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: 'Approved', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group in the application. | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | handleMsg | string | Yes | Handling message. Pass an empty string when no message is needed. | When the call completes, the group application is accepted. Application status changes trigger OnGroupApplicationAccepted ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." + }, + { + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "description": "OpenIM React Native SDK guide for reject a group application.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications refuse-group-application", + "content": "Call refuseGroupApplication to reject a user's group application. await OpenIMSDK.refuseGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: 'The application cannot be accepted at this time', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group in the application. | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | handleMsg | string | Yes | Rejection reason. Pass an empty string when no reason is needed. | When the call completes, the group application is rejected. Application status changes trigger OnGroupApplicationRejected ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." + }, + { + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "description": "OpenIM React Native SDK guide for delete group applications.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications delete-group-requests", + "content": "Call deleteGroupRequests to delete specified group application records in batches. await OpenIMSDK.deleteGroupRequests fromUserID: application.userID, groupID: application.groupID, , ; Parameters Each item in the array contains the following fields: | Parameter | Type | Required | Description | | | | | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | groupID | string | Yes | ID of the group in the application. | Deleting an application record does not handle a pending application. To accept or reject an application, use Accept a group application /sdk/react native/group/group applications/accept group application or Reject a group application /sdk/react native/group/group applications/refuse group application , respectively. When the call completes, the request to delete the records is complete. Deleting an application record triggers OnGroupApplicationDeleted ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "Get group members", + "description": "OpenIM React Native SDK guide for get group members.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-group-member-list", + "content": "Call getGroupMemberList to retrieve members of a group in pages and filter them by role. const members = await OpenIMSDK.getGroupMemberList groupID: 'group 001', filter: GroupMemberFilter.All, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | filter | GroupMemberFilter | Yes | Member role filter. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | GroupMemberFilter values are: | Enum value | Value | Description | | | | | | GroupMemberFilter.All | 0 | All members. | | GroupMemberFilter.Owner | 1 | Group owner only. | | GroupMemberFilter.Admin | 2 | Administrators only. | | GroupMemberFilter.Normal | 3 | Regular members only. | | GroupMemberFilter.AdminAndNormal | 4 | Administrators and regular members. | | GroupMemberFilter.AdminAndOwner | 5 | Administrators and the group owner. | To retrieve the next page, set offset to the number of members already retrieved. Return value When the call completes, it returns GroupMemberItem for the current page. See Group overview /sdk/react native/group/overview group for field descriptions. Listen for group member changes When a member joins, leaves, or has profile information changed, OnGroupMemberAdded , OnGroupMemberDeleted , and OnGroupMemberInfoChanged are triggered respectively. Each callback receives a GroupMemberItem directly: const handleMemberAdded = member: GroupMemberItem = // Add the member to the corresponding group member list ; const handleMemberDeleted = member: GroupMemberItem = // Delete the member by member.groupID and member.userID ; const handleMemberChanged = member: GroupMemberItem = // Update the member profile by member.groupID and member.userID ; OpenIMSDK.on OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.on OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; OpenIMSDK.off OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.off OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; Remove these listeners when signing out, switching accounts, or discarding member list state." + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get group member profiles", + "description": "OpenIM React Native SDK guide for get group member profiles.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-specified-group-members-info", + "content": "Call getSpecifiedGroupMembersInfo to retrieve member profiles for specified users in a group. const members = await OpenIMSDK.getSpecifiedGroupMembersInfo groupID: 'group 001', userIDList: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userIDList | string | Yes | User IDs of the members to retrieve. | Return value When the call completes, it returns matching GroupMemberItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "Check users in a group", + "description": "OpenIM React Native SDK guide for check users in a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-users-in-group", + "content": "Call getUsersInGroup to retrieve the user IDs from a specified set that have joined a group. const userIDs = await OpenIMSDK.getUsersInGroup groupID: 'group 001', userIDList: 'user 001', 'user 002', 'user 003' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userIDList | string | Yes | User IDs to check. | Return value When the call completes, it returns string containing the user IDs that have joined the target group." + }, + { + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "description": "OpenIM React Native SDK guide for search group members.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members search-group-members", + "content": "Call searchGroupMembers to search members of a group by user ID or group nickname. const members = await OpenIMSDK.searchGroupMembers groupID: 'group 001', keywordList: 'Zhang' , isSearchUserID: false, isSearchMemberNickname: true, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | keywordList | string | Yes | Search keywords. | | isSearchUserID | boolean | Yes | Whether to match user IDs. | | isSearchMemberNickname | boolean | Yes | Whether to match group nicknames. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | Return value When the call completes, it returns matching GroupMemberItem entries for the current page. See Group overview /sdk/react native/group/overview group for field descriptions." + }, + { + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "description": "OpenIM React Native SDK guide for invite users to a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members invite-user-to-group", + "content": "Call inviteUserToGroup to invite one or more users to a group. await OpenIMSDK.inviteUserToGroup groupID: 'group 001', reason: 'Invitation to join the project discussion group', userIDList: 'user 002', 'user 003' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reason | string | Yes | Invitation message. Pass an empty string when no message is needed. | | userIDList | string | Yes | User IDs to invite. | When the call completes, the invitation request is submitted. When a user actually joins the group, OnGroupMemberAdded is triggered; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "description": "OpenIM React Native SDK guide for remove group members.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members kick-group-member", + "content": "Call kickGroupMember to remove one or more members from a group. await OpenIMSDK.kickGroupMember groupID: 'group 001', reason: 'No longer involved in the project', userIDList: 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reason | string | Yes | Removal reason. Pass an empty string when no reason is needed. | | userIDList | string | Yes | User IDs of the members to remove. | When the call completes, the specified members are removed from the group. Removing a member triggers OnGroupMemberDeleted ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "Update a group nickname", + "description": "OpenIM React Native SDK guide for update a group nickname.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-nickname", + "content": "Call setGroupMemberInfo to update a member's group nickname. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', nickname: 'Project owner', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose nickname to update. | | nickname | string | Yes | New nickname for the member in the group. | A group nickname applies only to this group and does not change the user's account nickname. When the call completes, the group nickname is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "description": "OpenIM React Native SDK guide for manage group administrators.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-role-level", + "content": "Call setGroupMemberInfo to make a member an administrator or remove administrator status. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', roleLevel: GroupMemberRole.Admin, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose role to set. | | roleLevel | GroupMemberRole | Yes | Member role to set. | | Enum value | Value | Description | | | | | | GroupMemberRole.Normal | 20 | Regular member. Pass this value to remove administrator status. | | GroupMemberRole.Admin | 60 | Administrator. | | GroupMemberRole.Owner | 100 | Group owner role, used only to identify the current role. | You cannot transfer group ownership by setting GroupMemberRole.Owner . Use Transfer group ownership /sdk/react native/group/managing group members/transfer group owner instead. When the call completes, the member role is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member avatar", + "description": "OpenIM React Native SDK guide for update a group member avatar.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-avatar", + "content": "Call setGroupMemberInfo to update a member's group avatar. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', faceURL: 'https://example.com/avatar.png', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose avatar to update. | | faceURL | string | Yes | Member avatar URL for this group. | A group avatar applies only to the specified group. To update an account avatar, use Update your profile /sdk/react native/user/profile/set self info . When the call completes, the group avatar is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "Set group member extra data", + "description": "OpenIM React Native SDK guide for set group member extra data.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-extension", + "content": "Call setGroupMemberInfo to set a member's ex extension field. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', ex: JSON.stringify title: 'maintainer', , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose extension data to set. | | ex | string | Yes | Group member extension string. It can contain JSON or another string format for business specific data. | When the call completes, the member extension field is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "description": "OpenIM React Native SDK guide for transfer group ownership.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members transfer-group-owner", + "content": "Call transferGroupOwner to transfer group ownership to another member. await OpenIMSDK.transferGroupOwner groupID: 'group 001', newOwnerUserID: 'user 002', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | newOwnerUserID | string | Yes | User ID of the new group owner. This user must already be a member of the group. | When the call completes, group ownership is transferred. The member roles of the former and new owners change through OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "description": "OpenIM React Native SDK guide for mute or unmute a group member.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", + "content": "Call changeGroupMemberMute to set a mute duration for a member. Pass 0 to remove the mute. await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member to mute or unmute. | | mutedSeconds | number | Yes | Mute duration in seconds. Pass 0 to remove the mute. | When the call completes, the member mute state is updated. Member profile changes trigger OnGroupMemberInfoChanged ; read muteEndTime from the event parameter to get the mute end time. See Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." } ] From 855403bdaf3029c332267c506bd94f8f3909dc8c Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Thu, 27 Aug 2026 18:13:41 +0800 Subject: [PATCH 04/15] docs(react-native): add message documentation --- .../change-input-states.mdx | 43 + .../check-speech-to-text.mdx | 29 + .../composing-messages/get-typing-status.mdx | 31 + .../save-local-transcript.mdx | 40 + .../composing-messages/transcribe-audio.mdx | 19 + .../update-typing-status.mdx | 29 + .../create-advanced-quote-message.mdx | 30 + .../create-advanced-text-message.mdx | 36 + .../creating-messages/create-card-message.mdx | 33 + .../create-custom-message.mdx | 31 + .../creating-messages/create-face-message.mdx | 24 + .../create-file-message-by-file.mdx | 29 + .../create-file-message-by-url.mdx | 37 + .../create-forward-message.mdx | 19 + .../create-image-message-by-file.mdx | 19 + .../create-image-message-by-url.mdx | 42 + .../create-location-message.mdx | 31 + .../create-markdown-message.mdx | 21 + .../create-merger-message.mdx | 31 + .../create-quote-message.mdx | 29 + .../create-sound-message-by-file.mdx | 29 + .../create-sound-message-by-url.mdx | 37 + .../create-targeted-group-message.mdx | 31 + .../create-text-at-message.mdx | 37 + .../creating-messages/create-text-message.mdx | 19 + .../create-video-message-by-file.mdx | 33 + .../create-video-message-by-url.mdx | 46 + .../clear-all-local-messages.mdx | 19 + .../managing-messages/clear-all-messages.mdx | 19 + .../delete-local-message.mdx | 29 + .../delete-saved-messages.mdx | 49 + .../delete-user-messages.mdx | 53 + .../insert-local-group-message.mdx | 31 + .../insert-local-single-message.mdx | 31 + .../managing-messages/modify-a-message.mdx | 57 + .../managing-messages/revoke-a-message.mdx | 47 + .../set-message-local-ex.mdx | 31 + .../get-group-message-readers.mdx | 35 + .../send-group-read-receipts.mdx | 47 + .../react-native/message/overview-message.mdx | 105 + .../receive-custom-business-messages.mdx | 33 + .../receiving-messages/receive-messages.mdx | 39 + .../find-messages-by-id.mdx | 37 + .../load-message-context.mdx | 33 + .../load-newer-messages.mdx | 33 + .../load-older-messages.mdx | 44 + .../searching-messages/search-messages.mdx | 50 + .../sending-messages/send-message-not-oss.mdx | 33 + .../message/sending-messages/send-message.mdx | 51 + .../change-input-states.mdx | 43 + .../check-speech-to-text.mdx | 29 + .../composing-messages/get-typing-status.mdx | 31 + .../save-local-transcript.mdx | 40 + .../composing-messages/transcribe-audio.mdx | 19 + .../update-typing-status.mdx | 29 + .../create-advanced-quote-message.mdx | 30 + .../create-advanced-text-message.mdx | 36 + .../creating-messages/create-card-message.mdx | 33 + .../create-custom-message.mdx | 31 + .../creating-messages/create-face-message.mdx | 24 + .../create-file-message-by-file.mdx | 29 + .../create-file-message-by-url.mdx | 37 + .../create-forward-message.mdx | 19 + .../create-image-message-by-file.mdx | 19 + .../create-image-message-by-url.mdx | 42 + .../create-location-message.mdx | 31 + .../create-markdown-message.mdx | 21 + .../create-merger-message.mdx | 31 + .../create-quote-message.mdx | 29 + .../create-sound-message-by-file.mdx | 29 + .../create-sound-message-by-url.mdx | 37 + .../create-targeted-group-message.mdx | 31 + .../create-text-at-message.mdx | 37 + .../creating-messages/create-text-message.mdx | 19 + .../create-video-message-by-file.mdx | 33 + .../create-video-message-by-url.mdx | 46 + .../clear-all-local-messages.mdx | 19 + .../managing-messages/clear-all-messages.mdx | 19 + .../delete-local-message.mdx | 29 + .../delete-saved-messages.mdx | 49 + .../delete-user-messages.mdx | 51 + .../insert-local-group-message.mdx | 31 + .../insert-local-single-message.mdx | 31 + .../managing-messages/modify-a-message.mdx | 57 + .../managing-messages/revoke-a-message.mdx | 47 + .../set-message-local-ex.mdx | 31 + .../get-group-message-readers.mdx | 37 + .../send-group-read-receipts.mdx | 47 + .../react-native/message/overview-message.mdx | 105 + .../receive-custom-business-messages.mdx | 33 + .../receiving-messages/receive-messages.mdx | 39 + .../find-messages-by-id.mdx | 37 + .../load-message-context.mdx | 33 + .../load-newer-messages.mdx | 33 + .../load-older-messages.mdx | 44 + .../searching-messages/search-messages.mdx | 50 + .../sending-messages/send-message-not-oss.mdx | 33 + .../message/sending-messages/send-message.mdx | 51 + data/structure/chat-pages.json | 392 +++ .../structure/react-native-content-audit.json | 2233 +++++++++++++++++ .../react-native-navigation-labels.json | 58 +- data/structure/react-native-sidebar.json | 232 ++ src/generated/navigation.json | 557 +++- .../react-native-sdk-zh-content.json | 760 +++++- src/generated/routes.json | 882 +++++++ src/generated/search-index-zh.json | 392 +++ src/generated/search-index.json | 392 +++ 107 files changed, 9374 insertions(+), 6 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx create mode 100644 content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx create mode 100644 content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx create mode 100644 content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx create mode 100644 content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx create mode 100644 content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx create mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx create mode 100644 content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx create mode 100644 content/docs/chat/sdk/react-native/message/overview-message.mdx create mode 100644 content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx create mode 100644 content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx create mode 100644 content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx create mode 100644 content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx create mode 100644 content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/overview-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx diff --git a/content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx b/content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx new file mode 100644 index 0000000000..ab03cc8e0f --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx @@ -0,0 +1,43 @@ +--- +title: 'Update input states' +description: 'OpenIM React Native SDK guide for update input states.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/change-input-states' +--- + +Use `changeInputStates()` to update the current account's input state in a conversation. Pass `focus: true` while typing, and `false` after sending, losing focus, or leaving the conversation. + +```ts +await OpenIMSDK.changeInputStates({ + conversationID, + focus: true, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation whose input state is updated. | +| `focus` | `boolean` | Yes | `true` means the user is typing; `false` means typing has stopped. | + +Avoid reporting the same state on every keyboard event. When the state changes, `OnInputStatusChanged` is emitted with `conversationID`, `userID`, and `platformIDs`. + +```ts +function handleInputStatusChanged(inputStatus) { + // ... +} + +// Set the listener +OpenIMSDK.on(OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx b/content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx new file mode 100644 index 0000000000..8ad4b549c1 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx @@ -0,0 +1,29 @@ +--- +title: 'Check audio transcription availability' +description: 'OpenIM React Native SDK guide for check audio transcription availability.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/check-speech-to-text' +--- + +`speechToTextCapabilities()` is used only to query supported audio formats, sample rates, recording duration, and file size limits. The interface that actually performs speech recognition is [Transcribe audio](/sdk/react-native/message/composing-messages/transcribe-audio). + +```ts +const capabilities = await OpenIMSDK.speechToTextCapabilities(); +``` + +## Return value + +The call returns `SpeechToTextCapabilities`: + +| Field | Type | Description | +| --- | --- | --- | +| `format` | `string[]` | Supported audio formats. | +| `sampleRateHz` | `number` | Required audio sample rate in hertz. | +| `maxRecordTimeMs` | `number` | Maximum recording duration in milliseconds. | +| `maxFileSize` | `number` | Maximum file size in bytes. | +| `provider` | `string` | Current speech-recognition provider. | diff --git a/content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx b/content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx new file mode 100644 index 0000000000..284e2a0b9c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx @@ -0,0 +1,31 @@ +--- +title: 'Get typing status' +description: 'OpenIM React Native SDK guide for get typing status.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/get-typing-status' +--- + +Use `getInputStates()` to query a user's current input state in a conversation. + +```ts +const platformIDs = await OpenIMSDK.getInputStates({ + conversationID, + userID, +}); + +const isTyping = platformIDs.length > 0; +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Target conversation ID. | +| `userID` | `string` | Yes | User ID whose input state is queried. | + +The call returns an array of platform IDs currently reporting input. An empty array means that no platform is currently reporting input. To keep the display current, handle the `OnInputStatusChanged` event described in [Update input states](/sdk/react-native/message/composing-messages/change-input-states). diff --git a/content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx b/content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx new file mode 100644 index 0000000000..31da774f7c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx @@ -0,0 +1,40 @@ +--- +title: 'Save a local transcript' +description: 'OpenIM React Native SDK guide for save a local transcript.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/save-local-transcript' +--- + +Use `setMessageLocalContent()` to save transcription text in a voice message on the current device. Pass the complete message object and preserve its existing fields. + +```ts +const updatedMessage = { + ...message, + soundElem: { + ...message.soundElem, + text: { + text: transcript, + translate: message.soundElem?.text?.translate ?? {}, + }, + }, +}; + +await OpenIMSDK.setMessageLocalContent({ + conversationID, + message: updatedMessage, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `message` | `MessageItem` | Yes | Complete message object containing the transcription. | + +After the call completes, the transcription is saved in the message content on the current device. diff --git a/content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx b/content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx new file mode 100644 index 0000000000..115fcfd50c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx @@ -0,0 +1,19 @@ +--- +title: 'Transcribe audio' +description: 'OpenIM React Native SDK guide for transcribe audio.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/transcribe-audio' +--- + +Use `speechToText()` to transcribe a local audio file that the SDK can read. Pass a local path, not a remote URL, Base64 data, or an uploaded file name. + +```ts +const { text } = await OpenIMSDK.speechToText(filename); +``` + +`filename` is the local audio-file path. The call returns `{ text }`, where `text` is the transcription. See [Check speech recognition support](/sdk/react-native/message/composing-messages/check-speech-to-text) when capability information is needed; to save the result in a local voice message, see [Save a local transcript](/sdk/react-native/message/composing-messages/save-local-transcript). diff --git a/content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx b/content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx new file mode 100644 index 0000000000..53a892ea32 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx @@ -0,0 +1,29 @@ +--- +title: 'Report typing status' +description: 'OpenIM React Native SDK guide for report typing status.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/update-typing-status' +--- + +Use `typingStatusUpdate()` to send a typing hint to the other participant in a direct chat. + +```ts +await OpenIMSDK.typingStatusUpdate({ + recvID: receiverUserID, + msgTip: 'Typing...', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `recvID` | `string` | Yes | User ID receiving the typing hint. | +| `msgTip` | `string` | Yes | Typing hint text to send. | + +After the call completes, the typing hint has been sent. To update the current account's input state based on conversation focus, use [Update input states](/sdk/react-native/message/composing-messages/change-input-states). diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx new file mode 100644 index 0000000000..6c3d979421 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx @@ -0,0 +1,30 @@ +--- +title: 'Create a rich-text reply' +description: 'OpenIM React Native SDK guide for create a rich-text reply.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-advanced-quote-message' +--- + +Use `createAdvancedQuoteMessage()` to create a rich-text reply with an original-message reference and text entities. + +```ts +const message = await OpenIMSDK.createAdvancedQuoteMessage({ + text: 'I have reviewed the related link.', + message: originalMessage, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `text` | `string` | Yes | Raw reply text. | +| `message` | `MessageItem` | Yes | Original message being replied to. | +| `messageEntityList` | `MessageEntity[]` | No | Entities in the text. | + +`MessageEntity` uses `type`, `offset`, and `length` to describe an entity, with optional `url` and `info`. The call returns a `MessageItem` ready to send. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx new file mode 100644 index 0000000000..92690ac178 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx @@ -0,0 +1,36 @@ +--- +title: 'Create a rich-text message' +description: 'OpenIM React Native SDK guide for create a rich-text message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-advanced-text-message' +--- + +Use `createAdvancedTextMessage()` to create a rich-text message with message entities. + +```ts +const message = await OpenIMSDK.createAdvancedTextMessage({ + text: 'See https://openim.io', + messageEntityList: [ + { + type: 'url', + offset: 4, + length: 17, + url: 'https://openim.io', + }, + ], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `text` | `string` | Yes | Raw rich-text content. | +| `messageEntityList` | `MessageEntity[]` | No | Entities in the text. | + +Each `MessageEntity` contains `type`, `offset`, and `length`, with optional `url` and `info`. The call returns a `MessageItem` ready to send. Use [Send a message](/sdk/react-native/message/sending-messages/send-message) to send it. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx new file mode 100644 index 0000000000..cb1afdd06e --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx @@ -0,0 +1,33 @@ +--- +title: 'Create a contact card message' +description: 'OpenIM React Native SDK guide for create a contact card message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-card-message' +--- + +Use `createCardMessage()` to create a user contact-card message. + +```ts +const message = await OpenIMSDK.createCardMessage({ + userID: 'user-002', + nickname: 'Alex', + faceURL: 'https://example.com/avatar.png', + ex: '', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `userID` | `string` | Yes | User ID represented by the card. | +| `nickname` | `string` | Yes | Nickname shown on the card. | +| `faceURL` | `string` | Yes | Avatar URL shown on the card. | +| `ex` | `string` | Yes | Card extension data. Pass an empty string when it is not used. | + +The call returns a `MessageItem` ready to send. `message.cardElem` contains the card information passed during creation. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx new file mode 100644 index 0000000000..672da44a3c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx @@ -0,0 +1,31 @@ +--- +title: 'Create a custom message' +description: 'OpenIM React Native SDK guide for create a custom message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-custom-message' +--- + +Use `createCustomMessage()` to create a custom business message. The sending and receiving applications must agree on the formats of `data` and `extension`. + +```ts +const message = await OpenIMSDK.createCustomMessage({ + data: JSON.stringify({ type: 'task', taskID: 'task-42' }), + extension: JSON.stringify({ version: 1 }), + description: 'Task card', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `data` | `string` | Yes | Business data string. It can contain JSON. | +| `extension` | `string` | Yes | Business extension data string. | +| `description` | `string` | Yes | Message description. It can also be fallback text for clients that do not support the message type. | + +The call returns a `MessageItem` ready to send. Receiving clients should validate the business-data format and version. For server-delivered business notifications, see [Receive custom business messages](/sdk/react-native/message/receiving-messages/receive-custom-business-messages). diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx new file mode 100644 index 0000000000..b8a929bf3e --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx @@ -0,0 +1,24 @@ +--- +title: 'Create an emoji message' +description: 'OpenIM React Native SDK guide for create an emoji message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-face-message' +--- + +Use `createFaceMessage()` to create an emoji message defined by your application. + +```ts +const message = await OpenIMSDK.createFaceMessage({ + index: 12, + data: JSON.stringify({ + url: 'https://www.example.com/emoji.png', + }), +}); +``` + +`index` is an emoji index agreed by both clients. `data` is a custom-format string agreed by the sending and receiving clients. Use it to provide emoji identification or rendering information, such as an image URL, a fixed key, or other business data. The call returns a `MessageItem` ready to send. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx new file mode 100644 index 0000000000..6848217aff --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx @@ -0,0 +1,29 @@ +--- +title: 'Create a file message from a file' +description: 'OpenIM React Native SDK guide for create a file message from a file.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-file-message-by-file' +--- + +Use `createFileMessageFromFullPath()` to create a message from a file on the device. + +```ts +const message = await OpenIMSDK.createFileMessageFromFullPath({ + filePath, + fileName: 'product-guide.pdf', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `filePath` | `string` | Yes | Full path to the file. | +| `fileName` | `string` | Yes | File name shown to recipients. | + +The call returns a `MessageItem` ready to send. When you use [Send a message](/sdk/react-native/message/sending-messages/send-message), the SDK uploads the local file. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx new file mode 100644 index 0000000000..e96aecf78d --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx @@ -0,0 +1,37 @@ +--- +title: 'Create a file message from a URL' +description: 'OpenIM React Native SDK guide for create a file message from a url.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-file-message-by-url' +--- + +Use `createFileMessageByURL()` to create a message from uploaded file resource information. + +```ts +const message = await OpenIMSDK.createFileMessageByURL({ + filePath: '', + fileName: 'product-guide.pdf', + uuid: 'file-001', + sourceUrl: 'https://www.example.com/product-guide.pdf', + fileSize: 256000, + fileType: 'application/pdf', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `filePath` | `string` | Yes | Local file path. Pass an empty string when only a remote resource is available. | +| `fileName` | `string` | Yes | File name shown to recipients. | +| `uuid` | `string` | Yes | File resource ID. | +| `sourceUrl` | `string` | Yes | URL of the uploaded file. | +| `fileSize` | `number` | Yes | File size in bytes. | +| `fileType` | `string` | No | File type. | + +The call returns a `MessageItem` ready to send. Use the actual upload result for resource information, then use [Send an uploaded media message](/sdk/react-native/message/sending-messages/send-message-not-oss). diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx new file mode 100644 index 0000000000..1be11c4e0e --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx @@ -0,0 +1,19 @@ +--- +title: 'Create a forwarded message' +description: 'OpenIM React Native SDK guide for create a forwarded message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-forward-message' +--- + +Use `createForwardMessage()` to create a forwarded message from an existing message. + +```ts +const message = await OpenIMSDK.createForwardMessage(sourceMessage); +``` + +`sourceMessage` must be a complete `MessageItem`. The call returns a new `MessageItem` ready to send to a direct or group chat. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx new file mode 100644 index 0000000000..16910b3dcd --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx @@ -0,0 +1,19 @@ +--- +title: 'Create an image message from a file' +description: 'OpenIM React Native SDK guide for create an image message from a file.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-image-message-by-file' +--- + +Use `createImageMessageFromFullPath()` to create a message from an image stored on the device. + +```ts +const message = await OpenIMSDK.createImageMessageFromFullPath(imagePath); +``` + +`imagePath` is the full path to the image on the device. The call returns a `MessageItem` ready to send. When you use [Send a message](/sdk/react-native/message/sending-messages/send-message), the SDK uploads the local resource. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx new file mode 100644 index 0000000000..b176e7eb2d --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx @@ -0,0 +1,42 @@ +--- +title: 'Create an image message from a URL' +description: 'OpenIM React Native SDK guide for create an image message from a url.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-image-message-by-url' +--- + +Use `createImageMessageByURL()` to create a message from uploaded image resource information. The source image, large image, and thumbnail can share one resource description or use separate resources with different sizes or quality. + +```ts +const picture = { + uuid: 'image-001', + type: 'image/jpeg', + size: 120000, + width: 1280, + height: 720, + url: 'https://www.example.com/picture.png', +}; + +const message = await OpenIMSDK.createImageMessageByURL({ + sourcePicture: picture, + bigPicture: picture, + snapshotPicture: picture, + sourcePath: '', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `sourcePicture` | `PicBaseInfo` | Yes | Source-image resource information. | +| `bigPicture` | `PicBaseInfo` | Yes | Large-image resource information. | +| `snapshotPicture` | `PicBaseInfo` | Yes | Thumbnail resource information. | +| `sourcePath` | `string` | Yes | Local image path. Pass an empty string when only a remote resource is available. | + +Each `PicBaseInfo` contains `uuid`, `type`, `size`, `width`, `height`, and `url`: the resource ID, type, byte size, pixel dimensions, and remote URL. The call returns a `MessageItem` ready to send. Use [Send an uploaded media message](/sdk/react-native/message/sending-messages/send-message-not-oss) to send it. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx new file mode 100644 index 0000000000..6009b37c31 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx @@ -0,0 +1,31 @@ +--- +title: 'Create a location message' +description: 'OpenIM React Native SDK guide for create a location message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-location-message' +--- + +Use `createLocationMessage()` to create a location message. + +```ts +const message = await OpenIMSDK.createLocationMessage({ + description: 'Pudong New Area, Shanghai', + longitude: 121.4737, + latitude: 31.2304, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `description` | `string` | Yes | Location name or address description. | +| `longitude` | `number` | Yes | Longitude. | +| `latitude` | `number` | Yes | Latitude. | + +The call returns a `MessageItem` ready to send. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx new file mode 100644 index 0000000000..427127f1db --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx @@ -0,0 +1,21 @@ +--- +title: 'Create a Markdown message' +description: 'OpenIM React Native SDK guide for create a markdown message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-markdown-message' +--- + +Use `createMarkdownMessage()` to create a Markdown message. + +```ts +const message = await OpenIMSDK.createMarkdownMessage( + '## Release complete\n\n- Android\n- iOS', +); +``` + +The argument is the complete Markdown source text. `createMarkdownMessage()` only creates the message; it does not render or sanitize Markdown. The call returns a `MessageItem` ready to send. When displaying untrusted Markdown, use a Markdown renderer with appropriate security controls. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx new file mode 100644 index 0000000000..a221e63f6f --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx @@ -0,0 +1,31 @@ +--- +title: 'Create a merged forward message' +description: 'OpenIM React Native SDK guide for create a merged forward message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-merger-message' +--- + +Use `createMergerMessage()` to create a merged forwarded message containing multiple messages. + +```ts +const message = await OpenIMSDK.createMergerMessage({ + messageList: selectedMessages, + title: 'Project discussion', + summaryList: ['Alex: The release plan is confirmed', 'Lee: I will follow up on testing'], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `messageList` | `MessageItem[]` | Yes | Messages to merge. | +| `title` | `string` | Yes | Title of the merged message. | +| `summaryList` | `string[]` | Yes | Summary lines shown for the merged message. | + +The call returns a `MessageItem` ready to send. Summary content should follow the display and privacy rules of the current conversation. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx new file mode 100644 index 0000000000..9da7f5cc4b --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx @@ -0,0 +1,29 @@ +--- +title: 'Create a reply message' +description: 'OpenIM React Native SDK guide for create a reply message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-quote-message' +--- + +Use `createQuoteMessage()` to create a reply message with the complete original message object. + +```ts +const message = await OpenIMSDK.createQuoteMessage({ + text: 'I agree with this approach.', + message: originalMessage, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `text` | `string` | Yes | Reply text. | +| `message` | `MessageItem` | Yes | Original message being replied to. | + +The call returns a new `MessageItem` ready to send. When rendering replies, handle the case where the original message has been deleted or cannot be displayed. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx new file mode 100644 index 0000000000..955ba71942 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx @@ -0,0 +1,29 @@ +--- +title: 'Create an audio message from a file' +description: 'OpenIM React Native SDK guide for create an audio message from a file.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-sound-message-by-file' +--- + +Use `createSoundMessageFromFullPath()` to create a message from an audio file on the device. + +```ts +const message = await OpenIMSDK.createSoundMessageFromFullPath({ + soundPath, + duration: 18, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `soundPath` | `string` | Yes | Full path to the audio file. | +| `duration` | `number` | Yes | Audio duration in seconds. | + +The call returns a `MessageItem` ready to send. When you use [Send a message](/sdk/react-native/message/sending-messages/send-message), the SDK uploads the local audio resource. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx new file mode 100644 index 0000000000..76c489c42c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx @@ -0,0 +1,37 @@ +--- +title: 'Create an audio message from a URL' +description: 'OpenIM React Native SDK guide for create an audio message from a url.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-sound-message-by-url' +--- + +Use `createSoundMessageByURL()` to create a message from uploaded audio resource information. + +```ts +const message = await OpenIMSDK.createSoundMessageByURL({ + uuid: 'audio-001', + soundPath: '', + sourceUrl: 'https://www.example.com/sound.mp3', + dataSize: 54000, + duration: 18, + soundType: 'audio/mpeg', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `uuid` | `string` | Yes | Audio resource ID. | +| `soundPath` | `string` | Yes | Local audio path. Pass an empty string when only a remote resource is available. | +| `sourceUrl` | `string` | Yes | URL of the uploaded audio. | +| `dataSize` | `number` | Yes | Audio size in bytes. | +| `duration` | `number` | Yes | Audio duration in seconds. | +| `soundType` | `string` | No | Audio type. | + +The call returns a `MessageItem` ready to send. Use the actual upload result for resource information, then use [Send an uploaded media message](/sdk/react-native/message/sending-messages/send-message-not-oss). diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx new file mode 100644 index 0000000000..538d7d8d1d --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx @@ -0,0 +1,31 @@ +--- +title: 'Create a targeted group message' +description: 'OpenIM React Native SDK guide for create a targeted group message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-targeted-group-message' +--- + +Use `createTargetedGroupMessage()` to create a message object delivered only to selected group members. + +```ts +const textMessage = await OpenIMSDK.createTextMessage('Please review this, relevant members.'); + +const message = await OpenIMSDK.createTargetedGroupMessage({ + message: textMessage, + dstUserIDs: ['user-001', 'user-002'], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `message` | `MessageItem` | Yes | Message object to send selectively. | +| `dstUserIDs` | `string[]` | Yes | User IDs of group members who receive the message. | + +The call returns a `MessageItem` ready to send. Pass the target group in `groupID` and use [Send a message](/sdk/react-native/message/sending-messages/send-message) to deliver it. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx new file mode 100644 index 0000000000..50704a48ec --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx @@ -0,0 +1,37 @@ +--- +title: 'Create an @ message' +description: 'OpenIM React Native SDK guide for create an @ message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-text-at-message' +--- + +Use `createTextAtMessage()` to create a mention message in a group chat. The mentions in `text` must correspond to `atUserIDList`. + +```ts +const message = await OpenIMSDK.createTextAtMessage({ + text: '@user-001 Please confirm the release content.', + atUserIDList: ['user-001'], + atUsersInfo: [ + { + atUserID: 'user-001', + groupNickname: 'Lee', + }, + ], +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `text` | `string` | Yes | Body text of the mention message. | +| `atUserIDList` | `string[]` | Yes | User IDs of the mentioned members. | +| `atUsersInfo` | `AtUsersInfoItem[]` | No | Display names of mentioned members in the group. | +| `message` | `MessageItem` | No | An attached message object. | + +The call returns a `MessageItem` ready to send. Pass it as `message` to [Send a message](/sdk/react-native/message/sending-messages/send-message). diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx new file mode 100644 index 0000000000..875ccae3e7 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx @@ -0,0 +1,19 @@ +--- +title: 'Create a text message' +description: 'OpenIM React Native SDK guide for create a text message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-text-message' +--- + +Use `createTextMessage()` to create a text message ready to send. + +```ts +const message = await OpenIMSDK.createTextMessage('Hello, welcome to the discussion.'); +``` + +The argument is the message text. The call returns a `MessageItem`; pass it as `message` to [Send a message](/sdk/react-native/message/sending-messages/send-message). diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx new file mode 100644 index 0000000000..4cfbda9031 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx @@ -0,0 +1,33 @@ +--- +title: 'Create a video message from files' +description: 'OpenIM React Native SDK guide for create a video message from files.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-video-message-by-file' +--- + +Use `createVideoMessageFromFullPath()` to create a message from a video file and cover image on the device. + +```ts +const message = await OpenIMSDK.createVideoMessageFromFullPath({ + videoPath, + videoType: 'video/mp4', + duration: 36, + snapshotPath, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `videoPath` | `string` | Yes | Full path to the video file. | +| `videoType` | `string` | Yes | Video type. | +| `duration` | `number` | Yes | Video duration in seconds. | +| `snapshotPath` | `string` | Yes | Full path to the video cover image. | + +The call returns a `MessageItem` ready to send. Use [Send a message](/sdk/react-native/message/sending-messages/send-message) to upload the local video and cover image. diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx new file mode 100644 index 0000000000..0d95338b2c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx @@ -0,0 +1,46 @@ +--- +title: 'Create a video message from URLs' +description: 'OpenIM React Native SDK guide for create a video message from urls.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-video-message-by-url' +--- + +Use `createVideoMessageByURL()` to create a message from uploaded video and cover-image resources. + +```ts +const message = await OpenIMSDK.createVideoMessageByURL({ + videoPath: '', + duration: 36, + videoType: 'video/mp4', + videoUUID: 'video-001', + videoUrl: 'https://www.example.com/video.mp4', + videoSize: 820000, + snapshotPath: '', + snapshotUUID: 'cover-001', + snapshotSize: 42000, + snapshotUrl: 'https://www.example.com/snapshot.png', + snapshotWidth: 1280, + snapshotHeight: 720, + snapShotType: 'image/jpeg', +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `videoPath` | `string` | Yes | Local video path. Pass an empty string when only a remote resource is available. | +| `duration` | `number` | Yes | Video duration in seconds. | +| `videoType` | `string` | Yes | Video type. | +| `videoUUID`, `videoUrl`, `videoSize` | `string`, `string`, `number` | Yes | Video resource ID, remote URL, and byte size. | +| `snapshotPath` | `string` | Yes | Local cover-image path. Pass an empty string when only a remote resource is available. | +| `snapshotUUID`, `snapshotUrl`, `snapshotSize` | `string`, `string`, `number` | Yes | Cover-image resource ID, remote URL, and byte size. | +| `snapshotWidth`, `snapshotHeight` | `number` | Yes | Cover-image width and height in pixels. | +| `snapShotType` | `string` | No | Cover-image type. | + +The call returns a `MessageItem` ready to send. Use [Send an uploaded media message](/sdk/react-native/message/sending-messages/send-message-not-oss) to send it. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx new file mode 100644 index 0000000000..63b8e48a89 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx @@ -0,0 +1,19 @@ +--- +title: 'Clear all local messages' +description: 'OpenIM React Native SDK guide for clear all local messages.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/clear-all-local-messages' +--- + +Use `deleteAllMsgFromLocal()` to clear all messages for the current account on the current device. + +```ts +await OpenIMSDK.deleteAllMsgFromLocal(); +``` + +This account-level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, all messages on the current device are cleared; server history remains available. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx new file mode 100644 index 0000000000..b13f3f4a9a --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx @@ -0,0 +1,19 @@ +--- +title: 'Clear local and server messages' +description: 'OpenIM React Native SDK guide for clear local and server messages.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/clear-all-messages' +--- + +Use `deleteAllMsgFromLocalAndSvr()` to clear all messages saved for the current account locally and on the server. + +```ts +await OpenIMSDK.deleteAllMsgFromLocalAndSvr(); +``` + +This account-level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, local and server deletion requests have completed; copies already saved by other conversation members are not affected. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx new file mode 100644 index 0000000000..59b8130edc --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx @@ -0,0 +1,29 @@ +--- +title: 'Delete a local message' +description: 'OpenIM React Native SDK guide for delete a local message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/delete-local-message' +--- + +Use `deleteMessageFromLocalStorage()` to delete one message from a conversation on the current device. + +```ts +await OpenIMSDK.deleteMessageFromLocalStorage({ + conversationID, + clientMsgID, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `clientMsgID` | `string` | Yes | ID of the message to delete. | + +After the call completes, the target message is deleted on the current device. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx new file mode 100644 index 0000000000..e00ab7a22d --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx @@ -0,0 +1,49 @@ +--- +title: 'Delete messages in a batch' +description: 'OpenIM React Native SDK guide for delete messages in a batch.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/delete-saved-messages' +--- + +Use `deleteMessages()` to delete multiple messages from one conversation. + +```ts +await OpenIMSDK.deleteMessages({ + conversationID, + clientMsgIDs, + isSync: true, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the messages. | +| `clientMsgIDs` | `string[]` | Yes | IDs of the messages to delete; all must belong to the same conversation. | +| `isSync` | `boolean` | Yes | Whether to synchronize deletion to the other participant. `true` deletes the messages for both participants; `false` deletes them only for the current account. In either case, the deletion is synchronized to the current account's other devices. | + +After the call completes, the deletion request has completed. With `isSync: true`, the other participant also deletes the messages; with `false`, only the current account deletes them. + +## Listen for message deletion + +When messages are deleted, `OnMsgDeleted` is emitted with the deleted `MessageItem`. Use `clientMsgID` to update the corresponding message list. + +```ts +function handleMessageDeleted(message) { + // ... +} + +// Set the listener +OpenIMSDK.on(OpenIMEvent.OnMsgDeleted, handleMessageDeleted); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnMsgDeleted, handleMessageDeleted); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx new file mode 100644 index 0000000000..5a76df9a7d --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx @@ -0,0 +1,53 @@ +--- +title: 'Delete all messages from a user in a group chat' +description: 'OpenIM React Native SDK guide for delete all messages from a user in a group chat.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/delete-user-messages' +--- + +Use `deleteUserAllMessagesInConv()` to delete all messages from a specified user in a group conversation. + +```ts +await OpenIMSDK.deleteUserAllMessagesInConv({ + conversationID, + userID, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Target group conversation ID. | +| `userID` | `string` | Yes | User whose messages are deleted. | + +This is a group-management operation. After it completes, the deletion request has completed; the server validates permissions. + +## Listen for deletion of a user's messages + +After deletion, `OnDeleteUserAllMsgsInConv` is emitted with `conversationID` and `userID`. Use them to remove that user's messages from the target conversation. + +```ts +function handleUserMessagesDeleted(data) { + // ... +} + +// Set the listener +OpenIMSDK.on( + OpenIMEvent.OnDeleteUserAllMsgsInConv, + handleUserMessagesDeleted, +); + +// Remove the listener +OpenIMSDK.off( + OpenIMEvent.OnDeleteUserAllMsgsInConv, + handleUserMessagesDeleted, +); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx new file mode 100644 index 0000000000..45a0ab08f9 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx @@ -0,0 +1,31 @@ +--- +title: 'Insert a local group message' +description: 'OpenIM React Native SDK guide for insert a local group message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/insert-local-group-message' +--- + +Use `insertGroupMessageToLocalStorage()` to write one message to the current device's group-chat history. + +```ts +await OpenIMSDK.insertGroupMessageToLocalStorage({ + message, + groupID, + sendID, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `message` | `MessageItem` | Yes | Complete message object to write. | +| `groupID` | `string` | Yes | Target group ID. | +| `sendID` | `string` | Yes | Message sender user ID. | + +After the call completes, the message is written to the current device's group-chat history. To send a message to group members, use [Send a message](/sdk/react-native/message/sending-messages/send-message). diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx new file mode 100644 index 0000000000..80049e3176 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx @@ -0,0 +1,31 @@ +--- +title: 'Insert a local one-to-one message' +description: 'OpenIM React Native SDK guide for insert a local one-to-one message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/insert-local-single-message' +--- + +Use `insertSingleMessageToLocalStorage()` to write one message to the current device's direct-chat history. + +```ts +await OpenIMSDK.insertSingleMessageToLocalStorage({ + message, + recvID, + sendID, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `message` | `MessageItem` | Yes | Complete message object to write. | +| `recvID` | `string` | Yes | Direct-chat recipient user ID. | +| `sendID` | `string` | Yes | Message sender user ID. | + +After the call completes, the message is written to the current device's direct-chat history. To send it to the other participant, use [Send a message](/sdk/react-native/message/sending-messages/send-message). diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx new file mode 100644 index 0000000000..754135840a --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx @@ -0,0 +1,57 @@ +--- +title: 'Modify a message' +description: 'OpenIM React Native SDK guide for modify a message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/modify-a-message' +--- + +Use `modifyMessage()` to modify an existing message in a conversation. + +```ts +const updatedMessage = { + ...message, + textElem: { + ...message.textElem, + content: editedText, + }, +}; + +const modifiedMessage = await OpenIMSDK.modifyMessage({ + conversationID, + message: updatedMessage, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `message` | `MessageItem` | Yes | Complete modified message. Preserve its original `clientMsgID` and other required fields. | + +## Return value + +The call returns the server-confirmed `MessageItem`. You can replace the message with the same `clientMsgID` in your list. The server validates permitted message types, senders, and time limits. + +## Listen for message modification + +When a message is modified, `OnMessageModified` is emitted with the modified `MessageItem` directly. + +```ts +function handleMessageModified(message) { + // ... +} + +// Set the listener +OpenIMSDK.on(OpenIMEvent.OnMessageModified, handleMessageModified); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnMessageModified, handleMessageModified); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx new file mode 100644 index 0000000000..d416c56cbb --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx @@ -0,0 +1,47 @@ +--- +title: 'Revoke a message' +description: 'OpenIM React Native SDK guide for revoke a message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/revoke-a-message' +--- + +Use `revokeMessage()` to revoke a sent message. Conversation members then see the message's revoked state. + +```ts +await OpenIMSDK.revokeMessage({ + conversationID, + clientMsgID, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `clientMsgID` | `string` | Yes | ID of the message to revoke. | + +After the call completes, the revocation request has completed. The server validates which messages, senders, and time ranges are eligible. + +## Listen for message revocation + +When a message is revoked, `OnNewRecvMessageRevoked` is emitted with `RevokedInfo`. Use its `clientMsgID` to update the message's revoked state. + +```ts +function handleMessageRevoked(revokedInfo) { + // ... +} + +// Set the listener +OpenIMSDK.on(OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. To remove a message only from the current device, use [Delete a local message](/sdk/react-native/message/managing-messages/delete-local-message). diff --git a/content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx b/content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx new file mode 100644 index 0000000000..0734e0452c --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx @@ -0,0 +1,31 @@ +--- +title: 'Set a local message extension' +description: 'OpenIM React Native SDK guide for set a local message extension.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/set-message-local-ex' +--- + +Use `setMessageLocalEx()` to save local extension data for a message on the current device. + +```ts +await OpenIMSDK.setMessageLocalEx({ + conversationID, + clientMsgID, + localEx: JSON.stringify({ expanded: true }), +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `clientMsgID` | `string` | Yes | Target message ID. | +| `localEx` | `string` | Yes | Local extension string. It can contain JSON or another format of business extension data. | + +After the call completes, the local extension data is saved in the message on the current device. diff --git a/content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx b/content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx new file mode 100644 index 0000000000..e88a9378c7 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx @@ -0,0 +1,35 @@ +--- +title: 'Get members who read a group message' +description: 'OpenIM React Native SDK guide for get members who read a group message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-read-status/get-group-message-readers' +--- + +Use `getGroupMessageReaderList()` to page through members who have or have not read a group message. + +```ts +const members = await OpenIMSDK.getGroupMessageReaderList({ + conversationID, + clientMsgID, + filter: GroupMessageReaderFilter.Read, + offset: 0, + count: 50, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Group conversation ID. | +| `clientMsgID` | `string` | Yes | Message ID whose read status is queried. | +| `filter` | `GroupMessageReaderFilter` | Yes | Member filter. `Read` returns readers and `Unread` returns members who have not read the message. | +| `offset` | `number` | Yes | Pagination offset; use `0` for the first page. | +| `count` | `number` | Yes | Number of members to retrieve. | + +The call returns the current page as `GroupMemberItem[]`. See [Group overview](/sdk/react-native/group/overview-group) for member fields; increase `offset` for subsequent pages. diff --git a/content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx b/content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx new file mode 100644 index 0000000000..1cf5098fce --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx @@ -0,0 +1,47 @@ +--- +title: 'Report group messages as read' +description: 'OpenIM React Native SDK guide for report group messages as read.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-read-status/send-group-read-receipts' +--- + +Use `sendGroupMessageReadReceipt()` to report messages read in a group chat. + +```ts +await OpenIMSDK.sendGroupMessageReadReceipt({ + conversationID, + clientMsgIDs, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Group conversation ID. | +| `clientMsgIDs` | `string[]` | Yes | IDs of messages that were read; all must belong to the group conversation. | + +After the call completes, the read receipt has been reported. To update the conversation unread count, see [Mark a conversation as read](/sdk/react-native/conversation/managing-conversations/mark-conversation-read). + +## Listen for group read-status changes + +When group message read status changes, `OnRecvGroupReadReceipt` is emitted with `GroupMessageReceiptInfo`, including `conversationID`, read and unread counts, and readers for each message. + +```ts +function handleGroupReadReceipt(payload) { + // ... +} + +// Set the listener +OpenIMSDK.on(OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/overview-message.mdx b/content/docs/chat/sdk/react-native/message/overview-message.mdx new file mode 100644 index 0000000000..d7c90a6cc5 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/overview-message.mdx @@ -0,0 +1,105 @@ +--- +title: 'Message overview' +description: 'OpenIM React Native SDK guide for message overview.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/overview-message' +--- + +OpenIM React Native SDK represents each message with `MessageItem`. Creating a message only creates a `MessageItem` ready to send; to send it to a one-to-one user or group, call a sending API. Receiving, querying, and state changes such as deletion, revocation, and modification are handled through their respective APIs or events. + +Message lists use `clientMsgID` to identify, deduplicate, and update individual messages. `MessageItem` does not contain `conversationID`; obtain the message's conversation from the current conversation, history-query parameters, or event context. + +## Message workflow + +| Stage | Related capability | Description | +| --- | --- | --- | +| Create | `create*Message()` | Creates a `MessageItem` ready to send. | +| Send | `sendMessage()` and `sendMessageNotOss()` | Sends a message to a one-to-one chat or group chat. | +| Receive | New-message events | Receives real-time, offline, and online-only messages. | +| Query | Message history, lookup by ID, and search | Reads or locates saved messages by conversation. | +| State changes | Revocation, deletion, modification, and read receipts | Updates the message list from call results and the corresponding events. | + +## MessageItem type + +The message objects returned when creating, sending, receiving, or querying messages are `MessageItem`. Common public fields include: + +| Field | Type | Description | +| --- | --- | --- | +| `clientMsgID` | `string` | Client message ID, used to deduplicate, update, and locate messages. | +| `serverMsgID` | `string` | Server message ID. | +| `sessionType` | `SessionType` | Conversation type, used to distinguish one-to-one chats from group chats. | +| `sendID` | `string` | Sender user ID. | +| `recvID` | `string` | Recipient user ID for a one-to-one message. | +| `groupID` | `string` | Group ID for a group message. | +| `contentType` | `MessageType` | Message content type, which determines the content field to render. | +| `createTime` | `number` | Message-object creation time. | +| `sendTime` | `number` | Message send time. | +| `seq` | `number` | Server message sequence number. | +| `senderPlatformID` | `Platform` | Client platform that sent the message. | +| `status` | `MessageStatus` | Message send status. | +| `isRead` | `boolean` | Read state. | +| `senderNickname` | `string` | Sender nickname. | +| `senderFaceUrl` | `string` | Sender avatar URL. | +| `offlinePush` | `OfflinePush` | Offline push configuration. | +| `content` | `string` | SDK-serialized message content. For rendering, read the content field that corresponds to `contentType`. | +| `ex` | `string` | Message extension field. | +| `localEx` | `string` | Message extension field used only on the current device. | + +Message content is stored in the `MessageItem` field that corresponds to `contentType`: + +| Content | Field | +| --- | --- | +| Text, rich text, and Markdown | `textElem`, `advancedTextElem`, `markdownTextElem` | +| Images, audio, video, and files | `pictureElem`, `soundElem`, `videoElem`, `fileElem` | +| @ messages | `atTextElem` | +| Reply messages | `quoteElem` | +| Merged forwards | `mergeElem` | +| Contact cards, locations, and emoji | `cardElem`, `locationElem`, `faceElem` | +| Custom messages | `customElem` | +| Notifications, typing status, and attached status | `notificationElem`, `typingElem`, `attachedInfoElem` | + +All content fields are optional. A message usually uses only the content field that corresponds to its `contentType`; determine `contentType` before reading that field for rendering. + +## Create and send messages + +First call the applicable creation API to obtain a `MessageItem`, then call a sending API. Use [Send a message](/sdk/react-native/message/sending-messages/send-message) when the SDK uploads a local media file; use [Send an uploaded media message](/sdk/react-native/message/sending-messages/send-message-not-oss) when the media file already has a remote URL. + +| Content | Page | +| --- | --- | +| Text and rich text | [Create a text message](/sdk/react-native/message/creating-messages/create-text-message), [Create a rich-text message](/sdk/react-native/message/creating-messages/create-advanced-text-message) | +| @ messages | [Create an @ message](/sdk/react-native/message/creating-messages/create-text-at-message) | +| Images, audio, video, and files | [Create an image message from a file](/sdk/react-native/message/creating-messages/create-image-message-by-file), [Create an audio message from a file](/sdk/react-native/message/creating-messages/create-sound-message-by-file), [Create a video message from files](/sdk/react-native/message/creating-messages/create-video-message-by-file), [Create a file message from a file](/sdk/react-native/message/creating-messages/create-file-message-by-file) | +| Contact cards, locations, and emoji | [Create a contact card message](/sdk/react-native/message/creating-messages/create-card-message), [Create a location message](/sdk/react-native/message/creating-messages/create-location-message), [Create an emoji message](/sdk/react-native/message/creating-messages/create-face-message) | +| Replies, forwards, and merged forwards | [Create a reply message](/sdk/react-native/message/creating-messages/create-quote-message), [Create a forwarded message](/sdk/react-native/message/creating-messages/create-forward-message), [Create a merged forward message](/sdk/react-native/message/creating-messages/create-merger-message) | +| Custom messages | [Create a custom message](/sdk/react-native/message/creating-messages/create-custom-message) | + +## Browse by task + +| Task | Page | +| --- | --- | +| Receive real-time, offline, and online-only messages | [Receive messages](/sdk/react-native/message/receiving-messages/receive-messages) | +| Receive custom business messages | [Receive custom business messages](/sdk/react-native/message/receiving-messages/receive-custom-business-messages) | +| Load message history or message context | [Load message history](/sdk/react-native/message/retrieving-messages/load-older-messages), [Load message context](/sdk/react-native/message/retrieving-messages/load-message-context) | +| Find or search messages by ID | [Find messages by ID](/sdk/react-native/message/retrieving-messages/find-messages-by-id), [Search messages](/sdk/react-native/message/searching-messages/search-messages) | +| Delete, revoke, or modify messages | [Delete messages in a batch](/sdk/react-native/message/managing-messages/delete-saved-messages), [Revoke a message](/sdk/react-native/message/managing-messages/revoke-a-message), [Modify a message](/sdk/react-native/message/managing-messages/modify-a-message) | +| Manage message data used only on the current device | [Delete a local message](/sdk/react-native/message/managing-messages/delete-local-message), [Set a local message extension](/sdk/react-native/message/managing-messages/set-message-local-ex) | +| Report or query group message read status | [Report group messages as read](/sdk/react-native/message/managing-read-status/send-group-read-receipts), [Get members who read a group message](/sdk/react-native/message/managing-read-status/get-group-message-readers) | +| Report or query typing status | [Report typing status](/sdk/react-native/message/composing-messages/update-typing-status), [Get typing status](/sdk/react-native/message/composing-messages/get-typing-status) | +| Transcribe audio | [Check audio transcription availability](/sdk/react-native/message/composing-messages/check-speech-to-text), [Transcribe audio](/sdk/react-native/message/composing-messages/transcribe-audio) | + +## Event handling + +Complete event-listener examples for message events are available on the following pages: + +- New, offline, and online-only messages: `OnRecvNewMessage`, `OnRecvOfflineNewMessage`, and `OnRecvOnlineOnlyMessage`. See [Receive messages](/sdk/react-native/message/receiving-messages/receive-messages). +- Custom business messages: `OnRecvCustomBusinessMessage`. See [Receive custom business messages](/sdk/react-native/message/receiving-messages/receive-custom-business-messages). +- Message deletion: `OnMsgDeleted`. See [Delete messages in a batch](/sdk/react-native/message/managing-messages/delete-saved-messages). +- Message revocation: `OnNewRecvMessageRevoked`. See [Revoke a message](/sdk/react-native/message/managing-messages/revoke-a-message). +- Message modification: `OnMessageModified`. See [Modify a message](/sdk/react-native/message/managing-messages/modify-a-message). +- Group-message read status: `OnRecvGroupReadReceipt`. See [Report group messages as read](/sdk/react-native/message/managing-read-status/send-group-read-receipts). +- Typing-status changes: `OnInputStatusChanged`. See [Update input states](/sdk/react-native/message/composing-messages/change-input-states). diff --git a/content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx b/content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx new file mode 100644 index 0000000000..8c5f3588ef --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx @@ -0,0 +1,33 @@ +--- +title: 'Receive custom business messages' +description: 'OpenIM React Native SDK guide for receive custom business messages.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/receiving-messages/receive-custom-business-messages' +--- + +When the server sends a custom business notification, `OnRecvCustomBusinessMessage` is emitted. Its callback receives business data, not a `MessageItem`; ordinary custom chat messages are delivered through the new-message events in [Receive messages](/sdk/react-native/message/receiving-messages/receive-messages). + +```ts +function handleCustomBusinessMessage(data) { + // ... +} + +// Set the listener +OpenIMSDK.on( + OpenIMEvent.OnRecvCustomBusinessMessage, + handleCustomBusinessMessage, +); + +// Remove the listener +OpenIMSDK.off( + OpenIMEvent.OnRecvCustomBusinessMessage, + handleCustomBusinessMessage, +); +``` + +Validate the received data against your business protocol before processing it. Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx b/content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx new file mode 100644 index 0000000000..524ad23b20 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx @@ -0,0 +1,39 @@ +--- +title: 'Receive messages' +description: 'OpenIM React Native SDK guide for receive messages.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/receiving-messages/receive-messages' +--- + +When a new message arrives, `OnRecvNewMessage` is emitted with one `MessageItem`. Offline and online-only messages are delivered through `OnRecvOfflineNewMessage` and `OnRecvOnlineOnlyMessage`; all three callbacks receive a `MessageItem` directly. + +```ts +function handleNewMessage(message) { + // ... +} + +function handleOfflineMessage(message) { + // ... +} + +function handleOnlineOnlyMessage(message) { + // ... +} + +// Set the listeners +OpenIMSDK.on(OpenIMEvent.OnRecvNewMessage, handleNewMessage); +OpenIMSDK.on(OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage); +OpenIMSDK.on(OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage); + +// Remove the listeners +OpenIMSDK.off(OpenIMEvent.OnRecvNewMessage, handleNewMessage); +OpenIMSDK.off(OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage); +OpenIMSDK.off(OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage); +``` + +Use `clientMsgID` to identify messages. Remove the listeners when the component is destroyed, the account signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx b/content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx new file mode 100644 index 0000000000..242735db86 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx @@ -0,0 +1,37 @@ +--- +title: 'Find messages by ID' +description: 'OpenIM React Native SDK guide for find messages by id.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/find-messages-by-id' +--- + +Use `findMessageList()` to find messages by conversation ID and message ID. It is useful when navigating to a known message from a search result, quote, or notification. + +```ts +const result = await OpenIMSDK.findMessageList([ + { + conversationID, + clientMsgIDList: [clientMsgID], + }, +]); + +const targetMessage = result.findResultItems?.[0]?.messageList[0]; +``` + +## Parameters + +`findMessageList()` receives an array of query conditions. Each item contains: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the target messages. | +| `clientMsgIDList` | `string[]` | Yes | Message IDs to find. | + +## Return value + +The call returns `SearchMessageResult`; ID-based results are in `findResultItems`. Each result item contains `conversationID` and `messageList`. A missing message may produce an empty result item or message list. See [Search messages](/sdk/react-native/message/searching-messages/search-messages) for the complete result structure. diff --git a/content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx b/content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx new file mode 100644 index 0000000000..31fe3068da --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx @@ -0,0 +1,33 @@ +--- +title: 'Load message context' +description: 'OpenIM React Native SDK guide for load message context.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/load-message-context' +--- + +Use `fetchSurroundingMessages()` to load messages before and after a known message, such as when opening a result from search or a reply. + +```ts +const { messageList } = await OpenIMSDK.fetchSurroundingMessages({ + startMessage: targetMessage, + viewType: ViewType.Search, + before: 20, + after: 20, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `startMessage` | `MessageItem` | Yes | Retrieved anchor message. | +| `viewType` | `ViewType` | Yes | Context view type; use `ViewType.Search` for a search result. | +| `before` | `number` | Yes | Maximum messages to load before the anchor. | +| `after` | `number` | Yes | Maximum messages to load after the anchor. | + +The call returns `{ messageList }`, where `messageList` contains the retrieved surrounding `MessageItem[]`. The number of messages may be less than `before + after` near a boundary or when messages have been deleted. diff --git a/content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx b/content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx new file mode 100644 index 0000000000..f7e870e32b --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx @@ -0,0 +1,33 @@ +--- +title: 'Load message history in reverse' +description: 'OpenIM React Native SDK guide for load message history in reverse.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/load-newer-messages' +--- + +Use `getAdvancedHistoryMessageListReverse()` to load history in the newer direction from a message anchor. + +```ts +const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse({ + conversationID, + startClientMsgID: anchorMessage.clientMsgID, + count: 30, + viewType: ViewType.History, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation whose history is loaded. | +| `startClientMsgID` | `string` | Yes | Message ID used as the newer-direction anchor. | +| `count` | `number` | Yes | Number of messages to load. | +| `viewType` | `ViewType` | Yes | Use `ViewType.History` when browsing message history. | + +The call returns `AdvancedGetMessageResult`; `messageList` contains the current page and `isEnd` indicates whether the newer boundary has been reached. See [Load message history](/sdk/react-native/message/retrieving-messages/load-older-messages) for the other result fields. diff --git a/content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx b/content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx new file mode 100644 index 0000000000..a91aa20be2 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx @@ -0,0 +1,44 @@ +--- +title: 'Load message history' +description: 'OpenIM React Native SDK guide for load message history.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/load-older-messages' +--- + +Use `getAdvancedHistoryMessageList()` to page through older messages in a conversation. Pass an empty string for `startClientMsgID` on the first page, then pass the `clientMsgID` of the oldest loaded message. + +```ts +const page = await OpenIMSDK.getAdvancedHistoryMessageList({ + conversationID, + startClientMsgID: oldestMessage?.clientMsgID ?? '', + count: 30, + viewType: ViewType.History, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation whose history is loaded. | +| `startClientMsgID` | `string` | Yes | Pagination anchor; pass an empty string for the first page. | +| `count` | `number` | Yes | Number of messages to load. | +| `viewType` | `ViewType` | Yes | Use `ViewType.History` when browsing message history. | + +## Return value + +The call returns `AdvancedGetMessageResult`: + +| Field | Type | Description | +| --- | --- | --- | +| `messageList` | `MessageItem[]` | Messages on the current page. | +| `isEnd` | `boolean` | Whether the older boundary has been reached. | +| `errCode` | `number` | Status code for this history request. | +| `errMsg` | `string` | Description corresponding to `errCode`. | + +Deduplicate messages by `clientMsgID` before adding `messageList` to the conversation. diff --git a/content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx b/content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx new file mode 100644 index 0000000000..26d573f252 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx @@ -0,0 +1,50 @@ +--- +title: 'Search messages' +description: 'OpenIM React Native SDK guide for search messages.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/searching-messages/search-messages' +--- + +Use `searchLocalMessages()` to search messages already synchronized to the current account's local store. + +```ts +const result = await OpenIMSDK.searchLocalMessages({ + conversationID, + keywordList: ['release'], + messageTypeList: [MessageType.TextMessage], + pageIndex: 1, + count: 20, +}); +``` + +## Parameters + +`keywordList` can contain one or more keywords. A search field typically supplies one keyword after trimming surrounding whitespace and removing empty values. + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation to search. | +| `keywordList` | `string[]` | Yes | Keywords to search for. | +| `keywordListMatchType` | `number` | No | Match mode for multiple keywords: `0` matches any keyword (OR), and `1` requires all keywords (AND). Omitted values use `0`. | +| `senderUserIDList` | `string[]` | No | Restrict results to messages sent by these users. | +| `messageTypeList` | `MessageType[]` | No | Restrict results to the specified message types, such as text and mention messages. | +| `searchTimePosition` | `number` | No | Search end position as a Unix timestamp in seconds. | +| `searchTimePeriod` | `number` | No | Search range backward from `searchTimePosition`, in seconds. | +| `pageIndex` | `number` | No | Result page, starting at `1`. | +| `count` | `number` | No | Number of messages per page. | + +## Return value + +The call returns `SearchMessageResult`: + +| Field | Type | Description | +| --- | --- | --- | +| `totalCount` | `number` | Number of messages matching the current conditions. | +| `searchResultItems` | `SearchMessageResultItem[]` | Results organized by conversation. | + +Each `SearchMessageResultItem` contains conversation information and `messageList`. When keywords or filters change, restart from page one so results from different conditions are not mixed. To load messages around a hit, see [Load message context](/sdk/react-native/message/retrieving-messages/load-message-context). diff --git a/content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx b/content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx new file mode 100644 index 0000000000..e14ea060d7 --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx @@ -0,0 +1,33 @@ +--- +title: 'Send an uploaded media message' +description: 'OpenIM React Native SDK guide for send an uploaded media message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/sending-messages/send-message-not-oss' +--- + +Call `sendMessageNotOss()` to send an image, audio, video, or file message that already contains remote resource URLs. The SDK does not upload these resources again. + +```ts +const sentMessage = await OpenIMSDK.sendMessageNotOss({ + recvID: receiverUserID, + groupID: '', + message: uploadedMessage, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `recvID` | `string` | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | +| `groupID` | `string` | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | +| `message` | `MessageItem` | Yes | Message created by a URL-based message-creation API. | +| `offlinePushInfo` | `OfflinePush` | No | Offline push configuration. | +| `isOnlineOnly` | `boolean` | No | Whether to deliver only to online clients. | + +The call returns the sent `MessageItem`. Resource URLs, sizes, types, and dimensions in `message` should come from the actual upload result. For local-path media messages, use [Send a message](/sdk/react-native/message/sending-messages/send-message). diff --git a/content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx b/content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx new file mode 100644 index 0000000000..d9ee4b2fca --- /dev/null +++ b/content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx @@ -0,0 +1,51 @@ +--- +title: 'Send a message' +description: 'OpenIM React Native SDK guide for send a message.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/sending-messages/send-message' +--- + +Call `sendMessage()` to send the `MessageItem` returned by a message-creation API. For a direct chat, set `recvID`; for a group chat, set `groupID`. + +When messages are created from local image, audio, video, or file paths, the SDK uploads the resources during sending. For media messages created with remote URLs, use [Send an uploaded media message](/sdk/react-native/message/sending-messages/send-message-not-oss). + +```ts +const sentMessage = await OpenIMSDK.sendMessage({ + recvID: receiverUserID, + groupID: '', + message, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `recvID` | `string` | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | +| `groupID` | `string` | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | +| `message` | `MessageItem` | Yes | Message to send. | +| `offlinePushInfo` | `OfflinePush` | No | Offline push configuration. | +| `isOnlineOnly` | `boolean` | No | Whether to deliver only to online clients. | + +The call returns the sent `MessageItem`. + +When sending progress is available, `SendMessageProgress` is emitted with `progress` and `message`: + +```ts +function handleSendMessageProgress(info) { + // ... +} + +// Set the listener +OpenIMSDK.on(OpenIMEvent.SendMessageProgress, handleSendMessageProgress); + +// Remove the listener +OpenIMSDK.off(OpenIMEvent.SendMessageProgress, handleSendMessageProgress); +``` + +Remove the listener when the component is destroyed, the account signs out, or the account changes. diff --git a/content/zh/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx b/content/zh/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx new file mode 100644 index 0000000000..47ec07ee14 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx @@ -0,0 +1,43 @@ +--- +title: '更新输入状态' +description: 'OpenIM React Native SDK 更新输入状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/change-input-states' +--- + +使用 `changeInputStates()` 更新当前账号在会话中的输入状态。开始输入时传 `focus: true`,发送消息、失焦或离开会话时传 `false`。 + +```ts +await OpenIMSDK.changeInputStates({ + conversationID, + focus: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要更新输入状态的会话 ID。 | +| `focus` | `boolean` | 是 | `true` 表示正在输入,`false` 表示停止输入。 | + +避免在每个键盘事件中重复上报相同状态。输入状态变化时会触发 `OnInputStatusChanged`,回调携带 `conversationID`、`userID` 和 `platformIDs`。 + +```ts +function handleInputStatusChanged(inputStatus) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx b/content/zh/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx new file mode 100644 index 0000000000..14777936e1 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx @@ -0,0 +1,29 @@ +--- +title: '检查语音识别能力' +description: 'OpenIM React Native SDK 检查语音识别能力。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/check-speech-to-text' +--- + +`speechToTextCapabilities()`仅用于查询当前语音识别支持的音频格式、采样率、录音时长和文件大小等信息。实际执行语音识别的是[**识别音频文字**](/sdk/react-native/message/composing-messages/transcribe-audio)。 + +```ts +const capabilities = await OpenIMSDK.speechToTextCapabilities(); +``` + +## 返回结果 + +调用后返回 `SpeechToTextCapabilities`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `format` | `string[]` | 支持的音频格式。 | +| `sampleRateHz` | `number` | 要求的音频采样率,单位为赫兹。 | +| `maxRecordTimeMs` | `number` | 最大录音时长,单位为毫秒。 | +| `maxFileSize` | `number` | 最大文件大小,单位为字节。 | +| `provider` | `string` | 当前语音识别服务提供方。 | diff --git a/content/zh/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx b/content/zh/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx new file mode 100644 index 0000000000..27c9b85a4a --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx @@ -0,0 +1,31 @@ +--- +title: '查询输入状态' +description: 'OpenIM React Native SDK 查询输入状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/get-typing-status' +--- + +使用 `getInputStates()` 查询指定用户在会话中的当前输入状态。 + +```ts +const platformIDs = await OpenIMSDK.getInputStates({ + conversationID, + userID, +}); + +const isTyping = platformIDs.length > 0; +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 目标会话 ID。 | +| `userID` | `string` | 是 | 要查询输入状态的用户 ID。 | + +调用后返回处于输入状态的平台 ID 数组;空数组表示该用户当前没有平台处于输入状态。持续显示输入状态时,处理[更新输入状态](/sdk/react-native/message/composing-messages/change-input-states)中的 `OnInputStatusChanged` 事件。 diff --git a/content/zh/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx b/content/zh/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx new file mode 100644 index 0000000000..c482c3ca05 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx @@ -0,0 +1,40 @@ +--- +title: '保存本地转写结果' +description: 'OpenIM React Native SDK 保存本地转写结果。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/save-local-transcript' +--- + +使用 `setMessageLocalContent()` 将转写文字写入当前设备的语音消息。传入完整的消息对象,并保留原有消息字段。 + +```ts +const updatedMessage = { + ...message, + soundElem: { + ...message.soundElem, + text: { + text: transcript, + translate: message.soundElem?.text?.translate ?? {}, + }, + }, +}; + +await OpenIMSDK.setMessageLocalContent({ + conversationID, + message: updatedMessage, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所属的会话 ID。 | +| `message` | `MessageItem` | 是 | 写入转写结果后的完整消息对象。 | + +调用完成后,转写结果保存在当前设备的消息内容中。 diff --git a/content/zh/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx b/content/zh/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx new file mode 100644 index 0000000000..e86174d114 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx @@ -0,0 +1,19 @@ +--- +title: '识别音频文字' +description: 'OpenIM React Native SDK 识别音频文字。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/transcribe-audio' +--- + +使用 `speechToText()` 将设备上 SDK 可读取的本地音频文件识别为文字。传入本地路径,不传远端 URL、Base64 数据或上传后的文件名。 + +```ts +const { text } = await OpenIMSDK.speechToText(filename); +``` + +参数 `filename` 是本地音频文件路径。调用后返回 `{ text }`,其中 `text` 为识别结果。调用前先[检查语音识别能力](/sdk/react-native/message/composing-messages/check-speech-to-text);需要把结果保存在当前设备的语音消息中时见[保存本地转写结果](/sdk/react-native/message/composing-messages/save-local-transcript)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx b/content/zh/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx new file mode 100644 index 0000000000..ea669e84a7 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx @@ -0,0 +1,29 @@ +--- +title: '上报输入状态' +description: 'OpenIM React Native SDK 上报输入状态。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/composing-messages/update-typing-status' +--- + +使用 `typingStatusUpdate()` 向单聊对方上报输入状态提示内容。 + +```ts +await OpenIMSDK.typingStatusUpdate({ + recvID: receiverUserID, + msgTip: '正在输入…', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `recvID` | `string` | 是 | 接收输入提示的用户 ID。 | +| `msgTip` | `string` | 是 | 要上报的输入提示文本。 | + +调用完成后,输入提示已上报。需要根据会话焦点更新当前账号的输入状态时,使用[更新输入状态](/sdk/react-native/message/composing-messages/change-input-states)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx new file mode 100644 index 0000000000..78d348720f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx @@ -0,0 +1,30 @@ +--- +title: '创建富文本回复消息' +description: 'OpenIM React Native SDK 创建富文本回复消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-advanced-quote-message' +--- + +使用 `createAdvancedQuoteMessage()` 创建包含原消息引用和文本实体的富文本回复消息。 + +```ts +const message = await OpenIMSDK.createAdvancedQuoteMessage({ + text: '我已查看相关链接。', + message: originalMessage, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `text` | `string` | 是 | 回复的原始文本。 | +| `message` | `MessageItem` | 是 | 被回复的原消息。 | +| `messageEntityList` | `MessageEntity[]` | 否 | 文本中的实体列表。 | + +`MessageEntity` 使用 `type`、`offset`、`length` 描述实体,并可按需要传入 `url` 或 `info`。调用后返回待发送的 `MessageItem`。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx new file mode 100644 index 0000000000..3ea036ad10 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx @@ -0,0 +1,36 @@ +--- +title: '创建富文本消息' +description: 'OpenIM React Native SDK 创建富文本消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-advanced-text-message' +--- + +使用 `createAdvancedTextMessage()` 创建带消息实体的富文本消息。 + +```ts +const message = await OpenIMSDK.createAdvancedTextMessage({ + text: '请查看 https://openim.io', + messageEntityList: [ + { + type: 'url', + offset: 4, + length: 17, + url: 'https://openim.io', + }, + ], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `text` | `string` | 是 | 富文本的原始文本。 | +| `messageEntityList` | `MessageEntity[]` | 否 | 文本中的实体列表。 | + +每项 `MessageEntity` 包含 `type`、`offset`、`length`,并可选传入 `url` 和 `info`。调用后返回待发送的 `MessageItem`,使用[发送消息](/sdk/react-native/message/sending-messages/send-message)发送。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx new file mode 100644 index 0000000000..7af3db744e --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx @@ -0,0 +1,33 @@ +--- +title: '创建名片消息' +description: 'OpenIM React Native SDK 创建名片消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-card-message' +--- + +使用 `createCardMessage()` 创建用户名片消息。 + +```ts +const message = await OpenIMSDK.createCardMessage({ + userID: 'user-002', + nickname: '小王', + faceURL: 'https://example.com/avatar.png', + ex: '', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `userID` | `string` | 是 | 名片对应的用户 ID。 | +| `nickname` | `string` | 是 | 名片展示的昵称。 | +| `faceURL` | `string` | 是 | 名片展示的头像地址。 | +| `ex` | `string` | 是 | 名片扩展信息,没有内容时传空字符串。 | + +调用后返回待发送的 `MessageItem`。`messageItem.cardElem` 保存的是创建时传入的名片资料。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx new file mode 100644 index 0000000000..2d2ea9e744 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx @@ -0,0 +1,31 @@ +--- +title: '创建自定义消息' +description: 'OpenIM React Native SDK 创建自定义消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-custom-message' +--- + +使用 `createCustomMessage()` 创建自定义业务消息。业务双方需要约定 `data`、`extension` 的数据格式。 + +```ts +const message = await OpenIMSDK.createCustomMessage({ + data: JSON.stringify({ type: 'task', taskID: 'task-42' }), + extension: JSON.stringify({ version: 1 }), + description: '任务卡片', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `data` | `string` | 是 | 业务数据字符串,可传 JSON 字符串。 | +| `extension` | `string` | 是 | 业务扩展信息字符串。 | +| `description` | `string` | 是 | 消息说明,也可作为不支持该消息类型时的降级展示文本。 | + +调用后返回待发送的 `MessageItem`。接收端应校验业务数据的格式和版本;服务端业务通知的监听方式见[接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx new file mode 100644 index 0000000000..53fc2fba26 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx @@ -0,0 +1,24 @@ +--- +title: '创建表情消息' +description: 'OpenIM React Native SDK 创建表情消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-face-message' +--- + +使用 `createFaceMessage()` 创建应用内约定的表情消息。 + +```ts +const message = await OpenIMSDK.createFaceMessage({ + index: 12, + data: JSON.stringify({ + url: 'https://www.example.com/emoji.png', + }), +}); +``` + +`index` 是双方约定的表情索引,`data` 是由发送端和接收端共同约定的自定义格式字符串,用于传递表情的识别或渲染信息,例如图片 URL、固定键或其他业务数据。调用后返回待发送的 `MessageItem`。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx new file mode 100644 index 0000000000..92a88a39d4 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx @@ -0,0 +1,29 @@ +--- +title: '使用文件创建文件消息' +description: 'OpenIM React Native SDK 使用文件创建文件消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-file-message-by-file' +--- + +使用 `createFileMessageFromFullPath()` 根据设备上的文件创建消息。 + +```ts +const message = await OpenIMSDK.createFileMessageFromFullPath({ + filePath, + fileName: '产品说明.pdf', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `filePath` | `string` | 是 | 文件的完整路径。 | +| `fileName` | `string` | 是 | 对外展示的文件名。 | + +调用后返回待发送的 `MessageItem`。使用[发送消息](/sdk/react-native/message/sending-messages/send-message)时,SDK 会处理本地文件上传。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx new file mode 100644 index 0000000000..768c88f4b8 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx @@ -0,0 +1,37 @@ +--- +title: '使用 URL 创建文件消息' +description: 'OpenIM React Native SDK 使用 URL 创建文件消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-file-message-by-url' +--- + +使用 `createFileMessageByURL()` 根据已上传文件的资源信息创建消息。 + +```ts +const message = await OpenIMSDK.createFileMessageByURL({ + filePath: '', + fileName: '产品说明.pdf', + uuid: 'file-001', + sourceUrl: 'https://www.example.com/产品说明.pdf', + fileSize: 256000, + fileType: 'application/pdf', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `filePath` | `string` | 是 | 本地文件路径;只有远端资源时传空字符串。 | +| `fileName` | `string` | 是 | 对外展示的文件名。 | +| `uuid` | `string` | 是 | 文件资源标识。 | +| `sourceUrl` | `string` | 是 | 已上传文件的地址。 | +| `fileSize` | `number` | 是 | 文件大小,单位为字节。 | +| `fileType` | `string` | 否 | 文件类型。 | + +调用后返回待发送的 `MessageItem`。资源信息应以实际上传结果为准,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx new file mode 100644 index 0000000000..b4c25eb5f6 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx @@ -0,0 +1,19 @@ +--- +title: '创建转发消息' +description: 'OpenIM React Native SDK 创建转发消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-forward-message' +--- + +使用 `createForwardMessage()` 根据已有消息创建一条转发消息。 + +```ts +const message = await OpenIMSDK.createForwardMessage(sourceMessage); +``` + +参数 `sourceMessage` 为完整的 `MessageItem`。调用后返回新的待发送 `MessageItem`,可发送到单聊或群聊。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx new file mode 100644 index 0000000000..7ae13a259a --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx @@ -0,0 +1,19 @@ +--- +title: '使用文件创建图片消息' +description: 'OpenIM React Native SDK 使用文件创建图片消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-image-message-by-file' +--- + +使用 `createImageMessageFromFullPath()` 根据本地图片完整路径创建消息。 + +```ts +const message = await OpenIMSDK.createImageMessageFromFullPath(imagePath); +``` + +`imagePath` 是图片在设备上的完整路径。调用后返回待发送的 `MessageItem`;使用[发送消息](/sdk/react-native/message/sending-messages/send-message)发送时,SDK 会处理本地资源上传。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx new file mode 100644 index 0000000000..cfe7940002 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx @@ -0,0 +1,42 @@ +--- +title: '使用 URL 创建图片消息' +description: 'OpenIM React Native SDK 使用 URL 创建图片消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-image-message-by-url' +--- + +使用 `createImageMessageByURL()` 根据已上传图片的资源信息创建消息。原图、大图和缩略图可共用同一资源信息,也可按业务需要分别传入不同尺寸或质量的资源。 + +```ts +const picture = { + uuid: 'image-001', + type: 'image/jpeg', + size: 120000, + width: 1280, + height: 720, + url: 'https://www.example.com/picture.png', +}; + +const message = await OpenIMSDK.createImageMessageByURL({ + sourcePicture: picture, + bigPicture: picture, + snapshotPicture: picture, + sourcePath: '', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `sourcePicture` | `PicBaseInfo` | 是 | 原图资源信息。 | +| `bigPicture` | `PicBaseInfo` | 是 | 大图资源信息。 | +| `snapshotPicture` | `PicBaseInfo` | 是 | 缩略图资源信息。 | +| `sourcePath` | `string` | 是 | 图片本地路径;只有远端资源时传空字符串。 | + +每个 `PicBaseInfo` 包含 `uuid`、`type`、`size`、`width`、`height` 和 `url`,分别表示资源标识、类型、字节大小、像素尺寸和远端地址。调用后返回待发送的 `MessageItem`,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx new file mode 100644 index 0000000000..ed8d18c2cd --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx @@ -0,0 +1,31 @@ +--- +title: '创建位置消息' +description: 'OpenIM React Native SDK 创建位置消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-location-message' +--- + +使用 `createLocationMessage()` 创建位置消息。 + +```ts +const message = await OpenIMSDK.createLocationMessage({ + description: '上海市浦东新区', + longitude: 121.4737, + latitude: 31.2304, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `description` | `string` | 是 | 位置名称或地址描述。 | +| `longitude` | `number` | 是 | 经度。 | +| `latitude` | `number` | 是 | 纬度。 | + +调用后返回待发送的 `MessageItem`。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx new file mode 100644 index 0000000000..c615e7bd6d --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx @@ -0,0 +1,21 @@ +--- +title: '创建 Markdown 消息' +description: 'OpenIM React Native SDK 创建 Markdown 消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-markdown-message' +--- + +使用 `createMarkdownMessage()` 创建 Markdown 消息。 + +```ts +const message = await OpenIMSDK.createMarkdownMessage( + '## 发布完成\n\n- Android\n- iOS', +); +``` + +参数是完整的 Markdown 文本。调用后返回待发送的 `MessageItem`;接收端展示不可信 Markdown 文本时,应使用支持安全策略的 Markdown 渲染器。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx new file mode 100644 index 0000000000..b680670dd2 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx @@ -0,0 +1,31 @@ +--- +title: '创建合并消息' +description: 'OpenIM React Native SDK 创建合并消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-merger-message' +--- + +使用 `createMergerMessage()` 创建包含多条消息的合并转发消息。 + +```ts +const message = await OpenIMSDK.createMergerMessage({ + messageList: selectedMessages, + title: '项目讨论记录', + summaryList: ['小王:发布计划已确认', '小李:我会跟进测试'], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `messageList` | `MessageItem[]` | 是 | 要合并的消息列表。 | +| `title` | `string` | 是 | 合并消息的标题。 | +| `summaryList` | `string[]` | 是 | 合并消息展示的摘要列表。 | + +调用后返回待发送的 `MessageItem`。摘要内容应符合当前会话的展示与隐私规则。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx new file mode 100644 index 0000000000..8e6ebf65c4 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx @@ -0,0 +1,29 @@ +--- +title: '创建回复消息' +description: 'OpenIM React Native SDK 创建回复消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-quote-message' +--- + +使用 `createQuoteMessage()` 创建回复消息,并传入完整的原消息对象。 + +```ts +const message = await OpenIMSDK.createQuoteMessage({ + text: '同意这个方案。', + message: originalMessage, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `text` | `string` | 是 | 回复的文本内容。 | +| `message` | `MessageItem` | 是 | 被回复的原消息。 | + +调用后返回新的待发送 `MessageItem`。接收端展示回复消息时,应注意处理原消息已删除或无法展示的情况。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx new file mode 100644 index 0000000000..58f2a1a9d1 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx @@ -0,0 +1,29 @@ +--- +title: '使用文件创建音频消息' +description: 'OpenIM React Native SDK 使用文件创建音频消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-sound-message-by-file' +--- + +使用 `createSoundMessageFromFullPath()` 根据设备上的音频文件创建消息。 + +```ts +const message = await OpenIMSDK.createSoundMessageFromFullPath({ + soundPath, + duration: 18, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `soundPath` | `string` | 是 | 音频文件的完整路径。 | +| `duration` | `number` | 是 | 音频时长,单位为秒。 | + +调用后返回待发送的 `MessageItem`。使用[发送消息](/sdk/react-native/message/sending-messages/send-message)时,SDK 会处理本地音频资源上传。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx new file mode 100644 index 0000000000..b5c1135c46 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx @@ -0,0 +1,37 @@ +--- +title: '使用 URL 创建音频消息' +description: 'OpenIM React Native SDK 使用 URL 创建音频消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-sound-message-by-url' +--- + +使用 `createSoundMessageByURL()` 根据已上传音频的资源信息创建消息。 + +```ts +const message = await OpenIMSDK.createSoundMessageByURL({ + uuid: 'audio-001', + soundPath: '', + sourceUrl: 'https://www.example.com/sound.mp3', + dataSize: 54000, + duration: 18, + soundType: 'audio/mpeg', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `uuid` | `string` | 是 | 音频资源标识。 | +| `soundPath` | `string` | 是 | 本地音频路径;只有远端资源时传空字符串。 | +| `sourceUrl` | `string` | 是 | 已上传音频的地址。 | +| `dataSize` | `number` | 是 | 音频大小,单位为字节。 | +| `duration` | `number` | 是 | 音频时长,单位为秒。 | +| `soundType` | `string` | 否 | 音频类型。 | + +调用后返回待发送的 `MessageItem`。资源信息应以实际上传结果为准,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx new file mode 100644 index 0000000000..e2d3278d6f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx @@ -0,0 +1,31 @@ +--- +title: '创建定向群消息' +description: 'OpenIM React Native SDK 创建定向群消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-targeted-group-message' +--- + +使用 `createTargetedGroupMessage()` 创建仅定向投递给指定群成员的消息对象。 + +```ts +const textMessage = await OpenIMSDK.createTextMessage('请相关成员查看。'); + +const message = await OpenIMSDK.createTargetedGroupMessage({ + message: textMessage, + dstUserIDs: ['user-001', 'user-002'], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `message` | `MessageItem` | 是 | 要定向发送的消息对象。 | +| `dstUserIDs` | `string[]` | 是 | 接收该消息的群成员用户 ID 列表。 | + +调用后返回待发送的 `MessageItem`。发送时在 `groupID` 中指定目标群组,并通过[发送消息](/sdk/react-native/message/sending-messages/send-message)投递。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx new file mode 100644 index 0000000000..126323cbae --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx @@ -0,0 +1,37 @@ +--- +title: '创建 @ 消息' +description: 'OpenIM React Native SDK 创建 @ 消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-text-at-message' +--- + +使用 `createTextAtMessage()` 创建群聊中的 @ 消息。`text` 中的 @ 文本与 `atUserIDList` 应对应。 + +```ts +const message = await OpenIMSDK.createTextAtMessage({ + text: '@user-001 请确认发布内容。', + atUserIDList: ['user-001'], + atUsersInfo: [ + { + atUserID: 'user-001', + groupNickname: '小李', + }, + ], +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `text` | `string` | 是 | @ 消息的正文。 | +| `atUserIDList` | `string[]` | 是 | 被提及的用户 ID 列表。 | +| `atUsersInfo` | `AtUsersInfoItem[]` | 否 | 被提及用户在群内的展示名。 | +| `message` | `MessageItem` | 否 | 附带的消息对象。 | + +调用后返回待发送的 `MessageItem`。将它传给[发送消息](/sdk/react-native/message/sending-messages/send-message)的 `message` 字段即可发送。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx new file mode 100644 index 0000000000..bbe8fb4eac --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx @@ -0,0 +1,19 @@ +--- +title: '创建文本消息' +description: 'OpenIM React Native SDK 创建文本消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-text-message' +--- + +调用 `createTextMessage()` 创建一条待发送的文本消息。 + +```ts +const message = await OpenIMSDK.createTextMessage('你好,欢迎加入讨论。'); +``` + +参数为文本内容。调用后返回 `MessageItem`,将它传给[发送消息](/sdk/react-native/message/sending-messages/send-message)的 `message` 字段即可发送。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx new file mode 100644 index 0000000000..eb89c98cab --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx @@ -0,0 +1,33 @@ +--- +title: '使用文件创建视频消息' +description: 'OpenIM React Native SDK 使用文件创建视频消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-video-message-by-file' +--- + +使用 `createVideoMessageFromFullPath()` 根据设备上的视频文件和封面图创建消息。 + +```ts +const message = await OpenIMSDK.createVideoMessageFromFullPath({ + videoPath, + videoType: 'video/mp4', + duration: 36, + snapshotPath, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `videoPath` | `string` | 是 | 视频文件的完整路径。 | +| `videoType` | `string` | 是 | 视频类型。 | +| `duration` | `number` | 是 | 视频时长,单位为秒。 | +| `snapshotPath` | `string` | 是 | 视频封面图的完整路径。 | + +调用后返回待发送的 `MessageItem`。发送时使用[发送消息](/sdk/react-native/message/sending-messages/send-message)处理本地视频和封面图资源。 diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx new file mode 100644 index 0000000000..94e2189878 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx @@ -0,0 +1,46 @@ +--- +title: '使用 URL 创建视频消息' +description: 'OpenIM React Native SDK 使用 URL 创建视频消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/creating-messages/create-video-message-by-url' +--- + +使用 `createVideoMessageByURL()` 根据已上传的视频及封面图资源创建消息。 + +```ts +const message = await OpenIMSDK.createVideoMessageByURL({ + videoPath: '', + duration: 36, + videoType: 'video/mp4', + videoUUID: 'video-001', + videoUrl: 'https://www.example.com/video.mp4', + videoSize: 820000, + snapshotPath: '', + snapshotUUID: 'cover-001', + snapshotSize: 42000, + snapshotUrl: 'https://www.example.com/snapshot.png', + snapshotWidth: 1280, + snapshotHeight: 720, + snapShotType: 'image/jpeg', +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `videoPath` | `string` | 是 | 本地视频路径;只有远端资源时传空字符串。 | +| `duration` | `number` | 是 | 视频时长,单位为秒。 | +| `videoType` | `string` | 是 | 视频类型。 | +| `videoUUID`、`videoUrl`、`videoSize` | `string`、`string`、`number` | 是 | 视频资源标识、远端地址和字节大小。 | +| `snapshotPath` | `string` | 是 | 本地封面图路径;只有远端资源时传空字符串。 | +| `snapshotUUID`、`snapshotUrl`、`snapshotSize` | `string`、`string`、`number` | 是 | 封面图资源标识、远端地址和字节大小。 | +| `snapshotWidth`、`snapshotHeight` | `number` | 是 | 封面图宽高,单位为像素。 | +| `snapShotType` | `string` | 否 | 封面图类型。 | + +调用后返回待发送的 `MessageItem`,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx new file mode 100644 index 0000000000..ea208c3e4c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx @@ -0,0 +1,19 @@ +--- +title: '清理全部本地消息' +description: 'OpenIM React Native SDK 清理全部本地消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/clear-all-local-messages' +--- + +使用 `deleteAllMsgFromLocal()` 清理当前登录账号在本设备上的全部消息。 + +```ts +await OpenIMSDK.deleteAllMsgFromLocal(); +``` + +这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本设备上的全部消息已清理;服务端仍保留历史记录。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx new file mode 100644 index 0000000000..f42d50667b --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx @@ -0,0 +1,19 @@ +--- +title: '清理本地与服务端消息' +description: 'OpenIM React Native SDK 清理本地与服务端消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/clear-all-messages' +--- + +使用 `deleteAllMsgFromLocalAndSvr()` 清理当前登录账号在本地和服务端保存的全部消息。 + +```ts +await OpenIMSDK.deleteAllMsgFromLocalAndSvr(); +``` + +这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本地和服务端的清理请求已完成;其他会话成员已保存的消息副本不受影响。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx new file mode 100644 index 0000000000..4c5228edc0 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx @@ -0,0 +1,29 @@ +--- +title: '删除本地消息' +description: 'OpenIM React Native SDK 删除本地消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/delete-local-message' +--- + +使用 `deleteMessageFromLocalStorage()` 删除当前设备中指定会话的一条消息。 + +```ts +await OpenIMSDK.deleteMessageFromLocalStorage({ + conversationID, + clientMsgID, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所属的会话 ID。 | +| `clientMsgID` | `string` | 是 | 要删除的消息 ID。 | + +调用完成后,当前设备上的目标消息已删除。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx new file mode 100644 index 0000000000..34c98c172c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx @@ -0,0 +1,49 @@ +--- +title: '批量删除消息' +description: 'OpenIM React Native SDK 批量删除消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/delete-saved-messages' +--- + +使用 `deleteMessages()` 批量删除同一会话中的消息。 + +```ts +await OpenIMSDK.deleteMessages({ + conversationID, + clientMsgIDs, + isSync: true, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要删除消息所属的会话 ID。 | +| `clientMsgIDs` | `string[]` | 是 | 要删除的消息 ID 列表;列表中的消息应属于同一会话。 | +| `isSync` | `boolean` | 是 | 是否将删除操作同步给会话另一方。为 `true` 时,会话双方都会删除对应消息;为 `false` 时,仅当前账号删除。 | + +调用完成后,删除请求已完成。`isSync` 为 `true` 时,会话另一方也会删除对应消息;为 `false` 时,仅当前账号删除,无论取值如何,当前账号的删除都会同步到该账号的其他设备。 + +## 监听消息删除 + +消息删除时会触发 `OnMsgDeleted`,回调携带被删除的 `MessageItem`。根据 `clientMsgID` 更新对应会话的消息列表。 + +```ts +function handleMessageDeleted(message) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnMsgDeleted, handleMessageDeleted); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnMsgDeleted, handleMessageDeleted); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx new file mode 100644 index 0000000000..346afc5682 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx @@ -0,0 +1,51 @@ +--- +title: '删除群聊中指定用户的全部消息' +description: 'OpenIM React Native SDK 删除群聊中指定用户的全部消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/delete-user-messages' +--- + +使用 `deleteUserAllMessagesInConv()` 删除指定用户在群聊会话中的全部消息。 + +```ts +await OpenIMSDK.deleteUserAllMessagesInConv({ + conversationID, + userID, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 目标群聊的会话 ID。 | +| `userID` | `string` | 是 | 要删除其消息的用户 ID。 | + +这是群聊管理操作,调用完成后删除请求已完成,具体权限由服务端校验。 + +## 监听指定用户消息删除 + +删除完成后会触发 `OnDeleteUserAllMsgsInConv`,回调携带 `conversationID` 和 `userID`,可据此移除目标会话中该用户的消息。 + +```ts +function handleUserMessagesDeleted(data) { + // ... +} + +OpenIMSDK.on( + OpenIMEvent.OnDeleteUserAllMsgsInConv, + handleUserMessagesDeleted, +); + +OpenIMSDK.off( + OpenIMEvent.OnDeleteUserAllMsgsInConv, + handleUserMessagesDeleted, +); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx new file mode 100644 index 0000000000..6d51bdefe1 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx @@ -0,0 +1,31 @@ +--- +title: '插入本地群聊消息' +description: 'OpenIM React Native SDK 插入本地群聊消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/insert-local-group-message' +--- + +使用 `insertGroupMessageToLocalStorage()` 将一条消息写入当前设备的群聊记录。 + +```ts +await OpenIMSDK.insertGroupMessageToLocalStorage({ + message, + groupID, + sendID, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `message` | `MessageItem` | 是 | 要写入的完整消息对象。 | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `sendID` | `string` | 是 | 消息发送方的用户 ID。 | + +调用完成后,消息已写入当前设备的群聊记录。需要向群成员发送消息时,使用[发送消息](/sdk/react-native/message/sending-messages/send-message)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx new file mode 100644 index 0000000000..1257b4c029 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx @@ -0,0 +1,31 @@ +--- +title: '插入本地单聊消息' +description: 'OpenIM React Native SDK 插入本地单聊消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/insert-local-single-message' +--- + +使用 `insertSingleMessageToLocalStorage()` 将一条消息写入当前设备的单聊记录。 + +```ts +await OpenIMSDK.insertSingleMessageToLocalStorage({ + message, + recvID, + sendID, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `message` | `MessageItem` | 是 | 要写入的完整消息对象。 | +| `recvID` | `string` | 是 | 单聊接收方的用户 ID。 | +| `sendID` | `string` | 是 | 消息发送方的用户 ID。 | + +调用完成后,消息已写入当前设备的单聊记录。需要向对方发送消息时,使用[发送消息](/sdk/react-native/message/sending-messages/send-message)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx new file mode 100644 index 0000000000..2b49625289 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx @@ -0,0 +1,57 @@ +--- +title: '修改消息' +description: 'OpenIM React Native SDK 修改消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/modify-a-message' +--- + +使用 `modifyMessage()` 修改会话中已有消息的内容。 + +```ts +const updatedMessage = { + ...message, + textElem: { + ...message.textElem, + content: editedText, + }, +}; + +const modifiedMessage = await OpenIMSDK.modifyMessage({ + conversationID, + message: updatedMessage, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所属的会话 ID。 | +| `message` | `MessageItem` | 是 | 修改后的完整消息对象,需保留原消息的 `clientMsgID` 及其他必要字段。 | + +## 返回结果 + +调用后返回服务端确认的 `MessageItem`,可使用返回消息替换列表中相同 `clientMsgID` 的消息。允许修改的消息类型、发送者和时间范围由服务端校验。 + +## 监听消息修改 + +消息修改时会触发 `OnMessageModified`,回调直接携带修改后的 `MessageItem`。 + +```ts +function handleMessageModified(message) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnMessageModified, handleMessageModified); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnMessageModified, handleMessageModified); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx new file mode 100644 index 0000000000..acde903ad2 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx @@ -0,0 +1,47 @@ +--- +title: '撤回消息' +description: 'OpenIM React Native SDK 撤回消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/revoke-a-message' +--- + +使用 `revokeMessage()` 撤回已发送的消息。撤回后,会话成员可看到消息撤回状态。 + +```ts +await OpenIMSDK.revokeMessage({ + conversationID, + clientMsgID, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所属的会话 ID。 | +| `clientMsgID` | `string` | 是 | 要撤回的消息 ID。 | + +调用完成后,撤回请求已完成。允许撤回的消息、发送者和时间范围由服务端校验。 + +## 监听消息撤回 + +消息撤回时会触发 `OnNewRecvMessageRevoked`,回调携带 `RevokedInfo`。使用其中的 `clientMsgID` 更新对应消息的撤回状态。 + +```ts +function handleMessageRevoked(revokedInfo) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked); +``` + +组件销毁、退出登录或切换账号时,取消监听。仅从当前设备移除消息时,使用[删除本地消息](/sdk/react-native/message/managing-messages/delete-local-message)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx new file mode 100644 index 0000000000..ded7033d87 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx @@ -0,0 +1,31 @@ +--- +title: '设置消息本地扩展' +description: 'OpenIM React Native SDK 设置消息本地扩展。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-messages/set-message-local-ex' +--- + +使用 `setMessageLocalEx()` 为当前设备中的指定消息保存本地扩展数据。 + +```ts +await OpenIMSDK.setMessageLocalEx({ + conversationID, + clientMsgID, + localEx: JSON.stringify({ expanded: true }), +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所属的会话 ID。 | +| `clientMsgID` | `string` | 是 | 目标消息 ID。 | +| `localEx` | `string` | 是 | 本地扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展数据。 | + +调用完成后,本地扩展数据已保存到当前设备的消息中。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx new file mode 100644 index 0000000000..e2849e0250 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx @@ -0,0 +1,37 @@ +--- +title: '查询群消息已读成员' +description: 'OpenIM React Native SDK 查询群消息已读成员。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-read-status/get-group-message-readers' +--- + +使用 `getGroupMessageReaderList()` 分页查询一条群消息的已读或未读成员。 + +```ts +const members = await OpenIMSDK.getGroupMessageReaderList({ + conversationID, + clientMsgID, + filter: GroupMessageReaderFilter.Read, + offset: 0, + count: 50, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 群聊会话 ID。 | +| `clientMsgID` | `string` | 是 | 要查询已读情况的消息 ID。 | +| `filter` | `GroupMessageReaderFilter` | 是 | 成员筛选条件。`Read` 查询已读成员,`Unread` 查询未读成员。 | +| `offset` | `number` | 是 | 分页偏移量;首页传 `0`。 | +| `count` | `number` | 是 | 本次查询的成员数量。 | + +## 返回结果 + +调用后返回当前页的 `GroupMemberItem[]`。成员字段见[群组概览](/sdk/react-native/group/overview-group);继续查询时递增 `offset`。 diff --git a/content/zh/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx b/content/zh/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx new file mode 100644 index 0000000000..704eca1b16 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx @@ -0,0 +1,47 @@ +--- +title: '上报群消息已读' +description: 'OpenIM React Native SDK 上报群消息已读。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/managing-read-status/send-group-read-receipts' +--- + +使用 `sendGroupMessageReadReceipt()` 上报群聊中已读的消息。 + +```ts +await OpenIMSDK.sendGroupMessageReadReceipt({ + conversationID, + clientMsgIDs, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 群聊会话 ID。 | +| `clientMsgIDs` | `string[]` | 是 | 已读消息 ID 列表;列表中的消息应属于该群聊会话。 | + +调用完成后,已读回执已上报。会话未读数的更新见[标记会话已读](/sdk/react-native/conversation/managing-conversations/mark-conversation-read)。 + +## 监听群消息已读变化 + +群消息的已读状态变化时会触发 `OnRecvGroupReadReceipt`,回调携带 `GroupMessageReceiptInfo`,其中包含 `conversationID` 和各消息的已读人数、未读人数及已读成员。 + +```ts +function handleGroupReadReceipt(payload) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/overview-message.mdx b/content/zh/docs/chat/sdk/react-native/message/overview-message.mdx new file mode 100644 index 0000000000..e7b21b7565 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/overview-message.mdx @@ -0,0 +1,105 @@ +--- +title: '消息概览' +description: 'OpenIM React Native SDK 消息概览。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/overview-message' +--- + +OpenIM React Native SDK 使用 `MessageItem` 表示一条消息。创建消息仅生成待发送的 `MessageItem`;要将消息发送给单聊用户或群组,还需要调用发送 API。接收、查询以及删除、撤回、修改等状态变化则通过各自的 API 或事件处理。 + +消息列表使用 `clientMsgID` 识别、去重和更新单条消息。`MessageItem` 不包含 `conversationID`,消息所属会话应从当前会话、历史查询参数或事件上下文中获取。 + +## 消息处理流程 + +| 阶段 | 相关能力 | 说明 | +| --- | --- | --- | +| 创建 | `create*Message()` | 创建待发送的 `MessageItem`。 | +| 发送 | `sendMessage()`、`sendMessageNotOss()` | 将消息发送到单聊或群聊。 | +| 接收 | 新消息事件 | 接收实时消息、离线消息和仅在线消息。 | +| 查询 | 历史消息、按 ID 查找和搜索 | 按会话读取或定位已保存的消息。 | +| 状态变化 | 撤回、删除、修改和已读回执 | 根据调用结果和对应事件更新消息列表。 | + +## MessageItem 类型 + +创建、发送、接收和查询消息时,得到的消息对象都是 `MessageItem`。常用公共字段如下: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `clientMsgID` | `string` | 客户端消息 ID,用于消息去重、更新和定位。 | +| `serverMsgID` | `string` | 服务端消息 ID。 | +| `sessionType` | `SessionType` | 会话类型,用于区分单聊和群聊。 | +| `sendID` | `string` | 发送者用户 ID。 | +| `recvID` | `string` | 单聊消息的接收方用户 ID。 | +| `groupID` | `string` | 群聊消息所属的群组 ID。 | +| `contentType` | `MessageType` | 消息内容类型,决定使用哪个内容字段渲染。 | +| `createTime` | `number` | 消息对象创建时间。 | +| `sendTime` | `number` | 消息发送时间。 | +| `seq` | `number` | 服务端消息序号。 | +| `senderPlatformID` | `Platform` | 发送消息的客户端平台。 | +| `status` | `MessageStatus` | 消息发送状态。 | +| `isRead` | `boolean` | 已读状态。 | +| `senderNickname` | `string` | 发送者昵称。 | +| `senderFaceUrl` | `string` | 发送者头像 URL。 | +| `offlinePush` | `OfflinePush` | 离线推送配置。 | +| `content` | `string` | SDK 序列化的消息内容。渲染时应读取与 `contentType` 对应的内容字段。 | +| `ex` | `string` | 消息扩展字段。 | +| `localEx` | `string` | 仅当前设备使用的消息扩展字段。 | + +消息内容保存在 `MessageItem` 中与 `contentType` 对应的字段内: + +| 内容 | 字段 | +| --- | --- | +| 文本、富文本和 Markdown | `textElem`、`advancedTextElem`、`markdownTextElem` | +| 图片、音频、视频和文件 | `pictureElem`、`soundElem`、`videoElem`、`fileElem` | +| @ 消息 | `atTextElem` | +| 回复消息 | `quoteElem` | +| 合并转发 | `mergeElem` | +| 名片、位置和表情 | `cardElem`、`locationElem`、`faceElem` | +| 自定义消息 | `customElem` | +| 通知、输入状态和附加状态 | `notificationElem`、`typingElem`、`attachedInfoElem` | + +内容字段均为可选字段。一条消息通常只使用与其 `contentType` 对应的内容字段;渲染前应先判断 `contentType`,再读取相应字段。 + +## 创建并发送消息 + +先调用对应的创建 API 得到 `MessageItem`,再调用发送 API。由 SDK 上传本地媒体文件时使用[发送消息](/sdk/react-native/message/sending-messages/send-message);媒体文件已经有远端 URL 时使用[发送不经 OSS 的消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。 + +| 内容 | 页面 | +| --- | --- | +| 文本和富文本 | [创建文本消息](/sdk/react-native/message/creating-messages/create-text-message)、[创建富文本消息](/sdk/react-native/message/creating-messages/create-advanced-text-message) | +| @ 消息 | [创建 @ 消息](/sdk/react-native/message/creating-messages/create-text-at-message) | +| 图片、音频、视频和文件 | [创建图片消息](/sdk/react-native/message/creating-messages/create-image-message-by-file)、[创建音频消息](/sdk/react-native/message/creating-messages/create-sound-message-by-file)、[创建视频消息](/sdk/react-native/message/creating-messages/create-video-message-by-file)、[创建文件消息](/sdk/react-native/message/creating-messages/create-file-message-by-file) | +| 名片、位置和表情 | [创建名片消息](/sdk/react-native/message/creating-messages/create-card-message)、[创建位置消息](/sdk/react-native/message/creating-messages/create-location-message)、[创建表情消息](/sdk/react-native/message/creating-messages/create-face-message) | +| 回复、转发和合并转发 | [创建回复消息](/sdk/react-native/message/creating-messages/create-quote-message)、[创建转发消息](/sdk/react-native/message/creating-messages/create-forward-message)、[创建合并转发消息](/sdk/react-native/message/creating-messages/create-merger-message) | +| 自定义消息 | [创建自定义消息](/sdk/react-native/message/creating-messages/create-custom-message) | + +## 按任务查看能力 + +| 任务 | 页面 | +| --- | --- | +| 接收实时、离线和仅在线消息 | [接收消息](/sdk/react-native/message/receiving-messages/receive-messages) | +| 接收自定义业务消息 | [接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages) | +| 加载历史消息或消息上下文 | [加载历史消息](/sdk/react-native/message/retrieving-messages/load-older-messages)、[读取消息上下文](/sdk/react-native/message/retrieving-messages/load-message-context) | +| 按 ID 查找或搜索消息 | [按 ID 查找消息](/sdk/react-native/message/retrieving-messages/find-messages-by-id)、[搜索消息](/sdk/react-native/message/searching-messages/search-messages) | +| 删除、撤回或修改消息 | [批量删除消息](/sdk/react-native/message/managing-messages/delete-saved-messages)、[撤回消息](/sdk/react-native/message/managing-messages/revoke-a-message)、[修改消息](/sdk/react-native/message/managing-messages/modify-a-message) | +| 管理仅当前设备使用的消息数据 | [删除本地消息](/sdk/react-native/message/managing-messages/delete-local-message)、[设置消息本地扩展](/sdk/react-native/message/managing-messages/set-message-local-ex) | +| 上报或查询群消息已读 | [上报群消息已读](/sdk/react-native/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/sdk/react-native/message/managing-read-status/get-group-message-readers) | +| 上报或查询输入状态 | [上报输入状态](/sdk/react-native/message/composing-messages/update-typing-status)、[查询输入状态](/sdk/react-native/message/composing-messages/get-typing-status) | +| 识别音频文字 | [检查语音识别能力](/sdk/react-native/message/composing-messages/check-speech-to-text)、[识别音频文字](/sdk/react-native/message/composing-messages/transcribe-audio) | + +## 事件处理 + +消息相关事件的完整监听代码分别位于以下页面: + +- 新消息、离线消息和仅在线消息:`OnRecvNewMessage`、`OnRecvOfflineNewMessage`、`OnRecvOnlineOnlyMessage`,见[接收消息](/sdk/react-native/message/receiving-messages/receive-messages)。 +- 自定义业务消息:`OnRecvCustomBusinessMessage`,见[接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages)。 +- 消息删除:`OnMsgDeleted`,见[批量删除消息](/sdk/react-native/message/managing-messages/delete-saved-messages)。 +- 消息撤回:`OnNewRecvMessageRevoked`,见[撤回消息](/sdk/react-native/message/managing-messages/revoke-a-message)。 +- 消息修改:`OnMessageModified`,见[修改消息](/sdk/react-native/message/managing-messages/modify-a-message)。 +- 群消息已读状态:`OnRecvGroupReadReceipt`,见[上报群消息已读](/sdk/react-native/message/managing-read-status/send-group-read-receipts)。 +- 输入状态变化:`OnInputStatusChanged`,见[更新输入状态](/sdk/react-native/message/composing-messages/change-input-states)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx new file mode 100644 index 0000000000..ab43788471 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx @@ -0,0 +1,33 @@ +--- +title: '接收自定义业务消息' +description: 'OpenIM React Native SDK 接收自定义业务消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/receiving-messages/receive-custom-business-messages' +--- + +服务端下发自定义业务通知时会触发 `OnRecvCustomBusinessMessage`。该事件的回调参数为业务数据,不是 `MessageItem`;普通聊天自定义消息仍通过[接收消息](/sdk/react-native/message/receiving-messages/receive-messages)中的新消息事件接收。 + +```ts +function handleCustomBusinessMessage(data) { + // ... +} + +// 设置监听 +OpenIMSDK.on( + OpenIMEvent.OnRecvCustomBusinessMessage, + handleCustomBusinessMessage, +); + +// 取消监听 +OpenIMSDK.off( + OpenIMEvent.OnRecvCustomBusinessMessage, + handleCustomBusinessMessage, +); +``` + +业务侧应先校验收到的数据格式,再按自身协议处理。组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx new file mode 100644 index 0000000000..6c751a223e --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx @@ -0,0 +1,39 @@ +--- +title: '接收消息' +description: 'OpenIM React Native SDK 接收消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/receiving-messages/receive-messages' +--- + +新消息到达时会触发 `OnRecvNewMessage`,回调参数为一条 `MessageItem`。离线消息和只在线投递的消息分别通过 `OnRecvOfflineNewMessage`、`OnRecvOnlineOnlyMessage` 接收,三个事件的回调参数均为 `MessageItem`。 + +```ts +function handleNewMessage(message) { + // ... +} + +function handleOfflineNewMessage(message) { + // ... +} + +function handleOnlineOnlyMessage(message) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnRecvNewMessage, handleNewMessage); +OpenIMSDK.on(OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage); +OpenIMSDK.on(OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnRecvNewMessage, handleNewMessage); +OpenIMSDK.off(OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage); +OpenIMSDK.off(OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage); +``` + +使用 `clientMsgID` 识别消息。组件销毁、退出登录或切换账号时,取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx new file mode 100644 index 0000000000..ecc6395590 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx @@ -0,0 +1,37 @@ +--- +title: '按 ID 查找消息' +description: 'OpenIM React Native SDK 按 ID 查找消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/find-messages-by-id' +--- + +使用 `findMessageList()` 根据会话 ID 和消息 ID 查找消息。适合从搜索结果、引用或通知跳转到一条已知消息时使用。 + +```ts +const result = await OpenIMSDK.findMessageList([ + { + conversationID, + clientMsgIDList: [clientMsgID], + }, +]); + +const targetMessage = result.findResultItems?.[0]?.messageList[0]; +``` + +## 参数说明 + +`findMessageList()` 接收查询条件数组,每项包含以下字段: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 目标消息所属的会话 ID。 | +| `clientMsgIDList` | `string[]` | 是 | 要查找的消息 ID 列表。 | + +## 返回结果 + +调用后返回 `SearchMessageResult`,按 ID 查找的结果位于 `findResultItems`。每个结果项包含 `conversationID` 和 `messageList`;找不到消息时,结果项或其消息列表可能为空。完整结果结构见[搜索消息](/sdk/react-native/message/searching-messages/search-messages)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx new file mode 100644 index 0000000000..0ec226a62b --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx @@ -0,0 +1,33 @@ +--- +title: '读取消息上下文' +description: 'OpenIM React Native SDK 读取消息上下文。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/load-message-context' +--- + +使用 `fetchSurroundingMessages()` 读取一条已知消息前后的上下文,适合从搜索结果或回复消息进入聊天记录。 + +```ts +const { messageList } = await OpenIMSDK.fetchSurroundingMessages({ + startMessage: targetMessage, + viewType: ViewType.Search, + before: 20, + after: 20, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `startMessage` | `MessageItem` | 是 | 已取得的锚点消息。 | +| `viewType` | `ViewType` | 是 | 上下文查看类型;从搜索结果进入时可传 `ViewType.Search`。 | +| `before` | `number` | 是 | 锚点之前最多读取的消息数量。 | +| `after` | `number` | 是 | 锚点之后最多读取的消息数量。 | + +调用后返回 `{ messageList }`,其中 `messageList` 是锚点前后取得的 `MessageItem[]`。返回数量可能少于 `before + after`,例如锚点靠近记录边界或部分消息已删除。 diff --git a/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx new file mode 100644 index 0000000000..1e230f4269 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx @@ -0,0 +1,33 @@ +--- +title: '反向加载历史消息' +description: 'OpenIM React Native SDK 反向加载历史消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/load-newer-messages' +--- + +使用 `getAdvancedHistoryMessageListReverse()` 从消息锚点向较新的方向读取历史消息,适合定位消息后继续加载其后的记录。 + +```ts +const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse({ + conversationID, + startClientMsgID: anchorMessage.clientMsgID, + count: 30, + viewType: ViewType.History, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要读取消息的会话 ID。 | +| `startClientMsgID` | `string` | 是 | 向较新方向读取时使用的锚点消息 ID。 | +| `count` | `number` | 是 | 本次读取的消息数量。 | +| `viewType` | `ViewType` | 是 | 浏览历史消息时传 `ViewType.History`。 | + +调用后返回 `AdvancedGetMessageResult`,其中 `messageList` 是本页消息,`isEnd` 表示是否已到达较新一端的边界。其余返回字段见[加载历史消息](/sdk/react-native/message/retrieving-messages/load-older-messages)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx new file mode 100644 index 0000000000..afae2c989c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx @@ -0,0 +1,44 @@ +--- +title: '加载历史消息' +description: 'OpenIM React Native SDK 加载历史消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/retrieving-messages/load-older-messages' +--- + +使用 `getAdvancedHistoryMessageList()` 分页加载会话中较早的历史消息。第一页的 `startClientMsgID` 传空字符串,继续加载时传入当前最早消息的 `clientMsgID`。 + +```ts +const page = await OpenIMSDK.getAdvancedHistoryMessageList({ + conversationID, + startClientMsgID: oldestMessage?.clientMsgID ?? '', + count: 30, + viewType: ViewType.History, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 | +| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 | +| `count` | `number` | 是 | 本次读取的消息数量。 | +| `viewType` | `ViewType` | 是 | 浏览历史消息时传 `ViewType.History`。 | + +## 返回结果 + +调用后返回 `AdvancedGetMessageResult`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `messageList` | `MessageItem[]` | 当前页消息。 | +| `isEnd` | `boolean` | 是否已到达较早一端的边界。 | +| `errCode` | `number` | 本次历史读取的状态码。 | +| `errMsg` | `string` | 与 `errCode` 对应的说明。 | + +将 `messageList` 加入列表前,按 `clientMsgID` 去重。 diff --git a/content/zh/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx b/content/zh/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx new file mode 100644 index 0000000000..8e47ca2567 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx @@ -0,0 +1,50 @@ +--- +title: '搜索消息' +description: 'OpenIM React Native SDK 搜索消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/searching-messages/search-messages' +--- + +使用 `searchLocalMessages()` 搜索当前账号已同步到本地的消息。 + +```ts +const result = await OpenIMSDK.searchLocalMessages({ + conversationID, + keywordList: ['发布'], + messageTypeList: [MessageType.TextMessage], + pageIndex: 1, + count: 20, +}); +``` + +## 参数说明 + +`keywordList` 可传入一个或多个关键词。单个搜索框通常传入一个去除首尾空格且非空的关键词。 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要搜索的会话 ID。 | +| `keywordList` | `string[]` | 是 | 关键词列表;单个搜索框通常传入一个清理后的关键词。 | +| `keywordListMatchType` | `number` | 否 | 多关键词匹配方式:`0` 表示命中任意关键词(OR),`1` 表示同时命中全部关键词(AND);省略时按 `0` 处理。 | +| `senderUserIDList` | `string[]` | 否 | 仅搜索这些用户发送的消息。 | +| `messageTypeList` | `MessageType[]` | 否 | 仅搜索指定类型的消息,例如文本消息和 @ 文本消息;省略时按 SDK 默认范围搜索。 | +| `searchTimePosition` | `number` | 否 | 搜索结束位置,Unix 时间戳,单位为秒。 | +| `searchTimePeriod` | `number` | 否 | 从 `searchTimePosition` 向前搜索的时间范围,单位为秒。 | +| `pageIndex` | `number` | 否 | 搜索结果页码,从 `1` 开始。 | +| `count` | `number` | 否 | 每页返回的消息数量。 | + +## 返回结果 + +调用后返回 `SearchMessageResult`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `totalCount` | `number` | 当前条件下的匹配消息总数。 | +| `searchResultItems` | `SearchMessageResultItem[]` | 按会话组织的搜索结果。 | + +每个 `SearchMessageResultItem` 包含会话信息和 `messageList`。修改关键词或筛选条件时,从第一页重新搜索,避免混合不同条件的结果。需要定位命中消息前后的记录时见[读取消息上下文](/sdk/react-native/message/retrieving-messages/load-message-context)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx b/content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx new file mode 100644 index 0000000000..c4cda33ef9 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx @@ -0,0 +1,33 @@ +--- +title: '发送已上传的媒体消息' +description: 'OpenIM React Native SDK 发送已上传的媒体消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/sending-messages/send-message-not-oss' +--- + +`sendMessageNotOss()` 用于发送已经包含远端资源 URL 的图片、音频、视频或文件消息,不再走 SDK 的资源上传流程。 + +```ts +const sentMessage = await OpenIMSDK.sendMessageNotOss({ + recvID: receiverUserID, + groupID: '', + message: uploadedMessage, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `recvID` | `string` | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | +| `groupID` | `string` | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | +| `message` | `MessageItem` | 是 | 通过 URL 型消息创建 API 创建的待发送消息。 | +| `offlinePushInfo` | `OfflinePush` | 否 | 离线推送配置。 | +| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递。 | + +调用后返回发送完成的 `MessageItem`。`message` 中的资源地址、大小、类型和尺寸应来自实际上传结果;本地路径型媒体消息请使用[发送消息](/sdk/react-native/message/sending-messages/send-message)。 diff --git a/content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx b/content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx new file mode 100644 index 0000000000..775a495016 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx @@ -0,0 +1,51 @@ +--- +title: '发送消息' +description: 'OpenIM React Native SDK 发送消息。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/message/sending-messages/send-message' +--- + +调用 `sendMessage()` 发送由消息创建 API 返回的 `MessageItem`。单聊填写 `recvID`,群聊填写 `groupID`。 + +使用本地路径创建的图片、音频、视频和文件消息时,SDK 会在发送过程中自动上传资源。对于已通过 URL 创建、已有远端资源的媒体消息,请使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。 + +```ts +const sentMessage = await OpenIMSDK.sendMessage({ + recvID: receiverUserID, + groupID: '', + message, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `recvID` | `string` | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | +| `groupID` | `string` | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | +| `message` | `MessageItem` | 是 | 待发送消息。 | +| `offlinePushInfo` | `OfflinePush` | 否 | 离线推送配置。 | +| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递。 | + +调用后返回发送完成的 `MessageItem`。 + +发送过程有进度时会触发 `SendMessageProgress`,回调参数包含 `progress` 和 `message`: + +```ts +function handleSendMessageProgress(info) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.SendMessageProgress, handleSendMessageProgress); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.SendMessageProgress, handleSendMessageProgress); +``` + +组件销毁、退出登录或切换账号时,取消监听。 diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index 7d08c78d70..22d32495dc 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -7414,5 +7414,397 @@ "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/overview-message", + "openimPath": "/sdk/react-native/message/overview-message", + "title": "Message overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/overview-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "Create a text message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-custom-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "openimPath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "Create an image message from a file", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "openimPath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "openimPath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "Create an audio message from a file", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "openimPath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "openimPath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "Create a video message from files", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "openimPath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "openimPath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "Create a file message from a file", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "openimPath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-card-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-location-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "Create a location message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-face-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-quote-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-forward-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-merger-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "Create a rich-text message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "Create a rich-text reply", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "openimPath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "Create a targeted group message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/sending-messages/send-message", + "openimPath": "/sdk/react-native/message/sending-messages/send-message", + "title": "Send a message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "openimPath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-messages", + "openimPath": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "Receive messages", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "openimPath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "openimPath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "openimPath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "Load message history in reverse", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "openimPath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "openimPath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "Load message context", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/searching-messages/search-messages", + "openimPath": "/sdk/react-native/message/searching-messages/search-messages", + "title": "Search messages", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/update-typing-status", + "openimPath": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "Report typing status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/get-typing-status", + "openimPath": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "Get typing status", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "openimPath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "openimPath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "openimPath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", + "openimPath": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "Update input states", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/delete-local-message", + "openimPath": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "openimPath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "openimPath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "openimPath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/modify-a-message", + "openimPath": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "Modify a message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "openimPath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "openimPath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "openimPath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "openimPath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "openimPath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "openimPath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx" + }, + { + "sourcePath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "openimPath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx" } ] diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index ae807967cf..cd72104e51 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -4104,6 +4104,2239 @@ "notes": [ "2026-08-25:按 React Native SDK 固定提交核对公开方法、类型和页面示例。" ] + }, + { + "currentPath": "/sdk/react-native/message/overview-message", + "targetPath": "/sdk/react-native/message/overview-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "概览页只介绍消息模型、页面入口和事件归属。" + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "not-applicable", + "evidence": [], + "reason": "The overview page introduces the message model, page entry points, and event handling pages." + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对 MessageItem、消息内容字段、公开事件和页面链接。", + "2026-08-27:已将消息事件处理入口整理为按事件类型列出的页面链接。", + "2026-08-27:已明确创建消息、发送消息以及其他消息操作的职责边界。", + "2026-08-27:已按单章节结构整理 MessageItem 的公共字段和内容字段,并补充 RN 声明中的 createTime、seq、senderPlatformID 与 content 字段。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration.", + "2026-08-27:已修正中英文概览中搜索消息页面的路由链接。" + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-text-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-text-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createTextMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createTextAtMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-custom-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-custom-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createCustomMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "targetPath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createImageMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "targetPath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createImageMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-26:已说明原图、大图和缩略图可共用或分别使用资源信息。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "targetPath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createSoundMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "targetPath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createSoundMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "targetPath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createVideoMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "targetPath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createVideoMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "targetPath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createFileMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "targetPath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createFileMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-card-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-card-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createCardMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-location-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-location-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createLocationMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-face-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-face-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createFaceMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:已将 data 示例调整为包含表情图片 URL 的自定义格式字符串,并说明其含义由发送端和接收端共同约定。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-quote-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-quote-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createQuoteMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createMarkdownMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-forward-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-forward-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createForwardMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-merger-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-merger-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createMergerMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createAdvancedTextMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createAdvancedQuoteMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "targetPath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "createTargetedGroupMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/sending-messages/send-message", + "targetPath": "/sdk/react-native/message/sending-messages/send-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "sendMessage" + ], + "sdkEvents": [ + "SendMessageProgress" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、事件和页面示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:已将已上传资源消息的跳转说明前置到调用说明处,并明确本地资源会在发送过程中自动上传。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "targetPath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "sendMessageNotOss" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/receiving-messages/receive-messages", + "targetPath": "/sdk/react-native/message/receiving-messages/receive-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [ + "OnRecvNewMessage", + "OnRecvOfflineNewMessage", + "OnRecvOnlineOnlyMessage" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开事件、回调参数和监听示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "targetPath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [], + "sdkEvents": [ + "OnRecvCustomBusinessMessage" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-25:已按 React Native SDK 固定提交核对公开事件、回调参数和监听示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "targetPath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getAdvancedHistoryMessageList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "targetPath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getAdvancedHistoryMessageListReverse" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "targetPath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "findMessageList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "targetPath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "fetchSurroundingMessages" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/searching-messages/search-messages", + "targetPath": "/sdk/react-native/message/searching-messages/search-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "searchLocalMessages" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:已参考 WASM 参数说明,补充关键词匹配、筛选、时间范围和分页参数语义。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/composing-messages/update-typing-status", + "targetPath": "/sdk/react-native/message/composing-messages/update-typing-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "typingStatusUpdate" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/composing-messages/get-typing-status", + "targetPath": "/sdk/react-native/message/composing-messages/get-typing-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getInputStates" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "targetPath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "speechToTextCapabilities" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、返回结果和页面示例。", + "2026-08-27:已明确 speechToTextCapabilities() 用于查询支持信息,实际语音识别由识别音频文字接口执行。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "targetPath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "speechToText" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "targetPath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setMessageLocalContent" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/composing-messages/change-input-states", + "targetPath": "/sdk/react-native/message/composing-messages/change-input-states", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "changeInputStates" + ], + "sdkEvents": [ + "OnInputStatusChanged" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、事件、回调参数和监听页面示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/delete-local-message", + "targetPath": "/sdk/react-native/message/managing-messages/delete-local-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteMessageFromLocalStorage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "targetPath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteMessages" + ], + "sdkEvents": [ + "OnMsgDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、事件、回调参数和监听示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:已修正 isSync 的双向删除语义,并说明当前账号的删除始终同步到其其他设备。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "targetPath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteUserAllMessagesInConv" + ], + "sdkEvents": [ + "OnDeleteUserAllMsgsInConv" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、事件、回调参数和监听示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "targetPath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "revokeMessage" + ], + "sdkEvents": [ + "OnNewRecvMessageRevoked" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、事件、回调参数和监听示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/modify-a-message", + "targetPath": "/sdk/react-native/message/managing-messages/modify-a-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "modifyMessage" + ], + "sdkEvents": [ + "OnMessageModified" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果、事件、回调参数和监听示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "targetPath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "insertSingleMessageToLocalStorage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "targetPath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "insertGroupMessageToLocalStorage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "targetPath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteAllMsgFromLocal" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "targetPath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "deleteAllMsgFromLocalAndSvr" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "targetPath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "setMessageLocalEx" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "targetPath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "sendGroupMessageReadReceipt" + ], + "sdkEvents": [ + "OnRecvGroupReadReceipt" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、事件、回调参数和监听示例。", + "2026-08-26:监听示例已补充设置和取消监听注释。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] + }, + { + "currentPath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "targetPath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "getGroupMessageReaderList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-26", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + ] } ] } diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json index 964591d392..6ef82c4f7b 100644 --- a/data/structure/react-native-navigation-labels.json +++ b/data/structure/react-native-navigation-labels.json @@ -124,5 +124,61 @@ "Reorder conversation groups": "调整会话分组顺序", "Add conversations to groups": "添加会话到分组", "Remove conversations from groups": "从分组移除会话", - "Delete a conversation group": "删除会话分组" + "Delete a conversation group": "删除会话分组", + "Message overview": "消息概览", + "Create a text message": "创建文本消息", + "Create a mention message": "创建 @ 消息", + "Create a custom message": "创建自定义消息", + "Create an image message from a file": "使用文件创建图片消息", + "Create an image message from a URL": "使用 URL 创建图片消息", + "Create an audio message from a file": "使用文件创建音频消息", + "Create an audio message from a URL": "使用 URL 创建音频消息", + "Create a video message from a file": "使用文件创建视频消息", + "Create a video message from a URL": "使用 URL 创建视频消息", + "Create a file message from a file": "使用文件创建文件消息", + "Create a file message from a URL": "使用 URL 创建文件消息", + "Create a contact card message": "创建名片消息", + "Create a location message": "创建位置消息", + "Create an emoji message": "创建表情消息", + "Create a reply message": "创建回复消息", + "Create a Markdown message": "创建 Markdown 消息", + "Create a forwarded message": "创建转发消息", + "Create a merged message": "创建合并消息", + "Create a rich-text message": "创建富文本消息", + "Create a rich-text reply": "创建富文本回复消息", + "Create a targeted group message": "创建定向群消息", + "Send a message": "发送消息", + "Send a message without OSS": "发送已上传的媒体消息", + "Receive messages": "接收消息", + "Receive custom business messages": "接收自定义业务消息", + "Load older messages": "加载历史消息", + "Load newer messages": "反向加载历史消息", + "Find messages by ID": "按 ID 查找消息", + "Load message context": "读取消息上下文", + "Search messages": "搜索消息", + "Update typing status": "上报输入状态", + "Get typing status": "查询输入状态", + "Check speech recognition support": "检查语音识别能力", + "Transcribe an audio file": "识别音频文字", + "Save a local transcript": "保存本地转写结果", + "Update input states": "更新输入状态", + "Delete a local message": "删除本地消息", + "Delete saved messages": "批量删除消息", + "Delete messages from a user": "删除群聊中指定用户的全部消息", + "Revoke a message": "撤回消息", + "Modify a message": "修改消息", + "Insert a local direct message": "插入本地单聊消息", + "Insert a local group message": "插入本地群聊消息", + "Clear all local messages": "清理全部本地消息", + "Clear all saved messages": "清理本地与服务端消息", + "Set local message extensions": "设置消息本地扩展", + "Send group read receipts": "上报群消息已读", + "View group message readers": "查询群消息已读成员", + "Message": "消息", + "Creating messages": "创建消息", + "Sending messages": "发送消息", + "Retrieving messages": "查询消息", + "Composing messages": "输入状态与语音转写", + "Managing messages": "管理消息", + "Group message read status": "群聊消息已读" } diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index fc531ba6f8..35f109aec4 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -505,6 +505,238 @@ ] } ] + }, + { + "id": "message", + "title": "Message", + "children": [ + "/sdk/react-native/message/overview-message", + { + "id": "message/creating-messages", + "title": "Creating messages", + "children": [ + { + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "navigationTitle": "Create a text message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "navigationTitle": "Create a mention message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "navigationTitle": "Create a custom message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "navigationTitle": "Create an image message from a file" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "navigationTitle": "Create an image message from a URL" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "navigationTitle": "Create an audio message from a file" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "navigationTitle": "Create an audio message from a URL" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "navigationTitle": "Create a video message from a file" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "navigationTitle": "Create a video message from a URL" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "navigationTitle": "Create a file message from a file" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "navigationTitle": "Create a file message from a URL" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "navigationTitle": "Create a contact card message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "navigationTitle": "Create a location message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "navigationTitle": "Create an emoji message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "navigationTitle": "Create a reply message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "navigationTitle": "Create a Markdown message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "navigationTitle": "Create a forwarded message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "navigationTitle": "Create a merged message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "navigationTitle": "Create a rich-text message" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "navigationTitle": "Create a rich-text reply" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "navigationTitle": "Create a targeted group message" + } + ] + }, + { + "id": "message/sending-messages", + "title": "Sending messages", + "children": [ + { + "path": "/sdk/react-native/message/sending-messages/send-message", + "navigationTitle": "Send a message" + }, + { + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "navigationTitle": "Send a message without OSS" + } + ] + }, + "/sdk/react-native/message/receiving-messages/receive-messages", + { + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "navigationTitle": "Receive custom business messages" + }, + { + "id": "message/retrieving-messages", + "title": "Retrieving messages", + "children": [ + { + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "navigationTitle": "Load older messages" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "navigationTitle": "Load newer messages" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "navigationTitle": "Find messages by ID" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "navigationTitle": "Load message context" + }, + "/sdk/react-native/message/searching-messages/search-messages" + ] + }, + { + "id": "message/composing-messages", + "title": "Composing messages", + "children": [ + { + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "navigationTitle": "Update typing status" + }, + { + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "navigationTitle": "Get typing status" + }, + { + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "navigationTitle": "Update input states" + }, + { + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "navigationTitle": "Check speech recognition support", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "navigationTitle": "Transcribe an audio file", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "navigationTitle": "Save a local transcript", + "edition": "enterprise" + } + ] + }, + { + "id": "message/managing-messages", + "title": "Managing messages", + "children": [ + { + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "navigationTitle": "Delete a local message" + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "navigationTitle": "Delete saved messages", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "navigationTitle": "Delete messages from a user" + }, + "/sdk/react-native/message/managing-messages/revoke-a-message", + { + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "navigationTitle": "Insert a local direct message" + }, + { + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "navigationTitle": "Insert a local group message" + }, + { + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "navigationTitle": "Clear all local messages" + }, + { + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "navigationTitle": "Clear all saved messages" + }, + { + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "navigationTitle": "Set local message extensions" + } + ] + }, + { + "id": "message/group-message-read-status", + "title": "Group message read status", + "children": [ + { + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "navigationTitle": "Send group read receipts", + "edition": "enterprise" + }, + { + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "navigationTitle": "View group message readers", + "edition": "enterprise" + } + ] + } + ] } ] } diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 4a738d7fae..8398f37928 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -11190,9 +11190,564 @@ } ], "minIndex": 577 + }, + { + "id": "message", + "segment": "message", + "title": "Message", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/overview-message", + "segment": "overview-message", + "title": "Message overview", + "href": "/sdk/react-native/message/overview-message", + "type": "page", + "children": [], + "minIndex": 612 + }, + { + "id": "message/creating-messages", + "segment": "creating-messages", + "title": "Creating messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/creating-messages/create-text-message", + "segment": "create-text-message", + "title": "Create a text message", + "href": "/sdk/react-native/message/creating-messages/create-text-message", + "type": "page", + "children": [], + "minIndex": 613, + "navigationTitle": "Create a text message" + }, + { + "id": "message/creating-messages/create-text-at-message", + "segment": "create-text-at-message", + "title": "Create an @ message", + "href": "/sdk/react-native/message/creating-messages/create-text-at-message", + "type": "page", + "children": [], + "minIndex": 614, + "navigationTitle": "Create a mention message" + }, + { + "id": "message/creating-messages/create-custom-message", + "segment": "create-custom-message", + "title": "Create a custom message", + "href": "/sdk/react-native/message/creating-messages/create-custom-message", + "type": "page", + "children": [], + "minIndex": 615, + "navigationTitle": "Create a custom message" + }, + { + "id": "message/creating-messages/create-image-message-by-file", + "segment": "create-image-message-by-file", + "title": "Create an image message from a file", + "href": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "type": "page", + "children": [], + "minIndex": 616, + "navigationTitle": "Create an image message from a file" + }, + { + "id": "message/creating-messages/create-image-message-by-url", + "segment": "create-image-message-by-url", + "title": "Create an image message from a URL", + "href": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "type": "page", + "children": [], + "minIndex": 617, + "navigationTitle": "Create an image message from a URL" + }, + { + "id": "message/creating-messages/create-sound-message-by-file", + "segment": "create-sound-message-by-file", + "title": "Create an audio message from a file", + "href": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "type": "page", + "children": [], + "minIndex": 618, + "navigationTitle": "Create an audio message from a file" + }, + { + "id": "message/creating-messages/create-sound-message-by-url", + "segment": "create-sound-message-by-url", + "title": "Create an audio message from a URL", + "href": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "type": "page", + "children": [], + "minIndex": 619, + "navigationTitle": "Create an audio message from a URL" + }, + { + "id": "message/creating-messages/create-video-message-by-file", + "segment": "create-video-message-by-file", + "title": "Create a video message from files", + "href": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "type": "page", + "children": [], + "minIndex": 620, + "navigationTitle": "Create a video message from a file" + }, + { + "id": "message/creating-messages/create-video-message-by-url", + "segment": "create-video-message-by-url", + "title": "Create a video message from URLs", + "href": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "type": "page", + "children": [], + "minIndex": 621, + "navigationTitle": "Create a video message from a URL" + }, + { + "id": "message/creating-messages/create-file-message-by-file", + "segment": "create-file-message-by-file", + "title": "Create a file message from a file", + "href": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "type": "page", + "children": [], + "minIndex": 622, + "navigationTitle": "Create a file message from a file" + }, + { + "id": "message/creating-messages/create-file-message-by-url", + "segment": "create-file-message-by-url", + "title": "Create a file message from a URL", + "href": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "type": "page", + "children": [], + "minIndex": 623, + "navigationTitle": "Create a file message from a URL" + }, + { + "id": "message/creating-messages/create-card-message", + "segment": "create-card-message", + "title": "Create a contact card message", + "href": "/sdk/react-native/message/creating-messages/create-card-message", + "type": "page", + "children": [], + "minIndex": 624, + "navigationTitle": "Create a contact card message" + }, + { + "id": "message/creating-messages/create-location-message", + "segment": "create-location-message", + "title": "Create a location message", + "href": "/sdk/react-native/message/creating-messages/create-location-message", + "type": "page", + "children": [], + "minIndex": 625, + "navigationTitle": "Create a location message" + }, + { + "id": "message/creating-messages/create-face-message", + "segment": "create-face-message", + "title": "Create an emoji message", + "href": "/sdk/react-native/message/creating-messages/create-face-message", + "type": "page", + "children": [], + "minIndex": 626, + "navigationTitle": "Create an emoji message" + }, + { + "id": "message/creating-messages/create-quote-message", + "segment": "create-quote-message", + "title": "Create a reply message", + "href": "/sdk/react-native/message/creating-messages/create-quote-message", + "type": "page", + "children": [], + "minIndex": 627, + "navigationTitle": "Create a reply message" + }, + { + "id": "message/creating-messages/create-markdown-message", + "segment": "create-markdown-message", + "title": "Create a Markdown message", + "href": "/sdk/react-native/message/creating-messages/create-markdown-message", + "type": "page", + "children": [], + "minIndex": 628, + "navigationTitle": "Create a Markdown message" + }, + { + "id": "message/creating-messages/create-forward-message", + "segment": "create-forward-message", + "title": "Create a forwarded message", + "href": "/sdk/react-native/message/creating-messages/create-forward-message", + "type": "page", + "children": [], + "minIndex": 629, + "navigationTitle": "Create a forwarded message" + }, + { + "id": "message/creating-messages/create-merger-message", + "segment": "create-merger-message", + "title": "Create a merged forward message", + "href": "/sdk/react-native/message/creating-messages/create-merger-message", + "type": "page", + "children": [], + "minIndex": 630, + "navigationTitle": "Create a merged message" + }, + { + "id": "message/creating-messages/create-advanced-text-message", + "segment": "create-advanced-text-message", + "title": "Create a rich-text message", + "href": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "type": "page", + "children": [], + "minIndex": 631, + "navigationTitle": "Create a rich-text message" + }, + { + "id": "message/creating-messages/create-advanced-quote-message", + "segment": "create-advanced-quote-message", + "title": "Create a rich-text reply", + "href": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "type": "page", + "children": [], + "minIndex": 632, + "navigationTitle": "Create a rich-text reply" + }, + { + "id": "message/creating-messages/create-targeted-group-message", + "segment": "create-targeted-group-message", + "title": "Create a targeted group message", + "href": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "type": "page", + "children": [], + "minIndex": 633, + "navigationTitle": "Create a targeted group message" + } + ], + "minIndex": 613 + }, + { + "id": "message/sending-messages", + "segment": "sending-messages", + "title": "Sending messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/sending-messages/send-message", + "segment": "send-message", + "title": "Send a message", + "href": "/sdk/react-native/message/sending-messages/send-message", + "type": "page", + "children": [], + "minIndex": 634, + "navigationTitle": "Send a message" + }, + { + "id": "message/sending-messages/send-message-not-oss", + "segment": "send-message-not-oss", + "title": "Send an uploaded media message", + "href": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "type": "page", + "children": [], + "minIndex": 635, + "navigationTitle": "Send a message without OSS" + } + ], + "minIndex": 634 + }, + { + "id": "message/receiving-messages/receive-messages", + "segment": "receive-messages", + "title": "Receive messages", + "href": "/sdk/react-native/message/receiving-messages/receive-messages", + "type": "page", + "children": [], + "minIndex": 636 + }, + { + "id": "message/receiving-messages/receive-custom-business-messages", + "segment": "receive-custom-business-messages", + "title": "Receive custom business messages", + "href": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "type": "page", + "children": [], + "minIndex": 637, + "navigationTitle": "Receive custom business messages" + }, + { + "id": "message/retrieving-messages", + "segment": "retrieving-messages", + "title": "Retrieving messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/retrieving-messages/load-older-messages", + "segment": "load-older-messages", + "title": "Load message history", + "href": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "type": "page", + "children": [], + "minIndex": 638, + "navigationTitle": "Load older messages" + }, + { + "id": "message/retrieving-messages/load-newer-messages", + "segment": "load-newer-messages", + "title": "Load message history in reverse", + "href": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "type": "page", + "children": [], + "minIndex": 639, + "navigationTitle": "Load newer messages" + }, + { + "id": "message/retrieving-messages/find-messages-by-id", + "segment": "find-messages-by-id", + "title": "Find messages by ID", + "href": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "type": "page", + "children": [], + "minIndex": 640, + "navigationTitle": "Find messages by ID" + }, + { + "id": "message/retrieving-messages/load-message-context", + "segment": "load-message-context", + "title": "Load message context", + "href": "/sdk/react-native/message/retrieving-messages/load-message-context", + "type": "page", + "children": [], + "minIndex": 641, + "navigationTitle": "Load message context" + }, + { + "id": "message/searching-messages/search-messages", + "segment": "search-messages", + "title": "Search messages", + "href": "/sdk/react-native/message/searching-messages/search-messages", + "type": "page", + "children": [], + "minIndex": 642 + } + ], + "minIndex": 638 + }, + { + "id": "message/composing-messages", + "segment": "composing-messages", + "title": "Composing messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/composing-messages/update-typing-status", + "segment": "update-typing-status", + "title": "Report typing status", + "href": "/sdk/react-native/message/composing-messages/update-typing-status", + "type": "page", + "children": [], + "minIndex": 643, + "navigationTitle": "Update typing status" + }, + { + "id": "message/composing-messages/get-typing-status", + "segment": "get-typing-status", + "title": "Get typing status", + "href": "/sdk/react-native/message/composing-messages/get-typing-status", + "type": "page", + "children": [], + "minIndex": 644, + "navigationTitle": "Get typing status" + }, + { + "id": "message/composing-messages/change-input-states", + "segment": "change-input-states", + "title": "Update input states", + "href": "/sdk/react-native/message/composing-messages/change-input-states", + "type": "page", + "children": [], + "minIndex": 645, + "navigationTitle": "Update input states" + }, + { + "id": "message/composing-messages/check-speech-to-text", + "segment": "check-speech-to-text", + "title": "Check audio transcription availability", + "href": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "type": "page", + "children": [], + "minIndex": 646, + "navigationTitle": "Check speech recognition support" + }, + { + "id": "message/composing-messages/transcribe-audio", + "segment": "transcribe-audio", + "title": "Transcribe audio", + "href": "/sdk/react-native/message/composing-messages/transcribe-audio", + "type": "page", + "children": [], + "minIndex": 647, + "navigationTitle": "Transcribe an audio file" + }, + { + "id": "message/composing-messages/save-local-transcript", + "segment": "save-local-transcript", + "title": "Save a local transcript", + "href": "/sdk/react-native/message/composing-messages/save-local-transcript", + "type": "page", + "children": [], + "minIndex": 648, + "navigationTitle": "Save a local transcript" + } + ], + "minIndex": 643 + }, + { + "id": "message/managing-messages", + "segment": "managing-messages", + "title": "Managing messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/managing-messages/delete-local-message", + "segment": "delete-local-message", + "title": "Delete a local message", + "href": "/sdk/react-native/message/managing-messages/delete-local-message", + "type": "page", + "children": [], + "minIndex": 649, + "navigationTitle": "Delete a local message" + }, + { + "id": "message/managing-messages/delete-saved-messages", + "segment": "delete-saved-messages", + "title": "Delete messages in a batch", + "href": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "type": "page", + "children": [], + "minIndex": 650, + "navigationTitle": "Delete saved messages" + }, + { + "id": "message/managing-messages/delete-user-messages", + "segment": "delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "href": "/sdk/react-native/message/managing-messages/delete-user-messages", + "type": "page", + "children": [], + "minIndex": 651, + "navigationTitle": "Delete messages from a user" + }, + { + "id": "message/managing-messages/revoke-a-message", + "segment": "revoke-a-message", + "title": "Revoke a message", + "href": "/sdk/react-native/message/managing-messages/revoke-a-message", + "type": "page", + "children": [], + "minIndex": 652 + }, + { + "id": "message/managing-messages/modify-a-message", + "segment": "modify-a-message", + "title": "Modify a message", + "href": "/sdk/react-native/message/managing-messages/modify-a-message", + "type": "page", + "children": [], + "minIndex": 653 + }, + { + "id": "message/managing-messages/insert-local-single-message", + "segment": "insert-local-single-message", + "title": "Insert a local one-to-one message", + "href": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "type": "page", + "children": [], + "minIndex": 654, + "navigationTitle": "Insert a local direct message" + }, + { + "id": "message/managing-messages/insert-local-group-message", + "segment": "insert-local-group-message", + "title": "Insert a local group message", + "href": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "type": "page", + "children": [], + "minIndex": 655, + "navigationTitle": "Insert a local group message" + }, + { + "id": "message/managing-messages/clear-all-local-messages", + "segment": "clear-all-local-messages", + "title": "Clear all local messages", + "href": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "type": "page", + "children": [], + "minIndex": 656, + "navigationTitle": "Clear all local messages" + }, + { + "id": "message/managing-messages/clear-all-messages", + "segment": "clear-all-messages", + "title": "Clear local and server messages", + "href": "/sdk/react-native/message/managing-messages/clear-all-messages", + "type": "page", + "children": [], + "minIndex": 657, + "navigationTitle": "Clear all saved messages" + }, + { + "id": "message/managing-messages/set-message-local-ex", + "segment": "set-message-local-ex", + "title": "Set a local message extension", + "href": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "type": "page", + "children": [], + "minIndex": 658, + "navigationTitle": "Set local message extensions" + } + ], + "minIndex": 649 + }, + { + "id": "message/group-message-read-status", + "segment": "group-message-read-status", + "title": "Group message read status", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/managing-read-status/send-group-read-receipts", + "segment": "send-group-read-receipts", + "title": "Report group messages as read", + "href": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "type": "page", + "children": [], + "minIndex": 659, + "navigationTitle": "Send group read receipts" + }, + { + "id": "message/managing-read-status/get-group-message-readers", + "segment": "get-group-message-readers", + "title": "Get members who read a group message", + "href": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "type": "page", + "children": [], + "minIndex": 660, + "navigationTitle": "View group message readers" + } + ], + "minIndex": 659 + } + ], + "minIndex": 612 } ], - "pageCount": 93, + "pageCount": 142, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index ae94ef9477..161c6fe7c5 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,8 +1,8 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 93, - "manualPageCount": 93, + "pageCount": 142, + "manualPageCount": 142, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", @@ -97,7 +97,56 @@ "/sdk/react-native/group/managing-group-members/set-group-member-avatar": "published", "/sdk/react-native/group/managing-group-members/set-group-member-extension": "published", "/sdk/react-native/group/managing-group-members/transfer-group-owner": "published", - "/sdk/react-native/group/managing-group-members/change-group-member-mute": "published" + "/sdk/react-native/group/managing-group-members/change-group-member-mute": "published", + "/sdk/react-native/message/overview-message": "published", + "/sdk/react-native/message/creating-messages/create-text-message": "published", + "/sdk/react-native/message/creating-messages/create-text-at-message": "published", + "/sdk/react-native/message/creating-messages/create-custom-message": "published", + "/sdk/react-native/message/creating-messages/create-image-message-by-file": "published", + "/sdk/react-native/message/creating-messages/create-image-message-by-url": "published", + "/sdk/react-native/message/creating-messages/create-sound-message-by-file": "published", + "/sdk/react-native/message/creating-messages/create-sound-message-by-url": "published", + "/sdk/react-native/message/creating-messages/create-video-message-by-file": "published", + "/sdk/react-native/message/creating-messages/create-video-message-by-url": "published", + "/sdk/react-native/message/creating-messages/create-file-message-by-file": "published", + "/sdk/react-native/message/creating-messages/create-file-message-by-url": "published", + "/sdk/react-native/message/creating-messages/create-card-message": "published", + "/sdk/react-native/message/creating-messages/create-location-message": "published", + "/sdk/react-native/message/creating-messages/create-face-message": "published", + "/sdk/react-native/message/creating-messages/create-quote-message": "published", + "/sdk/react-native/message/creating-messages/create-markdown-message": "published", + "/sdk/react-native/message/creating-messages/create-forward-message": "published", + "/sdk/react-native/message/creating-messages/create-merger-message": "published", + "/sdk/react-native/message/creating-messages/create-advanced-text-message": "published", + "/sdk/react-native/message/creating-messages/create-advanced-quote-message": "published", + "/sdk/react-native/message/creating-messages/create-targeted-group-message": "published", + "/sdk/react-native/message/sending-messages/send-message": "published", + "/sdk/react-native/message/sending-messages/send-message-not-oss": "published", + "/sdk/react-native/message/receiving-messages/receive-messages": "published", + "/sdk/react-native/message/receiving-messages/receive-custom-business-messages": "published", + "/sdk/react-native/message/retrieving-messages/load-older-messages": "published", + "/sdk/react-native/message/retrieving-messages/load-newer-messages": "published", + "/sdk/react-native/message/retrieving-messages/find-messages-by-id": "published", + "/sdk/react-native/message/retrieving-messages/load-message-context": "published", + "/sdk/react-native/message/searching-messages/search-messages": "published", + "/sdk/react-native/message/composing-messages/update-typing-status": "published", + "/sdk/react-native/message/composing-messages/get-typing-status": "published", + "/sdk/react-native/message/composing-messages/change-input-states": "published", + "/sdk/react-native/message/composing-messages/check-speech-to-text": "published", + "/sdk/react-native/message/composing-messages/transcribe-audio": "published", + "/sdk/react-native/message/composing-messages/save-local-transcript": "published", + "/sdk/react-native/message/managing-messages/delete-local-message": "published", + "/sdk/react-native/message/managing-messages/delete-saved-messages": "published", + "/sdk/react-native/message/managing-messages/delete-user-messages": "published", + "/sdk/react-native/message/managing-messages/revoke-a-message": "published", + "/sdk/react-native/message/managing-messages/modify-a-message": "published", + "/sdk/react-native/message/managing-messages/insert-local-single-message": "published", + "/sdk/react-native/message/managing-messages/insert-local-group-message": "published", + "/sdk/react-native/message/managing-messages/clear-all-local-messages": "published", + "/sdk/react-native/message/managing-messages/clear-all-messages": "published", + "/sdk/react-native/message/managing-messages/set-message-local-ex": "published", + "/sdk/react-native/message/managing-read-status/send-group-read-receipts": "published", + "/sdk/react-native/message/managing-read-status/get-group-message-readers": "published" }, "navigationLabels": { "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", @@ -225,7 +274,63 @@ "Reorder conversation groups": "调整会话分组顺序", "Add conversations to groups": "添加会话到分组", "Remove conversations from groups": "从分组移除会话", - "Delete a conversation group": "删除会话分组" + "Delete a conversation group": "删除会话分组", + "Message overview": "消息概览", + "Create a text message": "创建文本消息", + "Create a mention message": "创建 @ 消息", + "Create a custom message": "创建自定义消息", + "Create an image message from a file": "使用文件创建图片消息", + "Create an image message from a URL": "使用 URL 创建图片消息", + "Create an audio message from a file": "使用文件创建音频消息", + "Create an audio message from a URL": "使用 URL 创建音频消息", + "Create a video message from a file": "使用文件创建视频消息", + "Create a video message from a URL": "使用 URL 创建视频消息", + "Create a file message from a file": "使用文件创建文件消息", + "Create a file message from a URL": "使用 URL 创建文件消息", + "Create a contact card message": "创建名片消息", + "Create a location message": "创建位置消息", + "Create an emoji message": "创建表情消息", + "Create a reply message": "创建回复消息", + "Create a Markdown message": "创建 Markdown 消息", + "Create a forwarded message": "创建转发消息", + "Create a merged message": "创建合并消息", + "Create a rich-text message": "创建富文本消息", + "Create a rich-text reply": "创建富文本回复消息", + "Create a targeted group message": "创建定向群消息", + "Send a message": "发送消息", + "Send a message without OSS": "发送已上传的媒体消息", + "Receive messages": "接收消息", + "Receive custom business messages": "接收自定义业务消息", + "Load older messages": "加载历史消息", + "Load newer messages": "反向加载历史消息", + "Find messages by ID": "按 ID 查找消息", + "Load message context": "读取消息上下文", + "Search messages": "搜索消息", + "Update typing status": "上报输入状态", + "Get typing status": "查询输入状态", + "Check speech recognition support": "检查语音识别能力", + "Transcribe an audio file": "识别音频文字", + "Save a local transcript": "保存本地转写结果", + "Update input states": "更新输入状态", + "Delete a local message": "删除本地消息", + "Delete saved messages": "批量删除消息", + "Delete messages from a user": "删除群聊中指定用户的全部消息", + "Revoke a message": "撤回消息", + "Modify a message": "修改消息", + "Insert a local direct message": "插入本地单聊消息", + "Insert a local group message": "插入本地群聊消息", + "Clear all local messages": "清理全部本地消息", + "Clear all saved messages": "清理本地与服务端消息", + "Set local message extensions": "设置消息本地扩展", + "Send group read receipts": "上报群消息已读", + "View group message readers": "查询群消息已读成员", + "Message": "消息", + "Creating messages": "创建消息", + "Sending messages": "发送消息", + "Retrieving messages": "查询消息", + "Composing messages": "输入状态与语音转写", + "Managing messages": "管理消息", + "Group message read status": "群聊消息已读" }, "pages": { "/sdk/react-native/overview": { @@ -1765,6 +1870,653 @@ ], "sourcePath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", "title": "设置群成员禁言" + }, + "/sdk/react-native/message/overview-message": { + "body": "OpenIM React Native SDK 使用 `MessageItem` 表示一条消息。创建消息仅生成待发送的 `MessageItem`;要将消息发送给单聊用户或群组,还需要调用发送 API。接收、查询以及删除、撤回、修改等状态变化则通过各自的 API 或事件处理。\n\n消息列表使用 `clientMsgID` 识别、去重和更新单条消息。`MessageItem` 不包含 `conversationID`,消息所属会话应从当前会话、历史查询参数或事件上下文中获取。\n\n## 消息处理流程\n\n| 阶段 | 相关能力 | 说明 |\n| --- | --- | --- |\n| 创建 | `create*Message()` | 创建待发送的 `MessageItem`。 |\n| 发送 | `sendMessage()`、`sendMessageNotOss()` | 将消息发送到单聊或群聊。 |\n| 接收 | 新消息事件 | 接收实时消息、离线消息和仅在线消息。 |\n| 查询 | 历史消息、按 ID 查找和搜索 | 按会话读取或定位已保存的消息。 |\n| 状态变化 | 撤回、删除、修改和已读回执 | 根据调用结果和对应事件更新消息列表。 |\n\n## MessageItem 类型\n\n创建、发送、接收和查询消息时,得到的消息对象都是 `MessageItem`。常用公共字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `clientMsgID` | `string` | 客户端消息 ID,用于消息去重、更新和定位。 |\n| `serverMsgID` | `string` | 服务端消息 ID。 |\n| `sessionType` | `SessionType` | 会话类型,用于区分单聊和群聊。 |\n| `sendID` | `string` | 发送者用户 ID。 |\n| `recvID` | `string` | 单聊消息的接收方用户 ID。 |\n| `groupID` | `string` | 群聊消息所属的群组 ID。 |\n| `contentType` | `MessageType` | 消息内容类型,决定使用哪个内容字段渲染。 |\n| `createTime` | `number` | 消息对象创建时间。 |\n| `sendTime` | `number` | 消息发送时间。 |\n| `seq` | `number` | 服务端消息序号。 |\n| `senderPlatformID` | `Platform` | 发送消息的客户端平台。 |\n| `status` | `MessageStatus` | 消息发送状态。 |\n| `isRead` | `boolean` | 已读状态。 |\n| `senderNickname` | `string` | 发送者昵称。 |\n| `senderFaceUrl` | `string` | 发送者头像 URL。 |\n| `offlinePush` | `OfflinePush` | 离线推送配置。 |\n| `content` | `string` | SDK 序列化的消息内容。渲染时应读取与 `contentType` 对应的内容字段。 |\n| `ex` | `string` | 消息扩展字段。 |\n| `localEx` | `string` | 仅当前设备使用的消息扩展字段。 |\n\n消息内容保存在 `MessageItem` 中与 `contentType` 对应的字段内:\n\n| 内容 | 字段 |\n| --- | --- |\n| 文本、富文本和 Markdown | `textElem`、`advancedTextElem`、`markdownTextElem` |\n| 图片、音频、视频和文件 | `pictureElem`、`soundElem`、`videoElem`、`fileElem` |\n| @ 消息 | `atTextElem` |\n| 回复消息 | `quoteElem` |\n| 合并转发 | `mergeElem` |\n| 名片、位置和表情 | `cardElem`、`locationElem`、`faceElem` |\n| 自定义消息 | `customElem` |\n| 通知、输入状态和附加状态 | `notificationElem`、`typingElem`、`attachedInfoElem` |\n\n内容字段均为可选字段。一条消息通常只使用与其 `contentType` 对应的内容字段;渲染前应先判断 `contentType`,再读取相应字段。\n\n## 创建并发送消息\n\n先调用对应的创建 API 得到 `MessageItem`,再调用发送 API。由 SDK 上传本地媒体文件时使用[发送消息](/sdk/react-native/message/sending-messages/send-message);媒体文件已经有远端 URL 时使用[发送不经 OSS 的消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。\n\n| 内容 | 页面 |\n| --- | --- |\n| 文本和富文本 | [创建文本消息](/sdk/react-native/message/creating-messages/create-text-message)、[创建富文本消息](/sdk/react-native/message/creating-messages/create-advanced-text-message) |\n| @ 消息 | [创建 @ 消息](/sdk/react-native/message/creating-messages/create-text-at-message) |\n| 图片、音频、视频和文件 | [创建图片消息](/sdk/react-native/message/creating-messages/create-image-message-by-file)、[创建音频消息](/sdk/react-native/message/creating-messages/create-sound-message-by-file)、[创建视频消息](/sdk/react-native/message/creating-messages/create-video-message-by-file)、[创建文件消息](/sdk/react-native/message/creating-messages/create-file-message-by-file) |\n| 名片、位置和表情 | [创建名片消息](/sdk/react-native/message/creating-messages/create-card-message)、[创建位置消息](/sdk/react-native/message/creating-messages/create-location-message)、[创建表情消息](/sdk/react-native/message/creating-messages/create-face-message) |\n| 回复、转发和合并转发 | [创建回复消息](/sdk/react-native/message/creating-messages/create-quote-message)、[创建转发消息](/sdk/react-native/message/creating-messages/create-forward-message)、[创建合并转发消息](/sdk/react-native/message/creating-messages/create-merger-message) |\n| 自定义消息 | [创建自定义消息](/sdk/react-native/message/creating-messages/create-custom-message) |\n\n## 按任务查看能力\n\n| 任务 | 页面 |\n| --- | --- |\n| 接收实时、离线和仅在线消息 | [接收消息](/sdk/react-native/message/receiving-messages/receive-messages) |\n| 接收自定义业务消息 | [接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages) |\n| 加载历史消息或消息上下文 | [加载历史消息](/sdk/react-native/message/retrieving-messages/load-older-messages)、[读取消息上下文](/sdk/react-native/message/retrieving-messages/load-message-context) |\n| 按 ID 查找或搜索消息 | [按 ID 查找消息](/sdk/react-native/message/retrieving-messages/find-messages-by-id)、[搜索消息](/sdk/react-native/message/searching-messages/search-messages) |\n| 删除、撤回或修改消息 | [批量删除消息](/sdk/react-native/message/managing-messages/delete-saved-messages)、[撤回消息](/sdk/react-native/message/managing-messages/revoke-a-message)、[修改消息](/sdk/react-native/message/managing-messages/modify-a-message) |\n| 管理仅当前设备使用的消息数据 | [删除本地消息](/sdk/react-native/message/managing-messages/delete-local-message)、[设置消息本地扩展](/sdk/react-native/message/managing-messages/set-message-local-ex) |\n| 上报或查询群消息已读 | [上报群消息已读](/sdk/react-native/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/sdk/react-native/message/managing-read-status/get-group-message-readers) |\n| 上报或查询输入状态 | [上报输入状态](/sdk/react-native/message/composing-messages/update-typing-status)、[查询输入状态](/sdk/react-native/message/composing-messages/get-typing-status) |\n| 识别音频文字 | [检查语音识别能力](/sdk/react-native/message/composing-messages/check-speech-to-text)、[识别音频文字](/sdk/react-native/message/composing-messages/transcribe-audio) |\n\n## 事件处理\n\n消息相关事件的完整监听代码分别位于以下页面:\n\n- 新消息、离线消息和仅在线消息:`OnRecvNewMessage`、`OnRecvOfflineNewMessage`、`OnRecvOnlineOnlyMessage`,见[接收消息](/sdk/react-native/message/receiving-messages/receive-messages)。\n- 自定义业务消息:`OnRecvCustomBusinessMessage`,见[接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages)。\n- 消息删除:`OnMsgDeleted`,见[批量删除消息](/sdk/react-native/message/managing-messages/delete-saved-messages)。\n- 消息撤回:`OnNewRecvMessageRevoked`,见[撤回消息](/sdk/react-native/message/managing-messages/revoke-a-message)。\n- 消息修改:`OnMessageModified`,见[修改消息](/sdk/react-native/message/managing-messages/modify-a-message)。\n- 群消息已读状态:`OnRecvGroupReadReceipt`,见[上报群消息已读](/sdk/react-native/message/managing-read-status/send-group-read-receipts)。\n- 输入状态变化:`OnInputStatusChanged`,见[更新输入状态](/sdk/react-native/message/composing-messages/change-input-states)。", + "description": "OpenIM React Native SDK 消息概览。", + "headings": [ + { + "depth": 2, + "title": "消息处理流程", + "url": "#消息处理流程" + }, + { + "depth": 2, + "title": "MessageItem 类型", + "url": "#messageitem-类型" + }, + { + "depth": 2, + "title": "创建并发送消息", + "url": "#创建并发送消息" + }, + { + "depth": 2, + "title": "按任务查看能力", + "url": "#按任务查看能力" + }, + { + "depth": 2, + "title": "事件处理", + "url": "#事件处理" + } + ], + "sourcePath": "/sdk/react-native/message/overview-message", + "title": "消息概览" + }, + "/sdk/react-native/message/creating-messages/create-text-message": { + "body": "调用 `createTextMessage()` 创建一条待发送的文本消息。\n\n```ts\nconst message = await OpenIMSDK.createTextMessage('你好,欢迎加入讨论。');\n```\n\n参数为文本内容。调用后返回 `MessageItem`,将它传给[发送消息](/sdk/react-native/message/sending-messages/send-message)的 `message` 字段即可发送。", + "description": "OpenIM React Native SDK 创建文本消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "创建文本消息" + }, + "/sdk/react-native/message/creating-messages/create-text-at-message": { + "body": "使用 `createTextAtMessage()` 创建群聊中的 @ 消息。`text` 中的 @ 文本与 `atUserIDList` 应对应。\n\n```ts\nconst message = await OpenIMSDK.createTextAtMessage({\n text: '@user-001 请确认发布内容。',\n atUserIDList: ['user-001'],\n atUsersInfo: [\n {\n atUserID: 'user-001',\n groupNickname: '小李',\n },\n ],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | @ 消息的正文。 |\n| `atUserIDList` | `string[]` | 是 | 被提及的用户 ID 列表。 |\n| `atUsersInfo` | `AtUsersInfoItem[]` | 否 | 被提及用户在群内的展示名。 |\n| `message` | `MessageItem` | 否 | 附带的消息对象。 |\n\n调用后返回待发送的 `MessageItem`。将它传给[发送消息](/sdk/react-native/message/sending-messages/send-message)的 `message` 字段即可发送。", + "description": "OpenIM React Native SDK 创建 @ 消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "创建 @ 消息" + }, + "/sdk/react-native/message/creating-messages/create-custom-message": { + "body": "使用 `createCustomMessage()` 创建自定义业务消息。业务双方需要约定 `data`、`extension` 的数据格式。\n\n```ts\nconst message = await OpenIMSDK.createCustomMessage({\n data: JSON.stringify({ type: 'task', taskID: 'task-42' }),\n extension: JSON.stringify({ version: 1 }),\n description: '任务卡片',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `data` | `string` | 是 | 业务数据字符串,可传 JSON 字符串。 |\n| `extension` | `string` | 是 | 业务扩展信息字符串。 |\n| `description` | `string` | 是 | 消息说明,也可作为不支持该消息类型时的降级展示文本。 |\n\n调用后返回待发送的 `MessageItem`。接收端应校验业务数据的格式和版本;服务端业务通知的监听方式见[接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages)。", + "description": "OpenIM React Native SDK 创建自定义消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "创建自定义消息" + }, + "/sdk/react-native/message/creating-messages/create-image-message-by-file": { + "body": "使用 `createImageMessageFromFullPath()` 根据本地图片完整路径创建消息。\n\n```ts\nconst message = await OpenIMSDK.createImageMessageFromFullPath(imagePath);\n```\n\n`imagePath` 是图片在设备上的完整路径。调用后返回待发送的 `MessageItem`;使用[发送消息](/sdk/react-native/message/sending-messages/send-message)发送时,SDK 会处理本地资源上传。", + "description": "OpenIM React Native SDK 使用文件创建图片消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "使用文件创建图片消息" + }, + "/sdk/react-native/message/creating-messages/create-image-message-by-url": { + "body": "使用 `createImageMessageByURL()` 根据已上传图片的资源信息创建消息。原图、大图和缩略图可共用同一资源信息,也可按业务需要分别传入不同尺寸或质量的资源。\n\n```ts\nconst picture = {\n uuid: 'image-001',\n type: 'image/jpeg',\n size: 120000,\n width: 1280,\n height: 720,\n url: 'https://www.example.com/picture.png',\n};\n\nconst message = await OpenIMSDK.createImageMessageByURL({\n sourcePicture: picture,\n bigPicture: picture,\n snapshotPicture: picture,\n sourcePath: '',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `sourcePicture` | `PicBaseInfo` | 是 | 原图资源信息。 |\n| `bigPicture` | `PicBaseInfo` | 是 | 大图资源信息。 |\n| `snapshotPicture` | `PicBaseInfo` | 是 | 缩略图资源信息。 |\n| `sourcePath` | `string` | 是 | 图片本地路径;只有远端资源时传空字符串。 |\n\n每个 `PicBaseInfo` 包含 `uuid`、`type`、`size`、`width`、`height` 和 `url`,分别表示资源标识、类型、字节大小、像素尺寸和远端地址。调用后返回待发送的 `MessageItem`,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。", + "description": "OpenIM React Native SDK 使用 URL 创建图片消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "使用 URL 创建图片消息" + }, + "/sdk/react-native/message/creating-messages/create-sound-message-by-file": { + "body": "使用 `createSoundMessageFromFullPath()` 根据设备上的音频文件创建消息。\n\n```ts\nconst message = await OpenIMSDK.createSoundMessageFromFullPath({\n soundPath,\n duration: 18,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `soundPath` | `string` | 是 | 音频文件的完整路径。 |\n| `duration` | `number` | 是 | 音频时长,单位为秒。 |\n\n调用后返回待发送的 `MessageItem`。使用[发送消息](/sdk/react-native/message/sending-messages/send-message)时,SDK 会处理本地音频资源上传。", + "description": "OpenIM React Native SDK 使用文件创建音频消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "使用文件创建音频消息" + }, + "/sdk/react-native/message/creating-messages/create-sound-message-by-url": { + "body": "使用 `createSoundMessageByURL()` 根据已上传音频的资源信息创建消息。\n\n```ts\nconst message = await OpenIMSDK.createSoundMessageByURL({\n uuid: 'audio-001',\n soundPath: '',\n sourceUrl: 'https://www.example.com/sound.mp3',\n dataSize: 54000,\n duration: 18,\n soundType: 'audio/mpeg',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `uuid` | `string` | 是 | 音频资源标识。 |\n| `soundPath` | `string` | 是 | 本地音频路径;只有远端资源时传空字符串。 |\n| `sourceUrl` | `string` | 是 | 已上传音频的地址。 |\n| `dataSize` | `number` | 是 | 音频大小,单位为字节。 |\n| `duration` | `number` | 是 | 音频时长,单位为秒。 |\n| `soundType` | `string` | 否 | 音频类型。 |\n\n调用后返回待发送的 `MessageItem`。资源信息应以实际上传结果为准,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。", + "description": "OpenIM React Native SDK 使用 URL 创建音频消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "使用 URL 创建音频消息" + }, + "/sdk/react-native/message/creating-messages/create-video-message-by-file": { + "body": "使用 `createVideoMessageFromFullPath()` 根据设备上的视频文件和封面图创建消息。\n\n```ts\nconst message = await OpenIMSDK.createVideoMessageFromFullPath({\n videoPath,\n videoType: 'video/mp4',\n duration: 36,\n snapshotPath,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `videoPath` | `string` | 是 | 视频文件的完整路径。 |\n| `videoType` | `string` | 是 | 视频类型。 |\n| `duration` | `number` | 是 | 视频时长,单位为秒。 |\n| `snapshotPath` | `string` | 是 | 视频封面图的完整路径。 |\n\n调用后返回待发送的 `MessageItem`。发送时使用[发送消息](/sdk/react-native/message/sending-messages/send-message)处理本地视频和封面图资源。", + "description": "OpenIM React Native SDK 使用文件创建视频消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "使用文件创建视频消息" + }, + "/sdk/react-native/message/creating-messages/create-video-message-by-url": { + "body": "使用 `createVideoMessageByURL()` 根据已上传的视频及封面图资源创建消息。\n\n```ts\nconst message = await OpenIMSDK.createVideoMessageByURL({\n videoPath: '',\n duration: 36,\n videoType: 'video/mp4',\n videoUUID: 'video-001',\n videoUrl: 'https://www.example.com/video.mp4',\n videoSize: 820000,\n snapshotPath: '',\n snapshotUUID: 'cover-001',\n snapshotSize: 42000,\n snapshotUrl: 'https://www.example.com/snapshot.png',\n snapshotWidth: 1280,\n snapshotHeight: 720,\n snapShotType: 'image/jpeg',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `videoPath` | `string` | 是 | 本地视频路径;只有远端资源时传空字符串。 |\n| `duration` | `number` | 是 | 视频时长,单位为秒。 |\n| `videoType` | `string` | 是 | 视频类型。 |\n| `videoUUID`、`videoUrl`、`videoSize` | `string`、`string`、`number` | 是 | 视频资源标识、远端地址和字节大小。 |\n| `snapshotPath` | `string` | 是 | 本地封面图路径;只有远端资源时传空字符串。 |\n| `snapshotUUID`、`snapshotUrl`、`snapshotSize` | `string`、`string`、`number` | 是 | 封面图资源标识、远端地址和字节大小。 |\n| `snapshotWidth`、`snapshotHeight` | `number` | 是 | 封面图宽高,单位为像素。 |\n| `snapShotType` | `string` | 否 | 封面图类型。 |\n\n调用后返回待发送的 `MessageItem`,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。", + "description": "OpenIM React Native SDK 使用 URL 创建视频消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "使用 URL 创建视频消息" + }, + "/sdk/react-native/message/creating-messages/create-file-message-by-file": { + "body": "使用 `createFileMessageFromFullPath()` 根据设备上的文件创建消息。\n\n```ts\nconst message = await OpenIMSDK.createFileMessageFromFullPath({\n filePath,\n fileName: '产品说明.pdf',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filePath` | `string` | 是 | 文件的完整路径。 |\n| `fileName` | `string` | 是 | 对外展示的文件名。 |\n\n调用后返回待发送的 `MessageItem`。使用[发送消息](/sdk/react-native/message/sending-messages/send-message)时,SDK 会处理本地文件上传。", + "description": "OpenIM React Native SDK 使用文件创建文件消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "使用文件创建文件消息" + }, + "/sdk/react-native/message/creating-messages/create-file-message-by-url": { + "body": "使用 `createFileMessageByURL()` 根据已上传文件的资源信息创建消息。\n\n```ts\nconst message = await OpenIMSDK.createFileMessageByURL({\n filePath: '',\n fileName: '产品说明.pdf',\n uuid: 'file-001',\n sourceUrl: 'https://www.example.com/产品说明.pdf',\n fileSize: 256000,\n fileType: 'application/pdf',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filePath` | `string` | 是 | 本地文件路径;只有远端资源时传空字符串。 |\n| `fileName` | `string` | 是 | 对外展示的文件名。 |\n| `uuid` | `string` | 是 | 文件资源标识。 |\n| `sourceUrl` | `string` | 是 | 已上传文件的地址。 |\n| `fileSize` | `number` | 是 | 文件大小,单位为字节。 |\n| `fileType` | `string` | 否 | 文件类型。 |\n\n调用后返回待发送的 `MessageItem`。资源信息应以实际上传结果为准,发送时使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。", + "description": "OpenIM React Native SDK 使用 URL 创建文件消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "使用 URL 创建文件消息" + }, + "/sdk/react-native/message/creating-messages/create-card-message": { + "body": "使用 `createCardMessage()` 创建用户名片消息。\n\n```ts\nconst message = await OpenIMSDK.createCardMessage({\n userID: 'user-002',\n nickname: '小王',\n faceURL: 'https://example.com/avatar.png',\n ex: '',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | `string` | 是 | 名片对应的用户 ID。 |\n| `nickname` | `string` | 是 | 名片展示的昵称。 |\n| `faceURL` | `string` | 是 | 名片展示的头像地址。 |\n| `ex` | `string` | 是 | 名片扩展信息,没有内容时传空字符串。 |\n\n调用后返回待发送的 `MessageItem`。`messageItem.cardElem` 保存的是创建时传入的名片资料。", + "description": "OpenIM React Native SDK 创建名片消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "创建名片消息" + }, + "/sdk/react-native/message/creating-messages/create-location-message": { + "body": "使用 `createLocationMessage()` 创建位置消息。\n\n```ts\nconst message = await OpenIMSDK.createLocationMessage({\n description: '上海市浦东新区',\n longitude: 121.4737,\n latitude: 31.2304,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `description` | `string` | 是 | 位置名称或地址描述。 |\n| `longitude` | `number` | 是 | 经度。 |\n| `latitude` | `number` | 是 | 纬度。 |\n\n调用后返回待发送的 `MessageItem`。", + "description": "OpenIM React Native SDK 创建位置消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "创建位置消息" + }, + "/sdk/react-native/message/creating-messages/create-face-message": { + "body": "使用 `createFaceMessage()` 创建应用内约定的表情消息。\n\n```ts\nconst message = await OpenIMSDK.createFaceMessage({\n index: 12,\n data: JSON.stringify({\n url: 'https://www.example.com/emoji.png',\n }),\n});\n```\n\n`index` 是双方约定的表情索引,`data` 是由发送端和接收端共同约定的自定义格式字符串,用于传递表情的识别或渲染信息,例如图片 URL、固定键或其他业务数据。调用后返回待发送的 `MessageItem`。", + "description": "OpenIM React Native SDK 创建表情消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "创建表情消息" + }, + "/sdk/react-native/message/creating-messages/create-quote-message": { + "body": "使用 `createQuoteMessage()` 创建回复消息,并传入完整的原消息对象。\n\n```ts\nconst message = await OpenIMSDK.createQuoteMessage({\n text: '同意这个方案。',\n message: originalMessage,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 回复的文本内容。 |\n| `message` | `MessageItem` | 是 | 被回复的原消息。 |\n\n调用后返回新的待发送 `MessageItem`。接收端展示回复消息时,应注意处理原消息已删除或无法展示的情况。", + "description": "OpenIM React Native SDK 创建回复消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "创建回复消息" + }, + "/sdk/react-native/message/creating-messages/create-markdown-message": { + "body": "使用 `createMarkdownMessage()` 创建 Markdown 消息。\n\n```ts\nconst message = await OpenIMSDK.createMarkdownMessage(\n '## 发布完成\\n\\n- Android\\n- iOS',\n);\n```\n\n参数是完整的 Markdown 文本。调用后返回待发送的 `MessageItem`;接收端展示不可信 Markdown 文本时,应使用支持安全策略的 Markdown 渲染器。", + "description": "OpenIM React Native SDK 创建 Markdown 消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "创建 Markdown 消息" + }, + "/sdk/react-native/message/creating-messages/create-forward-message": { + "body": "使用 `createForwardMessage()` 根据已有消息创建一条转发消息。\n\n```ts\nconst message = await OpenIMSDK.createForwardMessage(sourceMessage);\n```\n\n参数 `sourceMessage` 为完整的 `MessageItem`。调用后返回新的待发送 `MessageItem`,可发送到单聊或群聊。", + "description": "OpenIM React Native SDK 创建转发消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "创建转发消息" + }, + "/sdk/react-native/message/creating-messages/create-merger-message": { + "body": "使用 `createMergerMessage()` 创建包含多条消息的合并转发消息。\n\n```ts\nconst message = await OpenIMSDK.createMergerMessage({\n messageList: selectedMessages,\n title: '项目讨论记录',\n summaryList: ['小王:发布计划已确认', '小李:我会跟进测试'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `messageList` | `MessageItem[]` | 是 | 要合并的消息列表。 |\n| `title` | `string` | 是 | 合并消息的标题。 |\n| `summaryList` | `string[]` | 是 | 合并消息展示的摘要列表。 |\n\n调用后返回待发送的 `MessageItem`。摘要内容应符合当前会话的展示与隐私规则。", + "description": "OpenIM React Native SDK 创建合并消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "创建合并消息" + }, + "/sdk/react-native/message/creating-messages/create-advanced-text-message": { + "body": "使用 `createAdvancedTextMessage()` 创建带消息实体的富文本消息。\n\n```ts\nconst message = await OpenIMSDK.createAdvancedTextMessage({\n text: '请查看 https://openim.io',\n messageEntityList: [\n {\n type: 'url',\n offset: 4,\n length: 17,\n url: 'https://openim.io',\n },\n ],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 富文本的原始文本。 |\n| `messageEntityList` | `MessageEntity[]` | 否 | 文本中的实体列表。 |\n\n每项 `MessageEntity` 包含 `type`、`offset`、`length`,并可选传入 `url` 和 `info`。调用后返回待发送的 `MessageItem`,使用[发送消息](/sdk/react-native/message/sending-messages/send-message)发送。", + "description": "OpenIM React Native SDK 创建富文本消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "创建富文本消息" + }, + "/sdk/react-native/message/creating-messages/create-advanced-quote-message": { + "body": "使用 `createAdvancedQuoteMessage()` 创建包含原消息引用和文本实体的富文本回复消息。\n\n```ts\nconst message = await OpenIMSDK.createAdvancedQuoteMessage({\n text: '我已查看相关链接。',\n message: originalMessage,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 回复的原始文本。 |\n| `message` | `MessageItem` | 是 | 被回复的原消息。 |\n| `messageEntityList` | `MessageEntity[]` | 否 | 文本中的实体列表。 |\n\n`MessageEntity` 使用 `type`、`offset`、`length` 描述实体,并可按需要传入 `url` 或 `info`。调用后返回待发送的 `MessageItem`。", + "description": "OpenIM React Native SDK 创建富文本回复消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "创建富文本回复消息" + }, + "/sdk/react-native/message/creating-messages/create-targeted-group-message": { + "body": "使用 `createTargetedGroupMessage()` 创建仅定向投递给指定群成员的消息对象。\n\n```ts\nconst textMessage = await OpenIMSDK.createTextMessage('请相关成员查看。');\n\nconst message = await OpenIMSDK.createTargetedGroupMessage({\n message: textMessage,\n dstUserIDs: ['user-001', 'user-002'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `message` | `MessageItem` | 是 | 要定向发送的消息对象。 |\n| `dstUserIDs` | `string[]` | 是 | 接收该消息的群成员用户 ID 列表。 |\n\n调用后返回待发送的 `MessageItem`。发送时在 `groupID` 中指定目标群组,并通过[发送消息](/sdk/react-native/message/sending-messages/send-message)投递。", + "description": "OpenIM React Native SDK 创建定向群消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "创建定向群消息" + }, + "/sdk/react-native/message/sending-messages/send-message": { + "body": "调用 `sendMessage()` 发送由消息创建 API 返回的 `MessageItem`。单聊填写 `recvID`,群聊填写 `groupID`。\n\n使用本地路径创建的图片、音频、视频和文件消息时,SDK 会在发送过程中自动上传资源。对于已通过 URL 创建、已有远端资源的媒体消息,请使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。\n\n```ts\nconst sentMessage = await OpenIMSDK.sendMessage({\n recvID: receiverUserID,\n groupID: '',\n message,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 |\n| `message` | `MessageItem` | 是 | 待发送消息。 |\n| `offlinePushInfo` | `OfflinePush` | 否 | 离线推送配置。 |\n| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递。 |\n\n调用后返回发送完成的 `MessageItem`。\n\n发送过程有进度时会触发 `SendMessageProgress`,回调参数包含 `progress` 和 `message`:\n\n```ts\nfunction handleSendMessageProgress(info) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.SendMessageProgress, handleSendMessageProgress);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.SendMessageProgress, handleSendMessageProgress);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 发送消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/sending-messages/send-message", + "title": "发送消息" + }, + "/sdk/react-native/message/sending-messages/send-message-not-oss": { + "body": "`sendMessageNotOss()` 用于发送已经包含远端资源 URL 的图片、音频、视频或文件消息,不再走 SDK 的资源上传流程。\n\n```ts\nconst sentMessage = await OpenIMSDK.sendMessageNotOss({\n recvID: receiverUserID,\n groupID: '',\n message: uploadedMessage,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 |\n| `message` | `MessageItem` | 是 | 通过 URL 型消息创建 API 创建的待发送消息。 |\n| `offlinePushInfo` | `OfflinePush` | 否 | 离线推送配置。 |\n| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递。 |\n\n调用后返回发送完成的 `MessageItem`。`message` 中的资源地址、大小、类型和尺寸应来自实际上传结果;本地路径型媒体消息请使用[发送消息](/sdk/react-native/message/sending-messages/send-message)。", + "description": "OpenIM React Native SDK 发送已上传的媒体消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "发送已上传的媒体消息" + }, + "/sdk/react-native/message/receiving-messages/receive-messages": { + "body": "新消息到达时会触发 `OnRecvNewMessage`,回调参数为一条 `MessageItem`。离线消息和只在线投递的消息分别通过 `OnRecvOfflineNewMessage`、`OnRecvOnlineOnlyMessage` 接收,三个事件的回调参数均为 `MessageItem`。\n\n```ts\nfunction handleNewMessage(message) {\n // ...\n}\n\nfunction handleOfflineNewMessage(message) {\n // ...\n}\n\nfunction handleOnlineOnlyMessage(message) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnRecvNewMessage, handleNewMessage);\nOpenIMSDK.on(OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage);\nOpenIMSDK.on(OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnRecvNewMessage, handleNewMessage);\nOpenIMSDK.off(OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage);\nOpenIMSDK.off(OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage);\n```\n\n使用 `clientMsgID` 识别消息。组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 接收消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "接收消息" + }, + "/sdk/react-native/message/receiving-messages/receive-custom-business-messages": { + "body": "服务端下发自定义业务通知时会触发 `OnRecvCustomBusinessMessage`。该事件的回调参数为业务数据,不是 `MessageItem`;普通聊天自定义消息仍通过[接收消息](/sdk/react-native/message/receiving-messages/receive-messages)中的新消息事件接收。\n\n```ts\nfunction handleCustomBusinessMessage(data) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(\n OpenIMEvent.OnRecvCustomBusinessMessage,\n handleCustomBusinessMessage,\n);\n\n// 取消监听\nOpenIMSDK.off(\n OpenIMEvent.OnRecvCustomBusinessMessage,\n handleCustomBusinessMessage,\n);\n```\n\n业务侧应先校验收到的数据格式,再按自身协议处理。组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 接收自定义业务消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "接收自定义业务消息" + }, + "/sdk/react-native/message/retrieving-messages/load-older-messages": { + "body": "使用 `getAdvancedHistoryMessageList()` 分页加载会话中较早的历史消息。第一页的 `startClientMsgID` 传空字符串,继续加载时传入当前最早消息的 `clientMsgID`。\n\n```ts\nconst page = await OpenIMSDK.getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: oldestMessage?.clientMsgID ?? '',\n count: 30,\n viewType: ViewType.History,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `viewType` | `ViewType` | 是 | 浏览历史消息时传 `ViewType.History`。 |\n\n## 返回结果\n\n调用后返回 `AdvancedGetMessageResult`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `messageList` | `MessageItem[]` | 当前页消息。 |\n| `isEnd` | `boolean` | 是否已到达较早一端的边界。 |\n| `errCode` | `number` | 本次历史读取的状态码。 |\n| `errMsg` | `string` | 与 `errCode` 对应的说明。 |\n\n将 `messageList` 加入列表前,按 `clientMsgID` 去重。", + "description": "OpenIM React Native SDK 加载历史消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "加载历史消息" + }, + "/sdk/react-native/message/retrieving-messages/load-newer-messages": { + "body": "使用 `getAdvancedHistoryMessageListReverse()` 从消息锚点向较新的方向读取历史消息,适合定位消息后继续加载其后的记录。\n\n```ts\nconst page = await OpenIMSDK.getAdvancedHistoryMessageListReverse({\n conversationID,\n startClientMsgID: anchorMessage.clientMsgID,\n count: 30,\n viewType: ViewType.History,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 向较新方向读取时使用的锚点消息 ID。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `viewType` | `ViewType` | 是 | 浏览历史消息时传 `ViewType.History`。 |\n\n调用后返回 `AdvancedGetMessageResult`,其中 `messageList` 是本页消息,`isEnd` 表示是否已到达较新一端的边界。其余返回字段见[加载历史消息](/sdk/react-native/message/retrieving-messages/load-older-messages)。", + "description": "OpenIM React Native SDK 反向加载历史消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "反向加载历史消息" + }, + "/sdk/react-native/message/retrieving-messages/find-messages-by-id": { + "body": "使用 `findMessageList()` 根据会话 ID 和消息 ID 查找消息。适合从搜索结果、引用或通知跳转到一条已知消息时使用。\n\n```ts\nconst result = await OpenIMSDK.findMessageList([\n {\n conversationID,\n clientMsgIDList: [clientMsgID],\n },\n]);\n\nconst targetMessage = result.findResultItems?.[0]?.messageList[0];\n```\n\n## 参数说明\n\n`findMessageList()` 接收查询条件数组,每项包含以下字段:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 目标消息所属的会话 ID。 |\n| `clientMsgIDList` | `string[]` | 是 | 要查找的消息 ID 列表。 |\n\n## 返回结果\n\n调用后返回 `SearchMessageResult`,按 ID 查找的结果位于 `findResultItems`。每个结果项包含 `conversationID` 和 `messageList`;找不到消息时,结果项或其消息列表可能为空。完整结果结构见[搜索消息](/sdk/react-native/message/searching-messages/search-messages)。", + "description": "OpenIM React Native SDK 按 ID 查找消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "按 ID 查找消息" + }, + "/sdk/react-native/message/retrieving-messages/load-message-context": { + "body": "使用 `fetchSurroundingMessages()` 读取一条已知消息前后的上下文,适合从搜索结果或回复消息进入聊天记录。\n\n```ts\nconst { messageList } = await OpenIMSDK.fetchSurroundingMessages({\n startMessage: targetMessage,\n viewType: ViewType.Search,\n before: 20,\n after: 20,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `startMessage` | `MessageItem` | 是 | 已取得的锚点消息。 |\n| `viewType` | `ViewType` | 是 | 上下文查看类型;从搜索结果进入时可传 `ViewType.Search`。 |\n| `before` | `number` | 是 | 锚点之前最多读取的消息数量。 |\n| `after` | `number` | 是 | 锚点之后最多读取的消息数量。 |\n\n调用后返回 `{ messageList }`,其中 `messageList` 是锚点前后取得的 `MessageItem[]`。返回数量可能少于 `before + after`,例如锚点靠近记录边界或部分消息已删除。", + "description": "OpenIM React Native SDK 读取消息上下文。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "读取消息上下文" + }, + "/sdk/react-native/message/searching-messages/search-messages": { + "body": "使用 `searchLocalMessages()` 搜索当前账号已同步到本地的消息。\n\n```ts\nconst result = await OpenIMSDK.searchLocalMessages({\n conversationID,\n keywordList: ['发布'],\n messageTypeList: [MessageType.TextMessage],\n pageIndex: 1,\n count: 20,\n});\n```\n\n## 参数说明\n\n`keywordList` 可传入一个或多个关键词。单个搜索框通常传入一个去除首尾空格且非空的关键词。\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要搜索的会话 ID。 |\n| `keywordList` | `string[]` | 是 | 关键词列表;单个搜索框通常传入一个清理后的关键词。 |\n| `keywordListMatchType` | `number` | 否 | 多关键词匹配方式:`0` 表示命中任意关键词(OR),`1` 表示同时命中全部关键词(AND);省略时按 `0` 处理。 |\n| `senderUserIDList` | `string[]` | 否 | 仅搜索这些用户发送的消息。 |\n| `messageTypeList` | `MessageType[]` | 否 | 仅搜索指定类型的消息,例如文本消息和 @ 文本消息;省略时按 SDK 默认范围搜索。 |\n| `searchTimePosition` | `number` | 否 | 搜索结束位置,Unix 时间戳,单位为秒。 |\n| `searchTimePeriod` | `number` | 否 | 从 `searchTimePosition` 向前搜索的时间范围,单位为秒。 |\n| `pageIndex` | `number` | 否 | 搜索结果页码,从 `1` 开始。 |\n| `count` | `number` | 否 | 每页返回的消息数量。 |\n\n## 返回结果\n\n调用后返回 `SearchMessageResult`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `totalCount` | `number` | 当前条件下的匹配消息总数。 |\n| `searchResultItems` | `SearchMessageResultItem[]` | 按会话组织的搜索结果。 |\n\n每个 `SearchMessageResultItem` 包含会话信息和 `messageList`。修改关键词或筛选条件时,从第一页重新搜索,避免混合不同条件的结果。需要定位命中消息前后的记录时见[读取消息上下文](/sdk/react-native/message/retrieving-messages/load-message-context)。", + "description": "OpenIM React Native SDK 搜索消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/message/searching-messages/search-messages", + "title": "搜索消息" + }, + "/sdk/react-native/message/composing-messages/update-typing-status": { + "body": "使用 `typingStatusUpdate()` 向单聊对方上报输入状态提示内容。\n\n```ts\nawait OpenIMSDK.typingStatusUpdate({\n recvID: receiverUserID,\n msgTip: '正在输入…',\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 是 | 接收输入提示的用户 ID。 |\n| `msgTip` | `string` | 是 | 要上报的输入提示文本。 |\n\n调用完成后,输入提示已上报。需要根据会话焦点更新当前账号的输入状态时,使用[更新输入状态](/sdk/react-native/message/composing-messages/change-input-states)。", + "description": "OpenIM React Native SDK 上报输入状态。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "上报输入状态" + }, + "/sdk/react-native/message/composing-messages/get-typing-status": { + "body": "使用 `getInputStates()` 查询指定用户在会话中的当前输入状态。\n\n```ts\nconst platformIDs = await OpenIMSDK.getInputStates({\n conversationID,\n userID,\n});\n\nconst isTyping = platformIDs.length > 0;\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 目标会话 ID。 |\n| `userID` | `string` | 是 | 要查询输入状态的用户 ID。 |\n\n调用后返回处于输入状态的平台 ID 数组;空数组表示该用户当前没有平台处于输入状态。持续显示输入状态时,处理[更新输入状态](/sdk/react-native/message/composing-messages/change-input-states)中的 `OnInputStatusChanged` 事件。", + "description": "OpenIM React Native SDK 查询输入状态。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "查询输入状态" + }, + "/sdk/react-native/message/composing-messages/change-input-states": { + "body": "使用 `changeInputStates()` 更新当前账号在会话中的输入状态。开始输入时传 `focus: true`,发送消息、失焦或离开会话时传 `false`。\n\n```ts\nawait OpenIMSDK.changeInputStates({\n conversationID,\n focus: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要更新输入状态的会话 ID。 |\n| `focus` | `boolean` | 是 | `true` 表示正在输入,`false` 表示停止输入。 |\n\n避免在每个键盘事件中重复上报相同状态。输入状态变化时会触发 `OnInputStatusChanged`,回调携带 `conversationID`、`userID` 和 `platformIDs`。\n\n```ts\nfunction handleInputStatusChanged(inputStatus) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 更新输入状态。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "更新输入状态" + }, + "/sdk/react-native/message/composing-messages/check-speech-to-text": { + "body": "`speechToTextCapabilities()`仅用于查询当前语音识别支持的音频格式、采样率、录音时长和文件大小等信息。实际执行语音识别的是[**识别音频文字**](/sdk/react-native/message/composing-messages/transcribe-audio)。\n\n```ts\nconst capabilities = await OpenIMSDK.speechToTextCapabilities();\n```\n\n## 返回结果\n\n调用后返回 `SpeechToTextCapabilities`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `format` | `string[]` | 支持的音频格式。 |\n| `sampleRateHz` | `number` | 要求的音频采样率,单位为赫兹。 |\n| `maxRecordTimeMs` | `number` | 最大录音时长,单位为毫秒。 |\n| `maxFileSize` | `number` | 最大文件大小,单位为字节。 |\n| `provider` | `string` | 当前语音识别服务提供方。 |", + "description": "OpenIM React Native SDK 检查语音识别能力。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "检查语音识别能力" + }, + "/sdk/react-native/message/composing-messages/transcribe-audio": { + "body": "使用 `speechToText()` 将设备上 SDK 可读取的本地音频文件识别为文字。传入本地路径,不传远端 URL、Base64 数据或上传后的文件名。\n\n```ts\nconst { text } = await OpenIMSDK.speechToText(filename);\n```\n\n参数 `filename` 是本地音频文件路径。调用后返回 `{ text }`,其中 `text` 为识别结果。调用前先[检查语音识别能力](/sdk/react-native/message/composing-messages/check-speech-to-text);需要把结果保存在当前设备的语音消息中时见[保存本地转写结果](/sdk/react-native/message/composing-messages/save-local-transcript)。", + "description": "OpenIM React Native SDK 识别音频文字。", + "headings": [], + "sourcePath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "识别音频文字" + }, + "/sdk/react-native/message/composing-messages/save-local-transcript": { + "body": "使用 `setMessageLocalContent()` 将转写文字写入当前设备的语音消息。传入完整的消息对象,并保留原有消息字段。\n\n```ts\nconst updatedMessage = {\n ...message,\n soundElem: {\n ...message.soundElem,\n text: {\n text: transcript,\n translate: message.soundElem?.text?.translate ?? {},\n },\n },\n};\n\nawait OpenIMSDK.setMessageLocalContent({\n conversationID,\n message: updatedMessage,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所属的会话 ID。 |\n| `message` | `MessageItem` | 是 | 写入转写结果后的完整消息对象。 |\n\n调用完成后,转写结果保存在当前设备的消息内容中。", + "description": "OpenIM React Native SDK 保存本地转写结果。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "保存本地转写结果" + }, + "/sdk/react-native/message/managing-messages/delete-local-message": { + "body": "使用 `deleteMessageFromLocalStorage()` 删除当前设备中指定会话的一条消息。\n\n```ts\nawait OpenIMSDK.deleteMessageFromLocalStorage({\n conversationID,\n clientMsgID,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所属的会话 ID。 |\n| `clientMsgID` | `string` | 是 | 要删除的消息 ID。 |\n\n调用完成后,当前设备上的目标消息已删除。", + "description": "OpenIM React Native SDK 删除本地消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "删除本地消息" + }, + "/sdk/react-native/message/managing-messages/delete-saved-messages": { + "body": "使用 `deleteMessages()` 批量删除同一会话中的消息。\n\n```ts\nawait OpenIMSDK.deleteMessages({\n conversationID,\n clientMsgIDs,\n isSync: true,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要删除消息所属的会话 ID。 |\n| `clientMsgIDs` | `string[]` | 是 | 要删除的消息 ID 列表;列表中的消息应属于同一会话。 |\n| `isSync` | `boolean` | 是 | 是否将删除操作同步给会话另一方。为 `true` 时,会话双方都会删除对应消息;为 `false` 时,仅当前账号删除。 |\n\n调用完成后,删除请求已完成。`isSync` 为 `true` 时,会话另一方也会删除对应消息;为 `false` 时,仅当前账号删除,无论取值如何,当前账号的删除都会同步到该账号的其他设备。\n\n## 监听消息删除\n\n消息删除时会触发 `OnMsgDeleted`,回调携带被删除的 `MessageItem`。根据 `clientMsgID` 更新对应会话的消息列表。\n\n```ts\nfunction handleMessageDeleted(message) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnMsgDeleted, handleMessageDeleted);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnMsgDeleted, handleMessageDeleted);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 批量删除消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听消息删除", + "url": "#监听消息删除" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "批量删除消息" + }, + "/sdk/react-native/message/managing-messages/delete-user-messages": { + "body": "使用 `deleteUserAllMessagesInConv()` 删除指定用户在群聊会话中的全部消息。\n\n```ts\nawait OpenIMSDK.deleteUserAllMessagesInConv({\n conversationID,\n userID,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 目标群聊的会话 ID。 |\n| `userID` | `string` | 是 | 要删除其消息的用户 ID。 |\n\n这是群聊管理操作,调用完成后删除请求已完成,具体权限由服务端校验。\n\n## 监听指定用户消息删除\n\n删除完成后会触发 `OnDeleteUserAllMsgsInConv`,回调携带 `conversationID` 和 `userID`,可据此移除目标会话中该用户的消息。\n\n```ts\nfunction handleUserMessagesDeleted(data) {\n // ...\n}\n\nOpenIMSDK.on(\n OpenIMEvent.OnDeleteUserAllMsgsInConv,\n handleUserMessagesDeleted,\n);\n\nOpenIMSDK.off(\n OpenIMEvent.OnDeleteUserAllMsgsInConv,\n handleUserMessagesDeleted,\n);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 删除群聊中指定用户的全部消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听指定用户消息删除", + "url": "#监听指定用户消息删除" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "删除群聊中指定用户的全部消息" + }, + "/sdk/react-native/message/managing-messages/revoke-a-message": { + "body": "使用 `revokeMessage()` 撤回已发送的消息。撤回后,会话成员可看到消息撤回状态。\n\n```ts\nawait OpenIMSDK.revokeMessage({\n conversationID,\n clientMsgID,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所属的会话 ID。 |\n| `clientMsgID` | `string` | 是 | 要撤回的消息 ID。 |\n\n调用完成后,撤回请求已完成。允许撤回的消息、发送者和时间范围由服务端校验。\n\n## 监听消息撤回\n\n消息撤回时会触发 `OnNewRecvMessageRevoked`,回调携带 `RevokedInfo`。使用其中的 `clientMsgID` 更新对应消息的撤回状态。\n\n```ts\nfunction handleMessageRevoked(revokedInfo) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。仅从当前设备移除消息时,使用[删除本地消息](/sdk/react-native/message/managing-messages/delete-local-message)。", + "description": "OpenIM React Native SDK 撤回消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听消息撤回", + "url": "#监听消息撤回" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "撤回消息" + }, + "/sdk/react-native/message/managing-messages/modify-a-message": { + "body": "使用 `modifyMessage()` 修改会话中已有消息的内容。\n\n```ts\nconst updatedMessage = {\n ...message,\n textElem: {\n ...message.textElem,\n content: editedText,\n },\n};\n\nconst modifiedMessage = await OpenIMSDK.modifyMessage({\n conversationID,\n message: updatedMessage,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所属的会话 ID。 |\n| `message` | `MessageItem` | 是 | 修改后的完整消息对象,需保留原消息的 `clientMsgID` 及其他必要字段。 |\n\n## 返回结果\n\n调用后返回服务端确认的 `MessageItem`,可使用返回消息替换列表中相同 `clientMsgID` 的消息。允许修改的消息类型、发送者和时间范围由服务端校验。\n\n## 监听消息修改\n\n消息修改时会触发 `OnMessageModified`,回调直接携带修改后的 `MessageItem`。\n\n```ts\nfunction handleMessageModified(message) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnMessageModified, handleMessageModified);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnMessageModified, handleMessageModified);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 修改消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 2, + "title": "监听消息修改", + "url": "#监听消息修改" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "修改消息" + }, + "/sdk/react-native/message/managing-messages/insert-local-single-message": { + "body": "使用 `insertSingleMessageToLocalStorage()` 将一条消息写入当前设备的单聊记录。\n\n```ts\nawait OpenIMSDK.insertSingleMessageToLocalStorage({\n message,\n recvID,\n sendID,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `message` | `MessageItem` | 是 | 要写入的完整消息对象。 |\n| `recvID` | `string` | 是 | 单聊接收方的用户 ID。 |\n| `sendID` | `string` | 是 | 消息发送方的用户 ID。 |\n\n调用完成后,消息已写入当前设备的单聊记录。需要向对方发送消息时,使用[发送消息](/sdk/react-native/message/sending-messages/send-message)。", + "description": "OpenIM React Native SDK 插入本地单聊消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "插入本地单聊消息" + }, + "/sdk/react-native/message/managing-messages/insert-local-group-message": { + "body": "使用 `insertGroupMessageToLocalStorage()` 将一条消息写入当前设备的群聊记录。\n\n```ts\nawait OpenIMSDK.insertGroupMessageToLocalStorage({\n message,\n groupID,\n sendID,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `message` | `MessageItem` | 是 | 要写入的完整消息对象。 |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `sendID` | `string` | 是 | 消息发送方的用户 ID。 |\n\n调用完成后,消息已写入当前设备的群聊记录。需要向群成员发送消息时,使用[发送消息](/sdk/react-native/message/sending-messages/send-message)。", + "description": "OpenIM React Native SDK 插入本地群聊消息。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "插入本地群聊消息" + }, + "/sdk/react-native/message/managing-messages/clear-all-local-messages": { + "body": "使用 `deleteAllMsgFromLocal()` 清理当前登录账号在本设备上的全部消息。\n\n```ts\nawait OpenIMSDK.deleteAllMsgFromLocal();\n```\n\n这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本设备上的全部消息已清理;服务端仍保留历史记录。", + "description": "OpenIM React Native SDK 清理全部本地消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "清理全部本地消息" + }, + "/sdk/react-native/message/managing-messages/clear-all-messages": { + "body": "使用 `deleteAllMsgFromLocalAndSvr()` 清理当前登录账号在本地和服务端保存的全部消息。\n\n```ts\nawait OpenIMSDK.deleteAllMsgFromLocalAndSvr();\n```\n\n这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本地和服务端的清理请求已完成;其他会话成员已保存的消息副本不受影响。", + "description": "OpenIM React Native SDK 清理本地与服务端消息。", + "headings": [], + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "清理本地与服务端消息" + }, + "/sdk/react-native/message/managing-messages/set-message-local-ex": { + "body": "使用 `setMessageLocalEx()` 为当前设备中的指定消息保存本地扩展数据。\n\n```ts\nawait OpenIMSDK.setMessageLocalEx({\n conversationID,\n clientMsgID,\n localEx: JSON.stringify({ expanded: true }),\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所属的会话 ID。 |\n| `clientMsgID` | `string` | 是 | 目标消息 ID。 |\n| `localEx` | `string` | 是 | 本地扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展数据。 |\n\n调用完成后,本地扩展数据已保存到当前设备的消息中。", + "description": "OpenIM React Native SDK 设置消息本地扩展。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "设置消息本地扩展" + }, + "/sdk/react-native/message/managing-read-status/send-group-read-receipts": { + "body": "使用 `sendGroupMessageReadReceipt()` 上报群聊中已读的消息。\n\n```ts\nawait OpenIMSDK.sendGroupMessageReadReceipt({\n conversationID,\n clientMsgIDs,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 群聊会话 ID。 |\n| `clientMsgIDs` | `string[]` | 是 | 已读消息 ID 列表;列表中的消息应属于该群聊会话。 |\n\n调用完成后,已读回执已上报。会话未读数的更新见[标记会话已读](/sdk/react-native/conversation/managing-conversations/mark-conversation-read)。\n\n## 监听群消息已读变化\n\n群消息的已读状态变化时会触发 `OnRecvGroupReadReceipt`,回调携带 `GroupMessageReceiptInfo`,其中包含 `conversationID` 和各消息的已读人数、未读人数及已读成员。\n\n```ts\nfunction handleGroupReadReceipt(payload) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", + "description": "OpenIM React Native SDK 上报群消息已读。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听群消息已读变化", + "url": "#监听群消息已读变化" + } + ], + "sourcePath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "上报群消息已读" + }, + "/sdk/react-native/message/managing-read-status/get-group-message-readers": { + "body": "使用 `getGroupMessageReaderList()` 分页查询一条群消息的已读或未读成员。\n\n```ts\nconst members = await OpenIMSDK.getGroupMessageReaderList({\n conversationID,\n clientMsgID,\n filter: GroupMessageReaderFilter.Read,\n offset: 0,\n count: 50,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 群聊会话 ID。 |\n| `clientMsgID` | `string` | 是 | 要查询已读情况的消息 ID。 |\n| `filter` | `GroupMessageReaderFilter` | 是 | 成员筛选条件。`Read` 查询已读成员,`Unread` 查询未读成员。 |\n| `offset` | `number` | 是 | 分页偏移量;首页传 `0`。 |\n| `count` | `number` | 是 | 本次查询的成员数量。 |\n\n## 返回结果\n\n调用后返回当前页的 `GroupMemberItem[]`。成员字段见[群组概览](/sdk/react-native/group/overview-group);继续查询时递增 `offset`。", + "description": "OpenIM React Native SDK 查询群消息已读成员。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "查询群消息已读成员" } } } diff --git a/src/generated/routes.json b/src/generated/routes.json index e9900424f8..5d3b698354 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -16757,5 +16757,887 @@ "sourceIndex": 2816, "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx", "navOrder": 611 + }, + { + "id": 2433, + "path": "/sdk/react-native/message/overview-message", + "relativePath": "sdk/react-native/message/overview-message", + "sourcePath": "/sdk/react-native/message/overview-message", + "title": "Message overview", + "description": "OpenIM React Native SDK guide for message overview.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3803, + "contentFile": "content/docs/chat/sdk/react-native/message/overview-message.mdx", + "navOrder": 612 + }, + { + "id": 2434, + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "relativePath": "sdk/react-native/message/creating-messages/create-text-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "Create a text message", + "description": "OpenIM React Native SDK guide for create a text message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3804, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx", + "navOrder": 613 + }, + { + "id": 2435, + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "relativePath": "sdk/react-native/message/creating-messages/create-text-at-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "description": "OpenIM React Native SDK guide for create an @ message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3805, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx", + "navOrder": 614 + }, + { + "id": 2436, + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "relativePath": "sdk/react-native/message/creating-messages/create-custom-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "description": "OpenIM React Native SDK guide for create a custom message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3806, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx", + "navOrder": 615 + }, + { + "id": 2437, + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-image-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "Create an image message from a file", + "description": "OpenIM React Native SDK guide for create an image message from a file.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3807, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx", + "navOrder": 616 + }, + { + "id": 2438, + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-image-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "description": "OpenIM React Native SDK guide for create an image message from a url.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3808, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx", + "navOrder": 617 + }, + { + "id": 2439, + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-sound-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "Create an audio message from a file", + "description": "OpenIM React Native SDK guide for create an audio message from a file.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3809, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx", + "navOrder": 618 + }, + { + "id": 2440, + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-sound-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "description": "OpenIM React Native SDK guide for create an audio message from a url.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3810, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx", + "navOrder": 619 + }, + { + "id": 2441, + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-video-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "Create a video message from files", + "description": "OpenIM React Native SDK guide for create a video message from files.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3811, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx", + "navOrder": 620 + }, + { + "id": 2442, + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-video-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "description": "OpenIM React Native SDK guide for create a video message from urls.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3812, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx", + "navOrder": 621 + }, + { + "id": 2443, + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-file-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "Create a file message from a file", + "description": "OpenIM React Native SDK guide for create a file message from a file.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3813, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx", + "navOrder": 622 + }, + { + "id": 2444, + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-file-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "description": "OpenIM React Native SDK guide for create a file message from a url.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3814, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx", + "navOrder": 623 + }, + { + "id": 2445, + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "relativePath": "sdk/react-native/message/creating-messages/create-card-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "description": "OpenIM React Native SDK guide for create a contact card message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3815, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx", + "navOrder": 624 + }, + { + "id": 2446, + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "relativePath": "sdk/react-native/message/creating-messages/create-location-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "Create a location message", + "description": "OpenIM React Native SDK guide for create a location message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3816, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx", + "navOrder": 625 + }, + { + "id": 2447, + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "relativePath": "sdk/react-native/message/creating-messages/create-face-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "description": "OpenIM React Native SDK guide for create an emoji message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3817, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx", + "navOrder": 626 + }, + { + "id": 2448, + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "relativePath": "sdk/react-native/message/creating-messages/create-quote-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "description": "OpenIM React Native SDK guide for create a reply message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3818, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx", + "navOrder": 627 + }, + { + "id": 2449, + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "relativePath": "sdk/react-native/message/creating-messages/create-markdown-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "description": "OpenIM React Native SDK guide for create a markdown message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3819, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx", + "navOrder": 628 + }, + { + "id": 2450, + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "relativePath": "sdk/react-native/message/creating-messages/create-forward-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "description": "OpenIM React Native SDK guide for create a forwarded message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3820, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx", + "navOrder": 629 + }, + { + "id": 2451, + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "relativePath": "sdk/react-native/message/creating-messages/create-merger-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "description": "OpenIM React Native SDK guide for create a merged forward message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3821, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx", + "navOrder": 630 + }, + { + "id": 2452, + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "relativePath": "sdk/react-native/message/creating-messages/create-advanced-text-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "Create a rich-text message", + "description": "OpenIM React Native SDK guide for create a rich-text message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3822, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx", + "navOrder": 631 + }, + { + "id": 2453, + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "relativePath": "sdk/react-native/message/creating-messages/create-advanced-quote-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "Create a rich-text reply", + "description": "OpenIM React Native SDK guide for create a rich-text reply.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3823, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx", + "navOrder": 632 + }, + { + "id": 2454, + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "relativePath": "sdk/react-native/message/creating-messages/create-targeted-group-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "Create a targeted group message", + "description": "OpenIM React Native SDK guide for create a targeted group message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3824, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx", + "navOrder": 633 + }, + { + "id": 2455, + "path": "/sdk/react-native/message/sending-messages/send-message", + "relativePath": "sdk/react-native/message/sending-messages/send-message", + "sourcePath": "/sdk/react-native/message/sending-messages/send-message", + "title": "Send a message", + "description": "OpenIM React Native SDK guide for send a message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3825, + "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx", + "navOrder": 634 + }, + { + "id": 2456, + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "relativePath": "sdk/react-native/message/sending-messages/send-message-not-oss", + "sourcePath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "description": "OpenIM React Native SDK guide for send an uploaded media message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3826, + "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx", + "navOrder": 635 + }, + { + "id": 2457, + "path": "/sdk/react-native/message/receiving-messages/receive-messages", + "relativePath": "sdk/react-native/message/receiving-messages/receive-messages", + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "Receive messages", + "description": "OpenIM React Native SDK guide for receive messages.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3827, + "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx", + "navOrder": 636 + }, + { + "id": 2458, + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "relativePath": "sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "description": "OpenIM React Native SDK guide for receive custom business messages.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3828, + "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx", + "navOrder": 637 + }, + { + "id": 2459, + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "relativePath": "sdk/react-native/message/retrieving-messages/load-older-messages", + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "description": "OpenIM React Native SDK guide for load message history.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3829, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx", + "navOrder": 638 + }, + { + "id": 2460, + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "relativePath": "sdk/react-native/message/retrieving-messages/load-newer-messages", + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "Load message history in reverse", + "description": "OpenIM React Native SDK guide for load message history in reverse.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3830, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx", + "navOrder": 639 + }, + { + "id": 2461, + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "relativePath": "sdk/react-native/message/retrieving-messages/find-messages-by-id", + "sourcePath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "description": "OpenIM React Native SDK guide for find messages by id.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3831, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx", + "navOrder": 640 + }, + { + "id": 2462, + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "relativePath": "sdk/react-native/message/retrieving-messages/load-message-context", + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "Load message context", + "description": "OpenIM React Native SDK guide for load message context.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3832, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx", + "navOrder": 641 + }, + { + "id": 2463, + "path": "/sdk/react-native/message/searching-messages/search-messages", + "relativePath": "sdk/react-native/message/searching-messages/search-messages", + "sourcePath": "/sdk/react-native/message/searching-messages/search-messages", + "title": "Search messages", + "description": "OpenIM React Native SDK guide for search messages.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3833, + "contentFile": "content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx", + "navOrder": 642 + }, + { + "id": 2464, + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "relativePath": "sdk/react-native/message/composing-messages/update-typing-status", + "sourcePath": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "Report typing status", + "description": "OpenIM React Native SDK guide for report typing status.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3834, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx", + "navOrder": 643 + }, + { + "id": 2465, + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "relativePath": "sdk/react-native/message/composing-messages/get-typing-status", + "sourcePath": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "Get typing status", + "description": "OpenIM React Native SDK guide for get typing status.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3835, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx", + "navOrder": 644 + }, + { + "id": 2466, + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "relativePath": "sdk/react-native/message/composing-messages/check-speech-to-text", + "sourcePath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "description": "OpenIM React Native SDK guide for check audio transcription availability.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3836, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx", + "navOrder": 646 + }, + { + "id": 2467, + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "relativePath": "sdk/react-native/message/composing-messages/transcribe-audio", + "sourcePath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "description": "OpenIM React Native SDK guide for transcribe audio.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3837, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx", + "navOrder": 647 + }, + { + "id": 2468, + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "relativePath": "sdk/react-native/message/composing-messages/save-local-transcript", + "sourcePath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "description": "OpenIM React Native SDK guide for save a local transcript.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3838, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx", + "navOrder": 648 + }, + { + "id": 2469, + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "relativePath": "sdk/react-native/message/composing-messages/change-input-states", + "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "Update input states", + "description": "OpenIM React Native SDK guide for update input states.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3839, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx", + "navOrder": 645 + }, + { + "id": 2470, + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "relativePath": "sdk/react-native/message/managing-messages/delete-local-message", + "sourcePath": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "description": "OpenIM React Native SDK guide for delete a local message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3840, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx", + "navOrder": 649 + }, + { + "id": 2471, + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "relativePath": "sdk/react-native/message/managing-messages/delete-saved-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "description": "OpenIM React Native SDK guide for delete messages in a batch.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3841, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx", + "navOrder": 650 + }, + { + "id": 2472, + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "relativePath": "sdk/react-native/message/managing-messages/delete-user-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "description": "OpenIM React Native SDK guide for delete all messages from a user in a group chat.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3842, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx", + "navOrder": 651 + }, + { + "id": 2473, + "path": "/sdk/react-native/message/managing-messages/revoke-a-message", + "relativePath": "sdk/react-native/message/managing-messages/revoke-a-message", + "sourcePath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "description": "OpenIM React Native SDK guide for revoke a message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3843, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx", + "navOrder": 652 + }, + { + "id": 2474, + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "relativePath": "sdk/react-native/message/managing-messages/modify-a-message", + "sourcePath": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "Modify a message", + "description": "OpenIM React Native SDK guide for modify a message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3844, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx", + "navOrder": 653 + }, + { + "id": 2475, + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "relativePath": "sdk/react-native/message/managing-messages/insert-local-single-message", + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "description": "OpenIM React Native SDK guide for insert a local one-to-one message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3845, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx", + "navOrder": 654 + }, + { + "id": 2476, + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "relativePath": "sdk/react-native/message/managing-messages/insert-local-group-message", + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "description": "OpenIM React Native SDK guide for insert a local group message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3846, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx", + "navOrder": 655 + }, + { + "id": 2477, + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "relativePath": "sdk/react-native/message/managing-messages/clear-all-local-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "description": "OpenIM React Native SDK guide for clear all local messages.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3847, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx", + "navOrder": 656 + }, + { + "id": 2478, + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "relativePath": "sdk/react-native/message/managing-messages/clear-all-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "description": "OpenIM React Native SDK guide for clear local and server messages.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3848, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx", + "navOrder": 657 + }, + { + "id": 2479, + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "relativePath": "sdk/react-native/message/managing-messages/set-message-local-ex", + "sourcePath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "description": "OpenIM React Native SDK guide for set a local message extension.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3849, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx", + "navOrder": 658 + }, + { + "id": 2480, + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "relativePath": "sdk/react-native/message/managing-read-status/send-group-read-receipts", + "sourcePath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "description": "OpenIM React Native SDK guide for report group messages as read.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3850, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx", + "navOrder": 659 + }, + { + "id": 2481, + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "relativePath": "sdk/react-native/message/managing-read-status/get-group-message-readers", + "sourcePath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "description": "OpenIM React Native SDK guide for get members who read a group message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3851, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx", + "navOrder": 660 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index edcc2baa01..45f00525aa 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -7414,5 +7414,397 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", "content": "调用 changeGroupMemberMute 设置指定成员的禁言时长;传入 0 可解除禁言。 await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置禁言的成员用户 ID。 | | mutedSeconds | number | 是 | 禁言时长,单位为秒;传 0 解除禁言。 | 调用完成后,成员禁言状态已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ,可读取事件参数的 muteEndTime 获取禁言结束时间;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/message/overview-message", + "title": "消息概览", + "description": "OpenIM React Native SDK 消息概览。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message overview-message", + "content": "OpenIM React Native SDK 使用 MessageItem 表示一条消息。创建消息仅生成待发送的 MessageItem ;要将消息发送给单聊用户或群组,还需要调用发送 API。接收、查询以及删除、撤回、修改等状态变化则通过各自的 API 或事件处理。 消息列表使用 clientMsgID 识别、去重和更新单条消息。 MessageItem 不包含 conversationID ,消息所属会话应从当前会话、历史查询参数或事件上下文中获取。 消息处理流程 | 阶段 | 相关能力 | 说明 | | | | | | 创建 | create Message | 创建待发送的 MessageItem 。 | | 发送 | sendMessage 、 sendMessageNotOss | 将消息发送到单聊或群聊。 | | 接收 | 新消息事件 | 接收实时消息、离线消息和仅在线消息。 | | 查询 | 历史消息、按 ID 查找和搜索 | 按会话读取或定位已保存的消息。 | | 状态变化 | 撤回、删除、修改和已读回执 | 根据调用结果和对应事件更新消息列表。 | MessageItem 类型 创建、发送、接收和查询消息时,得到的消息对象都是 MessageItem 。常用公共字段如下: | 字段 | 类型 | 说明 | | | | | | clientMsgID | string | 客户端消息 ID,用于消息去重、更新和定位。 | | serverMsgID | string | 服务端消息 ID。 | | sessionType | SessionType | 会话类型,用于区分单聊和群聊。 | | sendID | string | 发送者用户 ID。 | | recvID | string | 单聊消息的接收方用户 ID。 | | groupID | string | 群聊消息所属的群组 ID。 | | contentType | MessageType | 消息内容类型,决定使用哪个内容字段渲染。 | | createTime | number | 消息对象创建时间。 | | sendTime | number | 消息发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | Platform | 发送消息的客户端平台。 | | status | MessageStatus | 消息发送状态。 | | isRead | boolean | 已读状态。 | | senderNickname | string | 发送者昵称。 | | senderFaceUrl | string | 发送者头像 URL。 | | offlinePush | OfflinePush | 离线推送配置。 | | content | string | SDK 序列化的消息内容。渲染时应读取与 contentType 对应的内容字段。 | | ex | string | 消息扩展字段。 | | localEx | string | 仅当前设备使用的消息扩展字段。 | 消息内容保存在 MessageItem 中与 contentType 对应的字段内: | 内容 | 字段 | | | | | 文本、富文本和 Markdown | textElem 、 advancedTextElem 、 markdownTextElem | | 图片、音频、视频和文件 | pictureElem 、 soundElem 、 videoElem 、 fileElem | | @ 消息 | atTextElem | | 回复消息 | quoteElem | | 合并转发 | mergeElem | | 名片、位置和表情 | cardElem 、 locationElem 、 faceElem | | 自定义消息 | customElem | | 通知、输入状态和附加状态 | notificationElem 、 typingElem 、 attachedInfoElem | 内容字段均为可选字段。一条消息通常只使用与其 contentType 对应的内容字段;渲染前应先判断 contentType ,再读取相应字段。 创建并发送消息 先调用对应的创建 API 得到 MessageItem ,再调用发送 API。由 SDK 上传本地媒体文件时使用 发送消息 /sdk/react native/message/sending messages/send message ;媒体文件已经有远端 URL 时使用 发送不经 OSS 的消息 /sdk/react native/message/sending messages/send message not oss 。 | 内容 | 页面 | | | | | 文本和富文本 | 创建文本消息 /sdk/react native/message/creating messages/create text message 、 创建富文本消息 /sdk/react native/message/creating messages/create advanced text message | | @ 消息 | 创建 @ 消息 /sdk/react native/message/creating messages/create text at message | | 图片、音频、视频和文件 | 创建图片消息 /sdk/react native/message/creating messages/create image message by file 、 创建音频消息 /sdk/react native/message/creating messages/create sound message by file 、 创建视频消息 /sdk/react native/message/creating messages/create video message by file 、 创建文件消息 /sdk/react native/message/creating messages/create file message by file | | 名片、位置和表情 | 创建名片消息 /sdk/react native/message/creating messages/create card message 、 创建位置消息 /sdk/react native/message/creating messages/create location message 、 创建表情消息 /sdk/react native/message/creating messages/create face message | | 回复、转发和合并转发 | 创建回复消息 /sdk/react native/message/creating messages/create quote message 、 创建转发消息 /sdk/react native/message/creating messages/create forward message 、 创建合并转发消息 /sdk/react native/message/creating messages/create merger message | | 自定义消息 | 创建自定义消息 /sdk/react native/message/creating messages/create custom message | 按任务查看能力 | 任务 | 页面 | | | | | 接收实时、离线和仅在线消息 | 接收消息 /sdk/react native/message/receiving messages/receive messages | | 接收自定义业务消息 | 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages | | 加载历史消息或消息上下文 | 加载历史消息 /sdk/react native/message/retrieving messages/load older messages 、 读取消息上下文 /sdk/react native/message/retrieving messages/load message context | | 按 ID 查找或搜索消息 | 按 ID 查找消息 /sdk/react native/message/retrieving messages/find messages by id 、 搜索消息 /sdk/react native/message/searching messages/search messages | | 删除、撤回或修改消息 | 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 、 撤回消息 /sdk/react native/message/managing messages/revoke a message 、 修改消息 /sdk/react native/message/managing messages/modify a message | | 管理仅当前设备使用的消息数据 | 删除本地消息 /sdk/react native/message/managing messages/delete local message 、 设置消息本地扩展 /sdk/react native/message/managing messages/set message local ex | | 上报或查询群消息已读 | 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts 、 查询群消息已读成员 /sdk/react native/message/managing read status/get group message readers | | 上报或查询输入状态 | 上报输入状态 /sdk/react native/message/composing messages/update typing status 、 查询输入状态 /sdk/react native/message/composing messages/get typing status | | 识别音频文字 | 检查语音识别能力 /sdk/react native/message/composing messages/check speech to text 、 识别音频文字 /sdk/react native/message/composing messages/transcribe audio | 事件处理 消息相关事件的完整监听代码分别位于以下页面: 新消息、离线消息和仅在线消息: OnRecvNewMessage 、 OnRecvOfflineNewMessage 、 OnRecvOnlineOnlyMessage ,见 接收消息 /sdk/react native/message/receiving messages/receive messages 。 自定义业务消息: OnRecvCustomBusinessMessage ,见 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 。 消息删除: OnMsgDeleted ,见 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 。 消息撤回: OnNewRecvMessageRevoked ,见 撤回消息 /sdk/react native/message/managing messages/revoke a message 。 消息修改: OnMessageModified ,见 修改消息 /sdk/react native/message/managing messages/modify a message 。 群消息已读状态: OnRecvGroupReadReceipt ,见 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts 。 输入状态变化: OnInputStatusChanged ,见 更新输入状态 /sdk/react native/message/composing messages/change input states 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "创建文本消息", + "description": "OpenIM React Native SDK 创建文本消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-message", + "content": "调用 createTextMessage 创建一条待发送的文本消息。 const message = await OpenIMSDK.createTextMessage '你好,欢迎加入讨论。' ; 参数为文本内容。调用后返回 MessageItem ,将它传给 发送消息 /sdk/react native/message/sending messages/send message 的 message 字段即可发送。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "创建 @ 消息", + "description": "OpenIM React Native SDK 创建 @ 消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-at-message", + "content": "使用 createTextAtMessage 创建群聊中的 @ 消息。 text 中的 @ 文本与 atUserIDList 应对应。 const message = await OpenIMSDK.createTextAtMessage text: '@user 001 请确认发布内容。', atUserIDList: 'user 001' , atUsersInfo: atUserID: 'user 001', groupNickname: '小李', , , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | @ 消息的正文。 | | atUserIDList | string | 是 | 被提及的用户 ID 列表。 | | atUsersInfo | AtUsersInfoItem | 否 | 被提及用户在群内的展示名。 | | message | MessageItem | 否 | 附带的消息对象。 | 调用后返回待发送的 MessageItem 。将它传给 发送消息 /sdk/react native/message/sending messages/send message 的 message 字段即可发送。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "创建自定义消息", + "description": "OpenIM React Native SDK 创建自定义消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-custom-message", + "content": "使用 createCustomMessage 创建自定义业务消息。业务双方需要约定 data 、 extension 的数据格式。 const message = await OpenIMSDK.createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify version: 1 , description: '任务卡片', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | data | string | 是 | 业务数据字符串,可传 JSON 字符串。 | | extension | string | 是 | 业务扩展信息字符串。 | | description | string | 是 | 消息说明,也可作为不支持该消息类型时的降级展示文本。 | 调用后返回待发送的 MessageItem 。接收端应校验业务数据的格式和版本;服务端业务通知的监听方式见 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "使用文件创建图片消息", + "description": "OpenIM React Native SDK 使用文件创建图片消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-file", + "content": "使用 createImageMessageFromFullPath 根据本地图片完整路径创建消息。 const message = await OpenIMSDK.createImageMessageFromFullPath imagePath ; imagePath 是图片在设备上的完整路径。调用后返回待发送的 MessageItem ;使用 发送消息 /sdk/react native/message/sending messages/send message 发送时,SDK 会处理本地资源上传。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "使用 URL 创建图片消息", + "description": "OpenIM React Native SDK 使用 URL 创建图片消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-url", + "content": "使用 createImageMessageByURL 根据已上传图片的资源信息创建消息。原图、大图和缩略图可共用同一资源信息,也可按业务需要分别传入不同尺寸或质量的资源。 const picture = uuid: 'image 001', type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: 'https://www.example.com/picture.png', ; const message = await OpenIMSDK.createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourcePicture | PicBaseInfo | 是 | 原图资源信息。 | | bigPicture | PicBaseInfo | 是 | 大图资源信息。 | | snapshotPicture | PicBaseInfo | 是 | 缩略图资源信息。 | | sourcePath | string | 是 | 图片本地路径;只有远端资源时传空字符串。 | 每个 PicBaseInfo 包含 uuid 、 type 、 size 、 width 、 height 和 url ,分别表示资源标识、类型、字节大小、像素尺寸和远端地址。调用后返回待发送的 MessageItem ,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "使用文件创建音频消息", + "description": "OpenIM React Native SDK 使用文件创建音频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-file", + "content": "使用 createSoundMessageFromFullPath 根据设备上的音频文件创建消息。 const message = await OpenIMSDK.createSoundMessageFromFullPath soundPath, duration: 18, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | soundPath | string | 是 | 音频文件的完整路径。 | | duration | number | 是 | 音频时长,单位为秒。 | 调用后返回待发送的 MessageItem 。使用 发送消息 /sdk/react native/message/sending messages/send message 时,SDK 会处理本地音频资源上传。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "使用 URL 创建音频消息", + "description": "OpenIM React Native SDK 使用 URL 创建音频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-url", + "content": "使用 createSoundMessageByURL 根据已上传音频的资源信息创建消息。 const message = await OpenIMSDK.createSoundMessageByURL uuid: 'audio 001', soundPath: '', sourceUrl: 'https://www.example.com/sound.mp3', dataSize: 54000, duration: 18, soundType: 'audio/mpeg', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | uuid | string | 是 | 音频资源标识。 | | soundPath | string | 是 | 本地音频路径;只有远端资源时传空字符串。 | | sourceUrl | string | 是 | 已上传音频的地址。 | | dataSize | number | 是 | 音频大小,单位为字节。 | | duration | number | 是 | 音频时长,单位为秒。 | | soundType | string | 否 | 音频类型。 | 调用后返回待发送的 MessageItem 。资源信息应以实际上传结果为准,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "使用文件创建视频消息", + "description": "OpenIM React Native SDK 使用文件创建视频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-file", + "content": "使用 createVideoMessageFromFullPath 根据设备上的视频文件和封面图创建消息。 const message = await OpenIMSDK.createVideoMessageFromFullPath videoPath, videoType: 'video/mp4', duration: 36, snapshotPath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | videoPath | string | 是 | 视频文件的完整路径。 | | videoType | string | 是 | 视频类型。 | | duration | number | 是 | 视频时长,单位为秒。 | | snapshotPath | string | 是 | 视频封面图的完整路径。 | 调用后返回待发送的 MessageItem 。发送时使用 发送消息 /sdk/react native/message/sending messages/send message 处理本地视频和封面图资源。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "使用 URL 创建视频消息", + "description": "OpenIM React Native SDK 使用 URL 创建视频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-url", + "content": "使用 createVideoMessageByURL 根据已上传的视频及封面图资源创建消息。 const message = await OpenIMSDK.createVideoMessageByURL videoPath: '', duration: 36, videoType: 'video/mp4', videoUUID: 'video 001', videoUrl: 'https://www.example.com/video.mp4', videoSize: 820000, snapshotPath: '', snapshotUUID: 'cover 001', snapshotSize: 42000, snapshotUrl: 'https://www.example.com/snapshot.png', snapshotWidth: 1280, snapshotHeight: 720, snapShotType: 'image/jpeg', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | videoPath | string | 是 | 本地视频路径;只有远端资源时传空字符串。 | | duration | number | 是 | 视频时长,单位为秒。 | | videoType | string | 是 | 视频类型。 | | videoUUID 、 videoUrl 、 videoSize | string 、 string 、 number | 是 | 视频资源标识、远端地址和字节大小。 | | snapshotPath | string | 是 | 本地封面图路径;只有远端资源时传空字符串。 | | snapshotUUID 、 snapshotUrl 、 snapshotSize | string 、 string 、 number | 是 | 封面图资源标识、远端地址和字节大小。 | | snapshotWidth 、 snapshotHeight | number | 是 | 封面图宽高,单位为像素。 | | snapShotType | string | 否 | 封面图类型。 | 调用后返回待发送的 MessageItem ,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "使用文件创建文件消息", + "description": "OpenIM React Native SDK 使用文件创建文件消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-file", + "content": "使用 createFileMessageFromFullPath 根据设备上的文件创建消息。 const message = await OpenIMSDK.createFileMessageFromFullPath filePath, fileName: '产品说明.pdf', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filePath | string | 是 | 文件的完整路径。 | | fileName | string | 是 | 对外展示的文件名。 | 调用后返回待发送的 MessageItem 。使用 发送消息 /sdk/react native/message/sending messages/send message 时,SDK 会处理本地文件上传。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "使用 URL 创建文件消息", + "description": "OpenIM React Native SDK 使用 URL 创建文件消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-url", + "content": "使用 createFileMessageByURL 根据已上传文件的资源信息创建消息。 const message = await OpenIMSDK.createFileMessageByURL filePath: '', fileName: '产品说明.pdf', uuid: 'file 001', sourceUrl: 'https://www.example.com/产品说明.pdf', fileSize: 256000, fileType: 'application/pdf', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filePath | string | 是 | 本地文件路径;只有远端资源时传空字符串。 | | fileName | string | 是 | 对外展示的文件名。 | | uuid | string | 是 | 文件资源标识。 | | sourceUrl | string | 是 | 已上传文件的地址。 | | fileSize | number | 是 | 文件大小,单位为字节。 | | fileType | string | 否 | 文件类型。 | 调用后返回待发送的 MessageItem 。资源信息应以实际上传结果为准,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "创建名片消息", + "description": "OpenIM React Native SDK 创建名片消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-card-message", + "content": "使用 createCardMessage 创建用户名片消息。 const message = await OpenIMSDK.createCardMessage userID: 'user 002', nickname: '小王', faceURL: 'https://example.com/avatar.png', ex: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userID | string | 是 | 名片对应的用户 ID。 | | nickname | string | 是 | 名片展示的昵称。 | | faceURL | string | 是 | 名片展示的头像地址。 | | ex | string | 是 | 名片扩展信息,没有内容时传空字符串。 | 调用后返回待发送的 MessageItem 。 messageItem.cardElem 保存的是创建时传入的名片资料。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "创建位置消息", + "description": "OpenIM React Native SDK 创建位置消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-location-message", + "content": "使用 createLocationMessage 创建位置消息。 const message = await OpenIMSDK.createLocationMessage description: '上海市浦东新区', longitude: 121.4737, latitude: 31.2304, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | description | string | 是 | 位置名称或地址描述。 | | longitude | number | 是 | 经度。 | | latitude | number | 是 | 纬度。 | 调用后返回待发送的 MessageItem 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "创建表情消息", + "description": "OpenIM React Native SDK 创建表情消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-face-message", + "content": "使用 createFaceMessage 创建应用内约定的表情消息。 const message = await OpenIMSDK.createFaceMessage index: 12, data: JSON.stringify url: 'https://www.example.com/emoji.png', , ; index 是双方约定的表情索引, data 是由发送端和接收端共同约定的自定义格式字符串,用于传递表情的识别或渲染信息,例如图片 URL、固定键或其他业务数据。调用后返回待发送的 MessageItem 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "创建回复消息", + "description": "OpenIM React Native SDK 创建回复消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-quote-message", + "content": "使用 createQuoteMessage 创建回复消息,并传入完整的原消息对象。 const message = await OpenIMSDK.createQuoteMessage text: '同意这个方案。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的文本内容。 | | message | MessageItem | 是 | 被回复的原消息。 | 调用后返回新的待发送 MessageItem 。接收端展示回复消息时,应注意处理原消息已删除或无法展示的情况。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "创建 Markdown 消息", + "description": "OpenIM React Native SDK 创建 Markdown 消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-markdown-message", + "content": "使用 createMarkdownMessage 创建 Markdown 消息。 const message = await OpenIMSDK.createMarkdownMessage ' 发布完成\\n\\n Android\\n iOS', ; 参数是完整的 Markdown 文本。调用后返回待发送的 MessageItem ;接收端展示不可信 Markdown 文本时,应使用支持安全策略的 Markdown 渲染器。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "创建转发消息", + "description": "OpenIM React Native SDK 创建转发消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-forward-message", + "content": "使用 createForwardMessage 根据已有消息创建一条转发消息。 const message = await OpenIMSDK.createForwardMessage sourceMessage ; 参数 sourceMessage 为完整的 MessageItem 。调用后返回新的待发送 MessageItem ,可发送到单聊或群聊。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "创建合并消息", + "description": "OpenIM React Native SDK 创建合并消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-merger-message", + "content": "使用 createMergerMessage 创建包含多条消息的合并转发消息。 const message = await OpenIMSDK.createMergerMessage messageList: selectedMessages, title: '项目讨论记录', summaryList: '小王:发布计划已确认', '小李:我会跟进测试' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | messageList | MessageItem | 是 | 要合并的消息列表。 | | title | string | 是 | 合并消息的标题。 | | summaryList | string | 是 | 合并消息展示的摘要列表。 | 调用后返回待发送的 MessageItem 。摘要内容应符合当前会话的展示与隐私规则。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "创建富文本消息", + "description": "OpenIM React Native SDK 创建富文本消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-text-message", + "content": "使用 createAdvancedTextMessage 创建带消息实体的富文本消息。 const message = await OpenIMSDK.createAdvancedTextMessage text: '请查看 https://openim.io', messageEntityList: type: 'url', offset: 4, length: 17, url: 'https://openim.io', , , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 富文本的原始文本。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | 每项 MessageEntity 包含 type 、 offset 、 length ,并可选传入 url 和 info 。调用后返回待发送的 MessageItem ,使用 发送消息 /sdk/react native/message/sending messages/send message 发送。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "创建富文本回复消息", + "description": "OpenIM React Native SDK 创建富文本回复消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", + "content": "使用 createAdvancedQuoteMessage 创建包含原消息引用和文本实体的富文本回复消息。 const message = await OpenIMSDK.createAdvancedQuoteMessage text: '我已查看相关链接。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的原始文本。 | | message | MessageItem | 是 | 被回复的原消息。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | MessageEntity 使用 type 、 offset 、 length 描述实体,并可按需要传入 url 或 info 。调用后返回待发送的 MessageItem 。" + }, + { + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "创建定向群消息", + "description": "OpenIM React Native SDK 创建定向群消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", + "content": "使用 createTargetedGroupMessage 创建仅定向投递给指定群成员的消息对象。 const textMessage = await OpenIMSDK.createTextMessage '请相关成员查看。' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要定向发送的消息对象。 | | dstUserIDs | string | 是 | 接收该消息的群成员用户 ID 列表。 | 调用后返回待发送的 MessageItem 。发送时在 groupID 中指定目标群组,并通过 发送消息 /sdk/react native/message/sending messages/send message 投递。" + }, + { + "path": "/sdk/react-native/message/sending-messages/send-message", + "title": "发送消息", + "description": "OpenIM React Native SDK 发送消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message", + "content": "调用 sendMessage 发送由消息创建 API 返回的 MessageItem 。单聊填写 recvID ,群聊填写 groupID 。 使用本地路径创建的图片、音频、视频和文件消息时,SDK 会在发送过程中自动上传资源。对于已通过 URL 创建、已有远端资源的媒体消息,请使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。 const sentMessage = await OpenIMSDK.sendMessage recvID: receiverUserID, groupID: '', message, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | | message | MessageItem | 是 | 待发送消息。 | | offlinePushInfo | OfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递。 | 调用后返回发送完成的 MessageItem 。 发送过程有进度时会触发 SendMessageProgress ,回调参数包含 progress 和 message : function handleSendMessageProgress info // ... // 设置监听 OpenIMSDK.on OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; // 取消监听 OpenIMSDK.off OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "发送已上传的媒体消息", + "description": "OpenIM React Native SDK 发送已上传的媒体消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message-not-oss", + "content": "sendMessageNotOss 用于发送已经包含远端资源 URL 的图片、音频、视频或文件消息,不再走 SDK 的资源上传流程。 const sentMessage = await OpenIMSDK.sendMessageNotOss recvID: receiverUserID, groupID: '', message: uploadedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | | message | MessageItem | 是 | 通过 URL 型消息创建 API 创建的待发送消息。 | | offlinePushInfo | OfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递。 | 调用后返回发送完成的 MessageItem 。 message 中的资源地址、大小、类型和尺寸应来自实际上传结果;本地路径型媒体消息请使用 发送消息 /sdk/react native/message/sending messages/send message 。" + }, + { + "path": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "接收消息", + "description": "OpenIM React Native SDK 接收消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-messages", + "content": "新消息到达时会触发 OnRecvNewMessage ,回调参数为一条 MessageItem 。离线消息和只在线投递的消息分别通过 OnRecvOfflineNewMessage 、 OnRecvOnlineOnlyMessage 接收,三个事件的回调参数均为 MessageItem 。 function handleNewMessage message // ... function handleOfflineNewMessage message // ... function handleOnlineOnlyMessage message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; 使用 clientMsgID 识别消息。组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "接收自定义业务消息", + "description": "OpenIM React Native SDK 接收自定义业务消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-custom-business-messages", + "content": "服务端下发自定义业务通知时会触发 OnRecvCustomBusinessMessage 。该事件的回调参数为业务数据,不是 MessageItem ;普通聊天自定义消息仍通过 接收消息 /sdk/react native/message/receiving messages/receive messages 中的新消息事件接收。 function handleCustomBusinessMessage data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; 业务侧应先校验收到的数据格式,再按自身协议处理。组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "加载历史消息", + "description": "OpenIM React Native SDK 加载历史消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-older-messages", + "content": "使用 getAdvancedHistoryMessageList 分页加载会话中较早的历史消息。第一页的 startClientMsgID 传空字符串,继续加载时传入当前最早消息的 clientMsgID 。 const page = await OpenIMSDK.getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, viewType: ViewType.History, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | viewType | ViewType | 是 | 浏览历史消息时传 ViewType.History 。 | 返回结果 调用后返回 AdvancedGetMessageResult : | 字段 | 类型 | 说明 | | | | | | messageList | MessageItem | 当前页消息。 | | isEnd | boolean | 是否已到达较早一端的边界。 | | errCode | number | 本次历史读取的状态码。 | | errMsg | string | 与 errCode 对应的说明。 | 将 messageList 加入列表前,按 clientMsgID 去重。" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "反向加载历史消息", + "description": "OpenIM React Native SDK 反向加载历史消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-newer-messages", + "content": "使用 getAdvancedHistoryMessageListReverse 从消息锚点向较新的方向读取历史消息,适合定位消息后继续加载其后的记录。 const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse conversationID, startClientMsgID: anchorMessage.clientMsgID, count: 30, viewType: ViewType.History, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取消息的会话 ID。 | | startClientMsgID | string | 是 | 向较新方向读取时使用的锚点消息 ID。 | | count | number | 是 | 本次读取的消息数量。 | | viewType | ViewType | 是 | 浏览历史消息时传 ViewType.History 。 | 调用后返回 AdvancedGetMessageResult ,其中 messageList 是本页消息, isEnd 表示是否已到达较新一端的边界。其余返回字段见 加载历史消息 /sdk/react native/message/retrieving messages/load older messages 。" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "按 ID 查找消息", + "description": "OpenIM React Native SDK 按 ID 查找消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages find-messages-by-id", + "content": "使用 findMessageList 根据会话 ID 和消息 ID 查找消息。适合从搜索结果、引用或通知跳转到一条已知消息时使用。 const result = await OpenIMSDK.findMessageList conversationID, clientMsgIDList: clientMsgID , , ; const targetMessage = result.findResultItems?. 0 ?.messageList 0 ; 参数说明 findMessageList 接收查询条件数组,每项包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标消息所属的会话 ID。 | | clientMsgIDList | string | 是 | 要查找的消息 ID 列表。 | 返回结果 调用后返回 SearchMessageResult ,按 ID 查找的结果位于 findResultItems 。每个结果项包含 conversationID 和 messageList ;找不到消息时,结果项或其消息列表可能为空。完整结果结构见 搜索消息 /sdk/react native/message/searching messages/search messages 。" + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "读取消息上下文", + "description": "OpenIM React Native SDK 读取消息上下文。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-message-context", + "content": "使用 fetchSurroundingMessages 读取一条已知消息前后的上下文,适合从搜索结果或回复消息进入聊天记录。 const messageList = await OpenIMSDK.fetchSurroundingMessages startMessage: targetMessage, viewType: ViewType.Search, before: 20, after: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | startMessage | MessageItem | 是 | 已取得的锚点消息。 | | viewType | ViewType | 是 | 上下文查看类型;从搜索结果进入时可传 ViewType.Search 。 | | before | number | 是 | 锚点之前最多读取的消息数量。 | | after | number | 是 | 锚点之后最多读取的消息数量。 | 调用后返回 messageList ,其中 messageList 是锚点前后取得的 MessageItem 。返回数量可能少于 before + after ,例如锚点靠近记录边界或部分消息已删除。" + }, + { + "path": "/sdk/react-native/message/searching-messages/search-messages", + "title": "搜索消息", + "description": "OpenIM React Native SDK 搜索消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message searching-messages search-messages", + "content": "使用 searchLocalMessages 搜索当前账号已同步到本地的消息。 const result = await OpenIMSDK.searchLocalMessages conversationID, keywordList: '发布' , messageTypeList: MessageType.TextMessage , pageIndex: 1, count: 20, ; 参数说明 keywordList 可传入一个或多个关键词。单个搜索框通常传入一个去除首尾空格且非空的关键词。 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要搜索的会话 ID。 | | keywordList | string | 是 | 关键词列表;单个搜索框通常传入一个清理后的关键词。 | | keywordListMatchType | number | 否 | 多关键词匹配方式: 0 表示命中任意关键词(OR), 1 表示同时命中全部关键词(AND);省略时按 0 处理。 | | senderUserIDList | string | 否 | 仅搜索这些用户发送的消息。 | | messageTypeList | MessageType | 否 | 仅搜索指定类型的消息,例如文本消息和 @ 文本消息;省略时按 SDK 默认范围搜索。 | | searchTimePosition | number | 否 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 否 | 从 searchTimePosition 向前搜索的时间范围,单位为秒。 | | pageIndex | number | 否 | 搜索结果页码,从 1 开始。 | | count | number | 否 | 每页返回的消息数量。 | 返回结果 调用后返回 SearchMessageResult : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下的匹配消息总数。 | | searchResultItems | SearchMessageResultItem | 按会话组织的搜索结果。 | 每个 SearchMessageResultItem 包含会话信息和 messageList 。修改关键词或筛选条件时,从第一页重新搜索,避免混合不同条件的结果。需要定位命中消息前后的记录时见 读取消息上下文 /sdk/react native/message/retrieving messages/load message context 。" + }, + { + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "上报输入状态", + "description": "OpenIM React Native SDK 上报输入状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages update-typing-status", + "content": "使用 typingStatusUpdate 向单聊对方上报输入状态提示内容。 await OpenIMSDK.typingStatusUpdate recvID: receiverUserID, msgTip: '正在输入…', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 是 | 接收输入提示的用户 ID。 | | msgTip | string | 是 | 要上报的输入提示文本。 | 调用完成后,输入提示已上报。需要根据会话焦点更新当前账号的输入状态时,使用 更新输入状态 /sdk/react native/message/composing messages/change input states 。" + }, + { + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "查询输入状态", + "description": "OpenIM React Native SDK 查询输入状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages get-typing-status", + "content": "使用 getInputStates 查询指定用户在会话中的当前输入状态。 const platformIDs = await OpenIMSDK.getInputStates conversationID, userID, ; const isTyping = platformIDs.length 0; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标会话 ID。 | | userID | string | 是 | 要查询输入状态的用户 ID。 | 调用后返回处于输入状态的平台 ID 数组;空数组表示该用户当前没有平台处于输入状态。持续显示输入状态时,处理 更新输入状态 /sdk/react native/message/composing messages/change input states 中的 OnInputStatusChanged 事件。" + }, + { + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "检查语音识别能力", + "description": "OpenIM React Native SDK 检查语音识别能力。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages check-speech-to-text", + "content": "speechToTextCapabilities 仅用于查询当前语音识别支持的音频格式、采样率、录音时长和文件大小等信息。实际执行语音识别的是 识别音频文字 /sdk/react native/message/composing messages/transcribe audio 。 const capabilities = await OpenIMSDK.speechToTextCapabilities ; 返回结果 调用后返回 SpeechToTextCapabilities : | 字段 | 类型 | 说明 | | | | | | format | string | 支持的音频格式。 | | sampleRateHz | number | 要求的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number | 最大录音时长,单位为毫秒。 | | maxFileSize | number | 最大文件大小,单位为字节。 | | provider | string | 当前语音识别服务提供方。 |" + }, + { + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "识别音频文字", + "description": "OpenIM React Native SDK 识别音频文字。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages transcribe-audio", + "content": "使用 speechToText 将设备上 SDK 可读取的本地音频文件识别为文字。传入本地路径,不传远端 URL、Base64 数据或上传后的文件名。 const text = await OpenIMSDK.speechToText filename ; 参数 filename 是本地音频文件路径。调用后返回 text ,其中 text 为识别结果。调用前先 检查语音识别能力 /sdk/react native/message/composing messages/check speech to text ;需要把结果保存在当前设备的语音消息中时见 保存本地转写结果 /sdk/react native/message/composing messages/save local transcript 。" + }, + { + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "保存本地转写结果", + "description": "OpenIM React Native SDK 保存本地转写结果。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages save-local-transcript", + "content": "使用 setMessageLocalContent 将转写文字写入当前设备的语音消息。传入完整的消息对象,并保留原有消息字段。 const updatedMessage = ...message, soundElem: ...message.soundElem, text: text: transcript, translate: message.soundElem?.text?.translate ?? , , , ; await OpenIMSDK.setMessageLocalContent conversationID, message: updatedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | MessageItem | 是 | 写入转写结果后的完整消息对象。 | 调用完成后,转写结果保存在当前设备的消息内容中。" + }, + { + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "更新输入状态", + "description": "OpenIM React Native SDK 更新输入状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages change-input-states", + "content": "使用 changeInputStates 更新当前账号在会话中的输入状态。开始输入时传 focus: true ,发送消息、失焦或离开会话时传 false 。 await OpenIMSDK.changeInputStates conversationID, focus: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要更新输入状态的会话 ID。 | | focus | boolean | 是 | true 表示正在输入, false 表示停止输入。 | 避免在每个键盘事件中重复上报相同状态。输入状态变化时会触发 OnInputStatusChanged ,回调携带 conversationID 、 userID 和 platformIDs 。 function handleInputStatusChanged inputStatus // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "删除本地消息", + "description": "OpenIM React Native SDK 删除本地消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-local-message", + "content": "使用 deleteMessageFromLocalStorage 删除当前设备中指定会话的一条消息。 await OpenIMSDK.deleteMessageFromLocalStorage conversationID, clientMsgID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 要删除的消息 ID。 | 调用完成后,当前设备上的目标消息已删除。" + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "批量删除消息", + "description": "OpenIM React Native SDK 批量删除消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-saved-messages", + "content": "使用 deleteMessages 批量删除同一会话中的消息。 await OpenIMSDK.deleteMessages conversationID, clientMsgIDs, isSync: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要删除消息所属的会话 ID。 | | clientMsgIDs | string | 是 | 要删除的消息 ID 列表;列表中的消息应属于同一会话。 | | isSync | boolean | 是 | 是否将删除操作同步给会话另一方。为 true 时,会话双方都会删除对应消息;为 false 时,仅当前账号删除。 | 调用完成后,删除请求已完成。 isSync 为 true 时,会话另一方也会删除对应消息;为 false 时,仅当前账号删除,无论取值如何,当前账号的删除都会同步到该账号的其他设备。 监听消息删除 消息删除时会触发 OnMsgDeleted ,回调携带被删除的 MessageItem 。根据 clientMsgID 更新对应会话的消息列表。 function handleMessageDeleted message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "删除群聊中指定用户的全部消息", + "description": "OpenIM React Native SDK 删除群聊中指定用户的全部消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-user-messages", + "content": "使用 deleteUserAllMessagesInConv 删除指定用户在群聊会话中的全部消息。 await OpenIMSDK.deleteUserAllMessagesInConv conversationID, userID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标群聊的会话 ID。 | | userID | string | 是 | 要删除其消息的用户 ID。 | 这是群聊管理操作,调用完成后删除请求已完成,具体权限由服务端校验。 监听指定用户消息删除 删除完成后会触发 OnDeleteUserAllMsgsInConv ,回调携带 conversationID 和 userID ,可据此移除目标会话中该用户的消息。 function handleUserMessagesDeleted data // ... OpenIMSDK.on OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; OpenIMSDK.off OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "撤回消息", + "description": "OpenIM React Native SDK 撤回消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages revoke-a-message", + "content": "使用 revokeMessage 撤回已发送的消息。撤回后,会话成员可看到消息撤回状态。 await OpenIMSDK.revokeMessage conversationID, clientMsgID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 要撤回的消息 ID。 | 调用完成后,撤回请求已完成。允许撤回的消息、发送者和时间范围由服务端校验。 监听消息撤回 消息撤回时会触发 OnNewRecvMessageRevoked ,回调携带 RevokedInfo 。使用其中的 clientMsgID 更新对应消息的撤回状态。 function handleMessageRevoked revokedInfo // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; 组件销毁、退出登录或切换账号时,取消监听。仅从当前设备移除消息时,使用 删除本地消息 /sdk/react native/message/managing messages/delete local message 。" + }, + { + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "修改消息", + "description": "OpenIM React Native SDK 修改消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages modify-a-message", + "content": "使用 modifyMessage 修改会话中已有消息的内容。 const updatedMessage = ...message, textElem: ...message.textElem, content: editedText, , ; const modifiedMessage = await OpenIMSDK.modifyMessage conversationID, message: updatedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | MessageItem | 是 | 修改后的完整消息对象,需保留原消息的 clientMsgID 及其他必要字段。 | 返回结果 调用后返回服务端确认的 MessageItem ,可使用返回消息替换列表中相同 clientMsgID 的消息。允许修改的消息类型、发送者和时间范围由服务端校验。 监听消息修改 消息修改时会触发 OnMessageModified ,回调直接携带修改后的 MessageItem 。 function handleMessageModified message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnMessageModified, handleMessageModified ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnMessageModified, handleMessageModified ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "插入本地单聊消息", + "description": "OpenIM React Native SDK 插入本地单聊消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-single-message", + "content": "使用 insertSingleMessageToLocalStorage 将一条消息写入当前设备的单聊记录。 await OpenIMSDK.insertSingleMessageToLocalStorage message, recvID, sendID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要写入的完整消息对象。 | | recvID | string | 是 | 单聊接收方的用户 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | 调用完成后,消息已写入当前设备的单聊记录。需要向对方发送消息时,使用 发送消息 /sdk/react native/message/sending messages/send message 。" + }, + { + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "插入本地群聊消息", + "description": "OpenIM React Native SDK 插入本地群聊消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-group-message", + "content": "使用 insertGroupMessageToLocalStorage 将一条消息写入当前设备的群聊记录。 await OpenIMSDK.insertGroupMessageToLocalStorage message, groupID, sendID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要写入的完整消息对象。 | | groupID | string | 是 | 目标群组 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | 调用完成后,消息已写入当前设备的群聊记录。需要向群成员发送消息时,使用 发送消息 /sdk/react native/message/sending messages/send message 。" + }, + { + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "清理全部本地消息", + "description": "OpenIM React Native SDK 清理全部本地消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-local-messages", + "content": "使用 deleteAllMsgFromLocal 清理当前登录账号在本设备上的全部消息。 await OpenIMSDK.deleteAllMsgFromLocal ; 这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本设备上的全部消息已清理;服务端仍保留历史记录。" + }, + { + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "清理本地与服务端消息", + "description": "OpenIM React Native SDK 清理本地与服务端消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-messages", + "content": "使用 deleteAllMsgFromLocalAndSvr 清理当前登录账号在本地和服务端保存的全部消息。 await OpenIMSDK.deleteAllMsgFromLocalAndSvr ; 这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本地和服务端的清理请求已完成;其他会话成员已保存的消息副本不受影响。" + }, + { + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "设置消息本地扩展", + "description": "OpenIM React Native SDK 设置消息本地扩展。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages set-message-local-ex", + "content": "使用 setMessageLocalEx 为当前设备中的指定消息保存本地扩展数据。 await OpenIMSDK.setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify expanded: true , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 目标消息 ID。 | | localEx | string | 是 | 本地扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展数据。 | 调用完成后,本地扩展数据已保存到当前设备的消息中。" + }, + { + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "上报群消息已读", + "description": "OpenIM React Native SDK 上报群消息已读。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-read-status send-group-read-receipts", + "content": "使用 sendGroupMessageReadReceipt 上报群聊中已读的消息。 await OpenIMSDK.sendGroupMessageReadReceipt conversationID, clientMsgIDs, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgIDs | string | 是 | 已读消息 ID 列表;列表中的消息应属于该群聊会话。 | 调用完成后,已读回执已上报。会话未读数的更新见 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 。 监听群消息已读变化 群消息的已读状态变化时会触发 OnRecvGroupReadReceipt ,回调携带 GroupMessageReceiptInfo ,其中包含 conversationID 和各消息的已读人数、未读人数及已读成员。 function handleGroupReadReceipt payload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "查询群消息已读成员", + "description": "OpenIM React Native SDK 查询群消息已读成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", + "content": "使用 getGroupMessageReaderList 分页查询一条群消息的已读或未读成员。 const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgID | string | 是 | 要查询已读情况的消息 ID。 | | filter | GroupMessageReaderFilter | 是 | 成员筛选条件。 Read 查询已读成员, Unread 查询未读成员。 | | offset | number | 是 | 分页偏移量;首页传 0 。 | | count | number | 是 | 本次查询的成员数量。 | 返回结果 调用后返回当前页的 GroupMemberItem 。成员字段见 群组概览 /sdk/react native/group/overview group ;继续查询时递增 offset 。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 718512bac3..e727903018 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -7414,5 +7414,397 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", "content": "Call changeGroupMemberMute to set a mute duration for a member. Pass 0 to remove the mute. await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member to mute or unmute. | | mutedSeconds | number | Yes | Mute duration in seconds. Pass 0 to remove the mute. | When the call completes, the member mute state is updated. Member profile changes trigger OnGroupMemberInfoChanged ; read muteEndTime from the event parameter to get the mute end time. See Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/message/overview-message", + "title": "Message overview", + "description": "OpenIM React Native SDK guide for message overview.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message overview-message", + "content": "OpenIM React Native SDK represents each message with MessageItem . Creating a message only creates a MessageItem ready to send; to send it to a one to one user or group, call a sending API. Receiving, querying, and state changes such as deletion, revocation, and modification are handled through their respective APIs or events. Message lists use clientMsgID to identify, deduplicate, and update individual messages. MessageItem does not contain conversationID ; obtain the message's conversation from the current conversation, history query parameters, or event context. Message workflow | Stage | Related capability | Description | | | | | | Create | create Message | Creates a MessageItem ready to send. | | Send | sendMessage and sendMessageNotOss | Sends a message to a one to one chat or group chat. | | Receive | New message events | Receives real time, offline, and online only messages. | | Query | Message history, lookup by ID, and search | Reads or locates saved messages by conversation. | | State changes | Revocation, deletion, modification, and read receipts | Updates the message list from call results and the corresponding events. | MessageItem type The message objects returned when creating, sending, receiving, or querying messages are MessageItem . Common public fields include: | Field | Type | Description | | | | | | clientMsgID | string | Client message ID, used to deduplicate, update, and locate messages. | | serverMsgID | string | Server message ID. | | sessionType | SessionType | Conversation type, used to distinguish one to one chats from group chats. | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID for a one to one message. | | groupID | string | Group ID for a group message. | | contentType | MessageType | Message content type, which determines the content field to render. | | createTime | number | Message object creation time. | | sendTime | number | Message send time. | | seq | number | Server message sequence number. | | senderPlatformID | Platform | Client platform that sent the message. | | status | MessageStatus | Message send status. | | isRead | boolean | Read state. | | senderNickname | string | Sender nickname. | | senderFaceUrl | string | Sender avatar URL. | | offlinePush | OfflinePush | Offline push configuration. | | content | string | SDK serialized message content. For rendering, read the content field that corresponds to contentType . | | ex | string | Message extension field. | | localEx | string | Message extension field used only on the current device. | Message content is stored in the MessageItem field that corresponds to contentType : | Content | Field | | | | | Text, rich text, and Markdown | textElem , advancedTextElem , markdownTextElem | | Images, audio, video, and files | pictureElem , soundElem , videoElem , fileElem | | @ messages | atTextElem | | Reply messages | quoteElem | | Merged forwards | mergeElem | | Contact cards, locations, and emoji | cardElem , locationElem , faceElem | | Custom messages | customElem | | Notifications, typing status, and attached status | notificationElem , typingElem , attachedInfoElem | All content fields are optional. A message usually uses only the content field that corresponds to its contentType ; determine contentType before reading that field for rendering. Create and send messages First call the applicable creation API to obtain a MessageItem , then call a sending API. Use Send a message /sdk/react native/message/sending messages/send message when the SDK uploads a local media file; use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss when the media file already has a remote URL. | Content | Page | | | | | Text and rich text | Create a text message /sdk/react native/message/creating messages/create text message , Create a rich text message /sdk/react native/message/creating messages/create advanced text message | | @ messages | Create an @ message /sdk/react native/message/creating messages/create text at message | | Images, audio, video, and files | Create an image message from a file /sdk/react native/message/creating messages/create image message by file , Create an audio message from a file /sdk/react native/message/creating messages/create sound message by file , Create a video message from files /sdk/react native/message/creating messages/create video message by file , Create a file message from a file /sdk/react native/message/creating messages/create file message by file | | Contact cards, locations, and emoji | Create a contact card message /sdk/react native/message/creating messages/create card message , Create a location message /sdk/react native/message/creating messages/create location message , Create an emoji message /sdk/react native/message/creating messages/create face message | | Replies, forwards, and merged forwards | Create a reply message /sdk/react native/message/creating messages/create quote message , Create a forwarded message /sdk/react native/message/creating messages/create forward message , Create a merged forward message /sdk/react native/message/creating messages/create merger message | | Custom messages | Create a custom message /sdk/react native/message/creating messages/create custom message | Browse by task | Task | Page | | | | | Receive real time, offline, and online only messages | Receive messages /sdk/react native/message/receiving messages/receive messages | | Receive custom business messages | Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages | | Load message history or message context | Load message history /sdk/react native/message/retrieving messages/load older messages , Load message context /sdk/react native/message/retrieving messages/load message context | | Find or search messages by ID | Find messages by ID /sdk/react native/message/retrieving messages/find messages by id , Search messages /sdk/react native/message/searching messages/search messages | | Delete, revoke, or modify messages | Delete messages in a batch /sdk/react native/message/managing messages/delete saved messages , Revoke a message /sdk/react native/message/managing messages/revoke a message , Modify a message /sdk/react native/message/managing messages/modify a message | | Manage message data used only on the current device | Delete a local message /sdk/react native/message/managing messages/delete local message , Set a local message extension /sdk/react native/message/managing messages/set message local ex | | Report or query group message read status | Report group messages as read /sdk/react native/message/managing read status/send group read receipts , Get members who read a group message /sdk/react native/message/managing read status/get group message readers | | Report or query typing status | Report typing status /sdk/react native/message/composing messages/update typing status , Get typing status /sdk/react native/message/composing messages/get typing status | | Transcribe audio | Check audio transcription availability /sdk/react native/message/composing messages/check speech to text , Transcribe audio /sdk/react native/message/composing messages/transcribe audio | Event handling Complete event listener examples for message events are available on the following pages: New, offline, and online only messages: OnRecvNewMessage , OnRecvOfflineNewMessage , and OnRecvOnlineOnlyMessage . See Receive messages /sdk/react native/message/receiving messages/receive messages . Custom business messages: OnRecvCustomBusinessMessage . See Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages . Message deletion: OnMsgDeleted . See Delete messages in a batch /sdk/react native/message/managing messages/delete saved messages . Message revocation: OnNewRecvMessageRevoked . See Revoke a message /sdk/react native/message/managing messages/revoke a message . Message modification: OnMessageModified . See Modify a message /sdk/react native/message/managing messages/modify a message . Group message read status: OnRecvGroupReadReceipt . See Report group messages as read /sdk/react native/message/managing read status/send group read receipts . Typing status changes: OnInputStatusChanged . See Update input states /sdk/react native/message/composing messages/change input states ." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "Create a text message", + "description": "OpenIM React Native SDK guide for create a text message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-message", + "content": "Use createTextMessage to create a text message ready to send. const message = await OpenIMSDK.createTextMessage 'Hello, welcome to the discussion.' ; The argument is the message text. The call returns a MessageItem ; pass it as message to Send a message /sdk/react native/message/sending messages/send message ." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "description": "OpenIM React Native SDK guide for create an @ message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-at-message", + "content": "Use createTextAtMessage to create a mention message in a group chat. The mentions in text must correspond to atUserIDList . const message = await OpenIMSDK.createTextAtMessage text: '@user 001 Please confirm the release content.', atUserIDList: 'user 001' , atUsersInfo: atUserID: 'user 001', groupNickname: 'Lee', , , ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Body text of the mention message. | | atUserIDList | string | Yes | User IDs of the mentioned members. | | atUsersInfo | AtUsersInfoItem | No | Display names of mentioned members in the group. | | message | MessageItem | No | An attached message object. | The call returns a MessageItem ready to send. Pass it as message to Send a message /sdk/react native/message/sending messages/send message ." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "description": "OpenIM React Native SDK guide for create a custom message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-custom-message", + "content": "Use createCustomMessage to create a custom business message. The sending and receiving applications must agree on the formats of data and extension . const message = await OpenIMSDK.createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify version: 1 , description: 'Task card', ; Parameters | Parameter | Type | Required | Description | | | | | | | data | string | Yes | Business data string. It can contain JSON. | | extension | string | Yes | Business extension data string. | | description | string | Yes | Message description. It can also be fallback text for clients that do not support the message type. | The call returns a MessageItem ready to send. Receiving clients should validate the business data format and version. For server delivered business notifications, see Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages ." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "Create an image message from a file", + "description": "OpenIM React Native SDK guide for create an image message from a file.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-file", + "content": "Use createImageMessageFromFullPath to create a message from an image stored on the device. const message = await OpenIMSDK.createImageMessageFromFullPath imagePath ; imagePath is the full path to the image on the device. The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local resource." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "description": "OpenIM React Native SDK guide for create an image message from a url.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-url", + "content": "Use createImageMessageByURL to create a message from uploaded image resource information. The source image, large image, and thumbnail can share one resource description or use separate resources with different sizes or quality. const picture = uuid: 'image 001', type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: 'https://www.example.com/picture.png', ; const message = await OpenIMSDK.createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', ; Parameters | Parameter | Type | Required | Description | | | | | | | sourcePicture | PicBaseInfo | Yes | Source image resource information. | | bigPicture | PicBaseInfo | Yes | Large image resource information. | | snapshotPicture | PicBaseInfo | Yes | Thumbnail resource information. | | sourcePath | string | Yes | Local image path. Pass an empty string when only a remote resource is available. | Each PicBaseInfo contains uuid , type , size , width , height , and url : the resource ID, type, byte size, pixel dimensions, and remote URL. The call returns a MessageItem ready to send. Use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss to send it." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "Create an audio message from a file", + "description": "OpenIM React Native SDK guide for create an audio message from a file.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-file", + "content": "Use createSoundMessageFromFullPath to create a message from an audio file on the device. const message = await OpenIMSDK.createSoundMessageFromFullPath soundPath, duration: 18, ; Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Full path to the audio file. | | duration | number | Yes | Audio duration in seconds. | The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local audio resource." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "description": "OpenIM React Native SDK guide for create an audio message from a url.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-url", + "content": "Use createSoundMessageByURL to create a message from uploaded audio resource information. const message = await OpenIMSDK.createSoundMessageByURL uuid: 'audio 001', soundPath: '', sourceUrl: 'https://www.example.com/sound.mp3', dataSize: 54000, duration: 18, soundType: 'audio/mpeg', ; Parameters | Parameter | Type | Required | Description | | | | | | | uuid | string | Yes | Audio resource ID. | | soundPath | string | Yes | Local audio path. Pass an empty string when only a remote resource is available. | | sourceUrl | string | Yes | URL of the uploaded audio. | | dataSize | number | Yes | Audio size in bytes. | | duration | number | Yes | Audio duration in seconds. | | soundType | string | No | Audio type. | The call returns a MessageItem ready to send. Use the actual upload result for resource information, then use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss ." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "Create a video message from files", + "description": "OpenIM React Native SDK guide for create a video message from files.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-file", + "content": "Use createVideoMessageFromFullPath to create a message from a video file and cover image on the device. const message = await OpenIMSDK.createVideoMessageFromFullPath videoPath, videoType: 'video/mp4', duration: 36, snapshotPath, ; Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Full path to the video file. | | videoType | string | Yes | Video type. | | duration | number | Yes | Video duration in seconds. | | snapshotPath | string | Yes | Full path to the video cover image. | The call returns a MessageItem ready to send. Use Send a message /sdk/react native/message/sending messages/send message to upload the local video and cover image." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "description": "OpenIM React Native SDK guide for create a video message from urls.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-url", + "content": "Use createVideoMessageByURL to create a message from uploaded video and cover image resources. const message = await OpenIMSDK.createVideoMessageByURL videoPath: '', duration: 36, videoType: 'video/mp4', videoUUID: 'video 001', videoUrl: 'https://www.example.com/video.mp4', videoSize: 820000, snapshotPath: '', snapshotUUID: 'cover 001', snapshotSize: 42000, snapshotUrl: 'https://www.example.com/snapshot.png', snapshotWidth: 1280, snapshotHeight: 720, snapShotType: 'image/jpeg', ; Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Local video path. Pass an empty string when only a remote resource is available. | | duration | number | Yes | Video duration in seconds. | | videoType | string | Yes | Video type. | | videoUUID , videoUrl , videoSize | string , string , number | Yes | Video resource ID, remote URL, and byte size. | | snapshotPath | string | Yes | Local cover image path. Pass an empty string when only a remote resource is available. | | snapshotUUID , snapshotUrl , snapshotSize | string , string , number | Yes | Cover image resource ID, remote URL, and byte size. | | snapshotWidth , snapshotHeight | number | Yes | Cover image width and height in pixels. | | snapShotType | string | No | Cover image type. | The call returns a MessageItem ready to send. Use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss to send it." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "Create a file message from a file", + "description": "OpenIM React Native SDK guide for create a file message from a file.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-file", + "content": "Use createFileMessageFromFullPath to create a message from a file on the device. const message = await OpenIMSDK.createFileMessageFromFullPath filePath, fileName: 'product guide.pdf', ; Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Full path to the file. | | fileName | string | Yes | File name shown to recipients. | The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local file." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "description": "OpenIM React Native SDK guide for create a file message from a url.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-url", + "content": "Use createFileMessageByURL to create a message from uploaded file resource information. const message = await OpenIMSDK.createFileMessageByURL filePath: '', fileName: 'product guide.pdf', uuid: 'file 001', sourceUrl: 'https://www.example.com/product guide.pdf', fileSize: 256000, fileType: 'application/pdf', ; Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Local file path. Pass an empty string when only a remote resource is available. | | fileName | string | Yes | File name shown to recipients. | | uuid | string | Yes | File resource ID. | | sourceUrl | string | Yes | URL of the uploaded file. | | fileSize | number | Yes | File size in bytes. | | fileType | string | No | File type. | The call returns a MessageItem ready to send. Use the actual upload result for resource information, then use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss ." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "description": "OpenIM React Native SDK guide for create a contact card message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-card-message", + "content": "Use createCardMessage to create a user contact card message. const message = await OpenIMSDK.createCardMessage userID: 'user 002', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', ; Parameters | Parameter | Type | Required | Description | | | | | | | userID | string | Yes | User ID represented by the card. | | nickname | string | Yes | Nickname shown on the card. | | faceURL | string | Yes | Avatar URL shown on the card. | | ex | string | Yes | Card extension data. Pass an empty string when it is not used. | The call returns a MessageItem ready to send. message.cardElem contains the card information passed during creation." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "Create a location message", + "description": "OpenIM React Native SDK guide for create a location message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-location-message", + "content": "Use createLocationMessage to create a location message. const message = await OpenIMSDK.createLocationMessage description: 'Pudong New Area, Shanghai', longitude: 121.4737, latitude: 31.2304, ; Parameters | Parameter | Type | Required | Description | | | | | | | description | string | Yes | Location name or address description. | | longitude | number | Yes | Longitude. | | latitude | number | Yes | Latitude. | The call returns a MessageItem ready to send." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "description": "OpenIM React Native SDK guide for create an emoji message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-face-message", + "content": "Use createFaceMessage to create an emoji message defined by your application. const message = await OpenIMSDK.createFaceMessage index: 12, data: JSON.stringify url: 'https://www.example.com/emoji.png', , ; index is an emoji index agreed by both clients. data is a custom format string agreed by the sending and receiving clients. Use it to provide emoji identification or rendering information, such as an image URL, a fixed key, or other business data. The call returns a MessageItem ready to send." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "description": "OpenIM React Native SDK guide for create a reply message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-quote-message", + "content": "Use createQuoteMessage to create a reply message with the complete original message object. const message = await OpenIMSDK.createQuoteMessage text: 'I agree with this approach.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Reply text. | | message | MessageItem | Yes | Original message being replied to. | The call returns a new MessageItem ready to send. When rendering replies, handle the case where the original message has been deleted or cannot be displayed." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "description": "OpenIM React Native SDK guide for create a markdown message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-markdown-message", + "content": "Use createMarkdownMessage to create a Markdown message. const message = await OpenIMSDK.createMarkdownMessage ' Release complete\\n\\n Android\\n iOS', ; The argument is the complete Markdown source text. createMarkdownMessage only creates the message; it does not render or sanitize Markdown. The call returns a MessageItem ready to send. When displaying untrusted Markdown, use a Markdown renderer with appropriate security controls." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "description": "OpenIM React Native SDK guide for create a forwarded message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-forward-message", + "content": "Use createForwardMessage to create a forwarded message from an existing message. const message = await OpenIMSDK.createForwardMessage sourceMessage ; sourceMessage must be a complete MessageItem . The call returns a new MessageItem ready to send to a direct or group chat." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "description": "OpenIM React Native SDK guide for create a merged forward message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-merger-message", + "content": "Use createMergerMessage to create a merged forwarded message containing multiple messages. const message = await OpenIMSDK.createMergerMessage messageList: selectedMessages, title: 'Project discussion', summaryList: 'Alex: The release plan is confirmed', 'Lee: I will follow up on testing' , ; Parameters | Parameter | Type | Required | Description | | | | | | | messageList | MessageItem | Yes | Messages to merge. | | title | string | Yes | Title of the merged message. | | summaryList | string | Yes | Summary lines shown for the merged message. | The call returns a MessageItem ready to send. Summary content should follow the display and privacy rules of the current conversation." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "Create a rich-text message", + "description": "OpenIM React Native SDK guide for create a rich-text message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-text-message", + "content": "Use createAdvancedTextMessage to create a rich text message with message entities. const message = await OpenIMSDK.createAdvancedTextMessage text: 'See https://openim.io', messageEntityList: type: 'url', offset: 4, length: 17, url: 'https://openim.io', , , ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw rich text content. | | messageEntityList | MessageEntity | No | Entities in the text. | Each MessageEntity contains type , offset , and length , with optional url and info . The call returns a MessageItem ready to send. Use Send a message /sdk/react native/message/sending messages/send message to send it." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "Create a rich-text reply", + "description": "OpenIM React Native SDK guide for create a rich-text reply.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", + "content": "Use createAdvancedQuoteMessage to create a rich text reply with an original message reference and text entities. const message = await OpenIMSDK.createAdvancedQuoteMessage text: 'I have reviewed the related link.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw reply text. | | message | MessageItem | Yes | Original message being replied to. | | messageEntityList | MessageEntity | No | Entities in the text. | MessageEntity uses type , offset , and length to describe an entity, with optional url and info . The call returns a MessageItem ready to send." + }, + { + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "Create a targeted group message", + "description": "OpenIM React Native SDK guide for create a targeted group message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", + "content": "Use createTargetedGroupMessage to create a message object delivered only to selected group members. const textMessage = await OpenIMSDK.createTextMessage 'Please review this, relevant members.' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Message object to send selectively. | | dstUserIDs | string | Yes | User IDs of group members who receive the message. | The call returns a MessageItem ready to send. Pass the target group in groupID and use Send a message /sdk/react native/message/sending messages/send message to deliver it." + }, + { + "path": "/sdk/react-native/message/sending-messages/send-message", + "title": "Send a message", + "description": "OpenIM React Native SDK guide for send a message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message", + "content": "Call sendMessage to send the MessageItem returned by a message creation API. For a direct chat, set recvID ; for a group chat, set groupID . When messages are created from local image, audio, video, or file paths, the SDK uploads the resources during sending. For media messages created with remote URLs, use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss . const sentMessage = await OpenIMSDK.sendMessage recvID: receiverUserID, groupID: '', message, ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | | message | MessageItem | Yes | Message to send. | | offlinePushInfo | OfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. | The call returns the sent MessageItem . When sending progress is available, SendMessageProgress is emitted with progress and message : function handleSendMessageProgress info // ... // Set the listener OpenIMSDK.on OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; // Remove the listener OpenIMSDK.off OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "description": "OpenIM React Native SDK guide for send an uploaded media message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message-not-oss", + "content": "Call sendMessageNotOss to send an image, audio, video, or file message that already contains remote resource URLs. The SDK does not upload these resources again. const sentMessage = await OpenIMSDK.sendMessageNotOss recvID: receiverUserID, groupID: '', message: uploadedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | | message | MessageItem | Yes | Message created by a URL based message creation API. | | offlinePushInfo | OfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. | The call returns the sent MessageItem . Resource URLs, sizes, types, and dimensions in message should come from the actual upload result. For local path media messages, use Send a message /sdk/react native/message/sending messages/send message ." + }, + { + "path": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "Receive messages", + "description": "OpenIM React Native SDK guide for receive messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-messages", + "content": "When a new message arrives, OnRecvNewMessage is emitted with one MessageItem . Offline and online only messages are delivered through OnRecvOfflineNewMessage and OnRecvOnlineOnlyMessage ; all three callbacks receive a MessageItem directly. function handleNewMessage message // ... function handleOfflineMessage message // ... function handleOnlineOnlyMessage message // ... // Set the listeners OpenIMSDK.on OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; // Remove the listeners OpenIMSDK.off OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; Use clientMsgID to identify messages. Remove the listeners when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "description": "OpenIM React Native SDK guide for receive custom business messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-custom-business-messages", + "content": "When the server sends a custom business notification, OnRecvCustomBusinessMessage is emitted. Its callback receives business data, not a MessageItem ; ordinary custom chat messages are delivered through the new message events in Receive messages /sdk/react native/message/receiving messages/receive messages . function handleCustomBusinessMessage data // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; Validate the received data against your business protocol before processing it. Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "description": "OpenIM React Native SDK guide for load message history.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-older-messages", + "content": "Use getAdvancedHistoryMessageList to page through older messages in a conversation. Pass an empty string for startClientMsgID on the first page, then pass the clientMsgID of the oldest loaded message. const page = await OpenIMSDK.getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, viewType: ViewType.History, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is loaded. | | startClientMsgID | string | Yes | Pagination anchor; pass an empty string for the first page. | | count | number | Yes | Number of messages to load. | | viewType | ViewType | Yes | Use ViewType.History when browsing message history. | Return value The call returns AdvancedGetMessageResult : | Field | Type | Description | | | | | | messageList | MessageItem | Messages on the current page. | | isEnd | boolean | Whether the older boundary has been reached. | | errCode | number | Status code for this history request. | | errMsg | string | Description corresponding to errCode . | Deduplicate messages by clientMsgID before adding messageList to the conversation." + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "Load message history in reverse", + "description": "OpenIM React Native SDK guide for load message history in reverse.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-newer-messages", + "content": "Use getAdvancedHistoryMessageListReverse to load history in the newer direction from a message anchor. const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse conversationID, startClientMsgID: anchorMessage.clientMsgID, count: 30, viewType: ViewType.History, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is loaded. | | startClientMsgID | string | Yes | Message ID used as the newer direction anchor. | | count | number | Yes | Number of messages to load. | | viewType | ViewType | Yes | Use ViewType.History when browsing message history. | The call returns AdvancedGetMessageResult ; messageList contains the current page and isEnd indicates whether the newer boundary has been reached. See Load message history /sdk/react native/message/retrieving messages/load older messages for the other result fields." + }, + { + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "description": "OpenIM React Native SDK guide for find messages by id.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages find-messages-by-id", + "content": "Use findMessageList to find messages by conversation ID and message ID. It is useful when navigating to a known message from a search result, quote, or notification. const result = await OpenIMSDK.findMessageList conversationID, clientMsgIDList: clientMsgID , , ; const targetMessage = result.findResultItems?. 0 ?.messageList 0 ; Parameters findMessageList receives an array of query conditions. Each item contains: | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the target messages. | | clientMsgIDList | string | Yes | Message IDs to find. | Return value The call returns SearchMessageResult ; ID based results are in findResultItems . Each result item contains conversationID and messageList . A missing message may produce an empty result item or message list. See Search messages /sdk/react native/message/searching messages/search messages for the complete result structure." + }, + { + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "Load message context", + "description": "OpenIM React Native SDK guide for load message context.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-message-context", + "content": "Use fetchSurroundingMessages to load messages before and after a known message, such as when opening a result from search or a reply. const messageList = await OpenIMSDK.fetchSurroundingMessages startMessage: targetMessage, viewType: ViewType.Search, before: 20, after: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | | startMessage | MessageItem | Yes | Retrieved anchor message. | | viewType | ViewType | Yes | Context view type; use ViewType.Search for a search result. | | before | number | Yes | Maximum messages to load before the anchor. | | after | number | Yes | Maximum messages to load after the anchor. | The call returns messageList , where messageList contains the retrieved surrounding MessageItem . The number of messages may be less than before + after near a boundary or when messages have been deleted." + }, + { + "path": "/sdk/react-native/message/searching-messages/search-messages", + "title": "Search messages", + "description": "OpenIM React Native SDK guide for search messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message searching-messages search-messages", + "content": "Use searchLocalMessages to search messages already synchronized to the current account's local store. const result = await OpenIMSDK.searchLocalMessages conversationID, keywordList: 'release' , messageTypeList: MessageType.TextMessage , pageIndex: 1, count: 20, ; Parameters keywordList can contain one or more keywords. A search field typically supplies one keyword after trimming surrounding whitespace and removing empty values. | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation to search. | | keywordList | string | Yes | Keywords to search for. | | keywordListMatchType | number | No | Match mode for multiple keywords: 0 matches any keyword OR , and 1 requires all keywords AND . Omitted values use 0 . | | senderUserIDList | string | No | Restrict results to messages sent by these users. | | messageTypeList | MessageType | No | Restrict results to the specified message types, such as text and mention messages. | | searchTimePosition | number | No | Search end position as a Unix timestamp in seconds. | | searchTimePeriod | number | No | Search range backward from searchTimePosition , in seconds. | | pageIndex | number | No | Result page, starting at 1 . | | count | number | No | Number of messages per page. | Return value The call returns SearchMessageResult : | Field | Type | Description | | | | | | totalCount | number | Number of messages matching the current conditions. | | searchResultItems | SearchMessageResultItem | Results organized by conversation. | Each SearchMessageResultItem contains conversation information and messageList . When keywords or filters change, restart from page one so results from different conditions are not mixed. To load messages around a hit, see Load message context /sdk/react native/message/retrieving messages/load message context ." + }, + { + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "Report typing status", + "description": "OpenIM React Native SDK guide for report typing status.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages update-typing-status", + "content": "Use typingStatusUpdate to send a typing hint to the other participant in a direct chat. await OpenIMSDK.typingStatusUpdate recvID: receiverUserID, msgTip: 'Typing...', ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Yes | User ID receiving the typing hint. | | msgTip | string | Yes | Typing hint text to send. | After the call completes, the typing hint has been sent. To update the current account's input state based on conversation focus, use Update input states /sdk/react native/message/composing messages/change input states ." + }, + { + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "Get typing status", + "description": "OpenIM React Native SDK guide for get typing status.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages get-typing-status", + "content": "Use getInputStates to query a user's current input state in a conversation. const platformIDs = await OpenIMSDK.getInputStates conversationID, userID, ; const isTyping = platformIDs.length 0; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Target conversation ID. | | userID | string | Yes | User ID whose input state is queried. | The call returns an array of platform IDs currently reporting input. An empty array means that no platform is currently reporting input. To keep the display current, handle the OnInputStatusChanged event described in Update input states /sdk/react native/message/composing messages/change input states ." + }, + { + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "description": "OpenIM React Native SDK guide for check audio transcription availability.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages check-speech-to-text", + "content": "speechToTextCapabilities is used only to query supported audio formats, sample rates, recording duration, and file size limits. The interface that actually performs speech recognition is Transcribe audio /sdk/react native/message/composing messages/transcribe audio . const capabilities = await OpenIMSDK.speechToTextCapabilities ; Return value The call returns SpeechToTextCapabilities : | Field | Type | Description | | | | | | format | string | Supported audio formats. | | sampleRateHz | number | Required audio sample rate in hertz. | | maxRecordTimeMs | number | Maximum recording duration in milliseconds. | | maxFileSize | number | Maximum file size in bytes. | | provider | string | Current speech recognition provider. |" + }, + { + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "description": "OpenIM React Native SDK guide for transcribe audio.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages transcribe-audio", + "content": "Use speechToText to transcribe a local audio file that the SDK can read. Pass a local path, not a remote URL, Base64 data, or an uploaded file name. const text = await OpenIMSDK.speechToText filename ; filename is the local audio file path. The call returns text , where text is the transcription. See Check speech recognition support /sdk/react native/message/composing messages/check speech to text when capability information is needed; to save the result in a local voice message, see Save a local transcript /sdk/react native/message/composing messages/save local transcript ." + }, + { + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "description": "OpenIM React Native SDK guide for save a local transcript.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages save-local-transcript", + "content": "Use setMessageLocalContent to save transcription text in a voice message on the current device. Pass the complete message object and preserve its existing fields. const updatedMessage = ...message, soundElem: ...message.soundElem, text: text: transcript, translate: message.soundElem?.text?.translate ?? , , , ; await OpenIMSDK.setMessageLocalContent conversationID, message: updatedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | MessageItem | Yes | Complete message object containing the transcription. | After the call completes, the transcription is saved in the message content on the current device." + }, + { + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "Update input states", + "description": "OpenIM React Native SDK guide for update input states.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages change-input-states", + "content": "Use changeInputStates to update the current account's input state in a conversation. Pass focus: true while typing, and false after sending, losing focus, or leaving the conversation. await OpenIMSDK.changeInputStates conversationID, focus: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose input state is updated. | | focus | boolean | Yes | true means the user is typing; false means typing has stopped. | Avoid reporting the same state on every keyboard event. When the state changes, OnInputStatusChanged is emitted with conversationID , userID , and platformIDs . function handleInputStatusChanged inputStatus // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "description": "OpenIM React Native SDK guide for delete a local message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-local-message", + "content": "Use deleteMessageFromLocalStorage to delete one message from a conversation on the current device. await OpenIMSDK.deleteMessageFromLocalStorage conversationID, clientMsgID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | ID of the message to delete. | After the call completes, the target message is deleted on the current device." + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "description": "OpenIM React Native SDK guide for delete messages in a batch.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-saved-messages", + "content": "Use deleteMessages to delete multiple messages from one conversation. await OpenIMSDK.deleteMessages conversationID, clientMsgIDs, isSync: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the messages. | | clientMsgIDs | string | Yes | IDs of the messages to delete; all must belong to the same conversation. | | isSync | boolean | Yes | Whether to synchronize deletion to the other participant. true deletes the messages for both participants; false deletes them only for the current account. In either case, the deletion is synchronized to the current account's other devices. | After the call completes, the deletion request has completed. With isSync: true , the other participant also deletes the messages; with false , only the current account deletes them. Listen for message deletion When messages are deleted, OnMsgDeleted is emitted with the deleted MessageItem . Use clientMsgID to update the corresponding message list. function handleMessageDeleted message // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "description": "OpenIM React Native SDK guide for delete all messages from a user in a group chat.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-user-messages", + "content": "Use deleteUserAllMessagesInConv to delete all messages from a specified user in a group conversation. await OpenIMSDK.deleteUserAllMessagesInConv conversationID, userID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Target group conversation ID. | | userID | string | Yes | User whose messages are deleted. | This is a group management operation. After it completes, the deletion request has completed; the server validates permissions. Listen for deletion of a user's messages After deletion, OnDeleteUserAllMsgsInConv is emitted with conversationID and userID . Use them to remove that user's messages from the target conversation. function handleUserMessagesDeleted data // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "description": "OpenIM React Native SDK guide for revoke a message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages revoke-a-message", + "content": "Use revokeMessage to revoke a sent message. Conversation members then see the message's revoked state. await OpenIMSDK.revokeMessage conversationID, clientMsgID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | ID of the message to revoke. | After the call completes, the revocation request has completed. The server validates which messages, senders, and time ranges are eligible. Listen for message revocation When a message is revoked, OnNewRecvMessageRevoked is emitted with RevokedInfo . Use its clientMsgID to update the message's revoked state. function handleMessageRevoked revokedInfo // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; Remove the listener when the component is destroyed, the account signs out, or the account changes. To remove a message only from the current device, use Delete a local message /sdk/react native/message/managing messages/delete local message ." + }, + { + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "Modify a message", + "description": "OpenIM React Native SDK guide for modify a message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages modify-a-message", + "content": "Use modifyMessage to modify an existing message in a conversation. const updatedMessage = ...message, textElem: ...message.textElem, content: editedText, , ; const modifiedMessage = await OpenIMSDK.modifyMessage conversationID, message: updatedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | MessageItem | Yes | Complete modified message. Preserve its original clientMsgID and other required fields. | Return value The call returns the server confirmed MessageItem . You can replace the message with the same clientMsgID in your list. The server validates permitted message types, senders, and time limits. Listen for message modification When a message is modified, OnMessageModified is emitted with the modified MessageItem directly. function handleMessageModified message // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnMessageModified, handleMessageModified ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnMessageModified, handleMessageModified ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "description": "OpenIM React Native SDK guide for insert a local one-to-one message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-single-message", + "content": "Use insertSingleMessageToLocalStorage to write one message to the current device's direct chat history. await OpenIMSDK.insertSingleMessageToLocalStorage message, recvID, sendID, ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Complete message object to write. | | recvID | string | Yes | Direct chat recipient user ID. | | sendID | string | Yes | Message sender user ID. | After the call completes, the message is written to the current device's direct chat history. To send it to the other participant, use Send a message /sdk/react native/message/sending messages/send message ." + }, + { + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "description": "OpenIM React Native SDK guide for insert a local group message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-group-message", + "content": "Use insertGroupMessageToLocalStorage to write one message to the current device's group chat history. await OpenIMSDK.insertGroupMessageToLocalStorage message, groupID, sendID, ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Complete message object to write. | | groupID | string | Yes | Target group ID. | | sendID | string | Yes | Message sender user ID. | After the call completes, the message is written to the current device's group chat history. To send a message to group members, use Send a message /sdk/react native/message/sending messages/send message ." + }, + { + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "description": "OpenIM React Native SDK guide for clear all local messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-local-messages", + "content": "Use deleteAllMsgFromLocal to clear all messages for the current account on the current device. await OpenIMSDK.deleteAllMsgFromLocal ; This account level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, all messages on the current device are cleared; server history remains available." + }, + { + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "description": "OpenIM React Native SDK guide for clear local and server messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-messages", + "content": "Use deleteAllMsgFromLocalAndSvr to clear all messages saved for the current account locally and on the server. await OpenIMSDK.deleteAllMsgFromLocalAndSvr ; This account level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, local and server deletion requests have completed; copies already saved by other conversation members are not affected." + }, + { + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "description": "OpenIM React Native SDK guide for set a local message extension.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-messages set-message-local-ex", + "content": "Use setMessageLocalEx to save local extension data for a message on the current device. await OpenIMSDK.setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify expanded: true , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | Target message ID. | | localEx | string | Yes | Local extension string. It can contain JSON or another format of business extension data. | After the call completes, the local extension data is saved in the message on the current device." + }, + { + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "description": "OpenIM React Native SDK guide for report group messages as read.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-read-status send-group-read-receipts", + "content": "Use sendGroupMessageReadReceipt to report messages read in a group chat. await OpenIMSDK.sendGroupMessageReadReceipt conversationID, clientMsgIDs, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgIDs | string | Yes | IDs of messages that were read; all must belong to the group conversation. | After the call completes, the read receipt has been reported. To update the conversation unread count, see Mark a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read . Listen for group read status changes When group message read status changes, OnRecvGroupReadReceipt is emitted with GroupMessageReceiptInfo , including conversationID , read and unread counts, and readers for each message. function handleGroupReadReceipt payload // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + }, + { + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "description": "OpenIM React Native SDK guide for get members who read a group message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", + "content": "Use getGroupMessageReaderList to page through members who have or have not read a group message. const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgID | string | Yes | Message ID whose read status is queried. | | filter | GroupMessageReaderFilter | Yes | Member filter. Read returns readers and Unread returns members who have not read the message. | | offset | number | Yes | Pagination offset; use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | The call returns the current page as GroupMemberItem . See Group overview /sdk/react native/group/overview group for member fields; increase offset for subsequent pages." } ] From 163ccf21bed6ce12118e438abffad5c7846fb9ea Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Thu, 27 Aug 2026 18:16:52 +0800 Subject: [PATCH 05/15] fix(react-native): correct quoted frontmatter descriptions --- .../managing-conversation-groups/get-conversation-groups.mdx | 2 +- .../managing-conversations/clear-conversation-messages.mdx | 2 +- .../delete-conversation-with-messages.mdx | 2 +- .../managing-conversations/get-total-unread-count.mdx | 2 +- .../conversation/managing-conversations/hide-a-conversation.mdx | 2 +- .../retrieving-conversations/retrieve-conversation-list.mdx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx index 524a174a4d..08b867995c 100644 --- a/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -1,6 +1,6 @@ --- title: 'Get conversation groups' -description: 'Query the current account's conversation groups by type.' +description: "Query the current account's conversation groups by type." product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx index 2b90554af1..efb0f0f614 100644 --- a/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx @@ -1,6 +1,6 @@ --- title: 'Clear messages in a conversation' -description: 'Clear the current account's messages in a conversation without deleting the conversation.' +description: "Clear the current account's messages in a conversation without deleting the conversation." product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx index e1eeaa0408..0b11138056 100644 --- a/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -1,6 +1,6 @@ --- title: 'Delete a conversation and its messages' -description: 'Delete a conversation and the current account's messages in it.' +description: "Delete a conversation and the current account's messages in it." product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx index fb7bb6c522..cd6e26d3af 100644 --- a/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx @@ -1,6 +1,6 @@ --- title: 'Track the total unread count' -description: 'Get the total unread message count across the current account's conversations.' +description: "Get the total unread message count across the current account's conversations." product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' diff --git a/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx b/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx index 2e59120faf..a7ce082821 100644 --- a/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx +++ b/content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx @@ -1,6 +1,6 @@ --- title: 'Hide a conversation' -description: 'Hide a conversation from the current account's conversation list.' +description: "Hide a conversation from the current account's conversation list." product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' diff --git a/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx index 174f6a3958..4d7cc26d2f 100644 --- a/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx +++ b/content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -1,6 +1,6 @@ --- title: 'Retrieve the conversation list' -description: 'Retrieve the current user's conversation list with pagination.' +description: "Retrieve the current user's conversation list with pagination." product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' From 59f2f47c93ff7caca93f30c78aa332b4ed8a7708 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Thu, 27 Aug 2026 19:14:15 +0800 Subject: [PATCH 06/15] docs(react-native): add file-uploads documentation --- .../react-native/file-uploads/upload-file.mdx | 59 +++++++++++++++++++ .../react-native/file-uploads/upload-file.mdx | 59 +++++++++++++++++++ data/structure/chat-pages.json | 8 +++ .../structure/react-native-content-audit.json | 48 +++++++++++++++ .../react-native-navigation-labels.json | 1 + data/structure/react-native-sidebar.json | 4 ++ src/generated/navigation.json | 12 +++- .../react-native-sdk-zh-content.json | 26 +++++++- src/generated/routes.json | 18 ++++++ src/generated/search-index-zh.json | 8 +++ src/generated/search-index.json | 8 +++ 11 files changed, 247 insertions(+), 4 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/file-uploads/upload-file.mdx diff --git a/content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx b/content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx new file mode 100644 index 0000000000..2cbdcf5936 --- /dev/null +++ b/content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx @@ -0,0 +1,59 @@ +--- +title: 'Upload a file' +description: 'Upload a file independently and obtain its remote URL with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/file-uploads/upload-file' +--- + +Use `uploadFile()` to upload a local file independently. You can use it for avatars, group avatars, profile attachments, or other business files. + +```ts +const { url } = await OpenIMSDK.uploadFile({ + name: 'avatar.png', + contentType: 'image/png', + uuid: 'avatar-upload-20260827', + cause: 'user-avatar', + filepath, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `name` | `string` | Yes | The file name used for the upload. | +| `contentType` | `string` | Yes | The MIME type of the file. | +| `uuid` | `string` | Yes | The business identifier for this upload. | +| `cause` | `string` | No | The business-defined reason for the upload. | +| `filepath` | `string` | Yes | A local file path that the app can read. | + +When the call completes, it returns the remote resource URL in `url`. You can use the URL to update an avatar, store a business attachment, or create and send a URL-based media message. + +## Listen for upload status + +`UploadOnProgress` is triggered during the upload. Its callback parameter includes the uploaded amount in `current` and the total file size in `size`. `UploadComplete` is triggered when the upload completes. Its callback parameter's `data` includes `fileSize`, `streamSize`, and `storageSize`. + +```ts +function handleUploadProgress({ current, size }) { + // ... +} + +function handleUploadComplete({ data }) { + // ... +} + +// Register listeners +OpenIMSDK.on(OpenIMEvent.UploadOnProgress, handleUploadProgress); +OpenIMSDK.on(OpenIMEvent.UploadComplete, handleUploadComplete); + +// Remove listeners +OpenIMSDK.off(OpenIMEvent.UploadOnProgress, handleUploadProgress); +OpenIMSDK.off(OpenIMEvent.UploadComplete, handleUploadComplete); +``` + +Remove the listeners when the component is destroyed, the user signs out, or the account changes. diff --git a/content/zh/docs/chat/sdk/react-native/file-uploads/upload-file.mdx b/content/zh/docs/chat/sdk/react-native/file-uploads/upload-file.mdx new file mode 100644 index 0000000000..7cd444aa91 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/file-uploads/upload-file.mdx @@ -0,0 +1,59 @@ +--- +title: '上传文件' +description: '使用 OpenIM React Native SDK 独立上传文件并获取远端资源 URL。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/file-uploads/upload-file' +--- + +`uploadFile()` 用于独立上传本地文件,可用于头像、群头像、资料附件或其他业务文件。 + +```ts +const { url } = await OpenIMSDK.uploadFile({ + name: 'avatar.png', + contentType: 'image/png', + uuid: 'avatar-upload-20260827', + cause: 'user-avatar', + filepath, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `name` | `string` | 是 | 上传使用的文件名。 | +| `contentType` | `string` | 是 | 文件的 MIME 类型。 | +| `uuid` | `string` | 是 | 本次上传的业务标识。 | +| `cause` | `string` | 否 | 业务约定的上传原因。 | +| `filepath` | `string` | 是 | 应用可读取的本地文件路径。 | + +调用完成后返回远端资源地址 `url`。可将该地址用于更新头像、保存业务附件,或创建 URL 类型的媒体消息后再发送。 + +## 监听上传状态 + +上传过程中触发 `UploadOnProgress` 事件,回调参数包含当前已上传量 `current` 和文件总量 `size`。上传完成时触发 `UploadComplete` 事件,回调参数的 `data` 包含 `fileSize`、`streamSize` 和 `storageSize`。 + +```ts +function handleUploadProgress({ current, size }) { + // ... +} + +function handleUploadComplete({ data }) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.UploadOnProgress, handleUploadProgress); +OpenIMSDK.on(OpenIMEvent.UploadComplete, handleUploadComplete); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.UploadOnProgress, handleUploadProgress); +OpenIMSDK.off(OpenIMEvent.UploadComplete, handleUploadComplete); +``` + +组件销毁、退出登录或切换账号时,应取消监听。 diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index 22d32495dc..67dc80610d 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -7806,5 +7806,13 @@ "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx" + }, + { + "sourcePath": "/sdk/react-native/file-uploads/upload-file", + "openimPath": "/sdk/react-native/file-uploads/upload-file", + "title": "Upload a file", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx" } ] diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index cd72104e51..758480c486 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -6337,6 +6337,54 @@ "2026-08-26:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." ] + }, + { + "currentPath": "/sdk/react-native/file-uploads/upload-file", + "targetPath": "/sdk/react-native/file-uploads/upload-file", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "sdkMethods": [ + "uploadFile" + ], + "sdkEvents": [ + "UploadOnProgress", + "UploadComplete" + ], + "locales": { + "zh": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex", + "reviewedAt": "2026-08-27", + "exampleVerification": { + "status": "verified", + "evidence": [ + "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" + ], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-27:已按 React Native SDK 固定提交核对 uploadFile、UploadFileParams、UploadOnProgress、UploadComplete 及页面示例。", + "2026-08-27:英文页面已根据审核后的中文内容翻译,并按 React Native SDK 声明核对。" + ] } ] } diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json index 6ef82c4f7b..aa6dbc84e5 100644 --- a/data/structure/react-native-navigation-labels.json +++ b/data/structure/react-native-navigation-labels.json @@ -87,6 +87,7 @@ "Set group member extra data": "设置群成员扩展字段", "Transfer group ownership": "转让群主", "Mute or unmute a group member": "设置群成员禁言", + "Upload a file": "上传文件", "Conversation": "会话", "Retrieving conversations": "获取会话", "Conversation organization": "会话管理", diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index 35f109aec4..e2847c6de4 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -737,6 +737,10 @@ ] } ] + }, + { + "path": "/sdk/react-native/file-uploads/upload-file", + "navigationTitle": "Upload a file" } ] } diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 8398f37928..4e749fc8b8 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -11745,9 +11745,19 @@ } ], "minIndex": 612 + }, + { + "id": "file-uploads/upload-file", + "segment": "upload-file", + "title": "Upload a file", + "href": "/sdk/react-native/file-uploads/upload-file", + "type": "page", + "children": [], + "minIndex": 661, + "navigationTitle": "Upload a file" } ], - "pageCount": 142, + "pageCount": 143, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index 161c6fe7c5..b279d3f2d0 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,8 +1,8 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 142, - "manualPageCount": 142, + "pageCount": 143, + "manualPageCount": 143, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", @@ -146,7 +146,8 @@ "/sdk/react-native/message/managing-messages/clear-all-messages": "published", "/sdk/react-native/message/managing-messages/set-message-local-ex": "published", "/sdk/react-native/message/managing-read-status/send-group-read-receipts": "published", - "/sdk/react-native/message/managing-read-status/get-group-message-readers": "published" + "/sdk/react-native/message/managing-read-status/get-group-message-readers": "published", + "/sdk/react-native/file-uploads/upload-file": "published" }, "navigationLabels": { "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", @@ -237,6 +238,7 @@ "Set group member extra data": "设置群成员扩展字段", "Transfer group ownership": "转让群主", "Mute or unmute a group member": "设置群成员禁言", + "Upload a file": "上传文件", "Conversation": "会话", "Retrieving conversations": "获取会话", "Conversation organization": "会话管理", @@ -2517,6 +2519,24 @@ ], "sourcePath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", "title": "查询群消息已读成员" + }, + "/sdk/react-native/file-uploads/upload-file": { + "body": "`uploadFile()` 用于独立上传本地文件,可用于头像、群头像、资料附件或其他业务文件。\n\n```ts\nconst { url } = await OpenIMSDK.uploadFile({\n name: 'avatar.png',\n contentType: 'image/png',\n uuid: 'avatar-upload-20260827',\n cause: 'user-avatar',\n filepath,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `name` | `string` | 是 | 上传使用的文件名。 |\n| `contentType` | `string` | 是 | 文件的 MIME 类型。 |\n| `uuid` | `string` | 是 | 本次上传的业务标识。 |\n| `cause` | `string` | 否 | 业务约定的上传原因。 |\n| `filepath` | `string` | 是 | 应用可读取的本地文件路径。 |\n\n调用完成后返回远端资源地址 `url`。可将该地址用于更新头像、保存业务附件,或创建 URL 类型的媒体消息后再发送。\n\n## 监听上传状态\n\n上传过程中触发 `UploadOnProgress` 事件,回调参数包含当前已上传量 `current` 和文件总量 `size`。上传完成时触发 `UploadComplete` 事件,回调参数的 `data` 包含 `fileSize`、`streamSize` 和 `storageSize`。\n\n```ts\nfunction handleUploadProgress({ current, size }) {\n // ...\n}\n\nfunction handleUploadComplete({ data }) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.UploadOnProgress, handleUploadProgress);\nOpenIMSDK.on(OpenIMEvent.UploadComplete, handleUploadComplete);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.UploadOnProgress, handleUploadProgress);\nOpenIMSDK.off(OpenIMEvent.UploadComplete, handleUploadComplete);\n```\n\n组件销毁、退出登录或切换账号时,应取消监听。", + "description": "使用 OpenIM React Native SDK 独立上传文件并获取远端资源 URL。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听上传状态", + "url": "#监听上传状态" + } + ], + "sourcePath": "/sdk/react-native/file-uploads/upload-file", + "title": "上传文件" } } } diff --git a/src/generated/routes.json b/src/generated/routes.json index 5d3b698354..8bdc771ed9 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -17639,5 +17639,23 @@ "sourceIndex": 3851, "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx", "navOrder": 660 + }, + { + "id": 2482, + "path": "/sdk/react-native/file-uploads/upload-file", + "relativePath": "sdk/react-native/file-uploads/upload-file", + "sourcePath": "/sdk/react-native/file-uploads/upload-file", + "title": "Upload a file", + "description": "Upload a file with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3852, + "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx", + "navOrder": 661 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 45f00525aa..0fba22aa84 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -7806,5 +7806,13 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", "content": "使用 getGroupMessageReaderList 分页查询一条群消息的已读或未读成员。 const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgID | string | 是 | 要查询已读情况的消息 ID。 | | filter | GroupMessageReaderFilter | 是 | 成员筛选条件。 Read 查询已读成员, Unread 查询未读成员。 | | offset | number | 是 | 分页偏移量;首页传 0 。 | | count | number | 是 | 本次查询的成员数量。 | 返回结果 调用后返回当前页的 GroupMemberItem 。成员字段见 群组概览 /sdk/react native/group/overview group ;继续查询时递增 offset 。" + }, + { + "path": "/sdk/react-native/file-uploads/upload-file", + "title": "上传文件", + "description": "使用 OpenIM React Native SDK 独立上传文件并获取远端资源 URL。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", + "content": "uploadFile 用于独立上传本地文件,可用于头像、群头像、资料附件或其他业务文件。 const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 上传使用的文件名。 | | contentType | string | 是 | 文件的 MIME 类型。 | | uuid | string | 是 | 本次上传的业务标识。 | | cause | string | 否 | 业务约定的上传原因。 | | filepath | string | 是 | 应用可读取的本地文件路径。 | 调用完成后返回远端资源地址 url 。可将该地址用于更新头像、保存业务附件,或创建 URL 类型的媒体消息后再发送。 监听上传状态 上传过程中触发 UploadOnProgress 事件,回调参数包含当前已上传量 current 和文件总量 size 。上传完成时触发 UploadComplete 事件,回调参数的 data 包含 fileSize 、 streamSize 和 storageSize 。 function handleUploadProgress current, size // ... function handleUploadComplete data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // 取消监听 OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; 组件销毁、退出登录或切换账号时,应取消监听。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index e727903018..c358e613d8 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -7806,5 +7806,13 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", "content": "Use getGroupMessageReaderList to page through members who have or have not read a group message. const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgID | string | Yes | Message ID whose read status is queried. | | filter | GroupMessageReaderFilter | Yes | Member filter. Read returns readers and Unread returns members who have not read the message. | | offset | number | Yes | Pagination offset; use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | The call returns the current page as GroupMemberItem . See Group overview /sdk/react native/group/overview group for member fields; increase offset for subsequent pages." + }, + { + "path": "/sdk/react-native/file-uploads/upload-file", + "title": "Upload a file", + "description": "Upload a file independently and obtain its remote URL with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", + "content": "Use uploadFile to upload a local file independently. You can use it for avatars, group avatars, profile attachments, or other business files. const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | The file name used for the upload. | | contentType | string | Yes | The MIME type of the file. | | uuid | string | Yes | The business identifier for this upload. | | cause | string | No | The business defined reason for the upload. | | filepath | string | Yes | A local file path that the app can read. | When the call completes, it returns the remote resource URL in url . You can use the URL to update an avatar, store a business attachment, or create and send a URL based media message. Listen for upload status UploadOnProgress is triggered during the upload. Its callback parameter includes the uploaded amount in current and the total file size in size . UploadComplete is triggered when the upload completes. Its callback parameter's data includes fileSize , streamSize , and storageSize . function handleUploadProgress current, size // ... function handleUploadComplete data // ... // Register listeners OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // Remove listeners OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; Remove the listeners when the component is destroyed, the user signs out, or the account changes." } ] From b5c8108de6f6f43326aff4cccd52bcbac66b1694 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Fri, 28 Aug 2026 12:30:35 +0800 Subject: [PATCH 07/15] docs(react-native): add calling documentation --- .../calling/managing-calls/accept-call.mdx | 24 ++ .../calling/managing-calls/cancel-call.mdx | 24 ++ .../managing-calls/handle-call-events.mdx | 133 +++++++++++ .../calling/managing-calls/hang-up-call.mdx | 24 ++ .../calling/managing-calls/reject-call.mdx | 24 ++ .../managing-calls/start-group-call.mdx | 55 +++++ .../managing-calls/start-single-call.mdx | 64 +++++ .../react-native/calling/overview-calling.mdx | 50 ++++ .../get-room-by-group-id.mdx | 29 +++ .../get-token-by-room-id.mdx | 22 ++ .../restore-pending-invitation.mdx | 27 +++ .../send-a-custom-signal.mdx | 49 ++++ .../calling/managing-calls/accept-call.mdx | 24 ++ .../calling/managing-calls/cancel-call.mdx | 24 ++ .../managing-calls/handle-call-events.mdx | 105 +++++++++ .../calling/managing-calls/hang-up-call.mdx | 24 ++ .../calling/managing-calls/reject-call.mdx | 24 ++ .../managing-calls/start-group-call.mdx | 55 +++++ .../managing-calls/start-single-call.mdx | 64 +++++ .../react-native/calling/overview-calling.mdx | 50 ++++ .../get-room-by-group-id.mdx | 29 +++ .../get-token-by-room-id.mdx | 22 ++ .../restore-pending-invitation.mdx | 27 +++ .../send-a-custom-signal.mdx | 49 ++++ data/structure/chat-pages.json | 96 ++++++++ .../structure/react-native-content-audit.json | 144 ++++++++++++ .../react-native-navigation-labels.json | 15 ++ data/structure/react-native-sidebar.json | 63 +++++ src/generated/navigation.json | 151 +++++++++++- .../react-native-sdk-zh-content.json | 190 ++++++++++++++- src/generated/routes.json | 218 +++++++++++++++++- src/generated/search-index-zh.json | 96 ++++++++ src/generated/search-index.json | 96 ++++++++ 33 files changed, 2086 insertions(+), 5 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/overview-calling.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx create mode 100644 content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/overview-calling.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx new file mode 100644 index 0000000000..84b5d4f183 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx @@ -0,0 +1,24 @@ +--- +title: 'Accept a call' +description: 'Accept a call invitation with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/accept-call' +--- + +After receiving `OnReceiveNewInvitation`, call `signalingAccept()` to accept the call invitation. + +```ts +const roomCredentials = await OpenIMSDK.signalingAccept({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` is the user ID of the user accepting the invitation. Use the complete `invitation` object provided by the `OnReceiveNewInvitation` event callback. + +The call returns `RtcInviteResults`, which contains the call room's `roomID`, `token`, and `liveURL`. Other participants receive the acceptance through `OnInviteeAccepted`; use `invitation.roomID` in its callback to identify the call. For event listeners, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx new file mode 100644 index 0000000000..5ec8c8df70 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx @@ -0,0 +1,24 @@ +--- +title: 'Cancel a call invitation' +description: 'Cancel a call invitation with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/cancel-call' +--- + +Before the call connects, the inviter can call `signalingCancel()` to cancel the invitation. + +```ts +await OpenIMSDK.signalingCancel({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` is the user ID that cancels the invitation. Use the complete `RtcInvite` object saved when the call was initiated for `invitation`. + +After the call returns, the cancellation request is complete. Invitees receive the cancellation through `OnInvitationCancelled`; use `invitation.roomID` in its callback to identify the call. For event parameters and listeners, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx new file mode 100644 index 0000000000..aa53621b3d --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx @@ -0,0 +1,133 @@ +--- +title: 'Handle call events' +description: 'Listen for call events with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/handle-call-events' +--- + +Call events report invitation status, participant status, and media-stream status. For invitation events, read room information from `invitation` in the callback parameter. Media-stream events provide `roomID` directly. To send and receive custom signals, see [Send a custom signal](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal). + +## Event parameters + +| Event | Callback parameter type | Common fields | +| --- | --- | --- | +| `OnReceiveNewInvitation` | `OnReceiveNewInvitationPayload` | `invitation`, `userID`, `participant`, `offlinePushInfo`. | +| `OnInviteeAccepted` | `OnInviteeAcceptedPayload` | `invitation`, `userID`, `participant`, `opUserPlatformID`. | +| `OnInviteeRejected` | `OnInviteeRejectedPayload` | `invitation`, `userID`, `participant`, `opUserPlatformID`. | +| `OnInvitationCancelled` | `OnInvitationCancelledPayload` | `invitation`, `userID`, `participant`, `offlinePushInfo`. | +| `OnInvitationTimeout` | `OnReceiveNewInvitationPayload` | `invitation`, `userID`, `participant`, `offlinePushInfo`. | +| `OnInviteeAcceptedByOtherDevice` | `OnInviteeAcceptedPayload` | `invitation`, `userID`, `participant`, `opUserPlatformID`. | +| `OnInviteeRejectedByOtherDevice` | `OnInviteeRejectedPayload` | `invitation`, `userID`, `participant`, `opUserPlatformID`. | +| `OnHangUp` | `OnHangUpPayload` | `invitation`, `userID`, `offlinePushInfo`. | +| `OnRoomParticipantConnected` | `OnRoomParticipantConnectedPayload` | `invitation`, `groupID`, `participant`. | +| `OnRoomParticipantDisconnected` | `OnRoomParticipantDisconnectedPayload` | `invitation`, `groupID`, `participant`. | +| `OnStreamChange` | `OnStreamChangePayload` | `roomID`, `streamType`, `mute`. | + +Use `invitation.roomID` or `roomID` to distinguish calls. Use `participant.userInfo.userID` to distinguish participants. + +```ts +function handleReceiveNewInvitation(payload: OnReceiveNewInvitationPayload) { + // ... +} + +function handleInviteeAccepted(payload: OnInviteeAcceptedPayload) { + // ... +} + +function handleInviteeRejected(payload: OnInviteeRejectedPayload) { + // ... +} + +function handleInvitationCancelled(payload: OnInvitationCancelledPayload) { + // ... +} + +function handleInvitationTimeout(payload: OnReceiveNewInvitationPayload) { + // ... +} + +function handleInviteeAcceptedByOtherDevice(payload: OnInviteeAcceptedPayload) { + // ... +} + +function handleInviteeRejectedByOtherDevice(payload: OnInviteeRejectedPayload) { + // ... +} + +function handleHangUp(payload: OnHangUpPayload) { + // ... +} + +function handleRoomParticipantConnected( + payload: OnRoomParticipantConnectedPayload, +) { + // ... +} + +function handleRoomParticipantDisconnected( + payload: OnRoomParticipantDisconnectedPayload, +) { + // ... +} + +function handleStreamChange(payload: OnStreamChangePayload) { + // ... +} + +// Start listening +OpenIMSDK.on(OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation); +OpenIMSDK.on(OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted); +OpenIMSDK.on(OpenIMEvent.OnInviteeRejected, handleInviteeRejected); +OpenIMSDK.on(OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled); +OpenIMSDK.on(OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout); +OpenIMSDK.on( + OpenIMEvent.OnInviteeAcceptedByOtherDevice, + handleInviteeAcceptedByOtherDevice, +); +OpenIMSDK.on( + OpenIMEvent.OnInviteeRejectedByOtherDevice, + handleInviteeRejectedByOtherDevice, +); +OpenIMSDK.on(OpenIMEvent.OnHangUp, handleHangUp); +OpenIMSDK.on( + OpenIMEvent.OnRoomParticipantConnected, + handleRoomParticipantConnected, +); +OpenIMSDK.on( + OpenIMEvent.OnRoomParticipantDisconnected, + handleRoomParticipantDisconnected, +); +OpenIMSDK.on(OpenIMEvent.OnStreamChange, handleStreamChange); + +// Stop listening +OpenIMSDK.off(OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation); +OpenIMSDK.off(OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted); +OpenIMSDK.off(OpenIMEvent.OnInviteeRejected, handleInviteeRejected); +OpenIMSDK.off(OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled); +OpenIMSDK.off(OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout); +OpenIMSDK.off( + OpenIMEvent.OnInviteeAcceptedByOtherDevice, + handleInviteeAcceptedByOtherDevice, +); +OpenIMSDK.off( + OpenIMEvent.OnInviteeRejectedByOtherDevice, + handleInviteeRejectedByOtherDevice, +); +OpenIMSDK.off(OpenIMEvent.OnHangUp, handleHangUp); +OpenIMSDK.off( + OpenIMEvent.OnRoomParticipantConnected, + handleRoomParticipantConnected, +); +OpenIMSDK.off( + OpenIMEvent.OnRoomParticipantDisconnected, + handleRoomParticipantDisconnected, +); +OpenIMSDK.off(OpenIMEvent.OnStreamChange, handleStreamChange); +``` + +Stop listening when the component is unmounted, the user signs out, or the account changes. diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx new file mode 100644 index 0000000000..1502306cef --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx @@ -0,0 +1,24 @@ +--- +title: 'Hang up a call' +description: 'Hang up a call with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/hang-up-call' +--- + +After a call connects, call `signalingHungUp()` to hang up. + +```ts +await OpenIMSDK.signalingHungUp({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` is the user ID hanging up the call. Use the complete `RtcInvite` object for the current call for `invitation`; its `roomID` must match the active call room. + +After the call returns, the hang-up request is complete. Other participants receive call-end information through `OnHangUp`; use `invitation.roomID` in its callback to identify the call. For event parameters and listeners, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx new file mode 100644 index 0000000000..b6e1883c99 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx @@ -0,0 +1,24 @@ +--- +title: 'Reject a call' +description: 'Reject a call invitation with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/reject-call' +--- + +After receiving a call invitation, call `signalingReject()` to reject it when the invitation will not be accepted. + +```ts +await OpenIMSDK.signalingReject({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` is the user ID of the user rejecting the invitation. Use the complete `invitation` object provided by the `OnReceiveNewInvitation` event callback. + +After the call returns, the rejection request is complete. The inviter receives the result through `OnInviteeRejected`; use `invitation.roomID` in its callback to identify the call. For event parameters and listeners, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx new file mode 100644 index 0000000000..829101f381 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx @@ -0,0 +1,55 @@ +--- +title: 'Start a group call' +description: 'Start a group audio or video call with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/start-group-call' +--- + +Call `signalingInviteInGroup()` to start a group audio or video call. `groupID` identifies the group where the call starts. `inviteeUserIDList` specifies the members to invite; it does not automatically invite every group member. + +```ts +const roomCredentials = await OpenIMSDK.signalingInviteInGroup({ + invitation: { + inviterUserID: currentUserID, + inviteeUserIDList: memberUserIDs, + groupID, + roomID, + timeout: 30, + mediaType: 'video', + sessionType: SessionType.Group, + platformID: currentPlatform, + }, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `invitation` | `RtcInvite` | Yes | The call invitation. | +| `invitation.inviterUserID` | `string` | Yes | User ID of the user starting the call. | +| `invitation.inviteeUserIDList` | `string[]` | Yes | User IDs of the group members to invite. | +| `invitation.groupID` | `string` | Yes | Target group ID. | +| `invitation.roomID` | `string` | Yes | Room ID for this group call. | +| `invitation.timeout` | `number` | Yes | Invitation timeout in seconds. | +| `invitation.mediaType` | `string` | Yes | Media type, such as `audio` or `video`. | +| `invitation.sessionType` | `SessionType` | Yes | Pass `SessionType.Group` for a group call. | +| `invitation.platformID` | `Platform` | Yes | Inviter platform. Pass the `Platform` enum value for the current client. | +| `invitation.customData` | `string` | No | Application-defined extension string sent with the invitation. | +| `invitation.initiateTime` | `number` | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | +| `invitation.busyLineUserIDList` | `string[]` | No | Busy-user list. It is usually omitted when starting a new invitation. | +| `offlinePushInfo` | `OfflinePush` | No | Push content for invited users when they are offline. | +| `offlinePushInfo.title` | `string` | Conditional | Push title when `offlinePushInfo` is provided. | +| `offlinePushInfo.desc` | `string` | Conditional | Push body when `offlinePushInfo` is provided. | +| `offlinePushInfo.ex` | `string` | Conditional | Extension string when `offlinePushInfo` is provided. Pass an empty string when there is no content. | +| `offlinePushInfo.iOSPushSound` | `string` | Conditional | iOS push sound when `offlinePushInfo` is provided. | +| `offlinePushInfo.iOSBadgeCount` | `boolean` | Conditional | Whether to update the iOS badge when `offlinePushInfo` is provided. | + +The call returns `RtcInviteResults`, which includes `roomID`, `token`, `liveURL`, and an optional `busyLineUserIDList`. For field descriptions, see [Start a one-to-one call](/sdk/react-native/calling/managing-calls/start-single-call). + +Invited members receive `OnReceiveNewInvitation` with `OnReceiveNewInvitationPayload`. For member acceptance, rejection, and room-leave status, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx b/content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx new file mode 100644 index 0000000000..392062aeee --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx @@ -0,0 +1,64 @@ +--- +title: 'Start a one-to-one call' +description: 'Start a one-to-one audio or video call with OpenIM React Native SDK.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/start-single-call' +--- + +Call `signalingInvite()` to start a one-to-one audio or video call. The call returns room credentials that the app can use to connect a real-time audio and video media engine with `roomID`, `token`, and `liveURL`. + +```ts +const roomCredentials = await OpenIMSDK.signalingInvite({ + invitation: { + inviterUserID: currentUserID, + inviteeUserIDList: [peerUserID], + groupID: '', + roomID, + timeout: 30, + mediaType: 'video', + sessionType: SessionType.Single, + platformID: currentPlatform, + }, +}); +``` + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `invitation` | `RtcInvite` | Yes | The call invitation. | +| `invitation.inviterUserID` | `string` | Yes | User ID of the user starting the call. | +| `invitation.inviteeUserIDList` | `string[]` | Yes | Invited user IDs. For a one-to-one call, provide the other user's ID. | +| `invitation.groupID` | `string` | Yes | Pass an empty string for a one-to-one call. | +| `invitation.roomID` | `string` | Yes | Room ID for this call. Subsequent call operations and state handling use this value to identify the call. | +| `invitation.timeout` | `number` | Yes | Invitation timeout in seconds. | +| `invitation.mediaType` | `string` | Yes | Media type, such as `audio` or `video`. | +| `invitation.sessionType` | `SessionType` | Yes | Pass `SessionType.Single` for a one-to-one call. | +| `invitation.platformID` | `Platform` | Yes | Inviter platform. Pass the `Platform` enum value for the current client. | +| `invitation.customData` | `string` | No | Application-defined extension string sent with the invitation. | +| `invitation.initiateTime` | `number` | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | +| `invitation.busyLineUserIDList` | `string[]` | No | Busy-user list. It is usually omitted when starting a new invitation. | +| `offlinePushInfo` | `OfflinePush` | No | Push content for invited users when they are offline. | +| `offlinePushInfo.title` | `string` | Conditional | Push title when `offlinePushInfo` is provided. | +| `offlinePushInfo.desc` | `string` | Conditional | Push body when `offlinePushInfo` is provided. | +| `offlinePushInfo.ex` | `string` | Conditional | Extension string when `offlinePushInfo` is provided. Pass an empty string when there is no content. | +| `offlinePushInfo.iOSPushSound` | `string` | Conditional | iOS push sound when `offlinePushInfo` is provided. | +| `offlinePushInfo.iOSBadgeCount` | `boolean` | Conditional | Whether to update the iOS badge when `offlinePushInfo` is provided. | + +## Return value + +The call returns `RtcInviteResults`: + +| Field | Type | Description | +| --- | --- | --- | +| `roomID` | `string` | Call room ID. | +| `token` | `string` | Credential for joining the call room. | +| `liveURL` | `string` | Room address returned by the calling service. | +| `busyLineUserIDList` | `string[]` | IDs of invited users that are currently busy. | + +The invitee receives `OnReceiveNewInvitation` with `OnReceiveNewInvitationPayload`. For acceptance, rejection, cancellation, and hang-up events, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/overview-calling.mdx b/content/docs/chat/sdk/react-native/calling/overview-calling.mdx new file mode 100644 index 0000000000..8ef40e7806 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/overview-calling.mdx @@ -0,0 +1,50 @@ +--- +title: 'Audio and video calling overview' +description: 'OpenIM React Native SDK guide for audio and video calling.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/overview-calling' +--- + +OpenIM React Native SDK provides calling signaling APIs for starting and handling call invitations, querying room information, and synchronizing call state. It handles call business signaling only; it does not capture or play audio and video, connect to media rooms, or render call UI. + +After starting or accepting a call, the SDK returns room credentials such as `roomID`, `token`, and `liveURL`. The application passes these credentials to a real-time audio and video media engine to join the call room, and handles device permissions, media tracks, weak-network strategy, and UI state itself. + +## Call flow + +1. Call `signalingInvite()` to start a one-to-one call, or `signalingInviteInGroup()` to start a group call. +2. Invitees receive the call invitation through `OnReceiveNewInvitation` and choose whether to accept or reject it. +3. After accepting, call `signalingAccept()` and use the returned room credentials to join the call room. +4. During the call, update the call UI based on invitation status, participant status, media-stream status, and custom signals. +5. The inviter can cancel an invitation that has not connected; call participants can hang up an established call. + +## Core data + +| Data | Description | +| --- | --- | +| `RtcInvite` | Call invitation containing the inviter, invitees, group, room, media type, timeout, and session type. | +| `RtcInviteResults` | The `roomID`, `token`, and `liveURL` returned after starting or accepting a call, or querying room credentials. | +| `CallingRoomData` | Room ID, invitation information, and participant information returned when querying by group. | +| `OnReceiveNewInvitationPayload` | Event parameter for a received call invitation, containing `invitation`, optional `offlinePushInfo`, and participant information. | + +`customData` and custom signals are both application-defined strings. Use JSON or another format required by the application protocol. + +## Call state + +After calling the start, accept, reject, cancel, or hang-up API, update the UI for the current action from the corresponding result. Call state from other users or devices is received through events. Use `roomID` to distinguish calls; use both `roomID` and `userID` to distinguish participant state. + +For invitation lifecycle, participant room-entry and room-exit, and media-stream listeners, see [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). For custom-signal listeners, see [Send a custom signal](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal). + +## Browse by task + +| Task | Page | +| --- | --- | +| Start a one-to-one or group call | [Start a one-to-one call](/sdk/react-native/calling/managing-calls/start-single-call), [Start a group call](/sdk/react-native/calling/managing-calls/start-group-call) | +| Accept or reject an invitation | [Accept a call](/sdk/react-native/calling/managing-calls/accept-call), [Reject a call](/sdk/react-native/calling/managing-calls/reject-call) | +| Cancel an invitation or hang up a call | [Cancel a call invitation](/sdk/react-native/calling/managing-calls/cancel-call), [Hang up a call](/sdk/react-native/calling/managing-calls/hang-up-call) | +| Query a room or restore a pending invitation | [Get a group call room](/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id), [Get room credentials](/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id), [Restore a pending invitation](/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation) | +| Handle events and custom signals | [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events), [Send a custom signal](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal) | diff --git a/content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx new file mode 100644 index 0000000000..5da22ddb48 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -0,0 +1,29 @@ +--- +title: 'Get a group call room' +description: 'Get a call room by group ID.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id' +--- + +Call `signalingGetRoomByGroupID()` to get group-call room information by group ID. `groupID` is the target group ID. + +```ts +const room = await OpenIMSDK.signalingGetRoomByGroupID(groupID); +``` + +## Return value + +The call returns `CallingRoomData`: + +| Field | Type | Description | +| --- | --- | --- | +| `roomID` | `string` | Call room ID. | +| `invitation` | `RtcInvite` (optional) | Call invitation information for the room. | +| `participant` | `ParticipantInfo[]` (optional) | Information about current room participants. | + +`userInfo` in `participant` contains user information. In group calls, it can also contain `groupMemberInfo` and `groupInfo`. Use the returned `roomID` to query room credentials or handle the corresponding call state. diff --git a/content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx b/content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx new file mode 100644 index 0000000000..53181b7078 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx @@ -0,0 +1,22 @@ +--- +title: 'Get room credentials' +description: 'Get call credentials by room ID.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id' +--- + +When a call room ID is known and room credentials are needed, call `signalingGetTokenByRoomID()`. `roomID` is the target call room ID. + +```ts +const roomCredentials = + await OpenIMSDK.signalingGetTokenByRoomID(roomID); +``` + +## Return value + +The call returns `RtcInviteResults`, including `roomID`, `token`, `liveURL`, and an optional `busyLineUserIDList`. Provide the returned room credentials to a real-time audio and video media engine to join the call room. diff --git a/content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx b/content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx new file mode 100644 index 0000000000..090e41f439 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx @@ -0,0 +1,27 @@ +--- +title: 'Restore a pending invitation' +description: 'Restore a pending call invitation.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation' +--- + +When the app starts or returns to the foreground, call `getSignalingInvitationInfoStartApp()` to get a call invitation that is still pending. + +```ts +const { invitation, offlinePushInfo } = + await OpenIMSDK.getSignalingInvitationInfoStartApp(); +``` + +## Return value + +| Field | Type | Description | +| --- | --- | --- | +| `invitation` | `RtcInvite` or `null` | Pending call invitation; `null` when no invitation is pending. | +| `offlinePushInfo` | `OfflinePush` | Offline push content included with the invitation. | + +When `invitation` is not `null`, use its invitation information to restore the incoming-call UI. Subsequent cancellation, timeout, acceptance, and hang-up states are received through [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx b/content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx new file mode 100644 index 0000000000..d17840da67 --- /dev/null +++ b/content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx @@ -0,0 +1,49 @@ +--- +title: 'Send a custom signal' +description: 'Send a custom signal in a call room.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal' +--- + +Call `signalingSendCustomSignal()` to send an application-defined signal to a call room, such as raising a hand or changing the layout. `customInfo` is a string. To send structured data, pass a JSON string. + +```ts +await OpenIMSDK.signalingSendCustomSignal({ + roomID, + customInfo: JSON.stringify({ + type: 'hand-raised', + }), +}); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| `roomID` | `string` | Target call room ID. | +| `customInfo` | `string` | Application-defined signal content. | + +After the call returns, the custom-signal request is complete. + +## Receive custom signals + +When another participant sends a custom signal, `OnReceiveCustomSignal` is triggered. Its callback parameter is `OnReceiveCustomSignalPayload`, which contains `roomID` and `customInfo`. + +```ts +function handleCustomSignal(payload: OnReceiveCustomSignalPayload) { + // ... +} + +// Start listening +OpenIMSDK.on(OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal); + +// Stop listening +OpenIMSDK.off(OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal); +``` + +Stop listening when the component is unmounted, the user signs out, or the account changes. After receiving `customInfo`, parse and handle its data according to the application protocol. diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx new file mode 100644 index 0000000000..521f4c9492 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx @@ -0,0 +1,24 @@ +--- +title: '接受通话' +description: '使用 OpenIM React Native SDK 接受通话邀请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/accept-call' +--- + +收到 `OnReceiveNewInvitation` 事件后,调用 `signalingAccept()` 接受通话邀请。 + +```ts +const roomCredentials = await OpenIMSDK.signalingAccept({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` 是当前接受邀请的用户 ID。`invitation` 应使用 `OnReceiveNewInvitation` 事件回调提供的完整 `invitation` 对象。 + +调用完成后返回 `RtcInviteResults`,包含通话房间的 `roomID`、`token` 和 `liveURL`。其他参与者会通过 `OnInviteeAccepted` 事件收到接受结果,事件回调中的 `invitation.roomID` 用于识别本次通话。事件监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx new file mode 100644 index 0000000000..808ab8db7e --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx @@ -0,0 +1,24 @@ +--- +title: '取消通话邀请' +description: '使用 OpenIM React Native SDK 取消通话邀请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/cancel-call' +--- + +发起方在通话尚未接通时,调用 `signalingCancel()` 取消邀请。 + +```ts +await OpenIMSDK.signalingCancel({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` 是当前发起取消操作的用户 ID。`invitation` 使用发起通话时保存的完整 `RtcInvite` 对象。 + +调用完成后,取消邀请请求已完成。被邀请用户会通过 `OnInvitationCancelled` 事件收到取消结果,事件回调中的 `invitation.roomID` 用于识别本次通话。事件参数和监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx new file mode 100644 index 0000000000..28b6516d3c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx @@ -0,0 +1,105 @@ +--- +title: '处理通话事件' +description: '使用 OpenIM React Native SDK 监听通话事件。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/handle-call-events' +--- + +通话相关事件用于接收邀请状态、参与者状态和媒体流状态。邀请类事件从回调参数的 `invitation` 读取房间信息;媒体流变化直接提供 `roomID`。发送和接收自定义信令见[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal)。 + +## 事件参数 + +| 事件 | 回调参数类型 | 常用字段 | +| --- | --- | --- | +| `OnReceiveNewInvitation` | `OnReceiveNewInvitationPayload` | `invitation`、`userID`、`participant`、`offlinePushInfo`。 | +| `OnInviteeAccepted` | `OnInviteeAcceptedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 | +| `OnInviteeRejected` | `OnInviteeRejectedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 | +| `OnInvitationCancelled` | `OnInvitationCancelledPayload` | `invitation`、`userID`、`participant`、`offlinePushInfo`。 | +| `OnInvitationTimeout` | `OnReceiveNewInvitationPayload` | `invitation`、`userID`、`participant`、`offlinePushInfo`。 | +| `OnInviteeAcceptedByOtherDevice` | `OnInviteeAcceptedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 | +| `OnInviteeRejectedByOtherDevice` | `OnInviteeRejectedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 | +| `OnHangUp` | `OnHangUpPayload` | `invitation`、`userID`、`offlinePushInfo`。 | +| `OnRoomParticipantConnected` | `OnRoomParticipantConnectedPayload` | `invitation`、`groupID`、`participant`。 | +| `OnRoomParticipantDisconnected` | `OnRoomParticipantDisconnectedPayload` | `invitation`、`groupID`、`participant`。 | +| `OnStreamChange` | `OnStreamChangePayload` | `roomID`、`streamType`、`mute`。 | + +使用 `invitation.roomID` 或 `roomID` 区分通话;参与者信息中使用 `participant.userInfo.userID` 区分用户。 + +```ts +function handleReceiveNewInvitation(payload: OnReceiveNewInvitationPayload) { + // ... +} + +function handleInviteeAccepted(payload: OnInviteeAcceptedPayload) { + // ... +} + +function handleInviteeRejected(payload: OnInviteeRejectedPayload) { + // ... +} + +function handleInvitationCancelled(payload: OnInvitationCancelledPayload) { + // ... +} + +function handleInvitationTimeout(payload: OnReceiveNewInvitationPayload) { + // ... +} + +function handleInviteeAcceptedByOtherDevice(payload: OnInviteeAcceptedPayload) { + // ... +} + +function handleInviteeRejectedByOtherDevice(payload: OnInviteeRejectedPayload) { + // ... +} + +function handleHangUp(payload: OnHangUpPayload) { + // ... +} + +function handleRoomParticipantConnected(payload: OnRoomParticipantConnectedPayload) { + // ... +} + +function handleRoomParticipantDisconnected(payload: OnRoomParticipantDisconnectedPayload) { + // ... +} + +function handleStreamChange(payload: OnStreamChangePayload) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation); +OpenIMSDK.on(OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted); +OpenIMSDK.on(OpenIMEvent.OnInviteeRejected, handleInviteeRejected); +OpenIMSDK.on(OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled); +OpenIMSDK.on(OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout); +OpenIMSDK.on(OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice); +OpenIMSDK.on(OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice); +OpenIMSDK.on(OpenIMEvent.OnHangUp, handleHangUp); +OpenIMSDK.on(OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected); +OpenIMSDK.on(OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected); +OpenIMSDK.on(OpenIMEvent.OnStreamChange, handleStreamChange); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation); +OpenIMSDK.off(OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted); +OpenIMSDK.off(OpenIMEvent.OnInviteeRejected, handleInviteeRejected); +OpenIMSDK.off(OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled); +OpenIMSDK.off(OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout); +OpenIMSDK.off(OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice); +OpenIMSDK.off(OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice); +OpenIMSDK.off(OpenIMEvent.OnHangUp, handleHangUp); +OpenIMSDK.off(OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected); +OpenIMSDK.off(OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected); +OpenIMSDK.off(OpenIMEvent.OnStreamChange, handleStreamChange); +``` + +组件销毁、退出登录或切换账号时,应取消监听。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx new file mode 100644 index 0000000000..9c4eeebc3f --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx @@ -0,0 +1,24 @@ +--- +title: '挂断通话' +description: '使用 OpenIM React Native SDK 挂断通话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/hang-up-call' +--- + +通话建立后,调用 `signalingHungUp()` 挂断通话。 + +```ts +await OpenIMSDK.signalingHungUp({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` 是当前挂断通话的用户 ID。`invitation` 使用本次通话的完整 `RtcInvite` 对象,其中的 `roomID` 应与当前通话房间一致。 + +调用完成后,挂断请求已完成。其他参与者会通过 `OnHangUp` 事件收到通话结束信息;事件回调中的 `invitation.roomID` 用于识别本次通话。事件参数和监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx new file mode 100644 index 0000000000..c4db0e855c --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx @@ -0,0 +1,24 @@ +--- +title: '拒绝通话' +description: '使用 OpenIM React Native SDK 拒绝通话邀请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/reject-call' +--- + +收到通话邀请后,如不接受,调用 `signalingReject()` 拒绝邀请。 + +```ts +await OpenIMSDK.signalingReject({ + opUserID: currentUserID, + invitation, +}); +``` + +`opUserID` 是当前拒绝邀请的用户 ID。`invitation` 使用 `OnReceiveNewInvitation` 事件回调提供的完整 `invitation` 对象。 + +调用完成后,拒绝请求已完成。发起方会通过 `OnInviteeRejected` 事件收到拒绝结果,事件回调中的 `invitation.roomID` 用于识别本次通话。事件参数和监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx new file mode 100644 index 0000000000..ae985bd879 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx @@ -0,0 +1,55 @@ +--- +title: '发起群聊通话' +description: '使用 OpenIM React Native SDK 发起群聊音视频通话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/start-group-call' +--- + +调用 `signalingInviteInGroup()` 发起群聊音视频通话。`groupID` 用于标识发起通话的群组。`inviteeUserIDList` 指定本次邀请的群成员,不会自动邀请群内全部成员。 + +```ts +const roomCredentials = await OpenIMSDK.signalingInviteInGroup({ + invitation: { + inviterUserID: currentUserID, + inviteeUserIDList: memberUserIDs, + groupID, + roomID, + timeout: 30, + mediaType: 'video', + sessionType: SessionType.Group, + platformID: currentPlatform, + }, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `invitation` | `RtcInvite` | 是 | 本次通话邀请。 | +| `invitation.inviterUserID` | `string` | 是 | 发起通话的当前用户 ID。 | +| `invitation.inviteeUserIDList` | `string[]` | 是 | 本次邀请的群成员用户 ID 列表。 | +| `invitation.groupID` | `string` | 是 | 目标群组 ID。 | +| `invitation.roomID` | `string` | 是 | 本次群聊通话的房间 ID。 | +| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 | +| `invitation.mediaType` | `string` | 是 | 媒体类型,例如 `audio` 或 `video`。 | +| `invitation.sessionType` | `SessionType` | 是 | 群聊传入 `SessionType.Group`。 | +| `invitation.platformID` | `Platform` | 是 | 发起端平台;传入当前客户端对应的 `Platform` 枚举值。 | +| `invitation.customData` | `string` | 否 | 随邀请传递的业务扩展字符串。 | +| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | +| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表。发起新邀请时通常不填写。 | +| `offlinePushInfo` | `OfflinePush` | 否 | 被邀请用户离线时使用的推送内容。 | +| `offlinePushInfo.title` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送标题。 | +| `offlinePushInfo.desc` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送正文。 | +| `offlinePushInfo.ex` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写扩展字符串;没有内容时传空字符串。 | +| `offlinePushInfo.iOSPushSound` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写 iOS 推送声音。 | +| `offlinePushInfo.iOSBadgeCount` | `boolean` | 条件必填 | 提供 `offlinePushInfo` 时说明是否更新 iOS 角标。 | + +调用完成后返回 `RtcInviteResults`,其中包含 `roomID`、`token`、`liveURL` 和可选的 `busyLineUserIDList`。字段说明见[发起单聊通话](/sdk/react-native/calling/managing-calls/start-single-call)。 + +被邀请成员会通过 `OnReceiveNewInvitation` 收到 `OnReceiveNewInvitationPayload`。成员的接受、拒绝和离开状态见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx new file mode 100644 index 0000000000..10d83ffd92 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx @@ -0,0 +1,64 @@ +--- +title: '发起单聊通话' +description: '使用 OpenIM React Native SDK 发起单聊音视频通话。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/managing-calls/start-single-call' +--- + +调用 `signalingInvite()` 发起单聊音视频通话。调用完成后返回房间凭据,应用可使用其中的 `roomID`、`token` 和 `liveURL` 接入实时音视频媒体引擎。 + +```ts +const roomCredentials = await OpenIMSDK.signalingInvite({ + invitation: { + inviterUserID: currentUserID, + inviteeUserIDList: [peerUserID], + groupID: '', + roomID, + timeout: 30, + mediaType: 'video', + sessionType: SessionType.Single, + platformID: currentPlatform, + }, +}); +``` + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `invitation` | `RtcInvite` | 是 | 本次通话邀请。 | +| `invitation.inviterUserID` | `string` | 是 | 发起通话的当前用户 ID。 | +| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户 ID 列表;单聊时传入对方用户 ID。 | +| `invitation.groupID` | `string` | 是 | 单聊传空字符串。 | +| `invitation.roomID` | `string` | 是 | 本次通话的房间 ID,后续通话操作和状态处理使用该值识别通话。 | +| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 | +| `invitation.mediaType` | `string` | 是 | 媒体类型,例如 `audio` 或 `video`。 | +| `invitation.sessionType` | `SessionType` | 是 | 单聊传入 `SessionType.Single`。 | +| `invitation.platformID` | `Platform` | 是 | 发起端平台;传入当前客户端对应的 `Platform` 枚举值。 | +| `invitation.customData` | `string` | 否 | 随邀请传递的业务扩展字符串。 | +| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | +| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表。发起新邀请时通常不填写。 | +| `offlinePushInfo` | `OfflinePush` | 否 | 被邀请用户离线时使用的推送内容。 | +| `offlinePushInfo.title` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送标题。 | +| `offlinePushInfo.desc` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送正文。 | +| `offlinePushInfo.ex` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写扩展字符串;没有内容时传空字符串。 | +| `offlinePushInfo.iOSPushSound` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写 iOS 推送声音。 | +| `offlinePushInfo.iOSBadgeCount` | `boolean` | 条件必填 | 提供 `offlinePushInfo` 时说明是否更新 iOS 角标。 | + +## 返回结果 + +调用完成后返回 `RtcInviteResults`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `roomID` | `string` | 通话房间 ID。 | +| `token` | `string` | 加入通话房间使用的凭据。 | +| `liveURL` | `string` | 通话服务返回的房间地址。 | +| `busyLineUserIDList` | `string[]` | 处于忙线状态的被邀请用户 ID 列表。 | + +被邀请用户会通过 `OnReceiveNewInvitation` 收到 `OnReceiveNewInvitationPayload`。接受、拒绝、取消和挂断等状态变化见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/overview-calling.mdx b/content/zh/docs/chat/sdk/react-native/calling/overview-calling.mdx new file mode 100644 index 0000000000..c96b3e48f0 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/overview-calling.mdx @@ -0,0 +1,50 @@ +--- +title: '音视频通话概览' +description: 'OpenIM React Native SDK 音视频通话概览。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/overview-calling' +--- + +OpenIM React Native SDK 提供音视频通话的信令 API,用于发起和处理通话邀请、查询房间信息及同步通话状态。它只处理通话业务信令,不负责音视频采集与播放、媒体房间连接或通话界面渲染。 + +发起或接受通话后,SDK 返回 `roomID`、`token` 和 `liveURL` 等房间凭据。应用需要将这些凭据交给实时音视频媒体引擎加入通话房间,并自行处理设备权限、媒体轨道、弱网策略和界面状态。 + +## 通话流程 + +1. 调用 `signalingInvite()` 发起单聊通话,或调用 `signalingInviteInGroup()` 发起群聊通话。 +2. 被邀请用户通过 `OnReceiveNewInvitation` 收到通话邀请,选择接受或拒绝。 +3. 接受邀请后调用 `signalingAccept()`,使用返回的房间凭据加入通话房间。 +4. 通话期间根据邀请状态、参与者状态、媒体流状态和自定义信令更新通话界面。 +5. 发起方可取消尚未接通的邀请;通话参与者可挂断已建立的通话。 + +## 核心数据 + +| 数据 | 说明 | +| --- | --- | +| `RtcInvite` | 通话邀请,包含邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 | +| `RtcInviteResults` | 发起、接受通话或查询房间凭据后返回的 `roomID`、`token` 和 `liveURL`。 | +| `CallingRoomData` | 按群组查询得到的房间 ID、邀请信息和参与者资料。 | +| `OnReceiveNewInvitationPayload` | 收到通话邀请时的事件参数,包含 `invitation`、可选的 `offlinePushInfo` 和参与者资料。 | + +`customData` 和自定义信令均为业务自定义字符串,可按业务协议传递 JSON 或其他格式的数据。 + +## 通话状态 + +调用发起、接受、拒绝、取消或挂断 API 后,可根据对应调用结果更新当前操作的界面。其他用户或设备的通话状态通过事件接收。使用 `roomID` 区分通话;参与者状态同时使用 `roomID` 和 `userID` 区分。 + +邀请生命周期、参与者进出房间和媒体流变化的监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。自定义信令的监听方式见[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal)。 + +## 按任务查找页面 + +| 任务 | 页面 | +| --- | --- | +| 发起单聊或群聊通话 | [发起单聊通话](/sdk/react-native/calling/managing-calls/start-single-call)、[发起群聊通话](/sdk/react-native/calling/managing-calls/start-group-call) | +| 接受或拒绝邀请 | [接受通话](/sdk/react-native/calling/managing-calls/accept-call)、[拒绝通话](/sdk/react-native/calling/managing-calls/reject-call) | +| 取消邀请或挂断通话 | [取消通话邀请](/sdk/react-native/calling/managing-calls/cancel-call)、[挂断通话](/sdk/react-native/calling/managing-calls/hang-up-call) | +| 查询房间或恢复待处理邀请 | [查询群组通话房间](/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id)、[获取通话房间 Token](/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id)、[恢复待处理的通话邀请](/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation) | +| 处理事件和自定义信令 | [处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)、[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal) | diff --git a/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx new file mode 100644 index 0000000000..bf5273c4d6 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -0,0 +1,29 @@ +--- +title: '查询群组通话房间' +description: '按群组 ID 查询通话房间。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id' +--- + +调用 `signalingGetRoomByGroupID()` 按群组 ID 获取群聊通话房间信息;`groupID` 是目标群组 ID。 + +```ts +const room = await OpenIMSDK.signalingGetRoomByGroupID(groupID); +``` + +## 返回结果 + +调用完成后返回 `CallingRoomData`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `roomID` | `string` | 通话房间 ID。 | +| `invitation` | `RtcInvite`(可选) | 房间对应的通话邀请信息。 | +| `participant` | `ParticipantInfo[]`(可选) | 当前房间的参与者资料。 | + +`participant` 中的 `userInfo` 是用户资料;群聊场景还可能包含 `groupMemberInfo` 和 `groupInfo`。调用后可使用 `roomID` 查询房间凭据或处理对应的通话状态。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx b/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx new file mode 100644 index 0000000000..324f569ae4 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx @@ -0,0 +1,22 @@ +--- +title: '获取通话房间 Token' +description: '按房间 ID 获取通话凭据。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id' +--- + +已知通话房间 ID、需要获取房间凭据时,调用 `signalingGetTokenByRoomID()`;`roomID` 是目标通话房间 ID。 + +```ts +const roomCredentials = + await OpenIMSDK.signalingGetTokenByRoomID(roomID); +``` + +## 返回结果 + +调用完成后返回 `RtcInviteResults`,包含 `roomID`、`token`、`liveURL` 和可选的 `busyLineUserIDList`。将返回的房间凭据交给实时音视频媒体引擎加入通话房间。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx b/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx new file mode 100644 index 0000000000..e5f61c8f0b --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx @@ -0,0 +1,27 @@ +--- +title: '恢复待处理的通话邀请' +description: '恢复待处理的通话邀请。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation' +--- + +应用启动或恢复到前台时,调用 `getSignalingInvitationInfoStartApp()` 获取仍待处理的通话邀请。 + +```ts +const { invitation, offlinePushInfo } = + await OpenIMSDK.getSignalingInvitationInfoStartApp(); +``` + +## 返回结果 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `invitation` | `RtcInvite` 或 `null` | 待处理的通话邀请;没有待处理邀请时为 `null`。 | +| `offlinePushInfo` | `OfflinePush` | 邀请携带的离线推送内容。 | + +当 `invitation` 不为 `null` 时,可使用其中的邀请信息恢复来电展示。后续取消、超时、接受和挂断等状态通过[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)接收。 diff --git a/content/zh/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx b/content/zh/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx new file mode 100644 index 0000000000..9f2c0912ed --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx @@ -0,0 +1,49 @@ +--- +title: '发送自定义信令' +description: '在通话房间中发送自定义信令。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal' +--- + +调用 `signalingSendCustomSignal()` 向通话房间发送业务自定义信令,例如举手或切换布局。`customInfo` 是字符串;需要传递结构化数据时,可传入 JSON 字符串。 + +```ts +await OpenIMSDK.signalingSendCustomSignal({ + roomID, + customInfo: JSON.stringify({ + type: 'hand-raised', + }), +}); +``` + +## 参数说明 + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `roomID` | `string` | 目标通话房间 ID。 | +| `customInfo` | `string` | 业务自定义信令内容。 | + +调用完成后,自定义信令发送请求已完成。 + +## 接收自定义信令 + +其他参与者发送自定义信令时触发 `OnReceiveCustomSignal` 事件,回调参数类型为 `OnReceiveCustomSignalPayload`,包含 `roomID` 和 `customInfo`。 + +```ts +function handleCustomSignal(payload: OnReceiveCustomSignalPayload) { + // ... +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal); +``` + +组件销毁、退出登录或切换账号时,应取消监听。接收 `customInfo` 后,按业务协议解析并处理其中的数据。 diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index 67dc80610d..c099bd14d8 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -7814,5 +7814,101 @@ "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/overview-calling", + "openimPath": "/sdk/react-native/calling/overview-calling", + "title": "Audio and video calling overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/overview-calling.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/start-single-call", + "openimPath": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/start-group-call", + "openimPath": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "Start a group call", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/accept-call", + "openimPath": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "Accept a call", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/reject-call", + "openimPath": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "Reject a call", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/cancel-call", + "openimPath": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "openimPath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "Hang up a call", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "openimPath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "openimPath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending invitation", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "openimPath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "openimPath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get room credentials", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx" + }, + { + "sourcePath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "openimPath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx" } ] diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index 758480c486..346ab7d662 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -6385,6 +6385,150 @@ "2026-08-27:已按 React Native SDK 固定提交核对 uploadFile、UploadFileParams、UploadOnProgress、UploadComplete 及页面示例。", "2026-08-27:英文页面已根据审核后的中文内容翻译,并按 React Native SDK 声明核对。" ] + }, + { + "currentPath": "/sdk/react-native/calling/overview-calling", + "targetPath": "/sdk/react-native/calling/overview-calling", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": [], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "not-applicable", "evidence": [], "reason": "概览页介绍通话流程、核心数据和页面入口,不包含代码示例。" } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "not-applicable", "evidence": [], "reason": "Overview page describes the calling flow, core data, and page entry points without code examples." } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对通话信令方法、核心模型和事件入口。", "2026-08-28:统一使用“实时音视频媒体引擎”描述房间凭据的接入对象。", "2026-08-28:补充信令 API 的职责边界,以及应用接入媒体引擎并处理音视频能力的说明。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/start-single-call", + "targetPath": "/sdk/react-native/calling/managing-calls/start-single-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingInvite"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingInvite、RtcInvite 和 RtcInviteResults。", "2026-08-28:统一使用“实时音视频媒体引擎”描述房间凭据的接入对象。", "2026-08-28:参数表已补齐 RtcInvite 和 OfflinePush 的嵌套字段,与其他 SDK 的字段层级保持一致。", "2026-08-28:将 busyLineUserIDList 的说明调整为“处于忙线状态的被邀请用户 ID 列表”。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/start-group-call", + "targetPath": "/sdk/react-native/calling/managing-calls/start-group-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingInviteInGroup"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交 signalingInviteInGroup、RtcInvite 和 RtcInviteResults。", "2026-08-28:参数表已补齐 RtcInvite 和 OfflinePush 的嵌套字段,与其他 SDK 的字段层级保持一致。", "2026-08-28:明确 groupID 用于标识通话群组,并说明 inviteeUserIDList 不会自动邀请全体群成员。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/accept-call", + "targetPath": "/sdk/react-native/calling/managing-calls/accept-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingAccept"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingAccept、RtcActionParams 和 RtcInviteResults。", "2026-08-28:正文改为说明事件回调提供的 invitation,避免引入未定义的 payload 变量。", "2026-08-28:明确 invitation 应使用事件回调提供的完整 invitation 对象。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/reject-call", + "targetPath": "/sdk/react-native/calling/managing-calls/reject-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingReject"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingReject 和 RtcActionParams。", "2026-08-28:正文改为说明事件回调提供的 invitation,避免引入未定义的 payload 变量。", "2026-08-28:明确 invitation 应使用事件回调提供的完整 invitation 对象。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/cancel-call", + "targetPath": "/sdk/react-native/calling/managing-calls/cancel-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingCancel"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingCancel 和 RtcActionParams。", "2026-08-28:正文改为说明事件回调中的 invitation.roomID,避免引入未定义的 payload 变量。", "2026-08-28:明确 invitation 应使用发起通话时保存的完整 RtcInvite 对象。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "targetPath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingHungUp"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingHungUp 和 RtcActionParams。", "2026-08-28:正文改为说明事件回调中的 invitation.roomID,避免引入未定义的 payload 变量。", "2026-08-28:明确 invitation 应使用当前通话的完整 RtcInvite 对象。"] + }, + { + "currentPath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "targetPath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": [], + "sdkEvents": ["OnReceiveNewInvitation", "OnInviteeAccepted", "OnInviteeRejected", "OnInvitationCancelled", "OnHangUp", "OnInvitationTimeout", "OnInviteeAcceptedByOtherDevice", "OnInviteeRejectedByOtherDevice", "OnStreamChange", "OnRoomParticipantConnected", "OnRoomParticipantDisconnected"], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 11 个通话事件及其回调载荷。"] + }, + { + "currentPath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "targetPath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["getSignalingInvitationInfoStartApp"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 getSignalingInvitationInfoStartApp、RtcInvite 和 OfflinePush。", "2026-08-28:将返回类型改为“RtcInvite 或 null”,避免 MDX 表格中的转义字符影响渲染。"] + }, + { + "currentPath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "targetPath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingGetRoomByGroupID"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingGetRoomByGroupID 和 CallingRoomData。", "2026-08-28:将单个 groupID 参数说明合并到方法介绍中。"] + }, + { + "currentPath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "targetPath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingGetTokenByRoomID"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingGetTokenByRoomID 和 RtcInviteResults。", "2026-08-28:统一使用“实时音视频媒体引擎”描述房间凭据的接入对象。", "2026-08-28:将单个 roomID 参数说明合并到方法介绍中。"] + }, + { + "currentPath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "targetPath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["signalingSendCustomSignal"], + "sdkEvents": ["OnReceiveCustomSignal"], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingSendCustomSignal 和 OnReceiveCustomSignal。"] } ] } diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json index aa6dbc84e5..79a2f9e0a9 100644 --- a/data/structure/react-native-navigation-labels.json +++ b/data/structure/react-native-navigation-labels.json @@ -88,6 +88,21 @@ "Transfer group ownership": "转让群主", "Mute or unmute a group member": "设置群成员禁言", "Upload a file": "上传文件", + "Calling": "音视频通话", + "Managing calls": "管理通话", + "Retrieving call information": "查询通话信息", + "Audio and video calling overview": "音视频通话概览", + "Start a one-to-one call": "发起单聊通话", + "Start a group call": "发起群聊通话", + "Accept a call": "接受通话", + "Reject a call": "拒绝通话", + "Cancel a call invitation": "取消通话邀请", + "Hang up a call": "挂断通话", + "Handle call events": "处理通话事件", + "Restore a pending invitation": "恢复待处理的通话邀请", + "Get a group call room": "查询群组通话房间", + "Get room credentials": "获取通话房间 Token", + "Send a custom signal": "发送自定义信令", "Conversation": "会话", "Retrieving conversations": "获取会话", "Conversation organization": "会话管理", diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index e2847c6de4..7d71b90e06 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -741,6 +741,69 @@ { "path": "/sdk/react-native/file-uploads/upload-file", "navigationTitle": "Upload a file" + }, + { + "id": "calling", + "title": "Calling", + "children": [ + "/sdk/react-native/calling/overview-calling", + { + "id": "calling/managing-calls", + "title": "Managing calls", + "children": [ + { + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "navigationTitle": "Start a one-to-one call" + }, + { + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "navigationTitle": "Start a group call" + }, + { + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "navigationTitle": "Accept a call" + }, + { + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "navigationTitle": "Reject a call" + }, + { + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "navigationTitle": "Cancel a call invitation" + }, + { + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "navigationTitle": "Hang up a call" + }, + { + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "navigationTitle": "Handle call events" + } + ] + }, + { + "id": "calling/retrieving-call-information", + "title": "Retrieving call information", + "children": [ + { + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "navigationTitle": "Restore a pending invitation" + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "navigationTitle": "Get a group call room" + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "navigationTitle": "Get room credentials" + } + ] + }, + { + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "navigationTitle": "Send a custom signal" + } + ] } ] } diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 4e749fc8b8..edbcc05f6d 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -11755,9 +11755,158 @@ "children": [], "minIndex": 661, "navigationTitle": "Upload a file" + }, + { + "id": "calling", + "segment": "calling", + "title": "Calling", + "href": null, + "type": "folder", + "children": [ + { + "id": "calling/overview-calling", + "segment": "overview-calling", + "title": "Audio and video calling overview", + "href": "/sdk/react-native/calling/overview-calling", + "type": "page", + "children": [], + "minIndex": 662 + }, + { + "id": "calling/managing-calls", + "segment": "managing-calls", + "title": "Managing calls", + "href": null, + "type": "folder", + "children": [ + { + "id": "calling/managing-calls/start-single-call", + "segment": "start-single-call", + "title": "Start a one-to-one call", + "href": "/sdk/react-native/calling/managing-calls/start-single-call", + "type": "page", + "children": [], + "minIndex": 663, + "navigationTitle": "Start a one-to-one call" + }, + { + "id": "calling/managing-calls/start-group-call", + "segment": "start-group-call", + "title": "Start a group call", + "href": "/sdk/react-native/calling/managing-calls/start-group-call", + "type": "page", + "children": [], + "minIndex": 664, + "navigationTitle": "Start a group call" + }, + { + "id": "calling/managing-calls/accept-call", + "segment": "accept-call", + "title": "Accept a call", + "href": "/sdk/react-native/calling/managing-calls/accept-call", + "type": "page", + "children": [], + "minIndex": 665, + "navigationTitle": "Accept a call" + }, + { + "id": "calling/managing-calls/reject-call", + "segment": "reject-call", + "title": "Reject a call", + "href": "/sdk/react-native/calling/managing-calls/reject-call", + "type": "page", + "children": [], + "minIndex": 666, + "navigationTitle": "Reject a call" + }, + { + "id": "calling/managing-calls/cancel-call", + "segment": "cancel-call", + "title": "Cancel a call invitation", + "href": "/sdk/react-native/calling/managing-calls/cancel-call", + "type": "page", + "children": [], + "minIndex": 667, + "navigationTitle": "Cancel a call invitation" + }, + { + "id": "calling/managing-calls/hang-up-call", + "segment": "hang-up-call", + "title": "Hang up a call", + "href": "/sdk/react-native/calling/managing-calls/hang-up-call", + "type": "page", + "children": [], + "minIndex": 668, + "navigationTitle": "Hang up a call" + }, + { + "id": "calling/managing-calls/handle-call-events", + "segment": "handle-call-events", + "title": "Handle call events", + "href": "/sdk/react-native/calling/managing-calls/handle-call-events", + "type": "page", + "children": [], + "minIndex": 669, + "navigationTitle": "Handle call events" + } + ], + "minIndex": 663 + }, + { + "id": "calling/retrieving-call-information", + "segment": "retrieving-call-information", + "title": "Retrieving call information", + "href": null, + "type": "folder", + "children": [ + { + "id": "calling/retrieving-call-information/restore-pending-invitation", + "segment": "restore-pending-invitation", + "title": "Restore a pending invitation", + "href": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "type": "page", + "children": [], + "minIndex": 670, + "navigationTitle": "Restore a pending invitation" + }, + { + "id": "calling/retrieving-call-information/get-room-by-group-id", + "segment": "get-room-by-group-id", + "title": "Get a group call room", + "href": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "type": "page", + "children": [], + "minIndex": 671, + "navigationTitle": "Get a group call room" + }, + { + "id": "calling/retrieving-call-information/get-token-by-room-id", + "segment": "get-token-by-room-id", + "title": "Get room credentials", + "href": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "type": "page", + "children": [], + "minIndex": 672, + "navigationTitle": "Get room credentials" + } + ], + "minIndex": 670 + }, + { + "id": "calling/sending-custom-signals/send-a-custom-signal", + "segment": "send-a-custom-signal", + "title": "Send a custom signal", + "href": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "type": "page", + "children": [], + "minIndex": 673, + "navigationTitle": "Send a custom signal" + } + ], + "minIndex": 662 } ], - "pageCount": 143, + "pageCount": 155, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index b279d3f2d0..6894c2e626 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,8 +1,8 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 143, - "manualPageCount": 143, + "pageCount": 155, + "manualPageCount": 155, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", @@ -147,7 +147,19 @@ "/sdk/react-native/message/managing-messages/set-message-local-ex": "published", "/sdk/react-native/message/managing-read-status/send-group-read-receipts": "published", "/sdk/react-native/message/managing-read-status/get-group-message-readers": "published", - "/sdk/react-native/file-uploads/upload-file": "published" + "/sdk/react-native/file-uploads/upload-file": "published", + "/sdk/react-native/calling/overview-calling": "published", + "/sdk/react-native/calling/managing-calls/start-single-call": "published", + "/sdk/react-native/calling/managing-calls/start-group-call": "published", + "/sdk/react-native/calling/managing-calls/accept-call": "published", + "/sdk/react-native/calling/managing-calls/reject-call": "published", + "/sdk/react-native/calling/managing-calls/cancel-call": "published", + "/sdk/react-native/calling/managing-calls/hang-up-call": "published", + "/sdk/react-native/calling/managing-calls/handle-call-events": "published", + "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation": "published", + "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id": "published", + "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id": "published", + "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal": "published" }, "navigationLabels": { "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", @@ -239,6 +251,21 @@ "Transfer group ownership": "转让群主", "Mute or unmute a group member": "设置群成员禁言", "Upload a file": "上传文件", + "Calling": "音视频通话", + "Managing calls": "管理通话", + "Retrieving call information": "查询通话信息", + "Audio and video calling overview": "音视频通话概览", + "Start a one-to-one call": "发起单聊通话", + "Start a group call": "发起群聊通话", + "Accept a call": "接受通话", + "Reject a call": "拒绝通话", + "Cancel a call invitation": "取消通话邀请", + "Hang up a call": "挂断通话", + "Handle call events": "处理通话事件", + "Restore a pending invitation": "恢复待处理的通话邀请", + "Get a group call room": "查询群组通话房间", + "Get room credentials": "获取通话房间 Token", + "Send a custom signal": "发送自定义信令", "Conversation": "会话", "Retrieving conversations": "获取会话", "Conversation organization": "会话管理", @@ -2537,6 +2564,163 @@ ], "sourcePath": "/sdk/react-native/file-uploads/upload-file", "title": "上传文件" + }, + "/sdk/react-native/calling/overview-calling": { + "body": "OpenIM React Native SDK 提供音视频通话的信令 API,用于发起和处理通话邀请、查询房间信息及同步通话状态。它只处理通话业务信令,不负责音视频采集与播放、媒体房间连接或通话界面渲染。\n\n发起或接受通话后,SDK 返回 `roomID`、`token` 和 `liveURL` 等房间凭据。应用需要将这些凭据交给实时音视频媒体引擎加入通话房间,并自行处理设备权限、媒体轨道、弱网策略和界面状态。\n\n## 通话流程\n\n1. 调用 `signalingInvite()` 发起单聊通话,或调用 `signalingInviteInGroup()` 发起群聊通话。\n2. 被邀请用户通过 `OnReceiveNewInvitation` 收到通话邀请,选择接受或拒绝。\n3. 接受邀请后调用 `signalingAccept()`,使用返回的房间凭据加入通话房间。\n4. 通话期间根据邀请状态、参与者状态、媒体流状态和自定义信令更新通话界面。\n5. 发起方可取消尚未接通的邀请;通话参与者可挂断已建立的通话。\n\n## 核心数据\n\n| 数据 | 说明 |\n| --- | --- |\n| `RtcInvite` | 通话邀请,包含邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 |\n| `RtcInviteResults` | 发起、接受通话或查询房间凭据后返回的 `roomID`、`token` 和 `liveURL`。 |\n| `CallingRoomData` | 按群组查询得到的房间 ID、邀请信息和参与者资料。 |\n| `OnReceiveNewInvitationPayload` | 收到通话邀请时的事件参数,包含 `invitation`、可选的 `offlinePushInfo` 和参与者资料。 |\n\n`customData` 和自定义信令均为业务自定义字符串,可按业务协议传递 JSON 或其他格式的数据。\n\n## 通话状态\n\n调用发起、接受、拒绝、取消或挂断 API 后,可根据对应调用结果更新当前操作的界面。其他用户或设备的通话状态通过事件接收。使用 `roomID` 区分通话;参与者状态同时使用 `roomID` 和 `userID` 区分。\n\n邀请生命周期、参与者进出房间和媒体流变化的监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。自定义信令的监听方式见[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal)。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发起单聊或群聊通话 | [发起单聊通话](/sdk/react-native/calling/managing-calls/start-single-call)、[发起群聊通话](/sdk/react-native/calling/managing-calls/start-group-call) |\n| 接受或拒绝邀请 | [接受通话](/sdk/react-native/calling/managing-calls/accept-call)、[拒绝通话](/sdk/react-native/calling/managing-calls/reject-call) |\n| 取消邀请或挂断通话 | [取消通话邀请](/sdk/react-native/calling/managing-calls/cancel-call)、[挂断通话](/sdk/react-native/calling/managing-calls/hang-up-call) |\n| 查询房间或恢复待处理邀请 | [查询群组通话房间](/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id)、[获取通话房间 Token](/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id)、[恢复待处理的通话邀请](/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation) |\n| 处理事件和自定义信令 | [处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)、[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal) |", + "description": "OpenIM React Native SDK 音视频通话概览。", + "headings": [ + { + "depth": 2, + "title": "通话流程", + "url": "#通话流程" + }, + { + "depth": 2, + "title": "核心数据", + "url": "#核心数据" + }, + { + "depth": 2, + "title": "通话状态", + "url": "#通话状态" + }, + { + "depth": 2, + "title": "按任务查找页面", + "url": "#按任务查找页面" + } + ], + "sourcePath": "/sdk/react-native/calling/overview-calling", + "title": "音视频通话概览" + }, + "/sdk/react-native/calling/managing-calls/start-single-call": { + "body": "调用 `signalingInvite()` 发起单聊音视频通话。调用完成后返回房间凭据,应用可使用其中的 `roomID`、`token` 和 `liveURL` 接入实时音视频媒体引擎。\n\n```ts\nconst roomCredentials = await OpenIMSDK.signalingInvite({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: [peerUserID],\n groupID: '',\n roomID,\n timeout: 30,\n mediaType: 'video',\n sessionType: SessionType.Single,\n platformID: currentPlatform,\n },\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `RtcInvite` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 发起通话的当前用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户 ID 列表;单聊时传入对方用户 ID。 |\n| `invitation.groupID` | `string` | 是 | 单聊传空字符串。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的房间 ID,后续通话操作和状态处理使用该值识别通话。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,例如 `audio` 或 `video`。 |\n| `invitation.sessionType` | `SessionType` | 是 | 单聊传入 `SessionType.Single`。 |\n| `invitation.platformID` | `Platform` | 是 | 发起端平台;传入当前客户端对应的 `Platform` 枚举值。 |\n| `invitation.customData` | `string` | 否 | 随邀请传递的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表。发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OfflinePush` | 否 | 被邀请用户离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送标题。 |\n| `offlinePushInfo.desc` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送正文。 |\n| `offlinePushInfo.ex` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写扩展字符串;没有内容时传空字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写 iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 条件必填 | 提供 `offlinePushInfo` 时说明是否更新 iOS 角标。 |\n\n## 返回结果\n\n调用完成后返回 `RtcInviteResults`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string` | 通话房间 ID。 |\n| `token` | `string` | 加入通话房间使用的凭据。 |\n| `liveURL` | `string` | 通话服务返回的房间地址。 |\n| `busyLineUserIDList` | `string[]` | 处于忙线状态的被邀请用户 ID 列表。 |\n\n被邀请用户会通过 `OnReceiveNewInvitation` 收到 `OnReceiveNewInvitationPayload`。接受、拒绝、取消和挂断等状态变化见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。", + "description": "使用 OpenIM React Native SDK 发起单聊音视频通话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "发起单聊通话" + }, + "/sdk/react-native/calling/managing-calls/start-group-call": { + "body": "调用 `signalingInviteInGroup()` 发起群聊音视频通话。`groupID` 用于标识发起通话的群组。`inviteeUserIDList` 指定本次邀请的群成员,不会自动邀请群内全部成员。\n\n```ts\nconst roomCredentials = await OpenIMSDK.signalingInviteInGroup({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: memberUserIDs,\n groupID,\n roomID,\n timeout: 30,\n mediaType: 'video',\n sessionType: SessionType.Group,\n platformID: currentPlatform,\n },\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `RtcInvite` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 发起通话的当前用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 本次邀请的群成员用户 ID 列表。 |\n| `invitation.groupID` | `string` | 是 | 目标群组 ID。 |\n| `invitation.roomID` | `string` | 是 | 本次群聊通话的房间 ID。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,例如 `audio` 或 `video`。 |\n| `invitation.sessionType` | `SessionType` | 是 | 群聊传入 `SessionType.Group`。 |\n| `invitation.platformID` | `Platform` | 是 | 发起端平台;传入当前客户端对应的 `Platform` 枚举值。 |\n| `invitation.customData` | `string` | 否 | 随邀请传递的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表。发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OfflinePush` | 否 | 被邀请用户离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送标题。 |\n| `offlinePushInfo.desc` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写推送正文。 |\n| `offlinePushInfo.ex` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写扩展字符串;没有内容时传空字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 条件必填 | 提供 `offlinePushInfo` 时填写 iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 条件必填 | 提供 `offlinePushInfo` 时说明是否更新 iOS 角标。 |\n\n调用完成后返回 `RtcInviteResults`,其中包含 `roomID`、`token`、`liveURL` 和可选的 `busyLineUserIDList`。字段说明见[发起单聊通话](/sdk/react-native/calling/managing-calls/start-single-call)。\n\n被邀请成员会通过 `OnReceiveNewInvitation` 收到 `OnReceiveNewInvitationPayload`。成员的接受、拒绝和离开状态见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。", + "description": "使用 OpenIM React Native SDK 发起群聊音视频通话。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "发起群聊通话" + }, + "/sdk/react-native/calling/managing-calls/accept-call": { + "body": "收到 `OnReceiveNewInvitation` 事件后,调用 `signalingAccept()` 接受通话邀请。\n\n```ts\nconst roomCredentials = await OpenIMSDK.signalingAccept({\n opUserID: currentUserID,\n invitation,\n});\n```\n\n`opUserID` 是当前接受邀请的用户 ID。`invitation` 应使用 `OnReceiveNewInvitation` 事件回调提供的完整 `invitation` 对象。\n\n调用完成后返回 `RtcInviteResults`,包含通话房间的 `roomID`、`token` 和 `liveURL`。其他参与者会通过 `OnInviteeAccepted` 事件收到接受结果,事件回调中的 `invitation.roomID` 用于识别本次通话。事件监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。", + "description": "使用 OpenIM React Native SDK 接受通话邀请。", + "headings": [], + "sourcePath": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "接受通话" + }, + "/sdk/react-native/calling/managing-calls/reject-call": { + "body": "收到通话邀请后,如不接受,调用 `signalingReject()` 拒绝邀请。\n\n```ts\nawait OpenIMSDK.signalingReject({\n opUserID: currentUserID,\n invitation,\n});\n```\n\n`opUserID` 是当前拒绝邀请的用户 ID。`invitation` 使用 `OnReceiveNewInvitation` 事件回调提供的完整 `invitation` 对象。\n\n调用完成后,拒绝请求已完成。发起方会通过 `OnInviteeRejected` 事件收到拒绝结果,事件回调中的 `invitation.roomID` 用于识别本次通话。事件参数和监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。", + "description": "使用 OpenIM React Native SDK 拒绝通话邀请。", + "headings": [], + "sourcePath": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "拒绝通话" + }, + "/sdk/react-native/calling/managing-calls/cancel-call": { + "body": "发起方在通话尚未接通时,调用 `signalingCancel()` 取消邀请。\n\n```ts\nawait OpenIMSDK.signalingCancel({\n opUserID: currentUserID,\n invitation,\n});\n```\n\n`opUserID` 是当前发起取消操作的用户 ID。`invitation` 使用发起通话时保存的完整 `RtcInvite` 对象。\n\n调用完成后,取消邀请请求已完成。被邀请用户会通过 `OnInvitationCancelled` 事件收到取消结果,事件回调中的 `invitation.roomID` 用于识别本次通话。事件参数和监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。", + "description": "使用 OpenIM React Native SDK 取消通话邀请。", + "headings": [], + "sourcePath": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "取消通话邀请" + }, + "/sdk/react-native/calling/managing-calls/hang-up-call": { + "body": "通话建立后,调用 `signalingHungUp()` 挂断通话。\n\n```ts\nawait OpenIMSDK.signalingHungUp({\n opUserID: currentUserID,\n invitation,\n});\n```\n\n`opUserID` 是当前挂断通话的用户 ID。`invitation` 使用本次通话的完整 `RtcInvite` 对象,其中的 `roomID` 应与当前通话房间一致。\n\n调用完成后,挂断请求已完成。其他参与者会通过 `OnHangUp` 事件收到通话结束信息;事件回调中的 `invitation.roomID` 用于识别本次通话。事件参数和监听方式见[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)。", + "description": "使用 OpenIM React Native SDK 挂断通话。", + "headings": [], + "sourcePath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "挂断通话" + }, + "/sdk/react-native/calling/managing-calls/handle-call-events": { + "body": "通话相关事件用于接收邀请状态、参与者状态和媒体流状态。邀请类事件从回调参数的 `invitation` 读取房间信息;媒体流变化直接提供 `roomID`。发送和接收自定义信令见[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal)。\n\n## 事件参数\n\n| 事件 | 回调参数类型 | 常用字段 |\n| --- | --- | --- |\n| `OnReceiveNewInvitation` | `OnReceiveNewInvitationPayload` | `invitation`、`userID`、`participant`、`offlinePushInfo`。 |\n| `OnInviteeAccepted` | `OnInviteeAcceptedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 |\n| `OnInviteeRejected` | `OnInviteeRejectedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 |\n| `OnInvitationCancelled` | `OnInvitationCancelledPayload` | `invitation`、`userID`、`participant`、`offlinePushInfo`。 |\n| `OnInvitationTimeout` | `OnReceiveNewInvitationPayload` | `invitation`、`userID`、`participant`、`offlinePushInfo`。 |\n| `OnInviteeAcceptedByOtherDevice` | `OnInviteeAcceptedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 |\n| `OnInviteeRejectedByOtherDevice` | `OnInviteeRejectedPayload` | `invitation`、`userID`、`participant`、`opUserPlatformID`。 |\n| `OnHangUp` | `OnHangUpPayload` | `invitation`、`userID`、`offlinePushInfo`。 |\n| `OnRoomParticipantConnected` | `OnRoomParticipantConnectedPayload` | `invitation`、`groupID`、`participant`。 |\n| `OnRoomParticipantDisconnected` | `OnRoomParticipantDisconnectedPayload` | `invitation`、`groupID`、`participant`。 |\n| `OnStreamChange` | `OnStreamChangePayload` | `roomID`、`streamType`、`mute`。 |\n\n使用 `invitation.roomID` 或 `roomID` 区分通话;参与者信息中使用 `participant.userInfo.userID` 区分用户。\n\n```ts\nfunction handleReceiveNewInvitation(payload: OnReceiveNewInvitationPayload) {\n // ...\n}\n\nfunction handleInviteeAccepted(payload: OnInviteeAcceptedPayload) {\n // ...\n}\n\nfunction handleInviteeRejected(payload: OnInviteeRejectedPayload) {\n // ...\n}\n\nfunction handleInvitationCancelled(payload: OnInvitationCancelledPayload) {\n // ...\n}\n\nfunction handleInvitationTimeout(payload: OnReceiveNewInvitationPayload) {\n // ...\n}\n\nfunction handleInviteeAcceptedByOtherDevice(payload: OnInviteeAcceptedPayload) {\n // ...\n}\n\nfunction handleInviteeRejectedByOtherDevice(payload: OnInviteeRejectedPayload) {\n // ...\n}\n\nfunction handleHangUp(payload: OnHangUpPayload) {\n // ...\n}\n\nfunction handleRoomParticipantConnected(payload: OnRoomParticipantConnectedPayload) {\n // ...\n}\n\nfunction handleRoomParticipantDisconnected(payload: OnRoomParticipantDisconnectedPayload) {\n // ...\n}\n\nfunction handleStreamChange(payload: OnStreamChangePayload) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation);\nOpenIMSDK.on(OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted);\nOpenIMSDK.on(OpenIMEvent.OnInviteeRejected, handleInviteeRejected);\nOpenIMSDK.on(OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled);\nOpenIMSDK.on(OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout);\nOpenIMSDK.on(OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice);\nOpenIMSDK.on(OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice);\nOpenIMSDK.on(OpenIMEvent.OnHangUp, handleHangUp);\nOpenIMSDK.on(OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected);\nOpenIMSDK.on(OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected);\nOpenIMSDK.on(OpenIMEvent.OnStreamChange, handleStreamChange);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation);\nOpenIMSDK.off(OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted);\nOpenIMSDK.off(OpenIMEvent.OnInviteeRejected, handleInviteeRejected);\nOpenIMSDK.off(OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled);\nOpenIMSDK.off(OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout);\nOpenIMSDK.off(OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice);\nOpenIMSDK.off(OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice);\nOpenIMSDK.off(OpenIMEvent.OnHangUp, handleHangUp);\nOpenIMSDK.off(OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected);\nOpenIMSDK.off(OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected);\nOpenIMSDK.off(OpenIMEvent.OnStreamChange, handleStreamChange);\n```\n\n组件销毁、退出登录或切换账号时,应取消监听。", + "description": "使用 OpenIM React Native SDK 监听通话事件。", + "headings": [ + { + "depth": 2, + "title": "事件参数", + "url": "#事件参数" + } + ], + "sourcePath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "处理通话事件" + }, + "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation": { + "body": "应用启动或恢复到前台时,调用 `getSignalingInvitationInfoStartApp()` 获取仍待处理的通话邀请。\n\n```ts\nconst { invitation, offlinePushInfo } =\n await OpenIMSDK.getSignalingInvitationInfoStartApp();\n```\n\n## 返回结果\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `invitation` | `RtcInvite` 或 `null` | 待处理的通话邀请;没有待处理邀请时为 `null`。 |\n| `offlinePushInfo` | `OfflinePush` | 邀请携带的离线推送内容。 |\n\n当 `invitation` 不为 `null` 时,可使用其中的邀请信息恢复来电展示。后续取消、超时、接受和挂断等状态通过[处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)接收。", + "description": "恢复待处理的通话邀请。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "恢复待处理的通话邀请" + }, + "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id": { + "body": "调用 `signalingGetRoomByGroupID()` 按群组 ID 获取群聊通话房间信息;`groupID` 是目标群组 ID。\n\n```ts\nconst room = await OpenIMSDK.signalingGetRoomByGroupID(groupID);\n```\n\n## 返回结果\n\n调用完成后返回 `CallingRoomData`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string` | 通话房间 ID。 |\n| `invitation` | `RtcInvite`(可选) | 房间对应的通话邀请信息。 |\n| `participant` | `ParticipantInfo[]`(可选) | 当前房间的参与者资料。 |\n\n`participant` 中的 `userInfo` 是用户资料;群聊场景还可能包含 `groupMemberInfo` 和 `groupInfo`。调用后可使用 `roomID` 查询房间凭据或处理对应的通话状态。", + "description": "按群组 ID 查询通话房间。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "查询群组通话房间" + }, + "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id": { + "body": "已知通话房间 ID、需要获取房间凭据时,调用 `signalingGetTokenByRoomID()`;`roomID` 是目标通话房间 ID。\n\n```ts\nconst roomCredentials =\n await OpenIMSDK.signalingGetTokenByRoomID(roomID);\n```\n\n## 返回结果\n\n调用完成后返回 `RtcInviteResults`,包含 `roomID`、`token`、`liveURL` 和可选的 `busyLineUserIDList`。将返回的房间凭据交给实时音视频媒体引擎加入通话房间。", + "description": "按房间 ID 获取通话凭据。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "获取通话房间 Token" + }, + "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal": { + "body": "调用 `signalingSendCustomSignal()` 向通话房间发送业务自定义信令,例如举手或切换布局。`customInfo` 是字符串;需要传递结构化数据时,可传入 JSON 字符串。\n\n```ts\nawait OpenIMSDK.signalingSendCustomSignal({\n roomID,\n customInfo: JSON.stringify({\n type: 'hand-raised',\n }),\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string` | 目标通话房间 ID。 |\n| `customInfo` | `string` | 业务自定义信令内容。 |\n\n调用完成后,自定义信令发送请求已完成。\n\n## 接收自定义信令\n\n其他参与者发送自定义信令时触发 `OnReceiveCustomSignal` 事件,回调参数类型为 `OnReceiveCustomSignalPayload`,包含 `roomID` 和 `customInfo`。\n\n```ts\nfunction handleCustomSignal(payload: OnReceiveCustomSignalPayload) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal);\n```\n\n组件销毁、退出登录或切换账号时,应取消监听。接收 `customInfo` 后,按业务协议解析并处理其中的数据。", + "description": "在通话房间中发送自定义信令。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "接收自定义信令", + "url": "#接收自定义信令" + } + ], + "sourcePath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "发送自定义信令" } } } diff --git a/src/generated/routes.json b/src/generated/routes.json index 8bdc771ed9..a9ae8ea497 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -17646,7 +17646,7 @@ "relativePath": "sdk/react-native/file-uploads/upload-file", "sourcePath": "/sdk/react-native/file-uploads/upload-file", "title": "Upload a file", - "description": "Upload a file with OpenIM React Native SDK.", + "description": "Upload a file independently and obtain its remote URL with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", @@ -17657,5 +17657,221 @@ "sourceIndex": 3852, "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx", "navOrder": 661 + }, + { + "id": 2483, + "path": "/sdk/react-native/calling/overview-calling", + "relativePath": "sdk/react-native/calling/overview-calling", + "sourcePath": "/sdk/react-native/calling/overview-calling", + "title": "Audio and video calling overview", + "description": "OpenIM React Native SDK guide for audio and video calling.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3853, + "contentFile": "content/docs/chat/sdk/react-native/calling/overview-calling.mdx", + "navOrder": 662 + }, + { + "id": 2484, + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "relativePath": "sdk/react-native/calling/managing-calls/start-single-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "description": "Start a one-to-one audio or video call with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3854, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx", + "navOrder": 663 + }, + { + "id": 2485, + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "relativePath": "sdk/react-native/calling/managing-calls/start-group-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "Start a group call", + "description": "Start a group audio or video call with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3855, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx", + "navOrder": 664 + }, + { + "id": 2486, + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "relativePath": "sdk/react-native/calling/managing-calls/accept-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "Accept a call", + "description": "Accept a call invitation with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3856, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx", + "navOrder": 665 + }, + { + "id": 2487, + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "relativePath": "sdk/react-native/calling/managing-calls/reject-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "Reject a call", + "description": "Reject a call invitation with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3857, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx", + "navOrder": 666 + }, + { + "id": 2488, + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "relativePath": "sdk/react-native/calling/managing-calls/cancel-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "description": "Cancel a call invitation with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3858, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx", + "navOrder": 667 + }, + { + "id": 2489, + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "relativePath": "sdk/react-native/calling/managing-calls/hang-up-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "Hang up a call", + "description": "Hang up a call with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3859, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx", + "navOrder": 668 + }, + { + "id": 2490, + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "relativePath": "sdk/react-native/calling/managing-calls/handle-call-events", + "sourcePath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "description": "Listen for call events with OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3860, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx", + "navOrder": 669 + }, + { + "id": 2491, + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "relativePath": "sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending invitation", + "description": "Restore a pending call invitation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3861, + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx", + "navOrder": 670 + }, + { + "id": 2492, + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "relativePath": "sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "description": "Get a call room by group ID.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3862, + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx", + "navOrder": 671 + }, + { + "id": 2493, + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "relativePath": "sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get room credentials", + "description": "Get call credentials by room ID.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3863, + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx", + "navOrder": 672 + }, + { + "id": 2494, + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "relativePath": "sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "sourcePath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "description": "Send a custom signal in a call room.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3864, + "contentFile": "content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx", + "navOrder": 673 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 0fba22aa84..8fe9e9eb8b 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -7814,5 +7814,101 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", "content": "uploadFile 用于独立上传本地文件,可用于头像、群头像、资料附件或其他业务文件。 const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 上传使用的文件名。 | | contentType | string | 是 | 文件的 MIME 类型。 | | uuid | string | 是 | 本次上传的业务标识。 | | cause | string | 否 | 业务约定的上传原因。 | | filepath | string | 是 | 应用可读取的本地文件路径。 | 调用完成后返回远端资源地址 url 。可将该地址用于更新头像、保存业务附件,或创建 URL 类型的媒体消息后再发送。 监听上传状态 上传过程中触发 UploadOnProgress 事件,回调参数包含当前已上传量 current 和文件总量 size 。上传完成时触发 UploadComplete 事件,回调参数的 data 包含 fileSize 、 streamSize 和 storageSize 。 function handleUploadProgress current, size // ... function handleUploadComplete data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // 取消监听 OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; 组件销毁、退出登录或切换账号时,应取消监听。" + }, + { + "path": "/sdk/react-native/calling/overview-calling", + "title": "音视频通话概览", + "description": "OpenIM React Native SDK 音视频通话概览。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling overview-calling", + "content": "OpenIM React Native SDK 提供音视频通话的信令 API,用于发起和处理通话邀请、查询房间信息及同步通话状态。它只处理通话业务信令,不负责音视频采集与播放、媒体房间连接或通话界面渲染。 发起或接受通话后,SDK 返回 roomID 、 token 和 liveURL 等房间凭据。应用需要将这些凭据交给实时音视频媒体引擎加入通话房间,并自行处理设备权限、媒体轨道、弱网策略和界面状态。 通话流程 1. 调用 signalingInvite 发起单聊通话,或调用 signalingInviteInGroup 发起群聊通话。 2. 被邀请用户通过 OnReceiveNewInvitation 收到通话邀请,选择接受或拒绝。 3. 接受邀请后调用 signalingAccept ,使用返回的房间凭据加入通话房间。 4. 通话期间根据邀请状态、参与者状态、媒体流状态和自定义信令更新通话界面。 5. 发起方可取消尚未接通的邀请;通话参与者可挂断已建立的通话。 核心数据 | 数据 | 说明 | | | | | RtcInvite | 通话邀请,包含邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 | | RtcInviteResults | 发起、接受通话或查询房间凭据后返回的 roomID 、 token 和 liveURL 。 | | CallingRoomData | 按群组查询得到的房间 ID、邀请信息和参与者资料。 | | OnReceiveNewInvitationPayload | 收到通话邀请时的事件参数,包含 invitation 、可选的 offlinePushInfo 和参与者资料。 | customData 和自定义信令均为业务自定义字符串,可按业务协议传递 JSON 或其他格式的数据。 通话状态 调用发起、接受、拒绝、取消或挂断 API 后,可根据对应调用结果更新当前操作的界面。其他用户或设备的通话状态通过事件接收。使用 roomID 区分通话;参与者状态同时使用 roomID 和 userID 区分。 邀请生命周期、参与者进出房间和媒体流变化的监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。自定义信令的监听方式见 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal 。 按任务查找页面 | 任务 | 页面 | | | | | 发起单聊或群聊通话 | 发起单聊通话 /sdk/react native/calling/managing calls/start single call 、 发起群聊通话 /sdk/react native/calling/managing calls/start group call | | 接受或拒绝邀请 | 接受通话 /sdk/react native/calling/managing calls/accept call 、 拒绝通话 /sdk/react native/calling/managing calls/reject call | | 取消邀请或挂断通话 | 取消通话邀请 /sdk/react native/calling/managing calls/cancel call 、 挂断通话 /sdk/react native/calling/managing calls/hang up call | | 查询房间或恢复待处理邀请 | 查询群组通话房间 /sdk/react native/calling/retrieving call information/get room by group id 、 获取通话房间 Token /sdk/react native/calling/retrieving call information/get token by room id 、 恢复待处理的通话邀请 /sdk/react native/calling/retrieving call information/restore pending invitation | | 处理事件和自定义信令 | 处理通话事件 /sdk/react native/calling/managing calls/handle call events 、 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal |" + }, + { + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "发起单聊通话", + "description": "使用 OpenIM React Native SDK 发起单聊音视频通话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-single-call", + "content": "调用 signalingInvite 发起单聊音视频通话。调用完成后返回房间凭据,应用可使用其中的 roomID 、 token 和 liveURL 接入实时音视频媒体引擎。 const roomCredentials = await OpenIMSDK.signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , groupID: '', roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Single, platformID: currentPlatform, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | RtcInvite | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起通话的当前用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户 ID 列表;单聊时传入对方用户 ID。 | | invitation.groupID | string | 是 | 单聊传空字符串。 | | invitation.roomID | string | 是 | 本次通话的房间 ID,后续通话操作和状态处理使用该值识别通话。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,例如 audio 或 video 。 | | invitation.sessionType | SessionType | 是 | 单聊传入 SessionType.Single 。 | | invitation.platformID | Platform | 是 | 发起端平台;传入当前客户端对应的 Platform 枚举值。 | | invitation.customData | string | 否 | 随邀请传递的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表。发起新邀请时通常不填写。 | | offlinePushInfo | OfflinePush | 否 | 被邀请用户离线时使用的推送内容。 | | offlinePushInfo.title | string | 条件必填 | 提供 offlinePushInfo 时填写推送标题。 | | offlinePushInfo.desc | string | 条件必填 | 提供 offlinePushInfo 时填写推送正文。 | | offlinePushInfo.ex | string | 条件必填 | 提供 offlinePushInfo 时填写扩展字符串;没有内容时传空字符串。 | | offlinePushInfo.iOSPushSound | string | 条件必填 | 提供 offlinePushInfo 时填写 iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 条件必填 | 提供 offlinePushInfo 时说明是否更新 iOS 角标。 | 返回结果 调用完成后返回 RtcInviteResults : | 字段 | 类型 | 说明 | | | | | | roomID | string | 通话房间 ID。 | | token | string | 加入通话房间使用的凭据。 | | liveURL | string | 通话服务返回的房间地址。 | | busyLineUserIDList | string | 处于忙线状态的被邀请用户 ID 列表。 | 被邀请用户会通过 OnReceiveNewInvitation 收到 OnReceiveNewInvitationPayload 。接受、拒绝、取消和挂断等状态变化见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + }, + { + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "发起群聊通话", + "description": "使用 OpenIM React Native SDK 发起群聊音视频通话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-group-call", + "content": "调用 signalingInviteInGroup 发起群聊音视频通话。 groupID 用于标识发起通话的群组。 inviteeUserIDList 指定本次邀请的群成员,不会自动邀请群内全部成员。 const roomCredentials = await OpenIMSDK.signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: memberUserIDs, groupID, roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Group, platformID: currentPlatform, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | RtcInvite | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起通话的当前用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 本次邀请的群成员用户 ID 列表。 | | invitation.groupID | string | 是 | 目标群组 ID。 | | invitation.roomID | string | 是 | 本次群聊通话的房间 ID。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,例如 audio 或 video 。 | | invitation.sessionType | SessionType | 是 | 群聊传入 SessionType.Group 。 | | invitation.platformID | Platform | 是 | 发起端平台;传入当前客户端对应的 Platform 枚举值。 | | invitation.customData | string | 否 | 随邀请传递的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表。发起新邀请时通常不填写。 | | offlinePushInfo | OfflinePush | 否 | 被邀请用户离线时使用的推送内容。 | | offlinePushInfo.title | string | 条件必填 | 提供 offlinePushInfo 时填写推送标题。 | | offlinePushInfo.desc | string | 条件必填 | 提供 offlinePushInfo 时填写推送正文。 | | offlinePushInfo.ex | string | 条件必填 | 提供 offlinePushInfo 时填写扩展字符串;没有内容时传空字符串。 | | offlinePushInfo.iOSPushSound | string | 条件必填 | 提供 offlinePushInfo 时填写 iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 条件必填 | 提供 offlinePushInfo 时说明是否更新 iOS 角标。 | 调用完成后返回 RtcInviteResults ,其中包含 roomID 、 token 、 liveURL 和可选的 busyLineUserIDList 。字段说明见 发起单聊通话 /sdk/react native/calling/managing calls/start single call 。 被邀请成员会通过 OnReceiveNewInvitation 收到 OnReceiveNewInvitationPayload 。成员的接受、拒绝和离开状态见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + }, + { + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "接受通话", + "description": "使用 OpenIM React Native SDK 接受通话邀请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls accept-call", + "content": "收到 OnReceiveNewInvitation 事件后,调用 signalingAccept 接受通话邀请。 const roomCredentials = await OpenIMSDK.signalingAccept opUserID: currentUserID, invitation, ; opUserID 是当前接受邀请的用户 ID。 invitation 应使用 OnReceiveNewInvitation 事件回调提供的完整 invitation 对象。 调用完成后返回 RtcInviteResults ,包含通话房间的 roomID 、 token 和 liveURL 。其他参与者会通过 OnInviteeAccepted 事件收到接受结果,事件回调中的 invitation.roomID 用于识别本次通话。事件监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + }, + { + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "拒绝通话", + "description": "使用 OpenIM React Native SDK 拒绝通话邀请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls reject-call", + "content": "收到通话邀请后,如不接受,调用 signalingReject 拒绝邀请。 await OpenIMSDK.signalingReject opUserID: currentUserID, invitation, ; opUserID 是当前拒绝邀请的用户 ID。 invitation 使用 OnReceiveNewInvitation 事件回调提供的完整 invitation 对象。 调用完成后,拒绝请求已完成。发起方会通过 OnInviteeRejected 事件收到拒绝结果,事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + }, + { + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "取消通话邀请", + "description": "使用 OpenIM React Native SDK 取消通话邀请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls cancel-call", + "content": "发起方在通话尚未接通时,调用 signalingCancel 取消邀请。 await OpenIMSDK.signalingCancel opUserID: currentUserID, invitation, ; opUserID 是当前发起取消操作的用户 ID。 invitation 使用发起通话时保存的完整 RtcInvite 对象。 调用完成后,取消邀请请求已完成。被邀请用户会通过 OnInvitationCancelled 事件收到取消结果,事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + }, + { + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "挂断通话", + "description": "使用 OpenIM React Native SDK 挂断通话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls hang-up-call", + "content": "通话建立后,调用 signalingHungUp 挂断通话。 await OpenIMSDK.signalingHungUp opUserID: currentUserID, invitation, ; opUserID 是当前挂断通话的用户 ID。 invitation 使用本次通话的完整 RtcInvite 对象,其中的 roomID 应与当前通话房间一致。 调用完成后,挂断请求已完成。其他参与者会通过 OnHangUp 事件收到通话结束信息;事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + }, + { + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "处理通话事件", + "description": "使用 OpenIM React Native SDK 监听通话事件。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls handle-call-events", + "content": "通话相关事件用于接收邀请状态、参与者状态和媒体流状态。邀请类事件从回调参数的 invitation 读取房间信息;媒体流变化直接提供 roomID 。发送和接收自定义信令见 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal 。 事件参数 | 事件 | 回调参数类型 | 常用字段 | | | | | | OnReceiveNewInvitation | OnReceiveNewInvitationPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInviteeAccepted | OnInviteeAcceptedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInviteeRejected | OnInviteeRejectedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInvitationCancelled | OnInvitationCancelledPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInvitationTimeout | OnReceiveNewInvitationPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInviteeAcceptedByOtherDevice | OnInviteeAcceptedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInviteeRejectedByOtherDevice | OnInviteeRejectedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnHangUp | OnHangUpPayload | invitation 、 userID 、 offlinePushInfo 。 | | OnRoomParticipantConnected | OnRoomParticipantConnectedPayload | invitation 、 groupID 、 participant 。 | | OnRoomParticipantDisconnected | OnRoomParticipantDisconnectedPayload | invitation 、 groupID 、 participant 。 | | OnStreamChange | OnStreamChangePayload | roomID 、 streamType 、 mute 。 | 使用 invitation.roomID 或 roomID 区分通话;参与者信息中使用 participant.userInfo.userID 区分用户。 function handleReceiveNewInvitation payload: OnReceiveNewInvitationPayload // ... function handleInviteeAccepted payload: OnInviteeAcceptedPayload // ... function handleInviteeRejected payload: OnInviteeRejectedPayload // ... function handleInvitationCancelled payload: OnInvitationCancelledPayload // ... function handleInvitationTimeout payload: OnReceiveNewInvitationPayload // ... function handleInviteeAcceptedByOtherDevice payload: OnInviteeAcceptedPayload // ... function handleInviteeRejectedByOtherDevice payload: OnInviteeRejectedPayload // ... function handleHangUp payload: OnHangUpPayload // ... function handleRoomParticipantConnected payload: OnRoomParticipantConnectedPayload // ... function handleRoomParticipantDisconnected payload: OnRoomParticipantDisconnectedPayload // ... function handleStreamChange payload: OnStreamChangePayload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.on OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.on OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.on OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.on OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.on OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice ; OpenIMSDK.on OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice ; OpenIMSDK.on OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected ; OpenIMSDK.on OpenIMEvent.OnStreamChange, handleStreamChange ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.off OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.off OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.off OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.off OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.off OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice ; OpenIMSDK.off OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice ; OpenIMSDK.off OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected ; OpenIMSDK.off OpenIMEvent.OnStreamChange, handleStreamChange ; 组件销毁、退出登录或切换账号时,应取消监听。" + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "恢复待处理的通话邀请", + "description": "恢复待处理的通话邀请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information restore-pending-invitation", + "content": "应用启动或恢复到前台时,调用 getSignalingInvitationInfoStartApp 获取仍待处理的通话邀请。 const invitation, offlinePushInfo = await OpenIMSDK.getSignalingInvitationInfoStartApp ; 返回结果 | 字段 | 类型 | 说明 | | | | | | invitation | RtcInvite 或 null | 待处理的通话邀请;没有待处理邀请时为 null 。 | | offlinePushInfo | OfflinePush | 邀请携带的离线推送内容。 | 当 invitation 不为 null 时,可使用其中的邀请信息恢复来电展示。后续取消、超时、接受和挂断等状态通过 处理通话事件 /sdk/react native/calling/managing calls/handle call events 接收。" + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "查询群组通话房间", + "description": "按群组 ID 查询通话房间。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-room-by-group-id", + "content": "调用 signalingGetRoomByGroupID 按群组 ID 获取群聊通话房间信息; groupID 是目标群组 ID。 const room = await OpenIMSDK.signalingGetRoomByGroupID groupID ; 返回结果 调用完成后返回 CallingRoomData : | 字段 | 类型 | 说明 | | | | | | roomID | string | 通话房间 ID。 | | invitation | RtcInvite (可选) | 房间对应的通话邀请信息。 | | participant | ParticipantInfo (可选) | 当前房间的参与者资料。 | participant 中的 userInfo 是用户资料;群聊场景还可能包含 groupMemberInfo 和 groupInfo 。调用后可使用 roomID 查询房间凭据或处理对应的通话状态。" + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "获取通话房间 Token", + "description": "按房间 ID 获取通话凭据。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-token-by-room-id", + "content": "已知通话房间 ID、需要获取房间凭据时,调用 signalingGetTokenByRoomID ; roomID 是目标通话房间 ID。 const roomCredentials = await OpenIMSDK.signalingGetTokenByRoomID roomID ; 返回结果 调用完成后返回 RtcInviteResults ,包含 roomID 、 token 、 liveURL 和可选的 busyLineUserIDList 。将返回的房间凭据交给实时音视频媒体引擎加入通话房间。" + }, + { + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "发送自定义信令", + "description": "在通话房间中发送自定义信令。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling sending-custom-signals send-a-custom-signal", + "content": "调用 signalingSendCustomSignal 向通话房间发送业务自定义信令,例如举手或切换布局。 customInfo 是字符串;需要传递结构化数据时,可传入 JSON 字符串。 await OpenIMSDK.signalingSendCustomSignal roomID, customInfo: JSON.stringify type: 'hand raised', , ; 参数说明 | 参数 | 类型 | 说明 | | | | | | roomID | string | 目标通话房间 ID。 | | customInfo | string | 业务自定义信令内容。 | 调用完成后,自定义信令发送请求已完成。 接收自定义信令 其他参与者发送自定义信令时触发 OnReceiveCustomSignal 事件,回调参数类型为 OnReceiveCustomSignalPayload ,包含 roomID 和 customInfo 。 function handleCustomSignal payload: OnReceiveCustomSignalPayload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; 组件销毁、退出登录或切换账号时,应取消监听。接收 customInfo 后,按业务协议解析并处理其中的数据。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index c358e613d8..e88b9488dd 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -7814,5 +7814,101 @@ "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", "content": "Use uploadFile to upload a local file independently. You can use it for avatars, group avatars, profile attachments, or other business files. const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | The file name used for the upload. | | contentType | string | Yes | The MIME type of the file. | | uuid | string | Yes | The business identifier for this upload. | | cause | string | No | The business defined reason for the upload. | | filepath | string | Yes | A local file path that the app can read. | When the call completes, it returns the remote resource URL in url . You can use the URL to update an avatar, store a business attachment, or create and send a URL based media message. Listen for upload status UploadOnProgress is triggered during the upload. Its callback parameter includes the uploaded amount in current and the total file size in size . UploadComplete is triggered when the upload completes. Its callback parameter's data includes fileSize , streamSize , and storageSize . function handleUploadProgress current, size // ... function handleUploadComplete data // ... // Register listeners OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // Remove listeners OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; Remove the listeners when the component is destroyed, the user signs out, or the account changes." + }, + { + "path": "/sdk/react-native/calling/overview-calling", + "title": "Audio and video calling overview", + "description": "OpenIM React Native SDK guide for audio and video calling.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling overview-calling", + "content": "OpenIM React Native SDK provides calling signaling APIs for starting and handling call invitations, querying room information, and synchronizing call state. It handles call business signaling only; it does not capture or play audio and video, connect to media rooms, or render call UI. After starting or accepting a call, the SDK returns room credentials such as roomID , token , and liveURL . The application passes these credentials to a real time audio and video media engine to join the call room, and handles device permissions, media tracks, weak network strategy, and UI state itself. Call flow 1. Call signalingInvite to start a one to one call, or signalingInviteInGroup to start a group call. 2. Invitees receive the call invitation through OnReceiveNewInvitation and choose whether to accept or reject it. 3. After accepting, call signalingAccept and use the returned room credentials to join the call room. 4. During the call, update the call UI based on invitation status, participant status, media stream status, and custom signals. 5. The inviter can cancel an invitation that has not connected; call participants can hang up an established call. Core data | Data | Description | | | | | RtcInvite | Call invitation containing the inviter, invitees, group, room, media type, timeout, and session type. | | RtcInviteResults | The roomID , token , and liveURL returned after starting or accepting a call, or querying room credentials. | | CallingRoomData | Room ID, invitation information, and participant information returned when querying by group. | | OnReceiveNewInvitationPayload | Event parameter for a received call invitation, containing invitation , optional offlinePushInfo , and participant information. | customData and custom signals are both application defined strings. Use JSON or another format required by the application protocol. Call state After calling the start, accept, reject, cancel, or hang up API, update the UI for the current action from the corresponding result. Call state from other users or devices is received through events. Use roomID to distinguish calls; use both roomID and userID to distinguish participant state. For invitation lifecycle, participant room entry and room exit, and media stream listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events . For custom signal listeners, see Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal . Browse by task | Task | Page | | | | | Start a one to one or group call | Start a one to one call /sdk/react native/calling/managing calls/start single call , Start a group call /sdk/react native/calling/managing calls/start group call | | Accept or reject an invitation | Accept a call /sdk/react native/calling/managing calls/accept call , Reject a call /sdk/react native/calling/managing calls/reject call | | Cancel an invitation or hang up a call | Cancel a call invitation /sdk/react native/calling/managing calls/cancel call , Hang up a call /sdk/react native/calling/managing calls/hang up call | | Query a room or restore a pending invitation | Get a group call room /sdk/react native/calling/retrieving call information/get room by group id , Get room credentials /sdk/react native/calling/retrieving call information/get token by room id , Restore a pending invitation /sdk/react native/calling/retrieving call information/restore pending invitation | | Handle events and custom signals | Handle call events /sdk/react native/calling/managing calls/handle call events , Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal |" + }, + { + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "description": "Start a one-to-one audio or video call with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-single-call", + "content": "Call signalingInvite to start a one to one audio or video call. The call returns room credentials that the app can use to connect a real time audio and video media engine with roomID , token , and liveURL . const roomCredentials = await OpenIMSDK.signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , groupID: '', roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Single, platformID: currentPlatform, , ; Parameters | Parameter | Type | Required | Description | | | | | | | invitation | RtcInvite | Yes | The call invitation. | | invitation.inviterUserID | string | Yes | User ID of the user starting the call. | | invitation.inviteeUserIDList | string | Yes | Invited user IDs. For a one to one call, provide the other user's ID. | | invitation.groupID | string | Yes | Pass an empty string for a one to one call. | | invitation.roomID | string | Yes | Room ID for this call. Subsequent call operations and state handling use this value to identify the call. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Media type, such as audio or video . | | invitation.sessionType | SessionType | Yes | Pass SessionType.Single for a one to one call. | | invitation.platformID | Platform | Yes | Inviter platform. Pass the Platform enum value for the current client. | | invitation.customData | string | No | Application defined extension string sent with the invitation. | | invitation.initiateTime | number | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | | invitation.busyLineUserIDList | string | No | Busy user list. It is usually omitted when starting a new invitation. | | offlinePushInfo | OfflinePush | No | Push content for invited users when they are offline. | | offlinePushInfo.title | string | Conditional | Push title when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string when offlinePushInfo is provided. Pass an empty string when there is no content. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether to update the iOS badge when offlinePushInfo is provided. | Return value The call returns RtcInviteResults : | Field | Type | Description | | | | | | roomID | string | Call room ID. | | token | string | Credential for joining the call room. | | liveURL | string | Room address returned by the calling service. | | busyLineUserIDList | string | IDs of invited users that are currently busy. | The invitee receives OnReceiveNewInvitation with OnReceiveNewInvitationPayload . For acceptance, rejection, cancellation, and hang up events, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "Start a group call", + "description": "Start a group audio or video call with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-group-call", + "content": "Call signalingInviteInGroup to start a group audio or video call. groupID identifies the group where the call starts. inviteeUserIDList specifies the members to invite; it does not automatically invite every group member. const roomCredentials = await OpenIMSDK.signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: memberUserIDs, groupID, roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Group, platformID: currentPlatform, , ; Parameters | Parameter | Type | Required | Description | | | | | | | invitation | RtcInvite | Yes | The call invitation. | | invitation.inviterUserID | string | Yes | User ID of the user starting the call. | | invitation.inviteeUserIDList | string | Yes | User IDs of the group members to invite. | | invitation.groupID | string | Yes | Target group ID. | | invitation.roomID | string | Yes | Room ID for this group call. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Media type, such as audio or video . | | invitation.sessionType | SessionType | Yes | Pass SessionType.Group for a group call. | | invitation.platformID | Platform | Yes | Inviter platform. Pass the Platform enum value for the current client. | | invitation.customData | string | No | Application defined extension string sent with the invitation. | | invitation.initiateTime | number | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | | invitation.busyLineUserIDList | string | No | Busy user list. It is usually omitted when starting a new invitation. | | offlinePushInfo | OfflinePush | No | Push content for invited users when they are offline. | | offlinePushInfo.title | string | Conditional | Push title when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string when offlinePushInfo is provided. Pass an empty string when there is no content. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether to update the iOS badge when offlinePushInfo is provided. | The call returns RtcInviteResults , which includes roomID , token , liveURL , and an optional busyLineUserIDList . For field descriptions, see Start a one to one call /sdk/react native/calling/managing calls/start single call . Invited members receive OnReceiveNewInvitation with OnReceiveNewInvitationPayload . For member acceptance, rejection, and room leave status, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "Accept a call", + "description": "Accept a call invitation with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls accept-call", + "content": "After receiving OnReceiveNewInvitation , call signalingAccept to accept the call invitation. const roomCredentials = await OpenIMSDK.signalingAccept opUserID: currentUserID, invitation, ; opUserID is the user ID of the user accepting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback. The call returns RtcInviteResults , which contains the call room's roomID , token , and liveURL . Other participants receive the acceptance through OnInviteeAccepted ; use invitation.roomID in its callback to identify the call. For event listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "Reject a call", + "description": "Reject a call invitation with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls reject-call", + "content": "After receiving a call invitation, call signalingReject to reject it when the invitation will not be accepted. await OpenIMSDK.signalingReject opUserID: currentUserID, invitation, ; opUserID is the user ID of the user rejecting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback. After the call returns, the rejection request is complete. The inviter receives the result through OnInviteeRejected ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "description": "Cancel a call invitation with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls cancel-call", + "content": "Before the call connects, the inviter can call signalingCancel to cancel the invitation. await OpenIMSDK.signalingCancel opUserID: currentUserID, invitation, ; opUserID is the user ID that cancels the invitation. Use the complete RtcInvite object saved when the call was initiated for invitation . After the call returns, the cancellation request is complete. Invitees receive the cancellation through OnInvitationCancelled ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "Hang up a call", + "description": "Hang up a call with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls hang-up-call", + "content": "After a call connects, call signalingHungUp to hang up. await OpenIMSDK.signalingHungUp opUserID: currentUserID, invitation, ; opUserID is the user ID hanging up the call. Use the complete RtcInvite object for the current call for invitation ; its roomID must match the active call room. After the call returns, the hang up request is complete. Other participants receive call end information through OnHangUp ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "description": "Listen for call events with OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling managing-calls handle-call-events", + "content": "Call events report invitation status, participant status, and media stream status. For invitation events, read room information from invitation in the callback parameter. Media stream events provide roomID directly. To send and receive custom signals, see Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal . Event parameters | Event | Callback parameter type | Common fields | | | | | | OnReceiveNewInvitation | OnReceiveNewInvitationPayload | invitation , userID , participant , offlinePushInfo . | | OnInviteeAccepted | OnInviteeAcceptedPayload | invitation , userID , participant , opUserPlatformID . | | OnInviteeRejected | OnInviteeRejectedPayload | invitation , userID , participant , opUserPlatformID . | | OnInvitationCancelled | OnInvitationCancelledPayload | invitation , userID , participant , offlinePushInfo . | | OnInvitationTimeout | OnReceiveNewInvitationPayload | invitation , userID , participant , offlinePushInfo . | | OnInviteeAcceptedByOtherDevice | OnInviteeAcceptedPayload | invitation , userID , participant , opUserPlatformID . | | OnInviteeRejectedByOtherDevice | OnInviteeRejectedPayload | invitation , userID , participant , opUserPlatformID . | | OnHangUp | OnHangUpPayload | invitation , userID , offlinePushInfo . | | OnRoomParticipantConnected | OnRoomParticipantConnectedPayload | invitation , groupID , participant . | | OnRoomParticipantDisconnected | OnRoomParticipantDisconnectedPayload | invitation , groupID , participant . | | OnStreamChange | OnStreamChangePayload | roomID , streamType , mute . | Use invitation.roomID or roomID to distinguish calls. Use participant.userInfo.userID to distinguish participants. function handleReceiveNewInvitation payload: OnReceiveNewInvitationPayload // ... function handleInviteeAccepted payload: OnInviteeAcceptedPayload // ... function handleInviteeRejected payload: OnInviteeRejectedPayload // ... function handleInvitationCancelled payload: OnInvitationCancelledPayload // ... function handleInvitationTimeout payload: OnReceiveNewInvitationPayload // ... function handleInviteeAcceptedByOtherDevice payload: OnInviteeAcceptedPayload // ... function handleInviteeRejectedByOtherDevice payload: OnInviteeRejectedPayload // ... function handleHangUp payload: OnHangUpPayload // ... function handleRoomParticipantConnected payload: OnRoomParticipantConnectedPayload, // ... function handleRoomParticipantDisconnected payload: OnRoomParticipantDisconnectedPayload, // ... function handleStreamChange payload: OnStreamChangePayload // ... // Start listening OpenIMSDK.on OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.on OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.on OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.on OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.on OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.on OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice, ; OpenIMSDK.on OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice, ; OpenIMSDK.on OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected, ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected, ; OpenIMSDK.on OpenIMEvent.OnStreamChange, handleStreamChange ; // Stop listening OpenIMSDK.off OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.off OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.off OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.off OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.off OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.off OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice, ; OpenIMSDK.off OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice, ; OpenIMSDK.off OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected, ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected, ; OpenIMSDK.off OpenIMEvent.OnStreamChange, handleStreamChange ; Stop listening when the component is unmounted, the user signs out, or the account changes." + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending invitation", + "description": "Restore a pending call invitation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information restore-pending-invitation", + "content": "When the app starts or returns to the foreground, call getSignalingInvitationInfoStartApp to get a call invitation that is still pending. const invitation, offlinePushInfo = await OpenIMSDK.getSignalingInvitationInfoStartApp ; Return value | Field | Type | Description | | | | | | invitation | RtcInvite or null | Pending call invitation; null when no invitation is pending. | | offlinePushInfo | OfflinePush | Offline push content included with the invitation. | When invitation is not null , use its invitation information to restore the incoming call UI. Subsequent cancellation, timeout, acceptance, and hang up states are received through Handle call events /sdk/react native/calling/managing calls/handle call events ." + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "description": "Get a call room by group ID.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-room-by-group-id", + "content": "Call signalingGetRoomByGroupID to get group call room information by group ID. groupID is the target group ID. const room = await OpenIMSDK.signalingGetRoomByGroupID groupID ; Return value The call returns CallingRoomData : | Field | Type | Description | | | | | | roomID | string | Call room ID. | | invitation | RtcInvite optional | Call invitation information for the room. | | participant | ParticipantInfo optional | Information about current room participants. | userInfo in participant contains user information. In group calls, it can also contain groupMemberInfo and groupInfo . Use the returned roomID to query room credentials or handle the corresponding call state." + }, + { + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get room credentials", + "description": "Get call credentials by room ID.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-token-by-room-id", + "content": "When a call room ID is known and room credentials are needed, call signalingGetTokenByRoomID . roomID is the target call room ID. const roomCredentials = await OpenIMSDK.signalingGetTokenByRoomID roomID ; Return value The call returns RtcInviteResults , including roomID , token , liveURL , and an optional busyLineUserIDList . Provide the returned room credentials to a real time audio and video media engine to join the call room." + }, + { + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "description": "Send a custom signal in a call room.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native calling sending-custom-signals send-a-custom-signal", + "content": "Call signalingSendCustomSignal to send an application defined signal to a call room, such as raising a hand or changing the layout. customInfo is a string. To send structured data, pass a JSON string. await OpenIMSDK.signalingSendCustomSignal roomID, customInfo: JSON.stringify type: 'hand raised', , ; Parameters | Parameter | Type | Description | | | | | | roomID | string | Target call room ID. | | customInfo | string | Application defined signal content. | After the call returns, the custom signal request is complete. Receive custom signals When another participant sends a custom signal, OnReceiveCustomSignal is triggered. Its callback parameter is OnReceiveCustomSignalPayload , which contains roomID and customInfo . function handleCustomSignal payload: OnReceiveCustomSignalPayload // ... // Start listening OpenIMSDK.on OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; // Stop listening OpenIMSDK.off OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; Stop listening when the component is unmounted, the user signs out, or the account changes. After receiving customInfo , parse and handle its data according to the application protocol." } ] From f16c0958a06010e26790fb5767d5a9ab7e21b752 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Fri, 28 Aug 2026 18:54:44 +0800 Subject: [PATCH 08/15] docs(react-native): add overview/getting-started/events/logger documentation --- .../react-native/events/overview-events.mdx | 100 + .../authenticate-and-manage-session.mdx | 150 + .../getting-started/before-you-start.mdx | 54 + .../environment-specific-implementation.mdx | 48 + .../getting-started/send-first-message.mdx | 43 + content/docs/chat/sdk/react-native/logger.mdx | 91 + .../docs/chat/sdk/react-native/overview.mdx | 21 - .../react-native/events/overview-events.mdx | 99 + .../authenticate-and-manage-session.mdx | 143 + .../getting-started/before-you-start.mdx | 47 + .../environment-specific-implementation.mdx | 41 + .../getting-started/send-first-message.mdx | 36 + .../zh/docs/chat/sdk/react-native/logger.mdx | 90 + .../docs/chat/sdk/react-native/overview.mdx | 21 - data/structure/chat-pages.json | 80 +- .../structure/react-native-content-audit.json | 78 + .../react-native-navigation-labels.json | 22 +- data/structure/react-native-sidebar.json | 22 +- scripts/sync-client-sdk-route-skeletons.mjs | 1 + src/components/docs/documentation-page.tsx | 4 +- src/components/docs/sdk-overview-page.tsx | 80 +- src/generated/navigation.json | 442 +- .../react-native-sdk-zh-content.json | 223 +- src/generated/routes.json | 8622 +++++++++-------- src/generated/search-index-zh.json | 3380 +++---- src/generated/search-index.json | 3378 +++---- 26 files changed, 9462 insertions(+), 7854 deletions(-) create mode 100644 content/docs/chat/sdk/react-native/events/overview-events.mdx create mode 100644 content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx create mode 100644 content/docs/chat/sdk/react-native/getting-started/before-you-start.mdx create mode 100644 content/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx create mode 100644 content/docs/chat/sdk/react-native/getting-started/send-first-message.mdx create mode 100644 content/docs/chat/sdk/react-native/logger.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/events/overview-events.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/getting-started/before-you-start.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/getting-started/send-first-message.mdx create mode 100644 content/zh/docs/chat/sdk/react-native/logger.mdx diff --git a/content/docs/chat/sdk/react-native/events/overview-events.mdx b/content/docs/chat/sdk/react-native/events/overview-events.mdx new file mode 100644 index 0000000000..f1d12174bb --- /dev/null +++ b/content/docs/chat/sdk/react-native/events/overview-events.mdx @@ -0,0 +1,100 @@ +--- +title: 'Events overview' +description: 'Understand the OpenIM React Native SDK event model, event categories, and listener lifecycle.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-28' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/events/overview-events' +--- + +## Event model + +The OpenIM React Native SDK uses `OpenIMEvent` to define event names and a shared listener interface to report connection state, data changes, and business signaling. + +Call `OpenIMSDK.on()` to register a listener and `OpenIMSDK.off()` to remove it. Event names can use enum values from `OpenIMEvent` or the corresponding event strings. When using a string, it must exactly match the event name defined by the SDK. + +```ts +function handleEvent(payload: unknown) { + // Update application state from the event payload. +} + +// Set listener +OpenIMSDK.on(OpenIMEvent.OnConversationChanged, handleEvent); +// Or use the event string +OpenIMSDK.on("onConversationChanged", handleEvent); + +// Remove listener +OpenIMSDK.off(OpenIMEvent.OnConversationChanged, handleEvent); +// Or use the event string +OpenIMSDK.off("onConversationChanged", handleEvent); +``` + +The callback parameter for each event is defined by the SDK declaration. It can be an entity, an array, a progress value, or error information. See the corresponding feature page for the exact parameter format and handling example. + +## Event categories + +React Native SDK events are grouped by business domain: + +| Event category | Typical events | Description | +| --- | --- | --- | +| Connection and sign-in state | `OnConnecting`, `OnConnectSuccess`, `OnConnectFailed`, `OnKickedOffline`, `OnUserTokenExpired`, `OnUserTokenInvalid` | Connection, connection failure, forced sign-out, and token state changes. | +| Initial synchronization | `OnSyncServerStart`, `OnSyncServerProgress`, `OnSyncServerFinish`, `OnSyncServerFailed` | The lifecycle of server data synchronization after sign-in. | +| Users and online status | `OnSelfInfoUpdated`, `OnUserStatusChanged` | Changes to the current user's profile and user online status. | +| Friends and blacklist | `OnFriendAdded`, `OnFriendDeleted`, `OnFriendInfoChanged`, `OnFriendApplicationAdded`, `OnBlackAdded` | Changes to friend relationships, friend applications, and the blacklist. | +| Conversations and unread state | `OnNewConversation`, `OnConversationChanged`, `OnTotalUnreadMessageCountChanged`, `OnInputStatusChanged` | Conversation list, unread count, and typing state changes. | +| Conversation groups | `OnConversationGroupAdded`, `OnConversationGroupChanged`, `OnConversationGroupDeleted` | Conversation groups and their membership changes. | +| Groups and members | `OnGroupInfoChanged`, `OnGroupMemberAdded`, `OnGroupMemberDeleted`, `OnGroupApplicationAdded`, `OnJoinedGroupAdded` | Group profile, member, application, and joined-group changes. | +| Messages | `OnRecvNewMessage`, `OnMsgDeleted`, `OnNewRecvMessageRevoked`, `OnMessageModified`, `OnRecvC2CReadReceipt` | New messages, deletions, revocations, modifications, and one-to-one read receipts. | +| File uploads | `UploadOnProgress`, `UploadComplete` | File upload progress and completion. | +| Audio and video calls | `OnReceiveNewInvitation`, `OnInviteeAccepted`, `OnInvitationCancelled`, `OnHangUp`, `OnReceiveCustomSignal` | Call invitations, participant state, and call signaling changes. | +| Custom business messages | `OnRecvCustomBusinessMessage` | Custom business messages. | + +## Registration timing and lifecycle + +The React Native SDK allows global listeners to be registered at any time. It starts delivering connection, synchronization, and business data events after `initSDK()` and sign-in; register listeners before the operation whose events you need to receive. + +The React Native SDK supports multiple listeners for the same event. Every registered listener receives the event, unlike the single-listener mechanism in the Flutter and Android SDKs, where a later listener replaces the earlier one. Even though multiple listeners are supported, register and manage callbacks centrally in the application so that rendering or re-entering a component does not register the same business handler repeatedly. + +Keep listener functions in stable references. When logging out, switching accounts, or destroying related state, call `off()` with the same event name and function reference used for registration. + +## Connection and initial synchronization events + +Connection events report the SDK connection state: + +| Event | Description | +| --- | --- | +| `OnConnecting` | The SDK starts connecting to the server. | +| `OnConnectSuccess` | The SDK connects successfully. | +| `OnConnectFailed` | The connection fails and error information is provided. | +| `OnKickedOffline` | The current account signs in on another client or is forced offline by the server. | +| `OnUserTokenExpired` | The current login token has expired. | +| `OnUserTokenInvalid` | The current login token is invalid. | + +After sign-in, the SDK reports initial synchronization through these events: + +| Event | Description | +| --- | --- | +| `OnSyncServerStart` | Synchronization starts. | +| `OnSyncServerProgress` | The current synchronization progress. | +| `OnSyncServerFinish` | The current synchronization completes. | +| `OnSyncServerFailed` | The current synchronization fails. | + +After synchronization completes, query the data needed by the current interface again. Later user, friend, conversation, group, message, and call changes are reported by the corresponding business events. + +## Handle events by domain + +The feature pages below provide complete parameter descriptions and listener examples: + +| Event scope | Reference pages | +| --- | --- | +| User profile and online status | [Update the current user profile](/sdk/react-native/user/profile/set-self-info), [Subscribe to user online status](/sdk/react-native/user/online-status/subscribe-users-status) | +| Friends, friend applications, and blacklist | [Get the friend list by page](/sdk/react-native/user/friends/get-friend-list-page), [Get received friend applications](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient), [Get the blacklist](/sdk/react-native/user/blacklist/get-black-list) | +| Conversations, unread counts, and conversation groups | [Retrieve the conversation list](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list), [Get the total unread count](/sdk/react-native/conversation/managing-conversations/get-total-unread-count), [Conversation groups overview](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) | +| Groups, members, and applications | [Group overview](/sdk/react-native/group/overview-group), [Get received group applications](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient), [Get the group member list by page](/sdk/react-native/group/retrieving-group-members/get-group-member-list) | +| Messages and message status | [Receive messages](/sdk/react-native/message/receiving-messages/receive-messages), [Receive custom business messages](/sdk/react-native/message/receiving-messages/receive-custom-business-messages), [Delete saved messages in a batch](/sdk/react-native/message/managing-messages/delete-saved-messages), [Revoke a message](/sdk/react-native/message/managing-messages/revoke-a-message), [Modify a message](/sdk/react-native/message/managing-messages/modify-a-message), [Send group read receipts](/sdk/react-native/message/managing-read-status/send-group-read-receipts) | +| File uploads | [Upload a file](/sdk/react-native/file-uploads/upload-file) | +| Audio and video calls and custom signaling | [Handle call events](/sdk/react-native/calling/managing-calls/handle-call-events), [Send a custom signal](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal) | diff --git a/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx b/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx new file mode 100644 index 0000000000..3c098f3143 --- /dev/null +++ b/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx @@ -0,0 +1,150 @@ +--- +title: 'Authenticate and manage a session' +description: 'Initialize the OpenIM React Native SDK, sign in, check login status, and log out the current account.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-28' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/getting-started/authenticate-and-manage-session' +--- + +Before starting this page, complete the preparation in [Before you start](/sdk/react-native/getting-started/before-you-start) and [React Native environment integration](/sdk/react-native/getting-started/environment-specific-implementation). The OpenIM React Native SDK is initialized with `initSDK()`, then `login()` signs in the current user and establishes the server connection. + +The complete flow is: + +1. Call `initSDK()` to initialize the SDK. +2. Register listeners for `onConnecting`, `onConnectSuccess`, and `onConnectFailed`. +3. Call `login()` to sign in the current user. +4. Wait for `onConnectSuccess`, which indicates that sign-in succeeded and the SDK is connected to the server. +5. Call `logout()` when the user actively signs out or switches accounts. + +## Initialize the SDK + +Call `initSDK()` with the server addresses, an application-writable data directory, and logging options. `dataDir` and `logFilePath` should use a persistent directory that the application can write to. + +### React Native CLI + +```ts +import RNFS from 'react-native-fs'; + +const dataDir = RNFS.DocumentDirectoryPath; + +await OpenIMSDK.initSDK({ + apiAddr: 'http://your-server-ip:10002', + wsAddr: 'ws://your-server-ip:10001', + dataDir, + logFilePath: dataDir, + logLevel: 5, + isLogStandardOutput: true, +}); +``` + +### Expo + +Use the application document directory provided by `expo-file-system`. Its URI includes the `file://` prefix, which must be removed before passing it to the SDK: + +```ts +import * as FileSystem from "expo-file-system/legacy"; + +const dataDir = FileSystem.documentDirectory.replace(/^file:\/\//, '').replace(/\/$/, ''); + +await OpenIMSDK.initSDK({ + apiAddr: 'http://your-server-ip:10002', + wsAddr: 'ws://your-server-ip:10001', + dataDir, + logFilePath: dataDir, + logLevel: 5, + isLogStandardOutput: true, +}); +``` + +`initSDK()` accepts the following parameters: + +| Parameter | Type | Description | +| --- | --- | --- | +| `apiAddr` | `string` | OpenIMServer HTTP API address. | +| `wsAddr` | `string` | OpenIMServer WebSocket address. | +| `dataDir` | `string` | SDK local data directory in an application-writable path. | +| `logFilePath` | `string` | SDK log directory in an application-writable path. | +| `logLevel` | `LogLevel` | Log level: `Debug`, `Info`, `Warn`, `Error`, `Fatal`, or `Panic`. | +| `isLogStandardOutput` | `boolean` | Whether SDK logs are written to the platform standard output. | + +## Register connection events + +Register connection listeners before calling `login()`. Event names can use values from `OpenIMEvent` or the corresponding event strings; this example uses strings to show the login flow: + +```ts +const handleConnecting = () => { + console.log("onConnecting") +}; + +const handleConnectSuccess = () => { + console.log("onConnectSuccess") +}; + +const handleConnectFailed = (error: OpenIMEventBaseErrorType) => { + console.log("onConnectFailed", error.errCode, error.errMsg) +}; + +// Set listeners +OpenIMSDK.on('onConnecting', handleConnecting); +OpenIMSDK.on('onConnectSuccess', handleConnectSuccess); +OpenIMSDK.on('onConnectFailed', handleConnectFailed); +``` + +## Sign in the current user + +Call `login()` with the `userID` and token returned by your trusted backend: + +```ts +await OpenIMSDK.login({ + userID, + token, +}); +``` + +After calling `login()`, wait for the `onConnectSuccess` event. This event indicates that sign-in succeeded and the SDK connected to the server. Call business APIs after this event. + +## Check login status + +Use `getLoginStatus()` to query the current login status: + +```ts +const loginStatus = await OpenIMSDK.getLoginStatus(); +``` + +`LoginStatus` contains the following states: + +| State | Description | +| --- | --- | +| `LoginStatus.Logout` | The SDK instance is not signed in. | +| `LoginStatus.Logging` | The sign-in flow is in progress. | +| `LoginStatus.Logged` | The SDK instance is signed in. | + +## Log out and switch accounts + +Call `logout()` when the user actively signs out or switches accounts, and clear the current account data stored by the application: + +```ts +await OpenIMSDK.logout(); +``` + +When switching accounts, finish logging out the previous account before calling `login()` with the new account's parameters. There is no need to call `initSDK()` again. Do not sign in to a new account while the previous account is still signed in. + +## Remove event listeners + +When logging out, switching accounts, or destroying the related state, call `off()` with the same event names and function references used during registration: + +```ts +// Remove listeners +OpenIMSDK.off('onConnecting', handleConnecting); +OpenIMSDK.off('onConnectSuccess', handleConnectSuccess); +OpenIMSDK.off('onConnectFailed', handleConnectFailed); +``` + +## Next step + +- [Send your first message](/sdk/react-native/getting-started/send-first-message) diff --git a/content/docs/chat/sdk/react-native/getting-started/before-you-start.mdx b/content/docs/chat/sdk/react-native/getting-started/before-you-start.mdx new file mode 100644 index 0000000000..d1aa1c1ca9 --- /dev/null +++ b/content/docs/chat/sdk/react-native/getting-started/before-you-start.mdx @@ -0,0 +1,54 @@ +--- +title: 'Before you start' +description: 'Prepare OpenIMServer, user credentials, and a React Native project before initializing and signing in.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-28' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/getting-started/before-you-start' +--- + +Before integrating the OpenIM SDK into a React Native application, prepare an accessible OpenIMServer, a trusted user authentication flow, and a React Native project that can compile the native module. + +## Prepare OpenIMServer + +If you do not have an OpenIMServer instance, follow the [Docker deployment guide](/docs/guides/quick-deployment/docker) to deploy one. Confirm that the target device can reach these addresses: + +| Field | Description | +| --- | --- | +| `apiAddr` | OpenIMServer HTTP API address for login, synchronization, and resource requests. | +| `wsAddr` | OpenIMServer WebSocket address for the long-lived connection and realtime events. | + +Do not verify connectivity only from the development computer. Android emulators, iOS simulators, and physical devices can use different network paths. In production, also check DNS, TLS certificates, firewalls, reverse proxies, and WebSocket upgrades. + +## Prepare users and tokens + +`userID` identifies an OpenIM user, and `token` authenticates that user. A trusted backend should create or bind users, issue tokens, and validate application permissions. A React Native application must not store administrator tokens, secrets, or other server credentials. + +Before integrating the OpenIMServer REST API in your backend, read [Prepare to use the Platform API](/platform-api/prepare-to-use-api) and [Issue a session token](/platform-api/user/managing-session-tokens/issue-a-session-token). After authenticating its own accounts, your backend should return only the following SDK login data to the client: + +| Data | Description | +| --- | --- | +| `userID` | OpenIM user ID for the account being signed in. | +| `token` | Login token issued for that user. | +| `apiAddr` | OpenIMServer HTTP API address. | +| `wsAddr` | OpenIMServer WebSocket address. | + +The `userID` must match the user encoded by the token. + +## Prepare the React Native project + +Before integration, confirm that: + +- The project has completed native configuration for either React Native CLI or an Expo custom development client. +- The Android and iOS projects can each build and run. +- Android and iOS network configuration is available, and the target device can reach `apiAddr` and `wsAddr`. + +The React Native SDK runs through native modules and is not available in Expo Go. An Expo project must use `expo prebuild` to generate or update the Android and iOS projects that include the SDK native module, then build a custom development client. See [React Native environment integration](/sdk/react-native/getting-started/environment-specific-implementation) for the installation steps. + +## Continue integration + +After completing these preparations, first follow [**React Native environment integration**](/sdk/react-native/getting-started/environment-specific-implementation) to install dependencies and configure the native projects. Then follow [**Authenticate and manage a session**](/sdk/react-native/getting-started/authenticate-and-manage-session) to initialize the SDK and sign in, and finally try [**Send your first message**](/sdk/react-native/getting-started/send-first-message). diff --git a/content/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx b/content/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx new file mode 100644 index 0000000000..e316bb57c7 --- /dev/null +++ b/content/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx @@ -0,0 +1,48 @@ +--- +title: 'Environment-specific implementation' +description: 'Install the OpenIM React Native SDK in a React Native CLI project or an Expo custom development client.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-28' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/getting-started/environment-specific-implementation' +--- + +This page covers the dependency and native project configuration required by a React Native application. + +## Add the dependency + +### Install in a React Native CLI project + +Install the OpenIM React Native SDK from the project root: + +```bash +npm install @openim/rn-client-sdk +cd ios && pod install && cd .. +``` + +You can use equivalent commands with your project's package manager. After installation, build both the Android and iOS projects to confirm that the native module is linked correctly. + +### Install in an Expo project + +The OpenIM React Native SDK contains Android and iOS native modules, which are not included in Expo Go. Install the SDK, use `expo prebuild --clean` to generate or update the native projects from the Expo configuration, and then build a custom development client: + +```bash +npm install @openim/rn-client-sdk +npx expo prebuild --clean +npx expo run:android +npx expo run:ios +``` + +After changing the Expo configuration or adding a dependency that requires native support, run `expo prebuild --clean` again and rebuild the development client. You can install `expo-dev-client` for an Expo-oriented development client experience, but the runtime still uses a custom development client rather than Expo Go. + +## Verify the native environment + +After installing the dependency and configuring the native projects, build the Android and iOS applications and confirm that the SDK native module compiles and loads. + +## Next step + +- [Authenticate and manage a session](/sdk/react-native/getting-started/authenticate-and-manage-session) diff --git a/content/docs/chat/sdk/react-native/getting-started/send-first-message.mdx b/content/docs/chat/sdk/react-native/getting-started/send-first-message.mdx new file mode 100644 index 0000000000..a1d66a804e --- /dev/null +++ b/content/docs/chat/sdk/react-native/getting-started/send-first-message.mdx @@ -0,0 +1,43 @@ +--- +title: 'Send your first message' +description: 'Send and receive the first one-to-one text message in a React Native application.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-28' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/getting-started/send-first-message' +--- + +This page verifies the OpenIM React Native SDK with one one-to-one text message. Before starting, complete [Authenticate and manage a session](/sdk/react-native/getting-started/authenticate-and-manage-session) and prepare two user accounts: one sender and one receiver. Both accounts must be signed in. + +## Create and send a text message + +The sender calls `createTextMessage()` to create a `MessageItem`, then calls `sendMessage()` to send it to the receiver. Replace `user_b` in the example with the receiver's actual user ID. For a one-to-one message, fill in `recvID` and pass an empty string for `groupID`. + +```ts +const message = await OpenIMSDK.createTextMessage('Hello, OpenIMSDK'); + +await OpenIMSDK.sendMessage({ + recvID: 'user_b', + groupID: '', + message, +}); +``` + +## Receive the message + +The receiver should set the `onRecvNewMessage` listener before the sender sends the message. After the sender sends it, the listener receives the corresponding `MessageItem`: + +```ts +function handleNewMessage(message: MessageItem) { + console.log("onRecvNewMessage", message) +} + +// Set listener +OpenIMSDK.on('onRecvNewMessage', handleNewMessage); +``` + +For complete message event and status handling, see [Receive messages](/sdk/react-native/message/receiving-messages/receive-messages). diff --git a/content/docs/chat/sdk/react-native/logger.mdx b/content/docs/chat/sdk/react-native/logger.mdx new file mode 100644 index 0000000000..71103da914 --- /dev/null +++ b/content/docs/chat/sdk/react-native/logger.mdx @@ -0,0 +1,91 @@ +--- +title: 'Logging' +description: 'Configure OpenIM React Native SDK logging, write diagnostic information, and upload logs.' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-28' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/logger' +--- + +OpenIM React Native SDK logs help diagnose initialization, connection, and business API problems. Development and staging environments can use more detailed logs. Production should reduce the log level and avoid recording tokens, complete message bodies, raw file URLs, call room credentials, or private user fields. + +## Configure logging during initialization + +Configure the log directory and level when calling `initSDK()`: + +```ts +await OpenIMSDK.initSDK({ + apiAddr, + wsAddr, + dataDir, + logFilePath, + logLevel: LogLevel.Debug, + isLogStandardOutput: true, +}); +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| `apiAddr` | `string` | OpenIMServer API address. | +| `wsAddr` | `string` | OpenIMServer WebSocket address. | +| `dataDir` | `string` | SDK local data directory in an application-writable path. | +| `logFilePath` | `string` | SDK log directory in an application-writable path. | +| `logLevel` | `LogLevel` | Log verbosity: `Debug`, `Info`, `Warn`, `Error`, `Fatal`, or `Panic`. | +| `isLogStandardOutput` | `boolean` | Whether SDK logs are written to the platform standard log. Enable it for development diagnostics. | + +Use `LogLevel.Debug` for development diagnostics. Production applications usually use `LogLevel.Warn` or `LogLevel.Error` and disable unnecessary standard output. + +## Write application logs + +Call `logs()` to write business diagnostic information to the SDK log: + +```ts +await OpenIMSDK.logs({ + logLevel: LogLevel.Error, + file: 'chatRepository.ts', + line: 184, + msgs: 'send_message_failed', + err: error.message, + keyAndValue: [ + 'conversationID', + conversationID, + 'clientMsgID', + clientMsgID, + ], +}); +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| `logLevel` | `number` | Log level for this entry. | +| `file` | `string` | File or module name at the call site. | +| `line` | `number` | Line number at the call site. | +| `msgs` | `string` | Short business action or diagnostic description. | +| `err` | `string` | Error information; pass an empty string when there is no error. | +| `keyAndValue` | `string[]` | Additional diagnostic fields passed as key and value pairs. | + +Use `keyAndValue` only for non-sensitive identifiers needed for diagnosis, such as `conversationID`, `clientMsgID`, `groupID`, or `roomID`. + +## Upload logs + +When a user actively submits diagnostic logs, call `uploadLogs()` to upload the client logs: + +```ts +await OpenIMSDK.uploadLogs({ + line: 2000, + cancelID: 'support-ticket-42', + ex: 'user-initiated-diagnostics', +}); +``` + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `line` | `number` | Yes | Number of log lines to read for this upload. | +| `cancelID` | `string` | No | Identifier for this upload. | +| `ex` | `string` | No | Additional diagnostic description; it must not contain credentials or private data. | + +When the call returns, the log upload request has completed. Before uploading, explain the log collection scope to the user and follow privacy and compliance requirements. diff --git a/content/docs/chat/sdk/react-native/overview.mdx b/content/docs/chat/sdk/react-native/overview.mdx index c419a8a9c3..a4c3b955ec 100644 --- a/content/docs/chat/sdk/react-native/overview.mdx +++ b/content/docs/chat/sdk/react-native/overview.mdx @@ -10,24 +10,3 @@ version: 'v4' platform: 'react-native' sourcePath: '/sdk/react-native/overview' --- - -## Overview - -Use the React Native SDK when your chat experience is built with React Native and needs mobile runtime behavior for connectivity, local cache, media selection, file upload, and push notification handoff. - -## Integration model - -The SDK should be initialized after your application has a backend-issued token for the current `userID`. Register connection and message events before login, then keep conversation state in your application store so native lifecycle changes can restore the UI predictably. - -## Mobile considerations - -- Validate login, reconnect, and message receipt after app foreground and background transitions. -- Test file messages with the media picker and upload permissions required by each platform. -- Route push notification registration through your trusted backend and platform notification services. -- When diagnosing mobile-only failures, record the time, user ID, action, `errCode`, and `errMsg`, but never record tokens or message content. - -## Related SDKs - -- [iOS SDK](/sdk/ios/overview) -- [Android SDK](/sdk/android/overview) -- [Flutter SDK](/sdk/flutter/overview) diff --git a/content/zh/docs/chat/sdk/react-native/events/overview-events.mdx b/content/zh/docs/chat/sdk/react-native/events/overview-events.mdx new file mode 100644 index 0000000000..9991a14cd0 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/events/overview-events.mdx @@ -0,0 +1,99 @@ +--- +title: '事件概览' +description: '了解 OpenIM React Native SDK 的事件模型、事件分类和监听生命周期。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/events/overview-events' +--- + +## 事件机制概览 + +OpenIM React Native SDK 通过 `OpenIMEvent` 定义事件名称,并使用统一的事件监听接口通知连接状态、数据变化和业务信令。 + +调用 `OpenIMSDK.on()` 设置监听,调用 `OpenIMSDK.off()` 取消监听。事件名称既可以使用 `OpenIMEvent` 中的枚举值,也可以直接传入对应的事件字符串,直接使用字符串时,必须与 SDK 定义的事件名完全一致。 + +```ts +function handleEvent(payload: unknown) { + // 根据事件参数更新应用状态 +} + +// 设置监听 +OpenIMSDK.on(OpenIMEvent.OnConversationChanged, handleEvent); +// 或者 +OpenIMSDK.on("onConversationChanged", handleEvent); + +// 取消监听 +OpenIMSDK.off(OpenIMEvent.OnConversationChanged, handleEvent); +// 或者 +OpenIMSDK.off("onConversationChanged", handleEvent); +``` + +每个事件的回调参数由 SDK 的事件声明决定,可能是实体对象、数组、进度值或错误信息。具体事件的参数格式和处理示例见对应功能页面。 + +## 事件分类 + +React Native SDK 的事件按业务领域分为以下类别: + +| 事件类别 | 典型事件 | 说明 | +| --- | --- | --- | +| 连接与登录状态 | `OnConnecting`、`OnConnectSuccess`、`OnConnectFailed`、`OnKickedOffline`、`OnUserTokenExpired`、`OnUserTokenInvalid` | 连接建立、连接失败、强制下线和 Token 状态变化。 | +| 初始化同步 | `OnSyncServerStart`、`OnSyncServerProgress`、`OnSyncServerFinish`、`OnSyncServerFailed` | 登录后 SDK 同步服务端数据的生命周期。 | +| 用户与在线状态 | `OnSelfInfoUpdated`、`OnUserStatusChanged` | 当前用户资料和用户在线状态变化。 | +| 好友与黑名单 | `OnFriendAdded`、`OnFriendDeleted`、`OnFriendInfoChanged`、`OnFriendApplicationAdded`、`OnBlackAdded` | 好友关系、好友申请和黑名单变化。 | +| 会话与未读状态 | `OnNewConversation`、`OnConversationChanged`、`OnTotalUnreadMessageCountChanged`、`OnInputStatusChanged` | 会话列表、未读数和输入状态变化。 | +| 会话分组 | `OnConversationGroupAdded`、`OnConversationGroupChanged`、`OnConversationGroupDeleted` | 会话分组及分组成员变化。 | +| 群组与群成员 | `OnGroupInfoChanged`、`OnGroupMemberAdded`、`OnGroupMemberDeleted`、`OnGroupApplicationAdded`、`OnJoinedGroupAdded` | 群资料、群成员、入群申请和已加入群组变化。 | +| 消息 | `OnRecvNewMessage`、`OnMsgDeleted`、`OnNewRecvMessageRevoked`、`OnMessageModified`、`OnRecvC2CReadReceipt` | 新消息、消息删除、撤回、修改和单聊已读回执。 | +| 文件上传 | `UploadOnProgress`、`UploadComplete` | 文件上传进度和上传完成。 | +| 音视频通话 | `OnReceiveNewInvitation`、`OnInviteeAccepted`、`OnInvitationCancelled`、`OnHangUp`、`OnReceiveCustomSignal` | 通话邀请、参与者状态和通话信令变化。 | +| 自定义业务消息 | `OnRecvCustomBusinessMessage` | 自定义业务消息。 | + +## 注册时机与生命周期 + +React Native SDK 可以在任意时机注册全局事件监听。完成 `initSDK()` 并登录后,SDK 才会触发连接、同步及业务数据等事件回调;如果需要接收这些事件,应在对应操作前完成监听注册。 + +React Native SDK 支持对同一事件同时注册多个监听函数,事件触发时,所有监听函数都会收到回调,这与 Flutter 和 Android SDK 的单一 listener 机制不同。虽然 React Native SDK 允许同一事件注册多个监听,但仍建议在应用中集中注册和管理回调,避免页面渲染或组件重复进入时注册相同的业务处理逻辑。 + +监听函数应保持稳定引用。退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()` 取消监听。 + +## 连接与初始化同步事件 + +连接事件用于反映 SDK 与服务端的连接状态: + +| 事件 | 说明 | +| --- | --- | +| `OnConnecting` | SDK 开始连接服务端。 | +| `OnConnectSuccess` | SDK 连接成功。 | +| `OnConnectFailed` | 连接失败及错误信息。 | +| `OnKickedOffline` | 当前账号在其他端登录或被服务端强制下线。 | +| `OnUserTokenExpired` | 当前登录 Token 已过期。 | +| `OnUserTokenInvalid` | 当前登录 Token 无效。 | + +登录后,SDK 通过以下事件通知初始化同步状态: + +| 事件 | 说明 | +| --- | --- | +| `OnSyncServerStart` | 开始同步。 | +| `OnSyncServerProgress` | 当前同步进度。 | +| `OnSyncServerFinish` | 本轮同步完成。 | +| `OnSyncServerFailed` | 本轮同步失败。 | + +同步完成后,应用可重新查询当前界面需要的数据;后续用户、好友、会话、群组、消息和通话变化由对应业务事件通知。 + +## 按业务领域处理事件 + +各业务页面提供对应事件的完整参数说明和监听示例: + +| 事件范围 | 参考页面 | +| --- | --- | +| 用户资料和在线状态 | [更新当前用户资料](/sdk/react-native/user/profile/set-self-info)、[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status) | +| 好友关系、好友申请和黑名单 | [分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)、[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)、[获取黑名单](/sdk/react-native/user/blacklist/get-black-list) | +| 会话、未读数和会话分组 | [获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)、[获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count)、[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) | +| 群组、群成员和入群申请 | [群组概览](/sdk/react-native/group/overview-group)、[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)、[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list) | +| 消息和消息状态 | [接收消息](/sdk/react-native/message/receiving-messages/receive-messages)、[接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages)、[批量删除消息](/sdk/react-native/message/managing-messages/delete-saved-messages)、[撤回消息](/sdk/react-native/message/managing-messages/revoke-a-message)、[修改消息](/sdk/react-native/message/managing-messages/modify-a-message)、[上报群消息已读](/sdk/react-native/message/managing-read-status/send-group-read-receipts) | +| 文件上传 | [上传文件](/sdk/react-native/file-uploads/upload-file) | +| 音视频通话和自定义信令 | [处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)、[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal) | diff --git a/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx b/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx new file mode 100644 index 0000000000..d0ea718730 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx @@ -0,0 +1,143 @@ +--- +title: '认证与管理登录会话' +description: '使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。' +sourcePath: '/sdk/react-native/getting-started/authenticate-and-manage-session' +--- + +开始本页操作前,请先完成[开始之前](/sdk/react-native/getting-started/before-you-start)和[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)中的准备工作。OpenIM React Native SDK 使用 `initSDK()` 初始化 SDK,再使用 `login()` 登录当前用户并建立与服务器的连接。 + +完整流程如下: + +1. 调用 `initSDK()` 初始化 SDK。 +2. 设置 `onConnecting`、`onConnectSuccess` 和 `onConnectFailed` 事件监听。 +3. 调用 `login()` 登录当前用户。 +4. 等待 `onConnectSuccess` 触发,表示登录成功并已连接服务器。 +5. 主动退出或切换账号时调用 `logout()`。 + +## 初始化 SDK + +调用 `initSDK()` 传入服务地址、本地数据目录和日志配置。`dataDir` 和 `logFilePath` 应使用应用可写的持久化目录。 + +### React Native CLI + +```ts +import RNFS from 'react-native-fs'; + +const dataDir = RNFS.DocumentDirectoryPath; + +await OpenIMSDK.initSDK({ + apiAddr: 'http://your-server-ip:10002', + wsAddr: 'ws://your-server-ip:10001', + dataDir, + logFilePath: dataDir, + logLevel: 5, + isLogStandardOutput: true, +}); +``` + +### Expo + +Expo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀: + +```ts +import * as FileSystem from "expo-file-system/legacy"; + +const dataDir = FileSystem.documentDirectory.replace(/^file:\/\//, '').replace(/\/$/, ''); + +await OpenIMSDK.initSDK({ + apiAddr: 'http://your-server-ip:10002', + wsAddr: 'ws://your-server-ip:10001', + dataDir, + logFilePath: dataDir, + logLevel: 5, + isLogStandardOutput: true, +}); +``` + +`initSDK()` 的参数如下: + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 | +| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 | +| `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 | +| `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 | +| `logLevel` | `LogLevel` | 日志级别,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 | +| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 | + +## 注册连接事件 + +调用 `login()` 前设置连接事件监听。可以使用 `OpenIMEvent` 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: + +```ts +const handleConnecting = () => { + console.log("onConnecting") +}; + +const handleConnectSuccess = () => { + console.log("onConnectSuccess") +}; + +const handleConnectFailed = (error: OpenIMEventBaseErrorType) => { + console.log("onConnectFailed", error.errCode, error.errMsg) +}; + +// 设置监听 +OpenIMSDK.on('onConnecting', handleConnecting); +OpenIMSDK.on('onConnectSuccess', handleConnectSuccess); +OpenIMSDK.on('onConnectFailed', handleConnectFailed); +``` + +## 登录当前用户 + +调用 `login()` 传入可信后端返回的 `userID` 和 Token: + +```ts +await OpenIMSDK.login({ + userID, + token, +}); +``` + +调用 `login()` 后等待 `onConnectSuccess` 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 + +## 查询登录状态 + +`getLoginStatus()` 查询当前登录状态: + +```ts +const loginStatus = await OpenIMSDK.getLoginStatus(); +``` + +`LoginStatus` 包含以下状态: + +| 状态 | 说明 | +| --- | --- | +| `LoginStatus.Logout` | 当前 SDK 实例未登录。 | +| `LoginStatus.Logging` | 登录流程正在进行。 | +| `LoginStatus.Logged` | 当前 SDK 实例已登录。 | + +## 退出登录和切换账号 + +主动退出或切换账号时调用 `logout()`,并清理应用中保存的当前账号数据: + +```ts +await OpenIMSDK.logout(); +``` + +切换账号时先完成旧账号退出,再使用新账号的参数调用 `login()`,无需重复 `initSDK`。不应在旧账号仍处于登录状态时登录新账号。 + +## 取消事件监听 + +退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()`: + +```ts +// 取消监听 +OpenIMSDK.off('onConnecting', handleConnecting); +OpenIMSDK.off('onConnectSuccess', handleConnectSuccess); +OpenIMSDK.off('onConnectFailed', handleConnectFailed); +``` + +## 下一步 + +- [发送第一条消息](/sdk/react-native/getting-started/send-first-message) diff --git a/content/zh/docs/chat/sdk/react-native/getting-started/before-you-start.mdx b/content/zh/docs/chat/sdk/react-native/getting-started/before-you-start.mdx new file mode 100644 index 0000000000..f04ed18e06 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/getting-started/before-you-start.mdx @@ -0,0 +1,47 @@ +--- +title: '开始之前' +description: '准备 OpenIMServer、用户登录信息和 React Native 工程环境,再开始初始化和登录。' +sourcePath: '/sdk/react-native/getting-started/before-you-start' +--- + +在 React Native 应用中接入 OpenIM SDK 前,需要准备可访问的 OpenIMServer、可信的用户认证流程,以及能够正常编译原生模块的 React Native 工程。 + +## 准备 OpenIMServer + +如果还没有可用的 OpenIMServer,先按 [Docker 部署指南](/docs/guides/quick-deployment/docker)完成部署,并确认目标设备可以访问以下地址: + +| 字段 | 说明 | +| --- | --- | +| `apiAddr` | OpenIMServer HTTP API 地址,用于登录、同步和资源请求。 | +| `wsAddr` | OpenIMServer WebSocket 地址,用于建立长连接和接收实时事件。 | + +不要只验证服务在开发电脑本机可以访问。Android 模拟器、iOS 模拟器和真机的网络环境可能不同;生产环境还应检查 DNS、TLS 证书、防火墙、反向代理和 WebSocket 升级是否正常。 + +## 准备用户和 Token + +`userID` 标识 OpenIM 用户,Token 用于认证该用户。创建或绑定用户、签发 Token 和校验业务权限都应由可信后端完成。React Native 应用不能保存管理员 Token、secret 或其他服务端凭据。 + +后端接入 OpenIMServer REST API 前,可阅读[准备使用 Platform API](/platform-api/prepare-to-use-api)和[签发会话 Token](/platform-api/user/managing-session-tokens/issue-a-session-token)。业务后端完成自身账号认证后,只向客户端返回 SDK 登录所需的以下数据: + +| 数据 | 说明 | +| --- | --- | +| `userID` | 当前登录用户的 OpenIM 用户 ID。 | +| `token` | 与该用户对应的登录 Token。 | +| `apiAddr` | OpenIMServer HTTP API 地址。 | +| `wsAddr` | OpenIMServer WebSocket 地址。 | + +`userID` 必须与 Token 对应。 + +## 准备 React Native 工程 + +接入前确认: + +- 工程已经完成 React Native CLI 或 Expo 自定义开发客户端的原生配置。 +- Android 和 iOS 工程能够分别编译并运行。 +- 确认 Android 和 iOS 的网络配置可用,目标设备能够正常访问 `apiAddr` 和 `wsAddr`。 + +React Native SDK 通过原生模块运行,不适用 Expo Go。Expo 项目需要使用 `expo prebuild` 生成或更新包含 SDK 原生模块的 Android 和 iOS 工程,再构建自定义开发客户端。具体安装方式见[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)。 + +## 继续接入 + +准备完成后,先根据[**按 React Native 环境接入**](/sdk/react-native/getting-started/environment-specific-implementation)完成依赖和原生工程配置,再按[**认证与管理登录会话**](/sdk/react-native/getting-started/authenticate-and-manage-session)初始化 SDK 并登录,最后尝试[**发送第一条消息**](/sdk/react-native/getting-started/send-first-message)。 diff --git a/content/zh/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx b/content/zh/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx new file mode 100644 index 0000000000..eb00f328d2 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx @@ -0,0 +1,41 @@ +--- +title: '按 React Native 环境接入' +description: '在 React Native CLI 或 Expo 自定义开发客户端中安装 OpenIM React Native SDK。' +sourcePath: '/sdk/react-native/getting-started/environment-specific-implementation' +--- + +本页说明 React Native 工程的依赖和原生环境配置。 + +## 添加依赖 + +### 在 React Native CLI 项目中安装 + +在项目根目录安装 OpenIM React Native SDK: + +```bash +npm install @openim/rn-client-sdk +cd ios && pod install && cd .. +``` + +也可以使用项目现有的包管理器执行等价命令。安装后分别构建 Android 和 iOS 工程,确认原生模块已正确链接。 + +### 在 Expo 项目中安装 + +OpenIM React Native SDK 包含 Android 和 iOS 原生模块,Expo Go 未包含这些模块,因此不能直接在 Expo Go 中使用。Expo 项目应先安装 OpenIM React Native SDK,再使用 `expo prebuild --clean` 根据 Expo 配置生成或更新 `android` 和 `ios` 原生工程,最后在该原生工程中构建自定义开发客户端: + +```bash +npm install @openim/rn-client-sdk +npx expo prebuild --clean +npx expo run:android +npx expo run:ios +``` + +修改 Expo 配置或新增需要原生支持的依赖后,应重新执行 `expo prebuild --clean`,再重新构建开发客户端。可以安装 `expo-dev-client`,获得适合 Expo 项目的开发客户端体验,但运行时仍使用自定义开发客户端,不要使用 Expo Go。 + +## 验证原生环境 + +完成安装和原生工程配置后,在 Android 和 iOS 工程中构建应用,确认 SDK 原生模块可以完成编译和加载。 + +## 下一步 + +- [认证与管理登录会话](/sdk/react-native/getting-started/authenticate-and-manage-session) diff --git a/content/zh/docs/chat/sdk/react-native/getting-started/send-first-message.mdx b/content/zh/docs/chat/sdk/react-native/getting-started/send-first-message.mdx new file mode 100644 index 0000000000..8853c2a079 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/getting-started/send-first-message.mdx @@ -0,0 +1,36 @@ +--- +title: '发送第一条消息' +description: '在 React Native 应用中发送并验证第一条单聊文本消息。' +sourcePath: '/sdk/react-native/getting-started/send-first-message' +--- + +本页用一条单聊文本消息验证 OpenIM React Native SDK 已完成接入。开始前,先按[认证与管理登录会话](/sdk/react-native/getting-started/authenticate-and-manage-session)完成 SDK 初始化和登录,并准备两个用户账号:一个作为发送方,一个作为接收方。两个账号都需要完成登录。 + +## 创建文本消息并发送 + +发送方调用 `createTextMessage()` 创建待发送的 `MessageItem`,再调用 `sendMessage()` 将消息发送给接收方。将示例中的 `user_b` 替换为接收方的真实用户 ID;单聊填写 `recvID`,`groupID` 传空字符串。 + +```ts +const message = await OpenIMSDK.createTextMessage('你好,OpenIMSDK'); + +await OpenIMSDK.sendMessage({ + recvID: 'user_b', + groupID: '', + message, +}); +``` + +## 接收消息 + +接收方应在发送方发送消息前设置 `onRecvNewMessage` 监听;发送方发送消息后,该监听函数会收到对应的 `MessageItem`: + +```ts +function handleNewMessage(message: MessageItem) { + console.log("onRecvNewMessage", message) +} + +// 设置监听 +OpenIMSDK.on('onRecvNewMessage', handleNewMessage); +``` + +完整的消息事件和消息状态处理方式见[接收消息](/sdk/react-native/message/receiving-messages/receive-messages)。 diff --git a/content/zh/docs/chat/sdk/react-native/logger.mdx b/content/zh/docs/chat/sdk/react-native/logger.mdx new file mode 100644 index 0000000000..efe786b5e3 --- /dev/null +++ b/content/zh/docs/chat/sdk/react-native/logger.mdx @@ -0,0 +1,90 @@ +--- +title: '日志' +description: '配置 OpenIM React Native SDK 日志,写入应用诊断信息并上传日志。' +product: 'sdk' +context: 'chat/sdk/react-native' +template: 'guide' +status: 'draft' +version: 'v4' +platform: 'react-native' +sourcePath: '/sdk/react-native/logger' +--- + +OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。 + +## 初始化日志配置 + +调用 `initSDK()` 时配置日志目录和日志级别: + +```ts +await OpenIMSDK.initSDK({ + apiAddr, + wsAddr, + dataDir, + logFilePath, + logLevel: LogLevel.Debug, + isLogStandardOutput: true, +}); +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `apiAddr` | `string` | OpenIM 服务端 API 地址。 | +| `wsAddr` | `string` | OpenIM WebSocket 长连接地址。 | +| `dataDir` | `string` | SDK 本地数据目录,应位于应用可写目录。 | +| `logFilePath` | `string` | SDK 日志目录,应位于应用可写目录。 | +| `logLevel` | `LogLevel` | 日志详细程度,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 | +| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 | + +开发诊断可使用 `LogLevel.Debug`。生产环境通常使用 `LogLevel.Warn` 或 `LogLevel.Error`,并关闭不必要的标准输出。 + +## 写入应用日志 + +调用 `logs()` 将业务诊断信息写入 SDK 日志: + +```ts +await OpenIMSDK.logs({ + logLevel: LogLevel.Error, + file: 'chatRepository.ts', + line: 184, + msgs: 'send_message_failed', + err: error.message, + keyAndValue: [ + 'conversationID', + conversationID, + 'clientMsgID', + clientMsgID, + ], +}); +``` + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `logLevel` | `number` | 本条日志的级别。 | +| `file` | `string` | 调用位置所在的文件名或模块名。 | +| `line` | `number` | 调用位置的行号。 | +| `msgs` | `string` | 简短的业务动作或诊断描述。 | +| `err` | `string` | 错误信息;没有错误信息时传空字符串。 | +| `keyAndValue` | `string[]` | 附加诊断字段,按“键、值”成对传入。 | + +`keyAndValue` 只记录排查所需的非敏感标识,例如 `conversationID`、`clientMsgID`、`groupID` 或 `roomID`。 + +## 上传日志 + +用户主动提交诊断日志时,调用 `uploadLogs()` 上传客户端日志: + +```ts +await OpenIMSDK.uploadLogs({ + line: 2000, + cancelID: 'support-ticket-42', + ex: 'user-initiated-diagnostics', +}); +``` + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `line` | `number` | 是 | 本次上传读取的日志行数配置。 | +| `cancelID` | `string` | 否 | 本次上传的标识。 | +| `ex` | `string` | 否 | 附加诊断说明,不能包含凭据或隐私数据。 | + +调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。 diff --git a/content/zh/docs/chat/sdk/react-native/overview.mdx b/content/zh/docs/chat/sdk/react-native/overview.mdx index e45cb1e3d0..14809d0e77 100644 --- a/content/zh/docs/chat/sdk/react-native/overview.mdx +++ b/content/zh/docs/chat/sdk/react-native/overview.mdx @@ -3,24 +3,3 @@ title: 'OpenIM React Native SDK 概览' description: 'OpenIM React Native SDK 入口,用于移动端应用。' sourcePath: '/sdk/react-native/overview' --- - -## 概览 - -当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。 - -## 接入模型 - -客户端应在拿到后端为当前 `userID` 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。 - -## 移动端注意事项 - -- 验证应用前后台切换后的登录、重连和消息接收。 -- 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。 -- 推送 token 注册应通过可信后端和对应平台通知服务完成。 -- 排查移动端问题时记录发生时间、用户 ID、操作名称、`errCode` 和 `errMsg`,但不要记录 Token 或消息正文。 - -## 相关 SDK - -- [iOS SDK](/sdk/ios/overview) -- [Android SDK](/sdk/android/overview) -- [Flutter SDK](/sdk/flutter/overview) diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index c099bd14d8..4a5b7c106c 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -6680,20 +6680,44 @@ "contentFile": "content/docs/chat/sdk/error-codes.mdx" }, { - "sourcePath": "/sdk/react-native/user/overview-user", - "openimPath": "/sdk/react-native/user/overview-user", - "title": "User overview", + "sourcePath": "/sdk/react-native/getting-started/before-you-start", + "openimPath": "/sdk/react-native/getting-started/before-you-start", + "title": "Before you start", "context": "chat/sdk/react-native", "template": "guide", - "contentFile": "content/docs/chat/sdk/react-native/user/overview-user.mdx" + "contentFile": "content/docs/chat/sdk/react-native/getting-started/before-you-start.mdx" }, { - "sourcePath": "/sdk/react-native/user/overview-relationships", - "openimPath": "/sdk/react-native/user/overview-relationships", - "title": "Relationships overview", + "sourcePath": "/sdk/react-native/getting-started/environment-specific-implementation", + "openimPath": "/sdk/react-native/getting-started/environment-specific-implementation", + "title": "Environment-specific implementation", "context": "chat/sdk/react-native", "template": "guide", - "contentFile": "content/docs/chat/sdk/react-native/user/overview-relationships.mdx" + "contentFile": "content/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx" + }, + { + "sourcePath": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "openimPath": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx" + }, + { + "sourcePath": "/sdk/react-native/getting-started/send-first-message", + "openimPath": "/sdk/react-native/getting-started/send-first-message", + "title": "Send your first message", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/getting-started/send-first-message.mdx" + }, + { + "sourcePath": "/sdk/react-native/user/overview-user", + "openimPath": "/sdk/react-native/user/overview-user", + "title": "User overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/overview-user.mdx" }, { "sourcePath": "/sdk/react-native/user/profile/get-users-info", @@ -6759,6 +6783,14 @@ "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx" }, + { + "sourcePath": "/sdk/react-native/user/overview-relationships", + "openimPath": "/sdk/react-native/user/overview-relationships", + "title": "Relationships overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/user/overview-relationships.mdx" + }, { "sourcePath": "/sdk/react-native/user/friends/get-friend-list-page", "openimPath": "/sdk/react-native/user/friends/get-friend-list-page", @@ -7679,6 +7711,14 @@ "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx" }, + { + "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", + "openimPath": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "Update input states", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx" + }, { "sourcePath": "/sdk/react-native/message/composing-messages/check-speech-to-text", "openimPath": "/sdk/react-native/message/composing-messages/check-speech-to-text", @@ -7703,14 +7743,6 @@ "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx" }, - { - "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", - "openimPath": "/sdk/react-native/message/composing-messages/change-input-states", - "title": "Update input states", - "context": "chat/sdk/react-native", - "template": "guide", - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx" - }, { "sourcePath": "/sdk/react-native/message/managing-messages/delete-local-message", "openimPath": "/sdk/react-native/message/managing-messages/delete-local-message", @@ -7910,5 +7942,21 @@ "context": "chat/sdk/react-native", "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx" + }, + { + "sourcePath": "/sdk/react-native/events/overview-events", + "openimPath": "/sdk/react-native/events/overview-events", + "title": "Events overview", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/events/overview-events.mdx" + }, + { + "sourcePath": "/sdk/react-native/logger", + "openimPath": "/sdk/react-native/logger", + "title": "Logging", + "context": "chat/sdk/react-native", + "template": "guide", + "contentFile": "content/docs/chat/sdk/react-native/logger.mdx" } ] diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index 346ab7d662..d4ad899c1e 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -6529,6 +6529,84 @@ "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-27", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, "redirectTo": null, "notes": ["2026-08-27:已按 React Native SDK 固定提交核对 signalingSendCustomSignal 和 OnReceiveCustomSignal。"] + }, + { + "currentPath": "/sdk/react-native/events/overview-events", + "targetPath": "/sdk/react-native/events/overview-events", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["initSDK"], + "sdkEvents": ["OnConnectSuccess", "OnConnecting", "OnConnectFailed", "OnKickedOffline", "OnUserTokenExpired", "OnUserTokenInvalid", "OnSyncServerStart", "OnSyncServerProgress", "OnSyncServerFinish", "OnSyncServerFailed"], + "locales": { + "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, + "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } + }, + "redirectTo": null, + "notes": ["2026-08-28:参考 Android 事件概览,按 React Native SDK 的 OpenIMEvent 和 OpenIMSDK.on/off 声明整理连接、Token 和初始化同步事件。"] + }, + { + "currentPath": "/sdk/react-native/logger", + "targetPath": "/sdk/react-native/logger", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["initSDK", "logs", "uploadLogs"], + "sdkEvents": [], + "locales": { + "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, + "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } + }, + "redirectTo": null, + "notes": ["2026-08-28:参考 Android 日志页,按 React Native SDK 的 InitOptions、LogsParams 和 UploadLogsParams 声明整理日志配置、写入和上传能力。"] + }, + { + "currentPath": "/sdk/react-native/getting-started/before-you-start", + "targetPath": "/sdk/react-native/getting-started/before-you-start", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": [], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "not-applicable", "evidence": [], "reason": "准备章节不包含 SDK 调用示例。" } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "not-applicable", "evidence": [], "reason": "The preparation page contains no SDK call examples." } } }, + "redirectTo": null, + "notes": ["2026-08-28:参考 WASM 开始之前,补充 React Native 服务、账号和工程准备事项。"] + }, + { + "currentPath": "/sdk/react-native/getting-started/environment-specific-implementation", + "targetPath": "/sdk/react-native/getting-started/environment-specific-implementation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": [], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-28:参考 WASM 按运行环境接入,整理 React Native CLI 与 Expo 自定义开发客户端的安装方式。"] + }, + { + "currentPath": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "targetPath": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["initSDK", "login", "getLoginStatus", "getLoginUserID", "logout"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-28:参考 WASM 认证流程,按 React Native SDK 的 initSDK、login、登录状态查询和 logout 声明整理。"] + }, + { + "currentPath": "/sdk/react-native/getting-started/send-first-message", + "targetPath": "/sdk/react-native/getting-started/send-first-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], + "sdkMethods": ["createTextMessage", "sendMessage"], + "sdkEvents": [], + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "redirectTo": null, + "notes": ["2026-08-28:参考 WASM 发送第一条消息,按 React Native SDK 的 createTextMessage、sendMessage 和消息事件声明整理。"] } ] } diff --git a/data/structure/react-native-navigation-labels.json b/data/structure/react-native-navigation-labels.json index 79a2f9e0a9..3582d31636 100644 --- a/data/structure/react-native-navigation-labels.json +++ b/data/structure/react-native-navigation-labels.json @@ -1,4 +1,17 @@ { + "Overview": "概览", + "Getting started": "快速开始", + "getting-started": "快速开始", + "Before you start": "开始之前", + "before-you-start": "开始之前", + "Environment-specific implementation": "按 React Native 环境接入", + "environment-specific-implementation": "按 React Native 环境接入", + "Authenticate and manage session": "认证与管理登录会话", + "Authenticate and manage a session": "认证与管理登录会话", + "authenticate-and-manage-session": "认证与管理登录会话", + "Send first message": "发送第一条消息", + "Send your first message": "发送第一条消息", + "send-first-message": "发送第一条消息", "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", "User": "用户", "User profile": "用户资料", @@ -196,5 +209,12 @@ "Retrieving messages": "查询消息", "Composing messages": "输入状态与语音转写", "Managing messages": "管理消息", - "Group message read status": "群聊消息已读" + "Group message read status": "群聊消息已读", + "Events": "事件", + "events": "事件", + "Events overview": "事件概览", + "overview-events": "事件概览", + "Logging": "日志", + "Logger": "日志", + "logger": "日志" } diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index 7d71b90e06..19776d9c65 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -4,7 +4,20 @@ "contextKey": "chat/sdk/react-native", "sidebarExpansion": "active-path", "nodes": [ - "/sdk/react-native/overview", + { + "path": "/sdk/react-native/overview", + "navigationTitle": "Overview" + }, + { + "id": "getting-started", + "title": "Getting started", + "children": [ + "/sdk/react-native/getting-started/before-you-start", + "/sdk/react-native/getting-started/environment-specific-implementation", + "/sdk/react-native/getting-started/authenticate-and-manage-session", + "/sdk/react-native/getting-started/send-first-message" + ] + }, { "id": "user", "title": "User", @@ -804,6 +817,11 @@ "navigationTitle": "Send a custom signal" } ] - } + }, + { + "path": "/sdk/react-native/events/overview-events", + "navigationTitle": "Events" + }, + "/sdk/react-native/logger" ] } diff --git a/scripts/sync-client-sdk-route-skeletons.mjs b/scripts/sync-client-sdk-route-skeletons.mjs index a9e2951648..c15bd3dc59 100644 --- a/scripts/sync-client-sdk-route-skeletons.mjs +++ b/scripts/sync-client-sdk-route-skeletons.mjs @@ -306,6 +306,7 @@ async function readJson(relativePath) { function getPlatformDisplayName(platformId) { if (platformId === 'ios') return 'iOS'; if (platformId === 'android') return 'Android'; + if (platformId === 'react-native') return 'React Native'; return 'Flutter'; } diff --git a/src/components/docs/documentation-page.tsx b/src/components/docs/documentation-page.tsx index 45cd87f1b8..be124c05f6 100644 --- a/src/components/docs/documentation-page.tsx +++ b/src/components/docs/documentation-page.tsx @@ -214,7 +214,8 @@ export async function renderDocumentationPage( const sdkOverviewPlatform = locale === 'zh' || candidateSdkOverviewPlatform === 'wasm' || - candidateSdkOverviewPlatform === 'android' + candidateSdkOverviewPlatform === 'android' || + candidateSdkOverviewPlatform === 'react-native' ? candidateSdkOverviewPlatform : undefined; @@ -296,6 +297,7 @@ function getSdkOverviewPlatform(path: string): SdkOverviewPlatform | undefined { '/sdk/android/overview': 'android', '/sdk/flutter/overview': 'flutter', '/sdk/ios/overview': 'ios', + '/sdk/react-native/overview': 'react-native', '/sdk/wasm/overview': 'wasm', }; diff --git a/src/components/docs/sdk-overview-page.tsx b/src/components/docs/sdk-overview-page.tsx index 6649482ee1..7b3f8778b9 100644 --- a/src/components/docs/sdk-overview-page.tsx +++ b/src/components/docs/sdk-overview-page.tsx @@ -24,7 +24,7 @@ type ResourceLink = { title: string; }; -export type SdkOverviewPlatform = 'android' | 'flutter' | 'ios' | 'wasm'; +export type SdkOverviewPlatform = 'android' | 'flutter' | 'ios' | 'react-native' | 'wasm'; type OverviewCopy = { eyebrow: string; @@ -355,6 +355,54 @@ const mobileCopy = { }, ], }, + 'react-native': { + eyebrow: 'Version 4', + intro: + 'OpenIM React Native SDK 为 Android 和 iOS React Native 应用提供用户、会话、群组、消息、实时事件和本地存储能力。先完成 React Native 工程配置与登录,再通过 SDK API 和事件监听把业务数据接入应用状态。', + mostPopular: '热门主题', + recommended: '推荐功能', + resources: '资源', + popular: createMobilePopularCards('react-native'), + features: [ + { + title: '用户认证', + description: '使用后端签发的 Token 登录,并处理连接、过期和被踢下线事件。', + href: '/sdk/react-native/getting-started/authenticate-and-manage-session', + }, + { + title: '群组', + description: '管理群资料、群成员、入群申请、权限和群组事件。', + href: '/sdk/react-native/group/overview-group', + }, + { + title: '事件', + description: '注册全局事件监听,并按稳定标识合并增量数据。', + href: '/sdk/react-native/events/overview-events', + }, + ], + links: [ + { + title: '发送第一条消息', + description: '完成接入、初始化、登录、选择目标并发送消息。', + href: '/sdk/react-native/getting-started/send-first-message', + }, + { + title: 'React Native 环境接入', + description: '配置 React Native CLI 或 Expo 工程并接入 SDK 原生模块。', + href: '/sdk/react-native/getting-started/environment-specific-implementation', + }, + { + title: '日志与诊断', + description: '配置 SDK 日志,并保留错误码和错误信息用于诊断。', + href: '/sdk/react-native/logger', + }, + { + title: '客户端 SDK 错误码', + description: '查询通用客户端错误码,并按错误来源选择处理方式。', + href: '/sdk/error-codes', + }, + ], + }, } satisfies Record, OverviewCopy>; const androidEnglishCopy = { @@ -453,6 +501,34 @@ const androidEnglishCopy = { ], } satisfies OverviewCopy; +const reactNativeEnglishCopy = { + eyebrow: 'Version 4', + intro: + 'OpenIM React Native SDK provides users, conversations, groups, messages, realtime events, and local storage for React Native applications on Android and iOS. Configure the React Native project and sign in first, then connect business data to application state through SDK APIs and event listeners.', + mostPopular: 'Most popular', + recommended: 'Recommended features', + resources: 'Resources', + popular: [ + { title: 'Manage conversations', description: 'Configure conversation state, drafts, unread counts, hiding, and deletion.', href: '/sdk/react-native/conversation/overview-conversation', visual: 'migration' }, + { title: 'Unread message count', description: 'Read conversation unread counts and keep chat lists, badges, and global state in sync.', href: '/sdk/react-native/conversation/managing-conversations/get-total-unread-count', visual: 'unread' }, + { title: 'Conversation read status', description: 'Clear conversation unread counts and handle one-to-one message read receipts.', href: '/sdk/react-native/conversation/managing-conversations/mark-conversation-read', visual: 'receipt' }, + { title: 'Send messages', description: 'Create text, file, or custom messages and send them to users or groups.', href: '/sdk/react-native/message/sending-messages/send-message', visual: 'message' }, + { title: 'Receive messages', description: 'Subscribe to new-message events and merge incremental messages into application state.', href: '/sdk/react-native/message/receiving-messages/receive-messages', visual: 'events' }, + { title: 'Message history', description: 'Retrieve local and synchronized message history with conversation identifiers and message cursors.', href: '/sdk/react-native/message/retrieving-messages/load-older-messages', visual: 'history' }, + ], + features: [ + { title: 'Authentication', description: 'Sign in with a backend-issued token and handle connection, expiration, and forced-logout events.', href: '/sdk/react-native/getting-started/authenticate-and-manage-session' }, + { title: 'Groups', description: 'Manage group profiles, members, applications, permissions, and group events.', href: '/sdk/react-native/group/overview-group' }, + { title: 'Events', description: 'Register global event listeners and merge incremental data by stable identifiers.', href: '/sdk/react-native/events/overview-events' }, + ], + links: [ + { title: 'Send your first message', description: 'Complete integration, initialization, sign-in, target selection, and sending.', href: '/sdk/react-native/getting-started/send-first-message' }, + { title: 'React Native integration', description: 'Configure a React Native CLI or Expo project and link the SDK native module.', href: '/sdk/react-native/getting-started/environment-specific-implementation' }, + { title: 'Logging and diagnostics', description: 'Configure SDK logging and retain error codes and messages for diagnosis.', href: '/sdk/react-native/logger' }, + { title: 'Client SDK error codes', description: 'Look up common client errors and choose a handling path by error source.', href: '/sdk/error-codes' }, + ], +} satisfies OverviewCopy; + function createMobilePopularCards( platform: Exclude, ): OverviewCard[] { @@ -522,6 +598,8 @@ export function SdkOverviewPage({ ? copy[locale] : platform === 'android' && locale === 'en' ? androidEnglishCopy + : platform === 'react-native' && locale === 'en' + ? reactNativeEnglishCopy : mobileCopy[platform]; return ( diff --git a/src/generated/navigation.json b/src/generated/navigation.json index edbcc05f6d..f4dd9be66b 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -10051,7 +10051,54 @@ "href": "/sdk/react-native/overview", "type": "page", "children": [], - "minIndex": 519 + "minIndex": 519, + "navigationTitle": "Overview" + }, + { + "id": "getting-started", + "segment": "getting-started", + "title": "Getting started", + "href": null, + "type": "folder", + "children": [ + { + "id": "getting-started/before-you-start", + "segment": "before-you-start", + "title": "Before you start", + "href": "/sdk/react-native/getting-started/before-you-start", + "type": "page", + "children": [], + "minIndex": 520 + }, + { + "id": "getting-started/environment-specific-implementation", + "segment": "environment-specific-implementation", + "title": "Environment-specific implementation", + "href": "/sdk/react-native/getting-started/environment-specific-implementation", + "type": "page", + "children": [], + "minIndex": 521 + }, + { + "id": "getting-started/authenticate-and-manage-session", + "segment": "authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "href": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "type": "page", + "children": [], + "minIndex": 522 + }, + { + "id": "getting-started/send-first-message", + "segment": "send-first-message", + "title": "Send your first message", + "href": "/sdk/react-native/getting-started/send-first-message", + "type": "page", + "children": [], + "minIndex": 523 + } + ], + "minIndex": 520 }, { "id": "user", @@ -10067,7 +10114,7 @@ "href": "/sdk/react-native/user/overview-user", "type": "page", "children": [], - "minIndex": 520, + "minIndex": 524, "navigationTitle": "User overview" }, { @@ -10084,7 +10131,7 @@ "href": "/sdk/react-native/user/profile/get-users-info", "type": "page", "children": [], - "minIndex": 521, + "minIndex": 525, "navigationTitle": "Get user profiles" }, { @@ -10094,7 +10141,7 @@ "href": "/sdk/react-native/user/profile/get-self-user-info", "type": "page", "children": [], - "minIndex": 522, + "minIndex": 526, "navigationTitle": "Get your profile" }, { @@ -10104,11 +10151,11 @@ "href": "/sdk/react-native/user/profile/set-self-info", "type": "page", "children": [], - "minIndex": 523, + "minIndex": 527, "navigationTitle": "Update your profile" } ], - "minIndex": 521 + "minIndex": 525 }, { "id": "user/profile/set-global-message-reception", @@ -10117,7 +10164,7 @@ "href": "/sdk/react-native/user/profile/set-global-message-reception", "type": "page", "children": [], - "minIndex": 524, + "minIndex": 528, "navigationTitle": "Set global message reception" }, { @@ -10127,7 +10174,7 @@ "href": "/sdk/react-native/user/profile/set-friend-add-permission", "type": "page", "children": [], - "minIndex": 525, + "minIndex": 529, "navigationTitle": "Set friend request permissions" }, { @@ -10144,7 +10191,7 @@ "href": "/sdk/react-native/user/online-status/subscribe-users-status", "type": "page", "children": [], - "minIndex": 526, + "minIndex": 530, "navigationTitle": "Subscribe to online status" }, { @@ -10154,7 +10201,7 @@ "href": "/sdk/react-native/user/online-status/get-subscribe-users-status", "type": "page", "children": [], - "minIndex": 527, + "minIndex": 531, "navigationTitle": "Get subscribed user status" }, { @@ -10164,14 +10211,14 @@ "href": "/sdk/react-native/user/online-status/unsubscribe-users-status", "type": "page", "children": [], - "minIndex": 528, + "minIndex": 532, "navigationTitle": "Unsubscribe from online status" } ], - "minIndex": 526 + "minIndex": 530 } ], - "minIndex": 520 + "minIndex": 524 }, { "id": "relationships", @@ -10187,7 +10234,7 @@ "href": "/sdk/react-native/user/overview-relationships", "type": "page", "children": [], - "minIndex": 529 + "minIndex": 533 }, { "id": "friends", @@ -10203,7 +10250,7 @@ "href": "/sdk/react-native/user/friends/get-friend-list-page", "type": "page", "children": [], - "minIndex": 530, + "minIndex": 534, "navigationTitle": "Get the friend list" }, { @@ -10213,7 +10260,7 @@ "href": "/sdk/react-native/user/friends/search-friends", "type": "page", "children": [], - "minIndex": 531, + "minIndex": 535, "navigationTitle": "Search friends" }, { @@ -10223,7 +10270,7 @@ "href": "/sdk/react-native/user/friends/get-specified-friends-info", "type": "page", "children": [], - "minIndex": 532, + "minIndex": 536, "navigationTitle": "Get friend profiles" }, { @@ -10233,7 +10280,7 @@ "href": "/sdk/react-native/user/friends/check-friend", "type": "page", "children": [], - "minIndex": 533, + "minIndex": 537, "navigationTitle": "Check friendship status" }, { @@ -10243,7 +10290,7 @@ "href": "/sdk/react-native/user/friends/update-friends", "type": "page", "children": [], - "minIndex": 534, + "minIndex": 538, "navigationTitle": "Update friend information" }, { @@ -10253,7 +10300,7 @@ "href": "/sdk/react-native/user/friends/delete-friend", "type": "page", "children": [], - "minIndex": 535, + "minIndex": 539, "navigationTitle": "Delete a friend" }, { @@ -10270,7 +10317,7 @@ "href": "/sdk/react-native/user/friend-applications/add-friend", "type": "page", "children": [], - "minIndex": 536, + "minIndex": 540, "navigationTitle": "Send a friend application" }, { @@ -10280,7 +10327,7 @@ "href": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", "type": "page", "children": [], - "minIndex": 537, + "minIndex": 541, "navigationTitle": "Get received friend applications" }, { @@ -10290,7 +10337,7 @@ "href": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", "type": "page", "children": [], - "minIndex": 538, + "minIndex": 542, "navigationTitle": "Get sent friend applications" }, { @@ -10300,7 +10347,7 @@ "href": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", "type": "page", "children": [], - "minIndex": 539, + "minIndex": 543, "navigationTitle": "Get pending application count" }, { @@ -10310,7 +10357,7 @@ "href": "/sdk/react-native/user/friend-applications/accept-friend-application", "type": "page", "children": [], - "minIndex": 540, + "minIndex": 544, "navigationTitle": "Accept a friend application" }, { @@ -10320,7 +10367,7 @@ "href": "/sdk/react-native/user/friend-applications/refuse-friend-application", "type": "page", "children": [], - "minIndex": 541, + "minIndex": 545, "navigationTitle": "Reject a friend application" }, { @@ -10330,14 +10377,14 @@ "href": "/sdk/react-native/user/friend-applications/delete-friend-requests", "type": "page", "children": [], - "minIndex": 542, + "minIndex": 546, "navigationTitle": "Delete friend applications" } ], - "minIndex": 536 + "minIndex": 540 } ], - "minIndex": 530 + "minIndex": 534 }, { "id": "blacklist", @@ -10353,7 +10400,7 @@ "href": "/sdk/react-native/user/blacklist/get-black-list", "type": "page", "children": [], - "minIndex": 543, + "minIndex": 547, "navigationTitle": "Get the blacklist" }, { @@ -10363,7 +10410,7 @@ "href": "/sdk/react-native/user/blacklist/add-black", "type": "page", "children": [], - "minIndex": 544, + "minIndex": 548, "navigationTitle": "Add a user to the blacklist" }, { @@ -10373,14 +10420,14 @@ "href": "/sdk/react-native/user/blacklist/remove-black", "type": "page", "children": [], - "minIndex": 545, + "minIndex": 549, "navigationTitle": "Remove a user from the blacklist" } ], - "minIndex": 543 + "minIndex": 547 } ], - "minIndex": 529 + "minIndex": 533 }, { "id": "conversation", @@ -10396,7 +10443,7 @@ "href": "/sdk/react-native/conversation/overview-conversation", "type": "page", "children": [], - "minIndex": 546 + "minIndex": 550 }, { "id": "conversation/retrieving-conversations", @@ -10412,7 +10459,7 @@ "href": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", "type": "page", "children": [], - "minIndex": 547, + "minIndex": 551, "navigationTitle": "Open a conversation" }, { @@ -10422,7 +10469,7 @@ "href": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", "type": "page", "children": [], - "minIndex": 548, + "minIndex": 552, "navigationTitle": "Resolve a conversation ID" }, { @@ -10432,7 +10479,7 @@ "href": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", "type": "page", "children": [], - "minIndex": 549, + "minIndex": 553, "navigationTitle": "Get conversations by ID" }, { @@ -10442,11 +10489,11 @@ "href": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", "type": "page", "children": [], - "minIndex": 550, + "minIndex": 554, "navigationTitle": "Retrieve the conversation list" } ], - "minIndex": 547 + "minIndex": 551 }, { "id": "conversation/conversation-organization", @@ -10462,7 +10509,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/pin-conversation", "type": "page", "children": [], - "minIndex": 551, + "minIndex": 555, "navigationTitle": "Pin or unpin a conversation" }, { @@ -10472,7 +10519,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/mark-conversation", "type": "page", "children": [], - "minIndex": 552, + "minIndex": 556, "navigationTitle": "Mark or unmark a conversation" }, { @@ -10482,7 +10529,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", "type": "page", "children": [], - "minIndex": 553, + "minIndex": 557, "navigationTitle": "Set a conversation remark" }, { @@ -10492,7 +10539,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", "type": "page", "children": [], - "minIndex": 554, + "minIndex": 558, "navigationTitle": "Set conversation extra data" }, { @@ -10502,11 +10549,11 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", "type": "page", "children": [], - "minIndex": 555, + "minIndex": 559, "navigationTitle": "Set a conversation draft" } ], - "minIndex": 551 + "minIndex": 555 }, { "id": "conversation/unread-status-and-notifications", @@ -10522,7 +10569,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", "type": "page", "children": [], - "minIndex": 556, + "minIndex": 560, "navigationTitle": "Set conversation message reception" }, { @@ -10532,7 +10579,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", "type": "page", "children": [], - "minIndex": 557, + "minIndex": 561, "navigationTitle": "Reset group mention status" }, { @@ -10542,7 +10589,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", "type": "page", "children": [], - "minIndex": 558, + "minIndex": 562, "navigationTitle": "Mark a conversation as read" }, { @@ -10552,11 +10599,11 @@ "href": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", "type": "page", "children": [], - "minIndex": 559, + "minIndex": 563, "navigationTitle": "Track the total unread count" } ], - "minIndex": 556 + "minIndex": 560 }, { "id": "conversation/message-retention-and-privacy", @@ -10572,7 +10619,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-private-chat", "type": "page", "children": [], - "minIndex": 560, + "minIndex": 564, "navigationTitle": "Enable or disable burn after reading" }, { @@ -10582,7 +10629,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", "type": "page", "children": [], - "minIndex": 561, + "minIndex": 565, "navigationTitle": "Set the burn duration" }, { @@ -10592,11 +10639,11 @@ "href": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", "type": "page", "children": [], - "minIndex": 562, + "minIndex": 566, "navigationTitle": "Schedule server message deletion" } ], - "minIndex": 560 + "minIndex": 564 }, { "id": "conversation/hiding-and-deleting-conversations", @@ -10612,7 +10659,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", "type": "page", "children": [], - "minIndex": 563, + "minIndex": 567, "navigationTitle": "Hide a conversation" }, { @@ -10622,7 +10669,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", "type": "page", "children": [], - "minIndex": 564, + "minIndex": 568, "navigationTitle": "Hide all conversations" }, { @@ -10632,7 +10679,7 @@ "href": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", "type": "page", "children": [], - "minIndex": 565, + "minIndex": 569, "navigationTitle": "Delete a conversation and its messages" }, { @@ -10642,11 +10689,11 @@ "href": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", "type": "page", "children": [], - "minIndex": 566, + "minIndex": 570, "navigationTitle": "Clear messages in a conversation" } ], - "minIndex": 563 + "minIndex": 567 }, { "id": "conversation/conversation-groups", @@ -10662,7 +10709,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", "type": "page", "children": [], - "minIndex": 567, + "minIndex": 571, "navigationTitle": "Conversation group overview" }, { @@ -10672,7 +10719,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", "type": "page", "children": [], - "minIndex": 568, + "minIndex": 572, "navigationTitle": "Create a conversation group" }, { @@ -10682,7 +10729,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", "type": "page", "children": [], - "minIndex": 569, + "minIndex": 573, "navigationTitle": "Get conversation groups" }, { @@ -10692,7 +10739,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", "type": "page", "children": [], - "minIndex": 570, + "minIndex": 574, "navigationTitle": "Get conversations in a group" }, { @@ -10702,7 +10749,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", "type": "page", "children": [], - "minIndex": 571, + "minIndex": 575, "navigationTitle": "Get groups for a conversation" }, { @@ -10712,7 +10759,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", "type": "page", "children": [], - "minIndex": 572, + "minIndex": 576, "navigationTitle": "Update a conversation group" }, { @@ -10722,7 +10769,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", "type": "page", "children": [], - "minIndex": 573, + "minIndex": 577, "navigationTitle": "Reorder conversation groups" }, { @@ -10732,7 +10779,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", "type": "page", "children": [], - "minIndex": 574, + "minIndex": 578, "navigationTitle": "Add conversations to groups" }, { @@ -10742,7 +10789,7 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", "type": "page", "children": [], - "minIndex": 575, + "minIndex": 579, "navigationTitle": "Remove conversations from groups" }, { @@ -10752,14 +10799,14 @@ "href": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", "type": "page", "children": [], - "minIndex": 576, + "minIndex": 580, "navigationTitle": "Delete a conversation group" } ], - "minIndex": 567 + "minIndex": 571 } ], - "minIndex": 546 + "minIndex": 550 }, { "id": "group", @@ -10775,7 +10822,7 @@ "href": "/sdk/react-native/group/overview-group", "type": "page", "children": [], - "minIndex": 577, + "minIndex": 581, "navigationTitle": "Group overview" }, { @@ -10792,7 +10839,7 @@ "href": "/sdk/react-native/group/create-group", "type": "page", "children": [], - "minIndex": 578, + "minIndex": 582, "navigationTitle": "Create a group" }, { @@ -10802,7 +10849,7 @@ "href": "/sdk/react-native/group/update-group-profile", "type": "page", "children": [], - "minIndex": 579, + "minIndex": 583, "navigationTitle": "Update group profile" }, { @@ -10812,7 +10859,7 @@ "href": "/sdk/react-native/group/set-group-announcement", "type": "page", "children": [], - "minIndex": 580, + "minIndex": 584, "navigationTitle": "Publish a group announcement" }, { @@ -10822,11 +10869,11 @@ "href": "/sdk/react-native/group/set-group-extension", "type": "page", "children": [], - "minIndex": 581, + "minIndex": 585, "navigationTitle": "Set group extra data" } ], - "minIndex": 578 + "minIndex": 582 }, { "id": "group/permissions", @@ -10842,7 +10889,7 @@ "href": "/sdk/react-native/group/set-group-join-verification", "type": "page", "children": [], - "minIndex": 582, + "minIndex": 586, "navigationTitle": "Set group join verification" }, { @@ -10852,7 +10899,7 @@ "href": "/sdk/react-native/group/set-group-member-profile-access", "type": "page", "children": [], - "minIndex": 583, + "minIndex": 587, "navigationTitle": "Set member profile access" }, { @@ -10862,7 +10909,7 @@ "href": "/sdk/react-native/group/set-group-member-friend-permission", "type": "page", "children": [], - "minIndex": 584, + "minIndex": 588, "navigationTitle": "Set member friend request permission" }, { @@ -10872,11 +10919,11 @@ "href": "/sdk/react-native/group/change-group-mute", "type": "page", "children": [], - "minIndex": 585, + "minIndex": 589, "navigationTitle": "Change group mute status" } ], - "minIndex": 582 + "minIndex": 586 }, { "id": "group/joining-and-leaving", @@ -10892,7 +10939,7 @@ "href": "/sdk/react-native/group/join-group", "type": "page", "children": [], - "minIndex": 586, + "minIndex": 590, "navigationTitle": "Apply to join a group" }, { @@ -10902,7 +10949,7 @@ "href": "/sdk/react-native/group/quit-group", "type": "page", "children": [], - "minIndex": 587, + "minIndex": 591, "navigationTitle": "Leave a group" }, { @@ -10912,11 +10959,11 @@ "href": "/sdk/react-native/group/dismiss-group", "type": "page", "children": [], - "minIndex": 588, + "minIndex": 592, "navigationTitle": "Dismiss a group" } ], - "minIndex": 586 + "minIndex": 590 }, { "id": "group/retrieving-groups", @@ -10932,7 +10979,7 @@ "href": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", "type": "page", "children": [], - "minIndex": 589, + "minIndex": 593, "navigationTitle": "Get group information" }, { @@ -10942,7 +10989,7 @@ "href": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", "type": "page", "children": [], - "minIndex": 590, + "minIndex": 594, "navigationTitle": "Get joined groups" }, { @@ -10952,7 +10999,7 @@ "href": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", "type": "page", "children": [], - "minIndex": 591, + "minIndex": 595, "navigationTitle": "Get joined groups by page" }, { @@ -10962,7 +11009,7 @@ "href": "/sdk/react-native/group/retrieving-groups/is-join-group", "type": "page", "children": [], - "minIndex": 592, + "minIndex": 596, "navigationTitle": "Check group membership" }, { @@ -10972,11 +11019,11 @@ "href": "/sdk/react-native/group/retrieving-groups/search-groups", "type": "page", "children": [], - "minIndex": 593, + "minIndex": 597, "navigationTitle": "Search groups" } ], - "minIndex": 589 + "minIndex": 593 }, { "id": "group/group-applications", @@ -10992,7 +11039,7 @@ "href": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", "type": "page", "children": [], - "minIndex": 594, + "minIndex": 598, "navigationTitle": "Get received group applications" }, { @@ -11002,7 +11049,7 @@ "href": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", "type": "page", "children": [], - "minIndex": 595, + "minIndex": 599, "navigationTitle": "Get sent group applications" }, { @@ -11012,7 +11059,7 @@ "href": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", "type": "page", "children": [], - "minIndex": 596, + "minIndex": 600, "navigationTitle": "Get pending group application count" }, { @@ -11022,7 +11069,7 @@ "href": "/sdk/react-native/group/group-applications/accept-group-application", "type": "page", "children": [], - "minIndex": 597, + "minIndex": 601, "navigationTitle": "Accept a group application" }, { @@ -11032,7 +11079,7 @@ "href": "/sdk/react-native/group/group-applications/refuse-group-application", "type": "page", "children": [], - "minIndex": 598, + "minIndex": 602, "navigationTitle": "Reject a group application" }, { @@ -11042,11 +11089,11 @@ "href": "/sdk/react-native/group/group-applications/delete-group-requests", "type": "page", "children": [], - "minIndex": 599, + "minIndex": 603, "navigationTitle": "Delete group applications" } ], - "minIndex": 594 + "minIndex": 598 }, { "id": "group/retrieving-group-members", @@ -11062,7 +11109,7 @@ "href": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", "type": "page", "children": [], - "minIndex": 600, + "minIndex": 604, "navigationTitle": "Get group members" }, { @@ -11072,7 +11119,7 @@ "href": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", "type": "page", "children": [], - "minIndex": 601, + "minIndex": 605, "navigationTitle": "Get group member profiles" }, { @@ -11082,7 +11129,7 @@ "href": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", "type": "page", "children": [], - "minIndex": 602, + "minIndex": 606, "navigationTitle": "Check users in a group" }, { @@ -11092,11 +11139,11 @@ "href": "/sdk/react-native/group/retrieving-group-members/search-group-members", "type": "page", "children": [], - "minIndex": 603, + "minIndex": 607, "navigationTitle": "Search group members" } ], - "minIndex": 600 + "minIndex": 604 }, { "id": "group/managing-group-members", @@ -11112,7 +11159,7 @@ "href": "/sdk/react-native/group/managing-group-members/invite-user-to-group", "type": "page", "children": [], - "minIndex": 604, + "minIndex": 608, "navigationTitle": "Invite users to a group" }, { @@ -11122,7 +11169,7 @@ "href": "/sdk/react-native/group/managing-group-members/kick-group-member", "type": "page", "children": [], - "minIndex": 605, + "minIndex": 609, "navigationTitle": "Remove group members" }, { @@ -11132,7 +11179,7 @@ "href": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", "type": "page", "children": [], - "minIndex": 606, + "minIndex": 610, "navigationTitle": "Update a group nickname" }, { @@ -11142,7 +11189,7 @@ "href": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", "type": "page", "children": [], - "minIndex": 607, + "minIndex": 611, "navigationTitle": "Manage group administrators" }, { @@ -11152,7 +11199,7 @@ "href": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", "type": "page", "children": [], - "minIndex": 608, + "minIndex": 612, "navigationTitle": "Update a group member avatar" }, { @@ -11162,7 +11209,7 @@ "href": "/sdk/react-native/group/managing-group-members/set-group-member-extension", "type": "page", "children": [], - "minIndex": 609, + "minIndex": 613, "navigationTitle": "Set group member extra data" }, { @@ -11172,7 +11219,7 @@ "href": "/sdk/react-native/group/managing-group-members/transfer-group-owner", "type": "page", "children": [], - "minIndex": 610, + "minIndex": 614, "navigationTitle": "Transfer group ownership" }, { @@ -11182,14 +11229,14 @@ "href": "/sdk/react-native/group/managing-group-members/change-group-member-mute", "type": "page", "children": [], - "minIndex": 611, + "minIndex": 615, "navigationTitle": "Mute or unmute a group member" } ], - "minIndex": 604 + "minIndex": 608 } ], - "minIndex": 577 + "minIndex": 581 }, { "id": "message", @@ -11205,7 +11252,7 @@ "href": "/sdk/react-native/message/overview-message", "type": "page", "children": [], - "minIndex": 612 + "minIndex": 616 }, { "id": "message/creating-messages", @@ -11221,7 +11268,7 @@ "href": "/sdk/react-native/message/creating-messages/create-text-message", "type": "page", "children": [], - "minIndex": 613, + "minIndex": 617, "navigationTitle": "Create a text message" }, { @@ -11231,7 +11278,7 @@ "href": "/sdk/react-native/message/creating-messages/create-text-at-message", "type": "page", "children": [], - "minIndex": 614, + "minIndex": 618, "navigationTitle": "Create a mention message" }, { @@ -11241,7 +11288,7 @@ "href": "/sdk/react-native/message/creating-messages/create-custom-message", "type": "page", "children": [], - "minIndex": 615, + "minIndex": 619, "navigationTitle": "Create a custom message" }, { @@ -11251,7 +11298,7 @@ "href": "/sdk/react-native/message/creating-messages/create-image-message-by-file", "type": "page", "children": [], - "minIndex": 616, + "minIndex": 620, "navigationTitle": "Create an image message from a file" }, { @@ -11261,7 +11308,7 @@ "href": "/sdk/react-native/message/creating-messages/create-image-message-by-url", "type": "page", "children": [], - "minIndex": 617, + "minIndex": 621, "navigationTitle": "Create an image message from a URL" }, { @@ -11271,7 +11318,7 @@ "href": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", "type": "page", "children": [], - "minIndex": 618, + "minIndex": 622, "navigationTitle": "Create an audio message from a file" }, { @@ -11281,7 +11328,7 @@ "href": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", "type": "page", "children": [], - "minIndex": 619, + "minIndex": 623, "navigationTitle": "Create an audio message from a URL" }, { @@ -11291,7 +11338,7 @@ "href": "/sdk/react-native/message/creating-messages/create-video-message-by-file", "type": "page", "children": [], - "minIndex": 620, + "minIndex": 624, "navigationTitle": "Create a video message from a file" }, { @@ -11301,7 +11348,7 @@ "href": "/sdk/react-native/message/creating-messages/create-video-message-by-url", "type": "page", "children": [], - "minIndex": 621, + "minIndex": 625, "navigationTitle": "Create a video message from a URL" }, { @@ -11311,7 +11358,7 @@ "href": "/sdk/react-native/message/creating-messages/create-file-message-by-file", "type": "page", "children": [], - "minIndex": 622, + "minIndex": 626, "navigationTitle": "Create a file message from a file" }, { @@ -11321,7 +11368,7 @@ "href": "/sdk/react-native/message/creating-messages/create-file-message-by-url", "type": "page", "children": [], - "minIndex": 623, + "minIndex": 627, "navigationTitle": "Create a file message from a URL" }, { @@ -11331,7 +11378,7 @@ "href": "/sdk/react-native/message/creating-messages/create-card-message", "type": "page", "children": [], - "minIndex": 624, + "minIndex": 628, "navigationTitle": "Create a contact card message" }, { @@ -11341,7 +11388,7 @@ "href": "/sdk/react-native/message/creating-messages/create-location-message", "type": "page", "children": [], - "minIndex": 625, + "minIndex": 629, "navigationTitle": "Create a location message" }, { @@ -11351,7 +11398,7 @@ "href": "/sdk/react-native/message/creating-messages/create-face-message", "type": "page", "children": [], - "minIndex": 626, + "minIndex": 630, "navigationTitle": "Create an emoji message" }, { @@ -11361,7 +11408,7 @@ "href": "/sdk/react-native/message/creating-messages/create-quote-message", "type": "page", "children": [], - "minIndex": 627, + "minIndex": 631, "navigationTitle": "Create a reply message" }, { @@ -11371,7 +11418,7 @@ "href": "/sdk/react-native/message/creating-messages/create-markdown-message", "type": "page", "children": [], - "minIndex": 628, + "minIndex": 632, "navigationTitle": "Create a Markdown message" }, { @@ -11381,7 +11428,7 @@ "href": "/sdk/react-native/message/creating-messages/create-forward-message", "type": "page", "children": [], - "minIndex": 629, + "minIndex": 633, "navigationTitle": "Create a forwarded message" }, { @@ -11391,7 +11438,7 @@ "href": "/sdk/react-native/message/creating-messages/create-merger-message", "type": "page", "children": [], - "minIndex": 630, + "minIndex": 634, "navigationTitle": "Create a merged message" }, { @@ -11401,7 +11448,7 @@ "href": "/sdk/react-native/message/creating-messages/create-advanced-text-message", "type": "page", "children": [], - "minIndex": 631, + "minIndex": 635, "navigationTitle": "Create a rich-text message" }, { @@ -11411,7 +11458,7 @@ "href": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", "type": "page", "children": [], - "minIndex": 632, + "minIndex": 636, "navigationTitle": "Create a rich-text reply" }, { @@ -11421,11 +11468,11 @@ "href": "/sdk/react-native/message/creating-messages/create-targeted-group-message", "type": "page", "children": [], - "minIndex": 633, + "minIndex": 637, "navigationTitle": "Create a targeted group message" } ], - "minIndex": 613 + "minIndex": 617 }, { "id": "message/sending-messages", @@ -11441,7 +11488,7 @@ "href": "/sdk/react-native/message/sending-messages/send-message", "type": "page", "children": [], - "minIndex": 634, + "minIndex": 638, "navigationTitle": "Send a message" }, { @@ -11451,11 +11498,11 @@ "href": "/sdk/react-native/message/sending-messages/send-message-not-oss", "type": "page", "children": [], - "minIndex": 635, + "minIndex": 639, "navigationTitle": "Send a message without OSS" } ], - "minIndex": 634 + "minIndex": 638 }, { "id": "message/receiving-messages/receive-messages", @@ -11464,7 +11511,7 @@ "href": "/sdk/react-native/message/receiving-messages/receive-messages", "type": "page", "children": [], - "minIndex": 636 + "minIndex": 640 }, { "id": "message/receiving-messages/receive-custom-business-messages", @@ -11473,7 +11520,7 @@ "href": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", "type": "page", "children": [], - "minIndex": 637, + "minIndex": 641, "navigationTitle": "Receive custom business messages" }, { @@ -11490,7 +11537,7 @@ "href": "/sdk/react-native/message/retrieving-messages/load-older-messages", "type": "page", "children": [], - "minIndex": 638, + "minIndex": 642, "navigationTitle": "Load older messages" }, { @@ -11500,7 +11547,7 @@ "href": "/sdk/react-native/message/retrieving-messages/load-newer-messages", "type": "page", "children": [], - "minIndex": 639, + "minIndex": 643, "navigationTitle": "Load newer messages" }, { @@ -11510,7 +11557,7 @@ "href": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", "type": "page", "children": [], - "minIndex": 640, + "minIndex": 644, "navigationTitle": "Find messages by ID" }, { @@ -11520,7 +11567,7 @@ "href": "/sdk/react-native/message/retrieving-messages/load-message-context", "type": "page", "children": [], - "minIndex": 641, + "minIndex": 645, "navigationTitle": "Load message context" }, { @@ -11530,10 +11577,10 @@ "href": "/sdk/react-native/message/searching-messages/search-messages", "type": "page", "children": [], - "minIndex": 642 + "minIndex": 646 } ], - "minIndex": 638 + "minIndex": 642 }, { "id": "message/composing-messages", @@ -11549,7 +11596,7 @@ "href": "/sdk/react-native/message/composing-messages/update-typing-status", "type": "page", "children": [], - "minIndex": 643, + "minIndex": 647, "navigationTitle": "Update typing status" }, { @@ -11559,7 +11606,7 @@ "href": "/sdk/react-native/message/composing-messages/get-typing-status", "type": "page", "children": [], - "minIndex": 644, + "minIndex": 648, "navigationTitle": "Get typing status" }, { @@ -11569,7 +11616,7 @@ "href": "/sdk/react-native/message/composing-messages/change-input-states", "type": "page", "children": [], - "minIndex": 645, + "minIndex": 649, "navigationTitle": "Update input states" }, { @@ -11579,7 +11626,7 @@ "href": "/sdk/react-native/message/composing-messages/check-speech-to-text", "type": "page", "children": [], - "minIndex": 646, + "minIndex": 650, "navigationTitle": "Check speech recognition support" }, { @@ -11589,7 +11636,7 @@ "href": "/sdk/react-native/message/composing-messages/transcribe-audio", "type": "page", "children": [], - "minIndex": 647, + "minIndex": 651, "navigationTitle": "Transcribe an audio file" }, { @@ -11599,11 +11646,11 @@ "href": "/sdk/react-native/message/composing-messages/save-local-transcript", "type": "page", "children": [], - "minIndex": 648, + "minIndex": 652, "navigationTitle": "Save a local transcript" } ], - "minIndex": 643 + "minIndex": 647 }, { "id": "message/managing-messages", @@ -11619,7 +11666,7 @@ "href": "/sdk/react-native/message/managing-messages/delete-local-message", "type": "page", "children": [], - "minIndex": 649, + "minIndex": 653, "navigationTitle": "Delete a local message" }, { @@ -11629,7 +11676,7 @@ "href": "/sdk/react-native/message/managing-messages/delete-saved-messages", "type": "page", "children": [], - "minIndex": 650, + "minIndex": 654, "navigationTitle": "Delete saved messages" }, { @@ -11639,7 +11686,7 @@ "href": "/sdk/react-native/message/managing-messages/delete-user-messages", "type": "page", "children": [], - "minIndex": 651, + "minIndex": 655, "navigationTitle": "Delete messages from a user" }, { @@ -11649,7 +11696,7 @@ "href": "/sdk/react-native/message/managing-messages/revoke-a-message", "type": "page", "children": [], - "minIndex": 652 + "minIndex": 656 }, { "id": "message/managing-messages/modify-a-message", @@ -11658,7 +11705,7 @@ "href": "/sdk/react-native/message/managing-messages/modify-a-message", "type": "page", "children": [], - "minIndex": 653 + "minIndex": 657 }, { "id": "message/managing-messages/insert-local-single-message", @@ -11667,7 +11714,7 @@ "href": "/sdk/react-native/message/managing-messages/insert-local-single-message", "type": "page", "children": [], - "minIndex": 654, + "minIndex": 658, "navigationTitle": "Insert a local direct message" }, { @@ -11677,7 +11724,7 @@ "href": "/sdk/react-native/message/managing-messages/insert-local-group-message", "type": "page", "children": [], - "minIndex": 655, + "minIndex": 659, "navigationTitle": "Insert a local group message" }, { @@ -11687,7 +11734,7 @@ "href": "/sdk/react-native/message/managing-messages/clear-all-local-messages", "type": "page", "children": [], - "minIndex": 656, + "minIndex": 660, "navigationTitle": "Clear all local messages" }, { @@ -11697,7 +11744,7 @@ "href": "/sdk/react-native/message/managing-messages/clear-all-messages", "type": "page", "children": [], - "minIndex": 657, + "minIndex": 661, "navigationTitle": "Clear all saved messages" }, { @@ -11707,11 +11754,11 @@ "href": "/sdk/react-native/message/managing-messages/set-message-local-ex", "type": "page", "children": [], - "minIndex": 658, + "minIndex": 662, "navigationTitle": "Set local message extensions" } ], - "minIndex": 649 + "minIndex": 653 }, { "id": "message/group-message-read-status", @@ -11727,7 +11774,7 @@ "href": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", "type": "page", "children": [], - "minIndex": 659, + "minIndex": 663, "navigationTitle": "Send group read receipts" }, { @@ -11737,14 +11784,14 @@ "href": "/sdk/react-native/message/managing-read-status/get-group-message-readers", "type": "page", "children": [], - "minIndex": 660, + "minIndex": 664, "navigationTitle": "View group message readers" } ], - "minIndex": 659 + "minIndex": 663 } ], - "minIndex": 612 + "minIndex": 616 }, { "id": "file-uploads/upload-file", @@ -11753,7 +11800,7 @@ "href": "/sdk/react-native/file-uploads/upload-file", "type": "page", "children": [], - "minIndex": 661, + "minIndex": 665, "navigationTitle": "Upload a file" }, { @@ -11770,7 +11817,7 @@ "href": "/sdk/react-native/calling/overview-calling", "type": "page", "children": [], - "minIndex": 662 + "minIndex": 666 }, { "id": "calling/managing-calls", @@ -11786,7 +11833,7 @@ "href": "/sdk/react-native/calling/managing-calls/start-single-call", "type": "page", "children": [], - "minIndex": 663, + "minIndex": 667, "navigationTitle": "Start a one-to-one call" }, { @@ -11796,7 +11843,7 @@ "href": "/sdk/react-native/calling/managing-calls/start-group-call", "type": "page", "children": [], - "minIndex": 664, + "minIndex": 668, "navigationTitle": "Start a group call" }, { @@ -11806,7 +11853,7 @@ "href": "/sdk/react-native/calling/managing-calls/accept-call", "type": "page", "children": [], - "minIndex": 665, + "minIndex": 669, "navigationTitle": "Accept a call" }, { @@ -11816,7 +11863,7 @@ "href": "/sdk/react-native/calling/managing-calls/reject-call", "type": "page", "children": [], - "minIndex": 666, + "minIndex": 670, "navigationTitle": "Reject a call" }, { @@ -11826,7 +11873,7 @@ "href": "/sdk/react-native/calling/managing-calls/cancel-call", "type": "page", "children": [], - "minIndex": 667, + "minIndex": 671, "navigationTitle": "Cancel a call invitation" }, { @@ -11836,7 +11883,7 @@ "href": "/sdk/react-native/calling/managing-calls/hang-up-call", "type": "page", "children": [], - "minIndex": 668, + "minIndex": 672, "navigationTitle": "Hang up a call" }, { @@ -11846,11 +11893,11 @@ "href": "/sdk/react-native/calling/managing-calls/handle-call-events", "type": "page", "children": [], - "minIndex": 669, + "minIndex": 673, "navigationTitle": "Handle call events" } ], - "minIndex": 663 + "minIndex": 667 }, { "id": "calling/retrieving-call-information", @@ -11866,7 +11913,7 @@ "href": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", "type": "page", "children": [], - "minIndex": 670, + "minIndex": 674, "navigationTitle": "Restore a pending invitation" }, { @@ -11876,7 +11923,7 @@ "href": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", "type": "page", "children": [], - "minIndex": 671, + "minIndex": 675, "navigationTitle": "Get a group call room" }, { @@ -11886,11 +11933,11 @@ "href": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", "type": "page", "children": [], - "minIndex": 672, + "minIndex": 676, "navigationTitle": "Get room credentials" } ], - "minIndex": 670 + "minIndex": 674 }, { "id": "calling/sending-custom-signals/send-a-custom-signal", @@ -11899,14 +11946,33 @@ "href": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", "type": "page", "children": [], - "minIndex": 673, + "minIndex": 677, "navigationTitle": "Send a custom signal" } ], - "minIndex": 662 + "minIndex": 666 + }, + { + "id": "events/overview-events", + "segment": "overview-events", + "title": "Events overview", + "href": "/sdk/react-native/events/overview-events", + "type": "page", + "children": [], + "minIndex": 678, + "navigationTitle": "Events" + }, + { + "id": "logger", + "segment": "logger", + "title": "Logging", + "href": "/sdk/react-native/logger", + "type": "page", + "children": [], + "minIndex": 679 } ], - "pageCount": 155, + "pageCount": 161, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index 6894c2e626..6bf959f45a 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,11 +1,15 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 155, - "manualPageCount": 155, + "pageCount": 161, + "manualPageCount": 161, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", + "/sdk/react-native/getting-started/before-you-start": "published", + "/sdk/react-native/getting-started/environment-specific-implementation": "published", + "/sdk/react-native/getting-started/authenticate-and-manage-session": "published", + "/sdk/react-native/getting-started/send-first-message": "published", "/sdk/react-native/user/overview-user": "published", "/sdk/react-native/user/profile/get-users-info": "published", "/sdk/react-native/user/profile/get-self-user-info": "published", @@ -159,9 +163,24 @@ "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation": "published", "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id": "published", "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id": "published", - "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal": "published" + "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal": "published", + "/sdk/react-native/events/overview-events": "published", + "/sdk/react-native/logger": "published" }, "navigationLabels": { + "Overview": "概览", + "Getting started": "快速开始", + "getting-started": "快速开始", + "Before you start": "开始之前", + "before-you-start": "开始之前", + "Environment-specific implementation": "按 React Native 环境接入", + "environment-specific-implementation": "按 React Native 环境接入", + "Authenticate and manage session": "认证与管理登录会话", + "Authenticate and manage a session": "认证与管理登录会话", + "authenticate-and-manage-session": "认证与管理登录会话", + "Send first message": "发送第一条消息", + "Send your first message": "发送第一条消息", + "send-first-message": "发送第一条消息", "OpenIM SDK for React Native": "OpenIM React Native SDK 概览", "User": "用户", "User profile": "用户资料", @@ -359,36 +378,154 @@ "Retrieving messages": "查询消息", "Composing messages": "输入状态与语音转写", "Managing messages": "管理消息", - "Group message read status": "群聊消息已读" + "Group message read status": "群聊消息已读", + "Events": "事件", + "events": "事件", + "Events overview": "事件概览", + "overview-events": "事件概览", + "Logging": "日志", + "Logger": "日志", + "logger": "日志" }, "pages": { "/sdk/react-native/overview": { - "body": "## 概览\n\n当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。\n\n## 接入模型\n\n客户端应在拿到后端为当前 `userID` 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。\n\n## 移动端注意事项\n\n- 验证应用前后台切换后的登录、重连和消息接收。\n- 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。\n- 推送 token 注册应通过可信后端和对应平台通知服务完成。\n- 排查移动端问题时记录发生时间、用户 ID、操作名称、`errCode` 和 `errMsg`,但不要记录 Token 或消息正文。\n\n## 相关 SDK\n\n- [iOS SDK](/sdk/ios/overview)\n- [Android SDK](/sdk/android/overview)\n- [Flutter SDK](/sdk/flutter/overview)", + "body": "", "description": "OpenIM React Native SDK 入口,用于移动端应用。", + "headings": [], + "sourcePath": "/sdk/react-native/overview", + "title": "OpenIM React Native SDK 概览" + }, + "/sdk/react-native/getting-started/before-you-start": { + "body": "在 React Native 应用中接入 OpenIM SDK 前,需要准备可访问的 OpenIMServer、可信的用户认证流程,以及能够正常编译原生模块的 React Native 工程。\n\n## 准备 OpenIMServer\n\n如果还没有可用的 OpenIMServer,先按 [Docker 部署指南](/docs/guides/quick-deployment/docker)完成部署,并确认目标设备可以访问以下地址:\n\n| 字段 | 说明 |\n| --- | --- |\n| `apiAddr` | OpenIMServer HTTP API 地址,用于登录、同步和资源请求。 |\n| `wsAddr` | OpenIMServer WebSocket 地址,用于建立长连接和接收实时事件。 |\n\n不要只验证服务在开发电脑本机可以访问。Android 模拟器、iOS 模拟器和真机的网络环境可能不同;生产环境还应检查 DNS、TLS 证书、防火墙、反向代理和 WebSocket 升级是否正常。\n\n## 准备用户和 Token\n\n`userID` 标识 OpenIM 用户,Token 用于认证该用户。创建或绑定用户、签发 Token 和校验业务权限都应由可信后端完成。React Native 应用不能保存管理员 Token、secret 或其他服务端凭据。\n\n后端接入 OpenIMServer REST API 前,可阅读[准备使用 Platform API](/platform-api/prepare-to-use-api)和[签发会话 Token](/platform-api/user/managing-session-tokens/issue-a-session-token)。业务后端完成自身账号认证后,只向客户端返回 SDK 登录所需的以下数据:\n\n| 数据 | 说明 |\n| --- | --- |\n| `userID` | 当前登录用户的 OpenIM 用户 ID。 |\n| `token` | 与该用户对应的登录 Token。 |\n| `apiAddr` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | OpenIMServer WebSocket 地址。 |\n\n`userID` 必须与 Token 对应。\n\n## 准备 React Native 工程\n\n接入前确认:\n\n- 工程已经完成 React Native CLI 或 Expo 自定义开发客户端的原生配置。\n- Android 和 iOS 工程能够分别编译并运行。\n- 确认 Android 和 iOS 的网络配置可用,目标设备能够正常访问 `apiAddr` 和 `wsAddr`。\n\nReact Native SDK 通过原生模块运行,不适用 Expo Go。Expo 项目需要使用 `expo prebuild` 生成或更新包含 SDK 原生模块的 Android 和 iOS 工程,再构建自定义开发客户端。具体安装方式见[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)。\n\n## 继续接入\n\n准备完成后,先根据[**按 React Native 环境接入**](/sdk/react-native/getting-started/environment-specific-implementation)完成依赖和原生工程配置,再按[**认证与管理登录会话**](/sdk/react-native/getting-started/authenticate-and-manage-session)初始化 SDK 并登录,最后尝试[**发送第一条消息**](/sdk/react-native/getting-started/send-first-message)。", + "description": "准备 OpenIMServer、用户登录信息和 React Native 工程环境,再开始初始化和登录。", "headings": [ { "depth": 2, - "title": "概览", - "url": "#概览" + "title": "准备 OpenIMServer", + "url": "#准备-openimserver" }, { "depth": 2, - "title": "接入模型", - "url": "#接入模型" + "title": "准备用户和 Token", + "url": "#准备用户和-token" }, { "depth": 2, - "title": "移动端注意事项", - "url": "#移动端注意事项" + "title": "准备 React Native 工程", + "url": "#准备-react-native-工程" }, { "depth": 2, - "title": "相关 SDK", - "url": "#相关-sdk" + "title": "继续接入", + "url": "#继续接入" } ], - "sourcePath": "/sdk/react-native/overview", - "title": "OpenIM React Native SDK 概览" + "sourcePath": "/sdk/react-native/getting-started/before-you-start", + "title": "开始之前" + }, + "/sdk/react-native/getting-started/environment-specific-implementation": { + "body": "本页说明 React Native 工程的依赖和原生环境配置。\n\n## 添加依赖\n\n### 在 React Native CLI 项目中安装\n\n在项目根目录安装 OpenIM React Native SDK:\n\n```bash\nnpm install @openim/rn-client-sdk\ncd ios && pod install && cd ..\n```\n\n也可以使用项目现有的包管理器执行等价命令。安装后分别构建 Android 和 iOS 工程,确认原生模块已正确链接。\n\n### 在 Expo 项目中安装\n\nOpenIM React Native SDK 包含 Android 和 iOS 原生模块,Expo Go 未包含这些模块,因此不能直接在 Expo Go 中使用。Expo 项目应先安装 OpenIM React Native SDK,再使用 `expo prebuild --clean` 根据 Expo 配置生成或更新 `android` 和 `ios` 原生工程,最后在该原生工程中构建自定义开发客户端:\n\n```bash\nnpm install @openim/rn-client-sdk\nnpx expo prebuild --clean\nnpx expo run:android\nnpx expo run:ios\n```\n\n修改 Expo 配置或新增需要原生支持的依赖后,应重新执行 `expo prebuild --clean`,再重新构建开发客户端。可以安装 `expo-dev-client`,获得适合 Expo 项目的开发客户端体验,但运行时仍使用自定义开发客户端,不要使用 Expo Go。\n\n## 验证原生环境\n\n完成安装和原生工程配置后,在 Android 和 iOS 工程中构建应用,确认 SDK 原生模块可以完成编译和加载。\n\n## 下一步\n\n- [认证与管理登录会话](/sdk/react-native/getting-started/authenticate-and-manage-session)", + "description": "在 React Native CLI 或 Expo 自定义开发客户端中安装 OpenIM React Native SDK。", + "headings": [ + { + "depth": 2, + "title": "添加依赖", + "url": "#添加依赖" + }, + { + "depth": 3, + "title": "在 React Native CLI 项目中安装", + "url": "#在-react-native-cli-项目中安装" + }, + { + "depth": 3, + "title": "在 Expo 项目中安装", + "url": "#在-expo-项目中安装" + }, + { + "depth": 2, + "title": "验证原生环境", + "url": "#验证原生环境" + }, + { + "depth": 2, + "title": "下一步", + "url": "#下一步" + } + ], + "sourcePath": "/sdk/react-native/getting-started/environment-specific-implementation", + "title": "按 React Native 环境接入" + }, + "/sdk/react-native/getting-started/authenticate-and-manage-session": { + "body": "开始本页操作前,请先完成[开始之前](/sdk/react-native/getting-started/before-you-start)和[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)中的准备工作。OpenIM React Native SDK 使用 `initSDK()` 初始化 SDK,再使用 `login()` 登录当前用户并建立与服务器的连接。\n\n完整流程如下:\n\n1. 调用 `initSDK()` 初始化 SDK。\n2. 设置 `onConnecting`、`onConnectSuccess` 和 `onConnectFailed` 事件监听。\n3. 调用 `login()` 登录当前用户。\n4. 等待 `onConnectSuccess` 触发,表示登录成功并已连接服务器。\n5. 主动退出或切换账号时调用 `logout()`。\n\n## 初始化 SDK\n\n调用 `initSDK()` 传入服务地址、本地数据目录和日志配置。`dataDir` 和 `logFilePath` 应使用应用可写的持久化目录。\n\n### React Native CLI\n\n```ts\nimport RNFS from 'react-native-fs';\n\nconst dataDir = RNFS.DocumentDirectoryPath;\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: 5,\n isLogStandardOutput: true,\n});\n```\n\n### Expo\n\nExpo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀:\n\n```ts\nimport * as FileSystem from \"expo-file-system/legacy\";\n\nconst dataDir = FileSystem.documentDirectory.replace(/^file:\\/\\//, '').replace(/\\/$/, '');\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: 5,\n isLogStandardOutput: true,\n});\n```\n\n`initSDK()` 的参数如下:\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 |\n| `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 |\n| `logLevel` | `LogLevel` | 日志级别,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 |\n\n## 注册连接事件\n\n调用 `login()` 前设置连接事件监听。可以使用 `OpenIMEvent` 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程:\n\n```ts\nconst handleConnecting = () => {\n console.log(\"onConnecting\")\n};\n\nconst handleConnectSuccess = () => {\n console.log(\"onConnectSuccess\")\n};\n\nconst handleConnectFailed = (error: OpenIMEventBaseErrorType) => {\n console.log(\"onConnectFailed\", error.errCode, error.errMsg)\n};\n\n// 设置监听\nOpenIMSDK.on('onConnecting', handleConnecting);\nOpenIMSDK.on('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.on('onConnectFailed', handleConnectFailed);\n```\n\n## 登录当前用户\n\n调用 `login()` 传入可信后端返回的 `userID` 和 Token:\n\n```ts\nawait OpenIMSDK.login({\n userID,\n token,\n});\n```\n\n调用 `login()` 后等待 `onConnectSuccess` 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。\n\n## 查询登录状态\n\n`getLoginStatus()` 查询当前登录状态:\n\n```ts\nconst loginStatus = await OpenIMSDK.getLoginStatus();\n```\n\n`LoginStatus` 包含以下状态:\n\n| 状态 | 说明 |\n| --- | --- |\n| `LoginStatus.Logout` | 当前 SDK 实例未登录。 |\n| `LoginStatus.Logging` | 登录流程正在进行。 |\n| `LoginStatus.Logged` | 当前 SDK 实例已登录。 |\n\n## 退出登录和切换账号\n\n主动退出或切换账号时调用 `logout()`,并清理应用中保存的当前账号数据:\n\n```ts\nawait OpenIMSDK.logout();\n```\n\n切换账号时先完成旧账号退出,再使用新账号的参数调用 `login()`,无需重复 `initSDK`。不应在旧账号仍处于登录状态时登录新账号。\n\n## 取消事件监听\n\n退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()`:\n\n```ts\n// 取消监听\nOpenIMSDK.off('onConnecting', handleConnecting);\nOpenIMSDK.off('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.off('onConnectFailed', handleConnectFailed);\n```\n\n## 下一步\n\n- [发送第一条消息](/sdk/react-native/getting-started/send-first-message)", + "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", + "headings": [ + { + "depth": 2, + "title": "初始化 SDK", + "url": "#初始化-sdk" + }, + { + "depth": 3, + "title": "React Native CLI", + "url": "#react-native-cli" + }, + { + "depth": 3, + "title": "Expo", + "url": "#expo" + }, + { + "depth": 2, + "title": "注册连接事件", + "url": "#注册连接事件" + }, + { + "depth": 2, + "title": "登录当前用户", + "url": "#登录当前用户" + }, + { + "depth": 2, + "title": "查询登录状态", + "url": "#查询登录状态" + }, + { + "depth": 2, + "title": "退出登录和切换账号", + "url": "#退出登录和切换账号" + }, + { + "depth": 2, + "title": "取消事件监听", + "url": "#取消事件监听" + }, + { + "depth": 2, + "title": "下一步", + "url": "#下一步" + } + ], + "sourcePath": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "title": "认证与管理登录会话" + }, + "/sdk/react-native/getting-started/send-first-message": { + "body": "本页用一条单聊文本消息验证 OpenIM React Native SDK 已完成接入。开始前,先按[认证与管理登录会话](/sdk/react-native/getting-started/authenticate-and-manage-session)完成 SDK 初始化和登录,并准备两个用户账号:一个作为发送方,一个作为接收方。两个账号都需要完成登录。\n\n## 创建文本消息并发送\n\n发送方调用 `createTextMessage()` 创建待发送的 `MessageItem`,再调用 `sendMessage()` 将消息发送给接收方。将示例中的 `user_b` 替换为接收方的真实用户 ID;单聊填写 `recvID`,`groupID` 传空字符串。\n\n```ts\nconst message = await OpenIMSDK.createTextMessage('你好,OpenIMSDK');\n\nawait OpenIMSDK.sendMessage({\n recvID: 'user_b',\n groupID: '',\n message,\n});\n```\n\n## 接收消息\n\n接收方应在发送方发送消息前设置 `onRecvNewMessage` 监听;发送方发送消息后,该监听函数会收到对应的 `MessageItem`:\n\n```ts\nfunction handleNewMessage(message: MessageItem) {\n console.log(\"onRecvNewMessage\", message)\n}\n\n// 设置监听\nOpenIMSDK.on('onRecvNewMessage', handleNewMessage);\n```\n\n完整的消息事件和消息状态处理方式见[接收消息](/sdk/react-native/message/receiving-messages/receive-messages)。", + "description": "在 React Native 应用中发送并验证第一条单聊文本消息。", + "headings": [ + { + "depth": 2, + "title": "创建文本消息并发送", + "url": "#创建文本消息并发送" + }, + { + "depth": 2, + "title": "接收消息", + "url": "#接收消息" + } + ], + "sourcePath": "/sdk/react-native/getting-started/send-first-message", + "title": "发送第一条消息" }, "/sdk/react-native/user/overview-user": { "body": "OpenIM React Native SDK 使用 `userID` 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。\n\n好友、好友申请和黑名单属于用户之间的关系链能力,见[关系链概览](/sdk/react-native/user/overview-relationships)。\n\n## 用户相关类型\n\nReact Native SDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要 API |\n| --- | --- | --- |\n| `SelfUserInfo` | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `PublicUserItem` | 查询应用用户和展示公开资料卡 | `getUsersInfo()` |\n| `UserOnlineState` | 用户在线状态和在线平台列表 | `subscribeUsersStatus()`、`getSubscribeUsersStatus()`、`unsubscribeUsersStatus()` |\n\n`SelfUserInfo` 表示当前登录用户,`PublicUserItem` 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于展示资料卡 | [获取用户资料](/sdk/react-native/user/profile/get-users-info) |\n| 读取或更新当前用户的昵称、头像和扩展信息 | [获取当前用户资料](/sdk/react-native/user/profile/get-self-user-info)、[更新当前用户资料](/sdk/react-native/user/profile/set-self-info) |\n| 设置账号级消息接收方式 | [设置全局消息接收方式](/sdk/react-native/user/profile/set-global-message-reception) |\n| 设置其他用户添加当前账号时的处理策略 | [设置好友添加权限](/sdk/react-native/user/profile/set-friend-add-permission) |\n| 订阅、读取和取消订阅在线状态 | [订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)、[获取已订阅用户状态](/sdk/react-native/user/online-status/get-subscribe-users-status)、[取消订阅用户状态](/sdk/react-native/user/online-status/unsubscribe-users-status) |\n| 管理好友、好友申请或黑名单 | [关系链概览](/sdk/react-native/user/overview-relationships) |\n\n## 事件监听\n\n用户状态变化会触发事件,具体的事件监听详见:\n\n- 当前用户资料变化见[更新当前用户资料](/sdk/react-native/user/profile/set-self-info)。\n- 用户在线状态变化见[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status)。\n- 好友、好友申请和黑名单变化见[关系链概览](/sdk/react-native/user/overview-relationships)。", @@ -2721,6 +2858,62 @@ ], "sourcePath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", "title": "发送自定义信令" + }, + "/sdk/react-native/events/overview-events": { + "body": "## 事件机制概览\n\nOpenIM React Native SDK 通过 `OpenIMEvent` 定义事件名称,并使用统一的事件监听接口通知连接状态、数据变化和业务信令。\n\n调用 `OpenIMSDK.on()` 设置监听,调用 `OpenIMSDK.off()` 取消监听。事件名称既可以使用 `OpenIMEvent` 中的枚举值,也可以直接传入对应的事件字符串,直接使用字符串时,必须与 SDK 定义的事件名完全一致。\n\n```ts\nfunction handleEvent(payload: unknown) {\n // 根据事件参数更新应用状态\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.OnConversationChanged, handleEvent);\n// 或者\nOpenIMSDK.on(\"onConversationChanged\", handleEvent);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.OnConversationChanged, handleEvent);\n// 或者\nOpenIMSDK.off(\"onConversationChanged\", handleEvent);\n```\n\n每个事件的回调参数由 SDK 的事件声明决定,可能是实体对象、数组、进度值或错误信息。具体事件的参数格式和处理示例见对应功能页面。\n\n## 事件分类\n\nReact Native SDK 的事件按业务领域分为以下类别:\n\n| 事件类别 | 典型事件 | 说明 |\n| --- | --- | --- |\n| 连接与登录状态 | `OnConnecting`、`OnConnectSuccess`、`OnConnectFailed`、`OnKickedOffline`、`OnUserTokenExpired`、`OnUserTokenInvalid` | 连接建立、连接失败、强制下线和 Token 状态变化。 |\n| 初始化同步 | `OnSyncServerStart`、`OnSyncServerProgress`、`OnSyncServerFinish`、`OnSyncServerFailed` | 登录后 SDK 同步服务端数据的生命周期。 |\n| 用户与在线状态 | `OnSelfInfoUpdated`、`OnUserStatusChanged` | 当前用户资料和用户在线状态变化。 |\n| 好友与黑名单 | `OnFriendAdded`、`OnFriendDeleted`、`OnFriendInfoChanged`、`OnFriendApplicationAdded`、`OnBlackAdded` | 好友关系、好友申请和黑名单变化。 |\n| 会话与未读状态 | `OnNewConversation`、`OnConversationChanged`、`OnTotalUnreadMessageCountChanged`、`OnInputStatusChanged` | 会话列表、未读数和输入状态变化。 |\n| 会话分组 | `OnConversationGroupAdded`、`OnConversationGroupChanged`、`OnConversationGroupDeleted` | 会话分组及分组成员变化。 |\n| 群组与群成员 | `OnGroupInfoChanged`、`OnGroupMemberAdded`、`OnGroupMemberDeleted`、`OnGroupApplicationAdded`、`OnJoinedGroupAdded` | 群资料、群成员、入群申请和已加入群组变化。 |\n| 消息 | `OnRecvNewMessage`、`OnMsgDeleted`、`OnNewRecvMessageRevoked`、`OnMessageModified`、`OnRecvC2CReadReceipt` | 新消息、消息删除、撤回、修改和单聊已读回执。 |\n| 文件上传 | `UploadOnProgress`、`UploadComplete` | 文件上传进度和上传完成。 |\n| 音视频通话 | `OnReceiveNewInvitation`、`OnInviteeAccepted`、`OnInvitationCancelled`、`OnHangUp`、`OnReceiveCustomSignal` | 通话邀请、参与者状态和通话信令变化。 |\n| 自定义业务消息 | `OnRecvCustomBusinessMessage` | 自定义业务消息。 |\n\n## 注册时机与生命周期\n\nReact Native SDK 可以在任意时机注册全局事件监听。完成 `initSDK()` 并登录后,SDK 才会触发连接、同步及业务数据等事件回调;如果需要接收这些事件,应在对应操作前完成监听注册。\n\nReact Native SDK 支持对同一事件同时注册多个监听函数,事件触发时,所有监听函数都会收到回调,这与 Flutter 和 Android SDK 的单一 listener 机制不同。虽然 React Native SDK 允许同一事件注册多个监听,但仍建议在应用中集中注册和管理回调,避免页面渲染或组件重复进入时注册相同的业务处理逻辑。\n\n监听函数应保持稳定引用。退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()` 取消监听。\n\n## 连接与初始化同步事件\n\n连接事件用于反映 SDK 与服务端的连接状态:\n\n| 事件 | 说明 |\n| --- | --- |\n| `OnConnecting` | SDK 开始连接服务端。 |\n| `OnConnectSuccess` | SDK 连接成功。 |\n| `OnConnectFailed` | 连接失败及错误信息。 |\n| `OnKickedOffline` | 当前账号在其他端登录或被服务端强制下线。 |\n| `OnUserTokenExpired` | 当前登录 Token 已过期。 |\n| `OnUserTokenInvalid` | 当前登录 Token 无效。 |\n\n登录后,SDK 通过以下事件通知初始化同步状态:\n\n| 事件 | 说明 |\n| --- | --- |\n| `OnSyncServerStart` | 开始同步。 |\n| `OnSyncServerProgress` | 当前同步进度。 |\n| `OnSyncServerFinish` | 本轮同步完成。 |\n| `OnSyncServerFailed` | 本轮同步失败。 |\n\n同步完成后,应用可重新查询当前界面需要的数据;后续用户、好友、会话、群组、消息和通话变化由对应业务事件通知。\n\n## 按业务领域处理事件\n\n各业务页面提供对应事件的完整参数说明和监听示例:\n\n| 事件范围 | 参考页面 |\n| --- | --- |\n| 用户资料和在线状态 | [更新当前用户资料](/sdk/react-native/user/profile/set-self-info)、[订阅用户在线状态](/sdk/react-native/user/online-status/subscribe-users-status) |\n| 好友关系、好友申请和黑名单 | [分页获取好友列表](/sdk/react-native/user/friends/get-friend-list-page)、[获取收到的好友申请](/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient)、[获取黑名单](/sdk/react-native/user/blacklist/get-black-list) |\n| 会话、未读数和会话分组 | [获取会话列表](/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list)、[获取消息总未读数](/sdk/react-native/conversation/managing-conversations/get-total-unread-count)、[会话分组概览](/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups) |\n| 群组、群成员和入群申请 | [群组概览](/sdk/react-native/group/overview-group)、[获取收到的入群申请](/sdk/react-native/group/group-applications/get-group-application-list-as-recipient)、[分页查询群成员](/sdk/react-native/group/retrieving-group-members/get-group-member-list) |\n| 消息和消息状态 | [接收消息](/sdk/react-native/message/receiving-messages/receive-messages)、[接收自定义业务消息](/sdk/react-native/message/receiving-messages/receive-custom-business-messages)、[批量删除消息](/sdk/react-native/message/managing-messages/delete-saved-messages)、[撤回消息](/sdk/react-native/message/managing-messages/revoke-a-message)、[修改消息](/sdk/react-native/message/managing-messages/modify-a-message)、[上报群消息已读](/sdk/react-native/message/managing-read-status/send-group-read-receipts) |\n| 文件上传 | [上传文件](/sdk/react-native/file-uploads/upload-file) |\n| 音视频通话和自定义信令 | [处理通话事件](/sdk/react-native/calling/managing-calls/handle-call-events)、[发送自定义信令](/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal) |", + "description": "了解 OpenIM React Native SDK 的事件模型、事件分类和监听生命周期。", + "headings": [ + { + "depth": 2, + "title": "事件机制概览", + "url": "#事件机制概览" + }, + { + "depth": 2, + "title": "事件分类", + "url": "#事件分类" + }, + { + "depth": 2, + "title": "注册时机与生命周期", + "url": "#注册时机与生命周期" + }, + { + "depth": 2, + "title": "连接与初始化同步事件", + "url": "#连接与初始化同步事件" + }, + { + "depth": 2, + "title": "按业务领域处理事件", + "url": "#按业务领域处理事件" + } + ], + "sourcePath": "/sdk/react-native/events/overview-events", + "title": "事件概览" + }, + "/sdk/react-native/logger": { + "body": "OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。\n\n## 初始化日志配置\n\n调用 `initSDK()` 时配置日志目录和日志级别:\n\n```ts\nawait OpenIMSDK.initSDK({\n apiAddr,\n wsAddr,\n dataDir,\n logFilePath,\n logLevel: LogLevel.Debug,\n isLogStandardOutput: true,\n});\n```\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIM 服务端 API 地址。 |\n| `wsAddr` | `string` | OpenIM WebSocket 长连接地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,应位于应用可写目录。 |\n| `logFilePath` | `string` | SDK 日志目录,应位于应用可写目录。 |\n| `logLevel` | `LogLevel` | 日志详细程度,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 |\n\n开发诊断可使用 `LogLevel.Debug`。生产环境通常使用 `LogLevel.Warn` 或 `LogLevel.Error`,并关闭不必要的标准输出。\n\n## 写入应用日志\n\n调用 `logs()` 将业务诊断信息写入 SDK 日志:\n\n```ts\nawait OpenIMSDK.logs({\n logLevel: LogLevel.Error,\n file: 'chatRepository.ts',\n line: 184,\n msgs: 'send_message_failed',\n err: error.message,\n keyAndValue: [\n 'conversationID',\n conversationID,\n 'clientMsgID',\n clientMsgID,\n ],\n});\n```\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `logLevel` | `number` | 本条日志的级别。 |\n| `file` | `string` | 调用位置所在的文件名或模块名。 |\n| `line` | `number` | 调用位置的行号。 |\n| `msgs` | `string` | 简短的业务动作或诊断描述。 |\n| `err` | `string` | 错误信息;没有错误信息时传空字符串。 |\n| `keyAndValue` | `string[]` | 附加诊断字段,按“键、值”成对传入。 |\n\n`keyAndValue` 只记录排查所需的非敏感标识,例如 `conversationID`、`clientMsgID`、`groupID` 或 `roomID`。\n\n## 上传日志\n\n用户主动提交诊断日志时,调用 `uploadLogs()` 上传客户端日志:\n\n```ts\nawait OpenIMSDK.uploadLogs({\n line: 2000,\n cancelID: 'support-ticket-42',\n ex: 'user-initiated-diagnostics',\n});\n```\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `line` | `number` | 是 | 本次上传读取的日志行数配置。 |\n| `cancelID` | `string` | 否 | 本次上传的标识。 |\n| `ex` | `string` | 否 | 附加诊断说明,不能包含凭据或隐私数据。 |\n\n调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。", + "description": "配置 OpenIM React Native SDK 日志,写入应用诊断信息并上传日志。", + "headings": [ + { + "depth": 2, + "title": "初始化日志配置", + "url": "#初始化日志配置" + }, + { + "depth": 2, + "title": "写入应用日志", + "url": "#写入应用日志" + }, + { + "depth": 2, + "title": "上传日志", + "url": "#上传日志" + } + ], + "sourcePath": "/sdk/react-native/logger", + "title": "日志" } } } diff --git a/src/generated/routes.json b/src/generated/routes.json index a9ae8ea497..e021814d01 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -12708,7 +12708,7 @@ "navOrder": 518 }, { - "id": 385, + "id": 2433, "path": "/sdk/react-native/overview", "relativePath": "sdk/react-native/overview", "sourcePath": "/sdk/react-native/overview", @@ -12721,5157 +12721,5265 @@ "contextTitle": "SDKs · React Native · v4", "template": "overview", "status": "draft", - "sourceIndex": 519, + "sourceIndex": 3803, "contentFile": "content/docs/chat/sdk/react-native/overview.mdx", "navOrder": 519 }, { - "id": 387, - "path": "/sdk/electron/getting-started/authenticate-and-init", - "relativePath": "sdk/electron/getting-started/authenticate-and-init", - "sourcePath": "/sdk/electron/getting-started/authenticate-and-init", - "title": "Authenticate and initialize", - "description": "Use the Electron FFI initSDK, login, and unInitSDK methods to establish a session, and understand how their parameters differ from WASM login.", + "id": 2434, + "path": "/sdk/react-native/getting-started/before-you-start", + "relativePath": "sdk/react-native/getting-started/before-you-start", + "sourcePath": "/sdk/react-native/getting-started/before-you-start", + "title": "Before you start", + "description": "OpenIM React Native SDK guide for Before you start.", "product": "sdk", "version": "v4", - "platform": "electron", - "contextKey": "chat/sdk/electron", - "contextTitle": "SDKs · Electron · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 1702, - "contentFile": "content/docs/chat/sdk/electron/getting-started/authenticate-and-init.mdx", - "navOrder": 1702 + "status": "draft", + "sourceIndex": 3804, + "contentFile": "content/docs/chat/sdk/react-native/getting-started/before-you-start.mdx", + "navOrder": 520 }, { - "id": 388, - "path": "/sdk/electron/message/create-media-from-full-path", - "relativePath": "sdk/electron/message/create-media-from-full-path", - "sourcePath": "/sdk/electron/message/create-media-from-full-path", - "title": "Create media messages from full paths", - "description": "Use the Electron FFI *FromFullPath APIs to create image, video, audio, and file messages from absolute local paths.", + "id": 2435, + "path": "/sdk/react-native/getting-started/environment-specific-implementation", + "relativePath": "sdk/react-native/getting-started/environment-specific-implementation", + "sourcePath": "/sdk/react-native/getting-started/environment-specific-implementation", + "title": "Environment-specific implementation", + "description": "OpenIM React Native SDK guide for Environment-specific implementation.", "product": "sdk", "version": "v4", - "platform": "electron", - "contextKey": "chat/sdk/electron", - "contextTitle": "SDKs · Electron · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 1703, - "contentFile": "content/docs/chat/sdk/electron/message/create-media-from-full-path.mdx", - "navOrder": 1703 + "status": "draft", + "sourceIndex": 3805, + "contentFile": "content/docs/chat/sdk/react-native/getting-started/environment-specific-implementation.mdx", + "navOrder": 521 }, { - "id": 386, - "path": "/sdk/electron/logger/upload-logs", - "relativePath": "sdk/electron/logger/upload-logs", - "sourcePath": "/sdk/electron/logger/upload-logs", - "title": "Upload logs", - "description": "Use the Electron FFI uploadLogs method to upload client diagnostic logs.", + "id": 2436, + "path": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "relativePath": "sdk/react-native/getting-started/authenticate-and-manage-session", + "sourcePath": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "description": "OpenIM React Native SDK guide for Authenticate and manage a session.", "product": "sdk", "version": "v4", - "platform": "electron", - "contextKey": "chat/sdk/electron", - "contextTitle": "SDKs · Electron · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 1704, - "contentFile": "content/docs/chat/sdk/electron/logger/upload-logs.mdx", - "navOrder": 1704 + "status": "draft", + "sourceIndex": 3806, + "contentFile": "content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx", + "navOrder": 522 }, { - "id": 389, - "path": "/platform-api/webhooks/overview", - "relativePath": "platform-api/webhooks/overview", - "sourcePath": "/platform-api/webhooks/overview", - "title": "Overview", - "description": "OpenIM Webhooks overview, including delivery behavior, configuration, protocol, and callback coverage.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "overview", - "status": "published", - "sourceIndex": 780, - "contentFile": "content/docs/chat/platform-api/webhooks/overview.mdx", - "navOrder": 780 + "id": 2437, + "path": "/sdk/react-native/getting-started/send-first-message", + "relativePath": "sdk/react-native/getting-started/send-first-message", + "sourcePath": "/sdk/react-native/getting-started/send-first-message", + "title": "Send your first message", + "description": "OpenIM React Native SDK guide for Send your first message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3807, + "contentFile": "content/docs/chat/sdk/react-native/getting-started/send-first-message.mdx", + "navOrder": 523 }, { - "id": 390, - "path": "/platform-api/webhooks/user/before-user-register", - "relativePath": "platform-api/webhooks/user/before-user-register", - "sourcePath": "/platform-api/webhooks/user/before-user-register", - "title": "Before user registration", - "description": "Validate or adjust user profiles before registration.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2438, + "path": "/sdk/react-native/user/overview-user", + "relativePath": "sdk/react-native/user/overview-user", + "sourcePath": "/sdk/react-native/user/overview-user", + "title": "User overview", + "description": "Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.01, - "contentFile": "content/docs/chat/platform-api/webhooks/user/before-user-register.mdx", - "navOrder": 780.01 + "sourceIndex": 3808, + "contentFile": "content/docs/chat/sdk/react-native/user/overview-user.mdx", + "navOrder": 524 }, { - "id": 391, - "path": "/platform-api/webhooks/user/after-user-register", - "relativePath": "platform-api/webhooks/user/after-user-register", - "sourcePath": "/platform-api/webhooks/user/after-user-register", - "title": "After user registration", - "description": "Synchronize user profiles after registration completes.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2439, + "path": "/sdk/react-native/user/profile/get-users-info", + "relativePath": "sdk/react-native/user/profile/get-users-info", + "sourcePath": "/sdk/react-native/user/profile/get-users-info", + "title": "Get user profiles", + "description": "Get public user profiles with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0101, - "contentFile": "content/docs/chat/platform-api/webhooks/user/after-user-register.mdx", - "navOrder": 780.0101 + "sourceIndex": 3809, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx", + "navOrder": 525 }, { - "id": 392, - "path": "/platform-api/webhooks/user/before-update-user-info", - "relativePath": "platform-api/webhooks/user/before-update-user-info", - "sourcePath": "/platform-api/webhooks/user/before-update-user-info", - "title": "Before updating user information", - "description": "Validate or adjust nickname, avatar, and extension data before a user profile update.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2440, + "path": "/sdk/react-native/user/profile/get-self-user-info", + "relativePath": "sdk/react-native/user/profile/get-self-user-info", + "sourcePath": "/sdk/react-native/user/profile/get-self-user-info", + "title": "Get your profile", + "description": "Get the current user profile with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0102, - "contentFile": "content/docs/chat/platform-api/webhooks/user/before-update-user-info.mdx", - "navOrder": 780.0102 + "sourceIndex": 3810, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx", + "navOrder": 526 }, { - "id": 393, - "path": "/platform-api/webhooks/user/after-update-user-info", - "relativePath": "platform-api/webhooks/user/after-update-user-info", - "sourcePath": "/platform-api/webhooks/user/after-update-user-info", - "title": "After updating user information", - "description": "Synchronize nickname, avatar, and extension changes after a profile update.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2441, + "path": "/sdk/react-native/user/profile/set-self-info", + "relativePath": "sdk/react-native/user/profile/set-self-info", + "sourcePath": "/sdk/react-native/user/profile/set-self-info", + "title": "Update your profile", + "description": "Update the current user profile with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0103, - "contentFile": "content/docs/chat/platform-api/webhooks/user/after-update-user-info.mdx", - "navOrder": 780.0103 + "sourceIndex": 3811, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx", + "navOrder": 527 }, { - "id": 394, - "path": "/platform-api/webhooks/user/before-update-user-info-ex", - "relativePath": "platform-api/webhooks/user/before-update-user-info-ex", - "sourcePath": "/platform-api/webhooks/user/before-update-user-info-ex", - "title": "Before updating selected user fields", - "description": "Validate or adjust optional user profile fields before an update.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2442, + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "relativePath": "sdk/react-native/user/profile/set-global-message-reception", + "sourcePath": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "Set global message reception", + "description": "Set the global message reception option with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0104, - "contentFile": "content/docs/chat/platform-api/webhooks/user/before-update-user-info-ex.mdx", - "navOrder": 780.0104 + "sourceIndex": 3812, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx", + "navOrder": 528 }, { - "id": 395, - "path": "/platform-api/webhooks/user/after-update-user-info-ex", - "relativePath": "platform-api/webhooks/user/after-update-user-info-ex", - "sourcePath": "/platform-api/webhooks/user/after-update-user-info-ex", - "title": "After updating selected user fields", - "description": "Synchronize optional user profile fields after an update completes.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 780.0105, - "contentFile": "content/docs/chat/platform-api/webhooks/user/after-update-user-info-ex.mdx", - "navOrder": 780.0105 - }, - { - "id": 396, - "path": "/platform-api/webhooks/relation/before-add-friend", - "relativePath": "platform-api/webhooks/relation/before-add-friend", - "sourcePath": "/platform-api/webhooks/relation/before-add-friend", - "title": "Before adding a friend", - "description": "Validate a friend request before it is created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2443, + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "relativePath": "sdk/react-native/user/profile/set-friend-add-permission", + "sourcePath": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "description": "Set friend request permissions with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.02, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-add-friend.mdx", - "navOrder": 780.02 + "sourceIndex": 3813, + "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx", + "navOrder": 529 }, { - "id": 397, - "path": "/platform-api/webhooks/relation/after-add-friend", - "relativePath": "platform-api/webhooks/relation/after-add-friend", - "sourcePath": "/platform-api/webhooks/relation/after-add-friend", - "title": "After adding a friend", - "description": "Synchronize a newly created friend request.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2444, + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "relativePath": "sdk/react-native/user/online-status/subscribe-users-status", + "sourcePath": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "description": "Subscribe to user online status with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0201, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-add-friend.mdx", - "navOrder": 780.0201 + "sourceIndex": 3814, + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx", + "navOrder": 530 }, { - "id": 398, - "path": "/platform-api/webhooks/relation/before-add-friend-agree", - "relativePath": "platform-api/webhooks/relation/before-add-friend-agree", - "sourcePath": "/platform-api/webhooks/relation/before-add-friend-agree", - "title": "Before accepting a friend request", - "description": "Validate a friend-request acceptance.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2445, + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "relativePath": "sdk/react-native/user/online-status/get-subscribe-users-status", + "sourcePath": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "description": "Get the status of subscribed users with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0202, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-add-friend-agree.mdx", - "navOrder": 780.0202 + "sourceIndex": 3815, + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx", + "navOrder": 531 }, { - "id": 399, - "path": "/platform-api/webhooks/relation/after-add-friend-agree", - "relativePath": "platform-api/webhooks/relation/after-add-friend-agree", - "sourcePath": "/platform-api/webhooks/relation/after-add-friend-agree", - "title": "After accepting a friend request", - "description": "Synchronize a newly established friendship.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2446, + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "relativePath": "sdk/react-native/user/online-status/unsubscribe-users-status", + "sourcePath": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "description": "Cancel user online-status subscriptions with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0203, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-add-friend-agree.mdx", - "navOrder": 780.0203 + "sourceIndex": 3816, + "contentFile": "content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx", + "navOrder": 532 }, { - "id": 400, - "path": "/platform-api/webhooks/relation/after-delete-friend", - "relativePath": "platform-api/webhooks/relation/after-delete-friend", - "sourcePath": "/platform-api/webhooks/relation/after-delete-friend", - "title": "After deleting a friend", - "description": "Synchronize a deleted friendship.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2447, + "path": "/sdk/react-native/user/overview-relationships", + "relativePath": "sdk/react-native/user/overview-relationships", + "sourcePath": "/sdk/react-native/user/overview-relationships", + "title": "Relationships overview", + "description": "Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0204, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-delete-friend.mdx", - "navOrder": 780.0204 + "sourceIndex": 3817, + "contentFile": "content/docs/chat/sdk/react-native/user/overview-relationships.mdx", + "navOrder": 533 }, { - "id": 401, - "path": "/platform-api/webhooks/relation/before-set-friend-remark", - "relativePath": "platform-api/webhooks/relation/before-set-friend-remark", - "sourcePath": "/platform-api/webhooks/relation/before-set-friend-remark", - "title": "Before setting a friend remark", - "description": "Validate or replace a friend remark.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2448, + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "relativePath": "sdk/react-native/user/friends/get-friend-list-page", + "sourcePath": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "Get the friend list", + "description": "Get the friend list with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0205, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-set-friend-remark.mdx", - "navOrder": 780.0205 + "sourceIndex": 3818, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx", + "navOrder": 534 }, { - "id": 402, - "path": "/platform-api/webhooks/relation/after-set-friend-remark", - "relativePath": "platform-api/webhooks/relation/after-set-friend-remark", - "sourcePath": "/platform-api/webhooks/relation/after-set-friend-remark", - "title": "After setting a friend remark", - "description": "Synchronize an updated friend remark.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2449, + "path": "/sdk/react-native/user/friends/search-friends", + "relativePath": "sdk/react-native/user/friends/search-friends", + "sourcePath": "/sdk/react-native/user/friends/search-friends", + "title": "Search friends", + "description": "Search the current user's friends with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0206, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-set-friend-remark.mdx", - "navOrder": 780.0206 + "sourceIndex": 3819, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/search-friends.mdx", + "navOrder": 535 }, { - "id": 403, - "path": "/platform-api/webhooks/relation/before-add-black", - "relativePath": "platform-api/webhooks/relation/before-add-black", - "sourcePath": "/platform-api/webhooks/relation/before-add-black", - "title": "Before adding to the blacklist", - "description": "Validate a blacklist addition.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2450, + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "relativePath": "sdk/react-native/user/friends/get-specified-friends-info", + "sourcePath": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "description": "Get specified friend profiles with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0207, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-add-black.mdx", - "navOrder": 780.0207 + "sourceIndex": 3820, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx", + "navOrder": 536 }, { - "id": 404, - "path": "/platform-api/webhooks/relation/after-remove-black", - "relativePath": "platform-api/webhooks/relation/after-remove-black", - "sourcePath": "/platform-api/webhooks/relation/after-remove-black", - "title": "After removing from the blacklist", - "description": "Synchronize a blacklist removal.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2451, + "path": "/sdk/react-native/user/friends/check-friend", + "relativePath": "sdk/react-native/user/friends/check-friend", + "sourcePath": "/sdk/react-native/user/friends/check-friend", + "title": "Check friendship status", + "description": "Check friendships with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0208, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-remove-black.mdx", - "navOrder": 780.0208 + "sourceIndex": 3821, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/check-friend.mdx", + "navOrder": 537 }, { - "id": 405, - "path": "/platform-api/webhooks/relation/before-import-friends", - "relativePath": "platform-api/webhooks/relation/before-import-friends", - "sourcePath": "/platform-api/webhooks/relation/before-import-friends", - "title": "Before importing friends", - "description": "Validate or filter a batch of friend IDs before import.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2452, + "path": "/sdk/react-native/user/friends/update-friends", + "relativePath": "sdk/react-native/user/friends/update-friends", + "sourcePath": "/sdk/react-native/user/friends/update-friends", + "title": "Update friend information", + "description": "Update friend information with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0209, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-import-friends.mdx", - "navOrder": 780.0209 + "sourceIndex": 3822, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/update-friends.mdx", + "navOrder": 538 }, { - "id": 406, - "path": "/platform-api/webhooks/relation/after-import-friends", - "relativePath": "platform-api/webhooks/relation/after-import-friends", - "sourcePath": "/platform-api/webhooks/relation/after-import-friends", - "title": "After importing friends", - "description": "Synchronize the result of a friend import.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2453, + "path": "/sdk/react-native/user/friends/delete-friend", + "relativePath": "sdk/react-native/user/friends/delete-friend", + "sourcePath": "/sdk/react-native/user/friends/delete-friend", + "title": "Delete a friend", + "description": "Delete a friend with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.021, - "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-import-friends.mdx", - "navOrder": 780.021 + "sourceIndex": 3823, + "contentFile": "content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx", + "navOrder": 539 }, { - "id": 407, - "path": "/platform-api/webhooks/group/before-create-group", - "relativePath": "platform-api/webhooks/group/before-create-group", - "sourcePath": "/platform-api/webhooks/group/before-create-group", - "title": "Before creating a group", - "description": "Validate or adjust group information and initial members before a group is created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2454, + "path": "/sdk/react-native/user/friend-applications/add-friend", + "relativePath": "sdk/react-native/user/friend-applications/add-friend", + "sourcePath": "/sdk/react-native/user/friend-applications/add-friend", + "title": "Send a friend application", + "description": "Send a friend request with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.03, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-create-group.mdx", - "navOrder": 780.03 + "sourceIndex": 3824, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx", + "navOrder": 540 }, { - "id": 408, - "path": "/platform-api/webhooks/group/after-create-group", - "relativePath": "platform-api/webhooks/group/after-create-group", - "sourcePath": "/platform-api/webhooks/group/after-create-group", - "title": "After creating a group", - "description": "Synchronize group information and initial members after a group is created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2455, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "description": "Get received friend requests with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0301, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-create-group.mdx", - "navOrder": 780.0301 + "sourceIndex": 3825, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx", + "navOrder": 541 }, { - "id": 409, - "path": "/platform-api/webhooks/group/before-member-join-group", - "relativePath": "platform-api/webhooks/group/before-member-join-group", - "sourcePath": "/platform-api/webhooks/group/before-member-join-group", - "title": "Before members join a group", - "description": "Validate or adjust member profiles before users become group members.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2456, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "description": "Get sent friend requests with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0302, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-member-join-group.mdx", - "navOrder": 780.0302 + "sourceIndex": 3826, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx", + "navOrder": 542 }, { - "id": 410, - "path": "/platform-api/webhooks/group/before-invite-user-to-group", - "relativePath": "platform-api/webhooks/group/before-invite-user-to-group", - "sourcePath": "/platform-api/webhooks/group/before-invite-user-to-group", - "title": "Before inviting users to a group", - "description": "Validate a group invitation and optionally refuse individual invitees.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2457, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get pending application count", + "description": "Get the unhandled friend-request count with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0303, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-invite-user-to-group.mdx", - "navOrder": 780.0303 + "sourceIndex": 3827, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx", + "navOrder": 543 }, { - "id": 411, - "path": "/platform-api/webhooks/group/before-apply-join-group", - "relativePath": "platform-api/webhooks/group/before-apply-join-group", - "sourcePath": "/platform-api/webhooks/group/before-apply-join-group", - "title": "Before applying to join a group", - "description": "Run authorization or risk checks before a group join application is created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2458, + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "relativePath": "sdk/react-native/user/friend-applications/accept-friend-application", + "sourcePath": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "Accept a friend application", + "description": "Accept a friend request with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0304, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-apply-join-group.mdx", - "navOrder": 780.0304 + "sourceIndex": 3828, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx", + "navOrder": 544 }, { - "id": 412, - "path": "/platform-api/webhooks/group/after-join-group", - "relativePath": "platform-api/webhooks/group/after-join-group", - "sourcePath": "/platform-api/webhooks/group/after-join-group", - "title": "After joining a group", - "description": "Synchronize membership changes after a user joins a group.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2459, + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "relativePath": "sdk/react-native/user/friend-applications/refuse-friend-application", + "sourcePath": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "Reject a friend application", + "description": "Reject a friend request with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0305, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-join-group.mdx", - "navOrder": 780.0305 - }, + "sourceIndex": 3829, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx", + "navOrder": 545 + }, { - "id": 413, - "path": "/platform-api/webhooks/group/after-quit-group", - "relativePath": "platform-api/webhooks/group/after-quit-group", - "sourcePath": "/platform-api/webhooks/group/after-quit-group", - "title": "After leaving a group", - "description": "Synchronize membership changes after a user leaves a group.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2460, + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "relativePath": "sdk/react-native/user/friend-applications/delete-friend-requests", + "sourcePath": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "Delete friend applications", + "description": "Delete friend-request records with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0306, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-quit-group.mdx", - "navOrder": 780.0306 + "sourceIndex": 3830, + "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx", + "navOrder": 546 }, { - "id": 414, - "path": "/platform-api/webhooks/group/after-kick-group-member", - "relativePath": "platform-api/webhooks/group/after-kick-group-member", - "sourcePath": "/platform-api/webhooks/group/after-kick-group-member", - "title": "After removing group members", - "description": "Synchronize membership changes after members are removed from a group.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2461, + "path": "/sdk/react-native/user/blacklist/get-black-list", + "relativePath": "sdk/react-native/user/blacklist/get-black-list", + "sourcePath": "/sdk/react-native/user/blacklist/get-black-list", + "title": "Get the blacklist", + "description": "Get the blocklist with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0307, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-kick-group-member.mdx", - "navOrder": 780.0307 + "sourceIndex": 3831, + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx", + "navOrder": 547 }, { - "id": 415, - "path": "/platform-api/webhooks/group/after-dismiss-group", - "relativePath": "platform-api/webhooks/group/after-dismiss-group", - "sourcePath": "/platform-api/webhooks/group/after-dismiss-group", - "title": "After dismissing a group", - "description": "Synchronize group state after a group is dismissed.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2462, + "path": "/sdk/react-native/user/blacklist/add-black", + "relativePath": "sdk/react-native/user/blacklist/add-black", + "sourcePath": "/sdk/react-native/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "description": "Block a user with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0308, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-dismiss-group.mdx", - "navOrder": 780.0308 + "sourceIndex": 3832, + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx", + "navOrder": 548 }, { - "id": 416, - "path": "/platform-api/webhooks/group/after-transfer-group-owner", - "relativePath": "platform-api/webhooks/group/after-transfer-group-owner", - "sourcePath": "/platform-api/webhooks/group/after-transfer-group-owner", - "title": "After transferring group ownership", - "description": "Synchronize the owner change after group ownership is transferred.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2463, + "path": "/sdk/react-native/user/blacklist/remove-black", + "relativePath": "sdk/react-native/user/blacklist/remove-black", + "sourcePath": "/sdk/react-native/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "description": "Unblock a user with the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0309, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-transfer-group-owner.mdx", - "navOrder": 780.0309 + "sourceIndex": 3833, + "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx", + "navOrder": 549 }, { - "id": 417, - "path": "/platform-api/webhooks/group/before-set-group-member-info", - "relativePath": "platform-api/webhooks/group/before-set-group-member-info", - "sourcePath": "/platform-api/webhooks/group/before-set-group-member-info", - "title": "Before updating group member information", - "description": "Validate or adjust fields before a group member profile is updated.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2464, + "path": "/sdk/react-native/conversation/overview-conversation", + "relativePath": "sdk/react-native/conversation/overview-conversation", + "sourcePath": "/sdk/react-native/conversation/overview-conversation", + "title": "Conversation overview", + "description": "Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.031, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-set-group-member-info.mdx", - "navOrder": 780.031 + "sourceIndex": 3834, + "contentFile": "content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx", + "navOrder": 550 }, { - "id": 418, - "path": "/platform-api/webhooks/group/after-set-group-member-info", - "relativePath": "platform-api/webhooks/group/after-set-group-member-info", - "sourcePath": "/platform-api/webhooks/group/after-set-group-member-info", - "title": "After updating group member information", - "description": "Synchronize changes after a group member profile is updated.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2465, + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "description": "Query a conversation by its chat target and session type.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0311, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-set-group-member-info.mdx", - "navOrder": 780.0311 + "sourceIndex": 3835, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx", + "navOrder": 551 }, { - "id": 419, - "path": "/platform-api/webhooks/group/before-set-group-info", - "relativePath": "platform-api/webhooks/group/before-set-group-info", - "sourcePath": "/platform-api/webhooks/group/before-set-group-info", - "title": "Before updating group information", - "description": "Validate or adjust group fields before group information is updated.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2466, + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "description": "Generate a conversation ID from a chat target and session type.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0312, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-set-group-info.mdx", - "navOrder": 780.0312 + "sourceIndex": 3836, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx", + "navOrder": 552 }, { - "id": 420, - "path": "/platform-api/webhooks/group/after-set-group-info", - "relativePath": "platform-api/webhooks/group/after-set-group-info", - "sourcePath": "/platform-api/webhooks/group/after-set-group-info", - "title": "After updating group information", - "description": "Synchronize changes after group information is updated.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2467, + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "description": "Retrieve multiple conversations by their conversation IDs.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0313, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-set-group-info.mdx", - "navOrder": 780.0313 + "sourceIndex": 3837, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx", + "navOrder": 553 }, { - "id": 421, - "path": "/platform-api/webhooks/group/before-set-group-info-ex", - "relativePath": "platform-api/webhooks/group/before-set-group-info-ex", - "sourcePath": "/platform-api/webhooks/group/before-set-group-info-ex", - "title": "Before updating selected group fields", - "description": "Validate or adjust the selected fields before a partial group update.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2468, + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "relativePath": "sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Retrieve the conversation list", + "description": "Retrieve the current user's conversation list with pagination.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0314, - "contentFile": "content/docs/chat/platform-api/webhooks/group/before-set-group-info-ex.mdx", - "navOrder": 780.0314 + "sourceIndex": 3838, + "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx", + "navOrder": 554 }, { - "id": 422, - "path": "/platform-api/webhooks/group/after-set-group-info-ex", - "relativePath": "platform-api/webhooks/group/after-set-group-info-ex", - "sourcePath": "/platform-api/webhooks/group/after-set-group-info-ex", - "title": "After updating selected group fields", - "description": "Synchronize changes after a partial group information update.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2469, + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "relativePath": "sdk/react-native/conversation/managing-conversations/pin-conversation", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "description": "Pin or unpin a conversation for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0315, - "contentFile": "content/docs/chat/platform-api/webhooks/group/after-set-group-info-ex.mdx", - "navOrder": 780.0315 + "sourceIndex": 3839, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx", + "navOrder": 555 }, { - "id": 423, - "path": "/platform-api/webhooks/message/before-send-single-message", - "relativePath": "platform-api/webhooks/message/before-send-single-message", - "sourcePath": "/platform-api/webhooks/message/before-send-single-message", - "title": "Before sending a one-to-one message", - "description": "Review, reject, or inspect fields before a one-to-one message is sent.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2470, + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "relativePath": "sdk/react-native/conversation/managing-conversations/mark-conversation", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "description": "Mark or unmark a conversation for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.04, - "contentFile": "content/docs/chat/platform-api/webhooks/message/before-send-single-message.mdx", - "navOrder": 780.04 + "sourceIndex": 3840, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx", + "navOrder": 556 }, { - "id": 424, - "path": "/platform-api/webhooks/message/after-send-single-message", - "relativePath": "platform-api/webhooks/message/after-send-single-message", - "sourcePath": "/platform-api/webhooks/message/after-send-single-message", - "title": "After sending a one-to-one message", - "description": "Synchronize a message event after a one-to-one message is sent.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2471, + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "description": "Set a remark for a conversation for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0401, - "contentFile": "content/docs/chat/platform-api/webhooks/message/after-send-single-message.mdx", - "navOrder": 780.0401 + "sourceIndex": 3841, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx", + "navOrder": 557 }, { - "id": 425, - "path": "/platform-api/webhooks/message/before-send-group-message", - "relativePath": "platform-api/webhooks/message/before-send-group-message", - "sourcePath": "/platform-api/webhooks/message/before-send-group-message", - "title": "Before sending a group message", - "description": "Review, reject, or inspect fields before a group message is sent.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2472, + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "description": "Set the conversation extension string.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0402, - "contentFile": "content/docs/chat/platform-api/webhooks/message/before-send-group-message.mdx", - "navOrder": 780.0402 + "sourceIndex": 3842, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx", + "navOrder": 558 }, { - "id": 426, - "path": "/platform-api/webhooks/message/after-send-group-message", - "relativePath": "platform-api/webhooks/message/after-send-group-message", - "sourcePath": "/platform-api/webhooks/message/after-send-group-message", - "title": "After sending a group message", - "description": "Synchronize a message event after a group message is sent.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2473, + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "description": "Save a draft for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0403, - "contentFile": "content/docs/chat/platform-api/webhooks/message/after-send-group-message.mdx", - "navOrder": 780.0403 + "sourceIndex": 3843, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx", + "navOrder": 559 }, { - "id": 427, - "path": "/platform-api/webhooks/message/before-message-modify", - "relativePath": "platform-api/webhooks/message/before-message-modify", - "sourcePath": "/platform-api/webhooks/message/before-message-modify", - "title": "Before writing a message", - "description": "Adjust permitted message fields before the message is written.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2474, + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "description": "Set the message reception option for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0404, - "contentFile": "content/docs/chat/platform-api/webhooks/message/before-message-modify.mdx", - "navOrder": 780.0404 + "sourceIndex": 3844, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx", + "navOrder": 560 }, { - "id": 428, - "path": "/platform-api/webhooks/message/after-single-message-read", - "relativePath": "platform-api/webhooks/message/after-single-message-read", - "sourcePath": "/platform-api/webhooks/message/after-single-message-read", - "title": "After one-to-one messages are read", - "description": "Synchronize read-state changes for one-to-one messages.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2475, + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "relativePath": "sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "description": "Reset the mention status of a group conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0405, - "contentFile": "content/docs/chat/platform-api/webhooks/message/after-single-message-read.mdx", - "navOrder": 780.0405 + "sourceIndex": 3845, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx", + "navOrder": 561 }, { - "id": 429, - "path": "/platform-api/webhooks/message/after-group-message-read", - "relativePath": "platform-api/webhooks/message/after-group-message-read", - "sourcePath": "/platform-api/webhooks/message/after-group-message-read", - "title": "After group messages are read", - "description": "Synchronize read-state changes for group messages.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2476, + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "relativePath": "sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "description": "Mark a conversation as read for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0406, - "contentFile": "content/docs/chat/platform-api/webhooks/message/after-group-message-read.mdx", - "navOrder": 780.0406 - }, + "sourceIndex": 3846, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx", + "navOrder": 562 + }, { - "id": 430, - "path": "/platform-api/webhooks/message/after-revoke-message", - "relativePath": "platform-api/webhooks/message/after-revoke-message", - "sourcePath": "/platform-api/webhooks/message/after-revoke-message", - "title": "After revoking a message", - "description": "Synchronize a revoke event after a message is revoked.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2477, + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "relativePath": "sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "description": "Get the total unread message count across the current account's conversations.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0407, - "contentFile": "content/docs/chat/platform-api/webhooks/message/after-revoke-message.mdx", - "navOrder": 780.0407 + "sourceIndex": 3847, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx", + "navOrder": 563 }, { - "id": 431, - "path": "/platform-api/webhooks/push/before-online-push", - "relativePath": "platform-api/webhooks/push/before-online-push", - "sourcePath": "/platform-api/webhooks/push/before-online-push", - "title": "Before one-to-one online push", - "description": "Adjust target users or push policy before an online one-to-one push.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2478, + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-private-chat", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "description": "Enable or disable burn after reading for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.05, - "contentFile": "content/docs/chat/platform-api/webhooks/push/before-online-push.mdx", - "navOrder": 780.05 + "sourceIndex": 3848, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx", + "navOrder": 564 }, { - "id": 432, - "path": "/platform-api/webhooks/push/before-group-online-push", - "relativePath": "platform-api/webhooks/push/before-group-online-push", - "sourcePath": "/platform-api/webhooks/push/before-group-online-push", - "title": "Before group online push", - "description": "Adjust target users or push policy before an online group push.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2479, + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-burn-duration", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "description": "Set the burn-after-reading duration for a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0501, - "contentFile": "content/docs/chat/platform-api/webhooks/push/before-group-online-push.mdx", - "navOrder": 780.0501 + "sourceIndex": 3849, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx", + "navOrder": 565 }, { - "id": 433, - "path": "/platform-api/webhooks/push/before-offline-push", - "relativePath": "platform-api/webhooks/push/before-offline-push", - "sourcePath": "/platform-api/webhooks/push/before-offline-push", - "title": "Before offline push", - "description": "Adjust recipients and notification metadata before an offline push.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2480, + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "relativePath": "sdk/react-native/conversation/managing-conversations/set-message-destruct", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "description": "Configure scheduled deletion of messages stored on the server.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0502, - "contentFile": "content/docs/chat/platform-api/webhooks/push/before-offline-push.mdx", - "navOrder": 780.0502 + "sourceIndex": 3850, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx", + "navOrder": 566 }, { - "id": 434, - "path": "/platform-api/webhooks/push/after-user-online", - "relativePath": "platform-api/webhooks/push/after-user-online", - "sourcePath": "/platform-api/webhooks/push/after-user-online", - "title": "After a user comes online", - "description": "Synchronize presence after a user establishes an online connection.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2481, + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "relativePath": "sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "description": "Hide a conversation from the current account's conversation list.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0503, - "contentFile": "content/docs/chat/platform-api/webhooks/push/after-user-online.mdx", - "navOrder": 780.0503 + "sourceIndex": 3851, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx", + "navOrder": 567 }, { - "id": 435, - "path": "/platform-api/webhooks/push/after-user-offline", - "relativePath": "platform-api/webhooks/push/after-user-offline", - "sourcePath": "/platform-api/webhooks/push/after-user-offline", - "title": "After a user goes offline", - "description": "Synchronize presence after a user connection closes.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2482, + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "relativePath": "sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "Hide all conversations for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0504, - "contentFile": "content/docs/chat/platform-api/webhooks/push/after-user-offline.mdx", - "navOrder": 780.0504 + "sourceIndex": 3852, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx", + "navOrder": 568 }, { - "id": 436, - "path": "/platform-api/webhooks/push/after-user-kick-off", - "relativePath": "platform-api/webhooks/push/after-user-kick-off", - "sourcePath": "/platform-api/webhooks/push/after-user-kick-off", - "title": "After a user is forced offline", - "description": "Synchronize connection state after a user is forced offline.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2483, + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "relativePath": "sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "description": "Delete a conversation and the current account's messages in it.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0505, - "contentFile": "content/docs/chat/platform-api/webhooks/push/after-user-kick-off.mdx", - "navOrder": 780.0505 + "sourceIndex": 3853, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx", + "navOrder": 569 }, { - "id": 437, - "path": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", - "relativePath": "platform-api/webhooks/conversation/before-create-single-chat-conversations", - "sourcePath": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", - "title": "Before creating one-to-one conversations", - "description": "Adjust default conversation properties before one-to-one conversations are first created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2484, + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "relativePath": "sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "description": "Clear the current account's messages in a conversation without deleting the conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.06, - "contentFile": "content/docs/chat/platform-api/webhooks/conversation/before-create-single-chat-conversations.mdx", - "navOrder": 780.06, - "edition": "enterprise" + "sourceIndex": 3854, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx", + "navOrder": 570 }, { - "id": 438, - "path": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", - "relativePath": "platform-api/webhooks/conversation/after-create-single-chat-conversations", - "sourcePath": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", - "title": "After creating one-to-one conversations", - "description": "Synchronize complete conversation properties after one-to-one conversations are created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 780.0601, - "contentFile": "content/docs/chat/platform-api/webhooks/conversation/after-create-single-chat-conversations.mdx", - "navOrder": 780.0601, - "edition": "enterprise" - }, - { - "id": 439, - "path": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", - "relativePath": "platform-api/webhooks/conversation/before-create-group-chat-conversations", - "sourcePath": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", - "title": "Before creating group conversations", - "description": "Adjust default conversation properties before group conversations are first created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2485, + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "description": "Learn about conversation groups in the OpenIM React Native SDK.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0602, - "contentFile": "content/docs/chat/platform-api/webhooks/conversation/before-create-group-chat-conversations.mdx", - "navOrder": 780.0602, - "edition": "enterprise" + "sourceIndex": 3855, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx", + "navOrder": 571 }, { - "id": 440, - "path": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", - "relativePath": "platform-api/webhooks/conversation/after-create-group-chat-conversations", - "sourcePath": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", - "title": "After creating group conversations", - "description": "Synchronize complete conversation properties after group conversations are created.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2486, + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "Create a conversation group for the current account.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 780.0603, - "contentFile": "content/docs/chat/platform-api/webhooks/conversation/after-create-group-chat-conversations.mdx", - "navOrder": 780.0603, - "edition": "enterprise" + "sourceIndex": 3856, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx", + "navOrder": 572 }, { - "id": 441, - "path": "/platform-api/timer/overview", - "relativePath": "platform-api/timer/overview", - "sourcePath": "/platform-api/timer/overview", - "title": "Overview", - "description": "Overview of the OpenIM Enterprise timer-task service.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "overview", + "id": 2487, + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "description": "Query the current account's conversation groups by type.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 750, - "contentFile": "content/docs/chat/platform-api/timer/overview.mdx", - "navOrder": 750, - "edition": "enterprise" + "sourceIndex": 3857, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx", + "navOrder": 573 }, { - "id": 442, - "path": "/platform-api/meeting/overview", - "relativePath": "platform-api/meeting/overview", - "sourcePath": "/platform-api/meeting/overview", - "title": "Overview", - "description": "Overview of OpenIM Enterprise meetings, real-time calls, meeting chat, and recordings.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "overview", + "id": 2488, + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "description": "Query a conversation group and its paginated conversations.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 770, - "contentFile": "content/docs/chat/platform-api/meeting/overview.mdx", - "navOrder": 770, - "edition": "enterprise" + "sourceIndex": 3858, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx", + "navOrder": 574 }, { - "id": 443, - "path": "/platform-api/user/account-governance/ban-user", - "relativePath": "platform-api/user/account-governance/ban-user", - "sourcePath": "/platform-api/user/account-governance/ban-user", - "title": "Ban users", - "description": "OpenIM Enterprise Platform API: ban specified users from continuing to use the service.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2489, + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "Get groups for a conversation", + "description": "Query the conversation groups that contain a conversation.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 624.101, - "contentFile": "content/docs/chat/platform-api/user/account-governance/ban-user.mdx", - "navOrder": 624.101, - "edition": "enterprise" + "sourceIndex": 3859, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx", + "navOrder": 575 }, { - "id": 444, - "path": "/platform-api/user/account-governance/unban-user", - "relativePath": "platform-api/user/account-governance/unban-user", - "sourcePath": "/platform-api/user/account-governance/unban-user", - "title": "Unban users", - "description": "OpenIM Enterprise Platform API: remove the ban from specified users.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2490, + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "Update an existing conversation group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 624.102, - "contentFile": "content/docs/chat/platform-api/user/account-governance/unban-user.mdx", - "navOrder": 624.102, - "edition": "enterprise" + "sourceIndex": 3860, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx", + "navOrder": 576 }, { - "id": 445, - "path": "/platform-api/user/account-governance/unregister-user", - "relativePath": "platform-api/user/account-governance/unregister-user", - "sourcePath": "/platform-api/user/account-governance/unregister-user", - "title": "Unregister users", - "description": "OpenIM Enterprise Platform API: unregister user accounts that no longer use the service.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2491, + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "description": "Batch-update the sort values of conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 624.1030000000001, - "contentFile": "content/docs/chat/platform-api/user/account-governance/unregister-user.mdx", - "navOrder": 624.1030000000001, - "edition": "enterprise" + "sourceIndex": 3861, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx", + "navOrder": 577 }, { - "id": 446, - "path": "/platform-api/user/account-governance/list-disabled-users", - "relativePath": "platform-api/user/account-governance/list-disabled-users", - "sourcePath": "/platform-api/user/account-governance/list-disabled-users", - "title": "List disabled users", - "description": "OpenIM Enterprise Platform API: list disabled accounts by user, status, and pagination criteria.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2492, + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "Add one or more conversations to conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 624.104, - "contentFile": "content/docs/chat/platform-api/user/account-governance/list-disabled-users.mdx", - "navOrder": 624.104, - "edition": "enterprise" + "sourceIndex": 3862, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx", + "navOrder": 578 }, { - "id": 447, - "path": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", - "relativePath": "platform-api/relation/managing-friend-requests/delete-sent-friend-requests", - "sourcePath": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", - "title": "Delete sent friend requests", - "description": "OpenIM Enterprise Platform API: delete friend requests sent by a specified user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2493, + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "Remove one or more conversations from conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 639.105, - "contentFile": "content/docs/chat/platform-api/relation/managing-friend-requests/delete-sent-friend-requests.mdx", - "navOrder": 639.105, - "edition": "enterprise" + "sourceIndex": 3863, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx", + "navOrder": 579 }, { - "id": 448, - "path": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", - "relativePath": "platform-api/relation/managing-friend-requests/delete-received-friend-requests", - "sourcePath": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", - "title": "Delete received friend requests", - "description": "OpenIM Enterprise Platform API: delete friend requests received by a specified user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", + "id": 2494, + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "relativePath": "sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "Delete a conversation group and its conversation membership.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", "status": "published", - "sourceIndex": 639.106, - "contentFile": "content/docs/chat/platform-api/relation/managing-friend-requests/delete-received-friend-requests.mdx", - "navOrder": 639.106, - "edition": "enterprise" + "sourceIndex": 3864, + "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx", + "navOrder": 580 }, { - "id": 449, - "path": "/platform-api/group/group-applications/get-group-application-badge-count", - "relativePath": "platform-api/group/group-applications/get-group-application-badge-count", - "sourcePath": "/platform-api/group/group-applications/get-group-application-badge-count", - "title": "Get the group application badge count", - "description": "OpenIM Enterprise Platform API: get the pending group-application badge count for a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 694.107, - "contentFile": "content/docs/chat/platform-api/group/group-applications/get-group-application-badge-count.mdx", - "navOrder": 694.107, - "edition": "enterprise" + "id": 2495, + "path": "/sdk/react-native/group/overview-group", + "relativePath": "sdk/react-native/group/overview-group", + "sourcePath": "/sdk/react-native/group/overview-group", + "title": "Group overview", + "description": "OpenIM React Native SDK guide for group overview.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3865, + "contentFile": "content/docs/chat/sdk/react-native/group/overview-group.mdx", + "navOrder": 581 }, { - "id": 450, - "path": "/platform-api/group/group-applications/clear-group-application-badge-count", - "relativePath": "platform-api/group/group-applications/clear-group-application-badge-count", - "sourcePath": "/platform-api/group/group-applications/clear-group-application-badge-count", - "title": "Clear the group application badge count", - "description": "OpenIM Enterprise Platform API: clear the current group-application badge count for a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 694.1080000000001, - "contentFile": "content/docs/chat/platform-api/group/group-applications/clear-group-application-badge-count.mdx", - "navOrder": 694.1080000000001, - "edition": "enterprise" + "id": 2496, + "path": "/sdk/react-native/group/create-group", + "relativePath": "sdk/react-native/group/create-group", + "sourcePath": "/sdk/react-native/group/create-group", + "title": "Create a group", + "description": "OpenIM React Native SDK guide for create a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3866, + "contentFile": "content/docs/chat/sdk/react-native/group/create-group.mdx", + "navOrder": 582 }, { - "id": 451, - "path": "/platform-api/group/group-applications/delete-user-group-requests", - "relativePath": "platform-api/group/group-applications/delete-user-group-requests", - "sourcePath": "/platform-api/group/group-applications/delete-user-group-requests", - "title": "Delete applications sent by a user", - "description": "OpenIM Enterprise Platform API: delete a user's applications to selected groups.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 694.109, - "contentFile": "content/docs/chat/platform-api/group/group-applications/delete-user-group-requests.mdx", - "navOrder": 694.109, - "edition": "enterprise" + "id": 2497, + "path": "/sdk/react-native/group/update-group-profile", + "relativePath": "sdk/react-native/group/update-group-profile", + "sourcePath": "/sdk/react-native/group/update-group-profile", + "title": "Update group profile", + "description": "OpenIM React Native SDK guide for update group profile.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3867, + "contentFile": "content/docs/chat/sdk/react-native/group/update-group-profile.mdx", + "navOrder": 583 }, { - "id": 452, - "path": "/platform-api/group/group-applications/delete-group-received-requests", - "relativePath": "platform-api/group/group-applications/delete-group-received-requests", - "sourcePath": "/platform-api/group/group-applications/delete-group-received-requests", - "title": "Delete applications received by a group", - "description": "OpenIM Enterprise Platform API: delete selected applications received by a group.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 694.11, - "contentFile": "content/docs/chat/platform-api/group/group-applications/delete-group-received-requests.mdx", - "navOrder": 694.11, - "edition": "enterprise" + "id": 2498, + "path": "/sdk/react-native/group/set-group-announcement", + "relativePath": "sdk/react-native/group/set-group-announcement", + "sourcePath": "/sdk/react-native/group/set-group-announcement", + "title": "Publish a group announcement", + "description": "OpenIM React Native SDK guide for publish a group announcement.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3868, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-announcement.mdx", + "navOrder": 584 }, { - "id": 453, - "path": "/platform-api/message/content-processing/translate-text", - "relativePath": "platform-api/message/content-processing/translate-text", - "sourcePath": "/platform-api/message/content-processing/translate-text", - "title": "Translate text", - "description": "OpenIM Enterprise Platform API: translate text and return the detected source language.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.111, - "contentFile": "content/docs/chat/platform-api/message/content-processing/translate-text.mdx", - "navOrder": 725.111, - "edition": "enterprise" + "id": 2499, + "path": "/sdk/react-native/group/set-group-extension", + "relativePath": "sdk/react-native/group/set-group-extension", + "sourcePath": "/sdk/react-native/group/set-group-extension", + "title": "Set group extra data", + "description": "OpenIM React Native SDK guide for set group extra data.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3869, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-extension.mdx", + "navOrder": 585 }, { - "id": 454, - "path": "/platform-api/message/streaming-messages/append-stream-message", - "relativePath": "platform-api/message/streaming-messages/append-stream-message", - "sourcePath": "/platform-api/message/streaming-messages/append-stream-message", - "title": "Append stream-message packets", - "description": "OpenIM Enterprise Platform API: append indexed text packets to a stream message.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.112, - "contentFile": "content/docs/chat/platform-api/message/streaming-messages/append-stream-message.mdx", - "navOrder": 725.112, - "edition": "enterprise" + "id": 2500, + "path": "/sdk/react-native/group/set-group-join-verification", + "relativePath": "sdk/react-native/group/set-group-join-verification", + "sourcePath": "/sdk/react-native/group/set-group-join-verification", + "title": "Set group join verification", + "description": "OpenIM React Native SDK guide for set group join verification.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3870, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx", + "navOrder": 586 }, { - "id": 455, - "path": "/platform-api/message/streaming-messages/put-stream-message", - "relativePath": "platform-api/message/streaming-messages/put-stream-message", - "sourcePath": "/platform-api/message/streaming-messages/put-stream-message", - "title": "Upload stream-message content", - "description": "OpenIM Enterprise Platform API: continuously upload UTF-8 content to a stream message over HTTP PUT.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.113, - "contentFile": "content/docs/chat/platform-api/message/streaming-messages/put-stream-message.mdx", - "navOrder": 725.113, - "edition": "enterprise" + "id": 2501, + "path": "/sdk/react-native/group/set-group-member-profile-access", + "relativePath": "sdk/react-native/group/set-group-member-profile-access", + "sourcePath": "/sdk/react-native/group/set-group-member-profile-access", + "title": "Set member profile access", + "description": "OpenIM React Native SDK guide for set member profile access.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3871, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx", + "navOrder": 587 }, { - "id": 456, - "path": "/platform-api/message/read-status/mark-conversation-read", - "relativePath": "platform-api/message/read-status/mark-conversation-read", - "sourcePath": "/platform-api/message/read-status/mark-conversation-read", - "title": "Mark a conversation read through a Seq", - "description": "OpenIM Enterprise Platform API: advance a user's read position in a conversation to a message Seq.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.114, - "contentFile": "content/docs/chat/platform-api/message/read-status/mark-conversation-read.mdx", - "navOrder": 725.114, - "edition": "enterprise" + "id": 2502, + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "relativePath": "sdk/react-native/group/set-group-member-friend-permission", + "sourcePath": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "description": "OpenIM React Native SDK guide for set member friend request permission.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3872, + "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx", + "navOrder": 588 }, { - "id": 457, - "path": "/platform-api/message/managing-messages/modify-message", - "relativePath": "platform-api/message/managing-messages/modify-message", - "sourcePath": "/platform-api/message/managing-messages/modify-message", - "title": "Modify a message", - "description": "Modify message content by conversation ID and Seq with the OpenIM Enterprise Platform API.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.115, - "contentFile": "content/docs/chat/platform-api/message/managing-messages/modify-message.mdx", - "navOrder": 725.115, - "edition": "enterprise" + "id": 2503, + "path": "/sdk/react-native/group/change-group-mute", + "relativePath": "sdk/react-native/group/change-group-mute", + "sourcePath": "/sdk/react-native/group/change-group-mute", + "title": "Change group mute status", + "description": "OpenIM React Native SDK guide for change group mute status.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3873, + "contentFile": "content/docs/chat/sdk/react-native/group/change-group-mute.mdx", + "navOrder": 589 }, { - "id": 458, - "path": "/platform-api/message/unread-count/get-conversations-unread-count", - "relativePath": "platform-api/message/unread-count/get-conversations-unread-count", - "sourcePath": "/platform-api/message/unread-count/get-conversations-unread-count", - "title": "Get conversation unread counts", - "description": "OpenIM Enterprise Platform API: get a user's unread counts for selected conversations.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.116, - "contentFile": "content/docs/chat/platform-api/message/unread-count/get-conversations-unread-count.mdx", - "navOrder": 725.116, - "edition": "enterprise" + "id": 2504, + "path": "/sdk/react-native/group/join-group", + "relativePath": "sdk/react-native/group/join-group", + "sourcePath": "/sdk/react-native/group/join-group", + "title": "Apply to join a group", + "description": "OpenIM React Native SDK guide for apply to join a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3874, + "contentFile": "content/docs/chat/sdk/react-native/group/join-group.mdx", + "navOrder": 590 }, { - "id": 459, - "path": "/platform-api/message/unread-count/clear-conversations-unread-count", - "relativePath": "platform-api/message/unread-count/clear-conversations-unread-count", - "sourcePath": "/platform-api/message/unread-count/clear-conversations-unread-count", - "title": "Clear conversation unread counts", - "description": "OpenIM Enterprise Platform API: clear a user's unread counts in selected conversations.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.1170000000001, - "contentFile": "content/docs/chat/platform-api/message/unread-count/clear-conversations-unread-count.mdx", - "navOrder": 725.1170000000001, - "edition": "enterprise" + "id": 2505, + "path": "/sdk/react-native/group/quit-group", + "relativePath": "sdk/react-native/group/quit-group", + "sourcePath": "/sdk/react-native/group/quit-group", + "title": "Leave a group", + "description": "OpenIM React Native SDK guide for leave a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3875, + "contentFile": "content/docs/chat/sdk/react-native/group/quit-group.mdx", + "navOrder": 591 }, { - "id": 460, - "path": "/platform-api/message/unread-count/reset-conversation-unread", - "relativePath": "platform-api/message/unread-count/reset-conversation-unread", - "sourcePath": "/platform-api/message/unread-count/reset-conversation-unread", - "title": "Set a conversation unread count", - "description": "OpenIM Enterprise Platform API: set a target unread count for migration or state correction.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 725.118, - "contentFile": "content/docs/chat/platform-api/message/unread-count/reset-conversation-unread.mdx", - "navOrder": 725.118, - "edition": "enterprise" + "id": 2506, + "path": "/sdk/react-native/group/dismiss-group", + "relativePath": "sdk/react-native/group/dismiss-group", + "sourcePath": "/sdk/react-native/group/dismiss-group", + "title": "Dismiss a group", + "description": "OpenIM React Native SDK guide for dismiss a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3876, + "contentFile": "content/docs/chat/sdk/react-native/group/dismiss-group.mdx", + "navOrder": 592 }, { - "id": 461, - "path": "/platform-api/conversation/conversation-groups/create-conversation-group", - "relativePath": "platform-api/conversation/conversation-groups/create-conversation-group", - "sourcePath": "/platform-api/conversation/conversation-groups/create-conversation-group", - "title": "Create a conversation group", - "description": "OpenIM Enterprise Platform API: create a conversation group for a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.119, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/create-conversation-group.mdx", - "navOrder": 745.119, - "edition": "enterprise" + "id": 2507, + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "relativePath": "sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "description": "OpenIM React Native SDK guide for get group information.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3877, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx", + "navOrder": 593 }, { - "id": 462, - "path": "/platform-api/conversation/conversation-groups/update-conversation-group", - "relativePath": "platform-api/conversation/conversation-groups/update-conversation-group", - "sourcePath": "/platform-api/conversation/conversation-groups/update-conversation-group", - "title": "Update a conversation group", - "description": "OpenIM Enterprise Platform API: update a conversation group's name, extension data, or hidden state.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.12, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/update-conversation-group.mdx", - "navOrder": 745.12, - "edition": "enterprise" + "id": 2508, + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "relativePath": "sdk/react-native/group/retrieving-groups/get-joined-group-list", + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "description": "OpenIM React Native SDK guide for get joined groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3878, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx", + "navOrder": 594 }, { - "id": 463, - "path": "/platform-api/conversation/conversation-groups/delete-conversation-group", - "relativePath": "platform-api/conversation/conversation-groups/delete-conversation-group", - "sourcePath": "/platform-api/conversation/conversation-groups/delete-conversation-group", - "title": "Delete a conversation group", - "description": "OpenIM Enterprise Platform API: delete a conversation group owned by a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.121, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/delete-conversation-group.mdx", - "navOrder": 745.121, - "edition": "enterprise" - }, - { - "id": 464, - "path": "/platform-api/conversation/conversation-groups/list-conversation-groups", - "relativePath": "platform-api/conversation/conversation-groups/list-conversation-groups", - "sourcePath": "/platform-api/conversation/conversation-groups/list-conversation-groups", - "title": "List conversation groups", - "description": "OpenIM Enterprise Platform API: get a user's conversation groups and synchronization version.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.1220000000001, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/list-conversation-groups.mdx", - "navOrder": 745.1220000000001, - "edition": "enterprise" + "id": 2509, + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "relativePath": "sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "description": "OpenIM React Native SDK guide for get joined groups by page.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3879, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx", + "navOrder": 595 }, { - "id": 465, - "path": "/platform-api/conversation/conversation-groups/set-conversation-group-order", - "relativePath": "platform-api/conversation/conversation-groups/set-conversation-group-order", - "sourcePath": "/platform-api/conversation/conversation-groups/set-conversation-group-order", - "title": "Set conversation group order", - "description": "OpenIM Enterprise Platform API: set the display order of a user's conversation groups.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.123, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/set-conversation-group-order.mdx", - "navOrder": 745.123, - "edition": "enterprise" + "id": 2510, + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "relativePath": "sdk/react-native/group/retrieving-groups/is-join-group", + "sourcePath": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "description": "OpenIM React Native SDK guide for check group membership.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3880, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx", + "navOrder": 596 }, { - "id": 466, - "path": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", - "relativePath": "platform-api/conversation/conversation-groups/add-conversations-to-groups", - "sourcePath": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", - "title": "Add conversations to groups", - "description": "OpenIM Enterprise Platform API: add conversations to one or more conversation groups.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.124, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/add-conversations-to-groups.mdx", - "navOrder": 745.124, - "edition": "enterprise" + "id": 2511, + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "relativePath": "sdk/react-native/group/retrieving-groups/search-groups", + "sourcePath": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "Search groups", + "description": "OpenIM React Native SDK guide for search groups.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3881, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx", + "navOrder": 597 }, { - "id": 467, - "path": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", - "relativePath": "platform-api/conversation/conversation-groups/remove-conversations-from-groups", - "sourcePath": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", - "title": "Remove conversations from groups", - "description": "OpenIM Enterprise Platform API: remove conversations from one or more conversation groups.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 745.125, - "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/remove-conversations-from-groups.mdx", - "navOrder": 745.125, - "edition": "enterprise" + "id": 2512, + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "relativePath": "sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "description": "OpenIM React Native SDK guide for get received group applications.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3882, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx", + "navOrder": 598 }, { - "id": 468, - "path": "/platform-api/timer/managing-tasks/create-timer-task", - "relativePath": "platform-api/timer/managing-tasks/create-timer-task", - "sourcePath": "/platform-api/timer/managing-tasks/create-timer-task", - "title": "Create a timer task", - "description": "OpenIM Enterprise Platform API: schedule a task that invokes a business callback.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 750.026, - "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/create-timer-task.mdx", - "navOrder": 750.026, - "edition": "enterprise" + "id": 2513, + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "relativePath": "sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "description": "OpenIM React Native SDK guide for get sent group applications.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3883, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx", + "navOrder": 599 }, { - "id": 469, - "path": "/platform-api/timer/managing-tasks/update-timer-task", - "relativePath": "platform-api/timer/managing-tasks/update-timer-task", - "sourcePath": "/platform-api/timer/managing-tasks/update-timer-task", - "title": "Update a timer task", - "description": "OpenIM Enterprise Platform API: update timer execution, retry, category, and callback settings.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 750.027, - "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/update-timer-task.mdx", - "navOrder": 750.027, - "edition": "enterprise" + "id": 2514, + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "relativePath": "sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "Get pending group application count", + "description": "OpenIM React Native SDK guide for get pending group application count.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3884, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx", + "navOrder": 600 }, { - "id": 470, - "path": "/platform-api/timer/managing-tasks/delete-timer-task", - "relativePath": "platform-api/timer/managing-tasks/delete-timer-task", - "sourcePath": "/platform-api/timer/managing-tasks/delete-timer-task", - "title": "Delete a timer task", - "description": "OpenIM Enterprise Platform API: delete a specified timer task owned by a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 750.028, - "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/delete-timer-task.mdx", - "navOrder": 750.028, - "edition": "enterprise" + "id": 2515, + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "relativePath": "sdk/react-native/group/group-applications/accept-group-application", + "sourcePath": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "Accept a group application", + "description": "OpenIM React Native SDK guide for accept a group application.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3885, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx", + "navOrder": 601 }, { - "id": 471, - "path": "/platform-api/timer/managing-tasks/get-timer-task", - "relativePath": "platform-api/timer/managing-tasks/get-timer-task", - "sourcePath": "/platform-api/timer/managing-tasks/get-timer-task", - "title": "Get a timer task", - "description": "OpenIM Enterprise Platform API: get a timer task by task and user ID.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 750.029, - "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/get-timer-task.mdx", - "navOrder": 750.029, - "edition": "enterprise" + "id": 2516, + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "relativePath": "sdk/react-native/group/group-applications/refuse-group-application", + "sourcePath": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "description": "OpenIM React Native SDK guide for reject a group application.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3886, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx", + "navOrder": 602 }, { - "id": 472, - "path": "/platform-api/timer/managing-tasks/list-timer-tasks", - "relativePath": "platform-api/timer/managing-tasks/list-timer-tasks", - "sourcePath": "/platform-api/timer/managing-tasks/list-timer-tasks", - "title": "List timer tasks", - "description": "OpenIM Enterprise Platform API: list a user's timer tasks by category with pagination.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 750.03, - "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/list-timer-tasks.mdx", - "navOrder": 750.03, - "edition": "enterprise" + "id": 2517, + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "relativePath": "sdk/react-native/group/group-applications/delete-group-requests", + "sourcePath": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "description": "OpenIM React Native SDK guide for delete group applications.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3887, + "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx", + "navOrder": 603 }, { - "id": 473, - "path": "/platform-api/meeting/meeting-management/book-meeting", - "relativePath": "platform-api/meeting/meeting-management/book-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/book-meeting", - "title": "Schedule a meeting", - "description": "OpenIM Enterprise Platform API: schedule a meeting for a future start time.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.031, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/book-meeting.mdx", - "navOrder": 770.031, - "edition": "enterprise" + "id": 2518, + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "relativePath": "sdk/react-native/group/retrieving-group-members/get-group-member-list", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "Get group members", + "description": "OpenIM React Native SDK guide for get group members.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3888, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx", + "navOrder": 604 }, { - "id": 474, - "path": "/platform-api/meeting/meeting-management/create-immediate-meeting", - "relativePath": "platform-api/meeting/meeting-management/create-immediate-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/create-immediate-meeting", - "title": "Create an immediate meeting", - "description": "OpenIM Enterprise Platform API: create a meeting immediately and return real-time connection details.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.032, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/create-immediate-meeting.mdx", - "navOrder": 770.032, - "edition": "enterprise" + "id": 2519, + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "relativePath": "sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get group member profiles", + "description": "OpenIM React Native SDK guide for get group member profiles.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3889, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx", + "navOrder": 605 }, { - "id": 475, - "path": "/platform-api/meeting/meeting-management/join-meeting", - "relativePath": "platform-api/meeting/meeting-management/join-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/join-meeting", - "title": "Join a meeting", - "description": "OpenIM Enterprise Platform API: validate a participant and meeting password, then issue connection details.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.033, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/join-meeting.mdx", - "navOrder": 770.033, - "edition": "enterprise" + "id": 2520, + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "relativePath": "sdk/react-native/group/retrieving-group-members/get-users-in-group", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "Check users in a group", + "description": "OpenIM React Native SDK guide for check users in a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3890, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx", + "navOrder": 606 }, { - "id": 476, - "path": "/platform-api/meeting/meeting-management/get-meeting-token", - "relativePath": "platform-api/meeting/meeting-management/get-meeting-token", - "sourcePath": "/platform-api/meeting/meeting-management/get-meeting-token", - "title": "Get a meeting token", - "description": "OpenIM Enterprise Platform API: issue real-time meeting connection details for a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.034, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/get-meeting-token.mdx", - "navOrder": 770.034, - "edition": "enterprise" + "id": 2521, + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "relativePath": "sdk/react-native/group/retrieving-group-members/search-group-members", + "sourcePath": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "description": "OpenIM React Native SDK guide for search group members.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3891, + "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx", + "navOrder": 607 }, { - "id": 477, - "path": "/platform-api/meeting/meeting-management/update-meeting", - "relativePath": "platform-api/meeting/meeting-management/update-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/update-meeting", - "title": "Update a meeting", - "description": "OpenIM Enterprise Platform API: update selected meeting information, settings, and invitees.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.035, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/update-meeting.mdx", - "navOrder": 770.035, - "edition": "enterprise" + "id": 2522, + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "relativePath": "sdk/react-native/group/managing-group-members/invite-user-to-group", + "sourcePath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "description": "OpenIM React Native SDK guide for invite users to a group.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3892, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx", + "navOrder": 608 }, { - "id": 478, - "path": "/platform-api/meeting/meeting-management/get-meeting", - "relativePath": "platform-api/meeting/meeting-management/get-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/get-meeting", - "title": "Get a meeting", - "description": "OpenIM Enterprise Platform API: get a meeting's details, settings, and recurrence information.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.036, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/get-meeting.mdx", - "navOrder": 770.036, - "edition": "enterprise" + "id": 2523, + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "relativePath": "sdk/react-native/group/managing-group-members/kick-group-member", + "sourcePath": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "description": "OpenIM React Native SDK guide for remove group members.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3893, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx", + "navOrder": 609 }, { - "id": 479, - "path": "/platform-api/meeting/meeting-management/list-meetings", - "relativePath": "platform-api/meeting/meeting-management/list-meetings", - "sourcePath": "/platform-api/meeting/meeting-management/list-meetings", - "title": "List a user's meetings", - "description": "OpenIM Enterprise Platform API: list meetings created or attended by a user, filtered by status.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.037, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/list-meetings.mdx", - "navOrder": 770.037, - "edition": "enterprise" + "id": 2524, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-nickname", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "Update a group nickname", + "description": "OpenIM React Native SDK guide for update a group nickname.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3894, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx", + "navOrder": 610 }, { - "id": 480, - "path": "/platform-api/meeting/meeting-management/invite-meeting-users", - "relativePath": "platform-api/meeting/meeting-management/invite-meeting-users", - "sourcePath": "/platform-api/meeting/meeting-management/invite-meeting-users", - "title": "Invite users to a meeting", - "description": "OpenIM Enterprise Platform API: invite users to an existing meeting and return per-user results.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.038, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/invite-meeting-users.mdx", - "navOrder": 770.038, - "edition": "enterprise" - }, - { - "id": 481, - "path": "/platform-api/meeting/meeting-management/leave-meeting", - "relativePath": "platform-api/meeting/meeting-management/leave-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/leave-meeting", - "title": "Leave a meeting", - "description": "OpenIM Enterprise Platform API: remove a specified user's active participation in a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.039, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/leave-meeting.mdx", - "navOrder": 770.039, - "edition": "enterprise" + "id": 2525, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-role-level", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "description": "OpenIM React Native SDK guide for manage group administrators.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3895, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx", + "navOrder": 611 }, { - "id": 482, - "path": "/platform-api/meeting/meeting-management/end-meeting", - "relativePath": "platform-api/meeting/meeting-management/end-meeting", - "sourcePath": "/platform-api/meeting/meeting-management/end-meeting", - "title": "End or cancel a meeting", - "description": "OpenIM Enterprise Platform API: cancel a scheduled meeting or end an active meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.04, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/end-meeting.mdx", - "navOrder": 770.04, - "edition": "enterprise" + "id": 2526, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-avatar", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member avatar", + "description": "OpenIM React Native SDK guide for update a group member avatar.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3896, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx", + "navOrder": 612 }, { - "id": 483, - "path": "/platform-api/meeting/meeting-management/get-user-related-meetings", - "relativePath": "platform-api/meeting/meeting-management/get-user-related-meetings", - "sourcePath": "/platform-api/meeting/meeting-management/get-user-related-meetings", - "title": "Get user-related meetings", - "description": "OpenIM Enterprise Platform API: list meetings related to a user by status and time range.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.041, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/get-user-related-meetings.mdx", - "navOrder": 770.041, - "edition": "enterprise" + "id": 2527, + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-extension", + "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "Set group member extra data", + "description": "OpenIM React Native SDK guide for set group member extra data.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3897, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx", + "navOrder": 613 }, { - "id": 484, - "path": "/platform-api/meeting/meeting-settings/set-personal-setting", - "relativePath": "platform-api/meeting/meeting-settings/set-personal-setting", - "sourcePath": "/platform-api/meeting/meeting-settings/set-personal-setting", - "title": "Set personal meeting preferences", - "description": "Set a user's camera and microphone preferences for joining a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.042, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/set-personal-setting.mdx", - "navOrder": 770.042, - "edition": "enterprise" + "id": 2528, + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "relativePath": "sdk/react-native/group/managing-group-members/transfer-group-owner", + "sourcePath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "description": "OpenIM React Native SDK guide for transfer group ownership.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3898, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx", + "navOrder": 614 }, { - "id": 485, - "path": "/platform-api/meeting/meeting-settings/get-personal-setting", - "relativePath": "platform-api/meeting/meeting-settings/get-personal-setting", - "sourcePath": "/platform-api/meeting/meeting-settings/get-personal-setting", - "title": "Get personal meeting preferences", - "description": "Get a user's camera and microphone preferences for a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.043, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/get-personal-setting.mdx", - "navOrder": 770.043, - "edition": "enterprise" + "id": 2529, + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "relativePath": "sdk/react-native/group/managing-group-members/change-group-member-mute", + "sourcePath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "description": "OpenIM React Native SDK guide for mute or unmute a group member.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3899, + "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx", + "navOrder": 615 }, { - "id": 486, - "path": "/platform-api/meeting/meeting-settings/operate-all-streams", - "relativePath": "platform-api/meeting/meeting-settings/operate-all-streams", - "sourcePath": "/platform-api/meeting/meeting-settings/operate-all-streams", - "title": "Control participant media streams", - "description": "Control camera and microphone state across meeting participants.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.044, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/operate-all-streams.mdx", - "navOrder": 770.044, - "edition": "enterprise" + "id": 2530, + "path": "/sdk/react-native/message/overview-message", + "relativePath": "sdk/react-native/message/overview-message", + "sourcePath": "/sdk/react-native/message/overview-message", + "title": "Message overview", + "description": "OpenIM React Native SDK guide for message overview.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3900, + "contentFile": "content/docs/chat/sdk/react-native/message/overview-message.mdx", + "navOrder": 616 }, { - "id": 487, - "path": "/platform-api/meeting/meeting-settings/modify-participant-name", - "relativePath": "platform-api/meeting/meeting-settings/modify-participant-name", - "sourcePath": "/platform-api/meeting/meeting-settings/modify-participant-name", - "title": "Modify a participant name", - "description": "Change a participant's display name within a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.045, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/modify-participant-name.mdx", - "navOrder": 770.045, - "edition": "enterprise" + "id": 2531, + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "relativePath": "sdk/react-native/message/creating-messages/create-text-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "Create a text message", + "description": "OpenIM React Native SDK guide for create a text message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3901, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx", + "navOrder": 617 }, { - "id": 488, - "path": "/platform-api/meeting/meeting-settings/remove-participants", - "relativePath": "platform-api/meeting/meeting-settings/remove-participants", - "sourcePath": "/platform-api/meeting/meeting-settings/remove-participants", - "title": "Remove meeting participants", - "description": "Remove selected participants from a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.046, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/remove-participants.mdx", - "navOrder": 770.046, - "edition": "enterprise" + "id": 2532, + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "relativePath": "sdk/react-native/message/creating-messages/create-text-at-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "description": "OpenIM React Native SDK guide for create an @ message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3902, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx", + "navOrder": 618 }, { - "id": 489, - "path": "/platform-api/meeting/meeting-settings/set-meeting-host", - "relativePath": "platform-api/meeting/meeting-settings/set-meeting-host", - "sourcePath": "/platform-api/meeting/meeting-settings/set-meeting-host", - "title": "Set meeting hosts", - "description": "Set the host and co-hosts of a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.047, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/set-meeting-host.mdx", - "navOrder": 770.047, - "edition": "enterprise" + "id": 2533, + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "relativePath": "sdk/react-native/message/creating-messages/create-custom-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "description": "OpenIM React Native SDK guide for create a custom message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3903, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx", + "navOrder": 619 }, { - "id": 490, - "path": "/platform-api/meeting/meeting-settings/clean-previous-meetings", - "relativePath": "platform-api/meeting/meeting-settings/clean-previous-meetings", - "sourcePath": "/platform-api/meeting/meeting-settings/clean-previous-meetings", - "title": "Clean previous meeting state", - "description": "Clear stale meeting connection state retained before a user logs in.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.048, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/clean-previous-meetings.mdx", - "navOrder": 770.048, - "edition": "enterprise" + "id": 2534, + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-image-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "Create an image message from a file", + "description": "OpenIM React Native SDK guide for create an image message from a file.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3904, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx", + "navOrder": 620 }, { - "id": 491, - "path": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", - "relativePath": "platform-api/meeting/recurring-meetings/create-repeat-meeting", - "sourcePath": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", - "title": "Create a recurring meeting", - "description": "Create a recurrence rule and generate its first meeting instance.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.049, - "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/create-repeat-meeting.mdx", - "navOrder": 770.049, - "edition": "enterprise" + "id": 2535, + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-image-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "description": "OpenIM React Native SDK guide for create an image message from a url.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3905, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx", + "navOrder": 621 }, { - "id": 492, - "path": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", - "relativePath": "platform-api/meeting/recurring-meetings/update-repeat-meeting", - "sourcePath": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", - "title": "Update a recurring meeting", - "description": "Update a recurrence definition and its future meeting instances.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.05, - "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/update-repeat-meeting.mdx", - "navOrder": 770.05, - "edition": "enterprise" + "id": 2536, + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-sound-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "Create an audio message from a file", + "description": "OpenIM React Native SDK guide for create an audio message from a file.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3906, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx", + "navOrder": 622 }, { - "id": 493, - "path": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", - "relativePath": "platform-api/meeting/recurring-meetings/delete-repeat-meeting", - "sourcePath": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", - "title": "Delete a recurring meeting", - "description": "Delete a recurring meeting definition.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.051, - "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/delete-repeat-meeting.mdx", - "navOrder": 770.051, - "edition": "enterprise" + "id": 2537, + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-sound-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "description": "OpenIM React Native SDK guide for create an audio message from a url.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3907, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx", + "navOrder": 623 }, { - "id": 494, - "path": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", - "relativePath": "platform-api/meeting/recurring-meetings/get-repeat-meeting", - "sourcePath": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", - "title": "Get a recurring meeting", - "description": "Get a recurring meeting definition and generation state.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.052, - "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/get-repeat-meeting.mdx", - "navOrder": 770.052, - "edition": "enterprise" + "id": 2538, + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-video-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "Create a video message from files", + "description": "OpenIM React Native SDK guide for create a video message from files.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3908, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx", + "navOrder": 624 }, { - "id": 495, - "path": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", - "relativePath": "platform-api/meeting/recurring-meetings/list-repeat-meetings", - "sourcePath": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", - "title": "List recurring meetings", - "description": "List recurring meeting definitions created by a user.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.053, - "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/list-repeat-meetings.mdx", - "navOrder": 770.053, - "edition": "enterprise" + "id": 2539, + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-video-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "description": "OpenIM React Native SDK guide for create a video message from urls.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3909, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx", + "navOrder": 625 }, { - "id": 496, - "path": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", - "relativePath": "platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", - "sourcePath": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", - "title": "List recurring meeting instances", - "description": "List meeting instances generated for a recurring meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.054, - "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances.mdx", - "navOrder": 770.054, - "edition": "enterprise" + "id": 2540, + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "relativePath": "sdk/react-native/message/creating-messages/create-file-message-by-file", + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "Create a file message from a file", + "description": "OpenIM React Native SDK guide for create a file message from a file.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3910, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx", + "navOrder": 626 }, { - "id": 497, - "path": "/platform-api/meeting/meeting-records/get-user-meeting-histories", - "relativePath": "platform-api/meeting/meeting-records/get-user-meeting-histories", - "sourcePath": "/platform-api/meeting/meeting-records/get-user-meeting-histories", - "title": "Get a user's meeting history", - "description": "List a user's meeting attendance history by time, status, and pagination.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.055, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-user-meeting-histories.mdx", - "navOrder": 770.055, - "edition": "enterprise" + "id": 2541, + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "relativePath": "sdk/react-native/message/creating-messages/create-file-message-by-url", + "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "description": "OpenIM React Native SDK guide for create a file message from a url.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3911, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx", + "navOrder": 627 }, { - "id": 498, - "path": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", - "relativePath": "platform-api/meeting/meeting-records/get-user-hosted-meetings", - "sourcePath": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", - "title": "Get meetings hosted by a user", - "description": "List meetings hosted by a user by time range and pagination.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.056, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-user-hosted-meetings.mdx", - "navOrder": 770.056, - "edition": "enterprise" + "id": 2542, + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "relativePath": "sdk/react-native/message/creating-messages/create-card-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "description": "OpenIM React Native SDK guide for create a contact card message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3912, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx", + "navOrder": 628 }, { - "id": 499, - "path": "/platform-api/meeting/meeting-records/get-meeting-records", - "relativePath": "platform-api/meeting/meeting-records/get-meeting-records", - "sourcePath": "/platform-api/meeting/meeting-records/get-meeting-records", - "title": "Get meeting recordings", - "description": "List meeting recordings by host, participant, time range, and pagination.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.057, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-meeting-records.mdx", - "navOrder": 770.057, - "edition": "enterprise" + "id": 2543, + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "relativePath": "sdk/react-native/message/creating-messages/create-location-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "Create a location message", + "description": "OpenIM React Native SDK guide for create a location message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3913, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx", + "navOrder": 629 }, { - "id": 500, - "path": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", - "relativePath": "platform-api/meeting/meeting-records/get-records-by-meeting-ids", - "sourcePath": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", - "title": "Get recordings by meeting IDs", - "description": "Get recording records for selected meeting IDs.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.058, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-records-by-meeting-ids.mdx", - "navOrder": 770.058, - "edition": "enterprise" + "id": 2544, + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "relativePath": "sdk/react-native/message/creating-messages/create-face-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "description": "OpenIM React Native SDK guide for create an emoji message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3914, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx", + "navOrder": 630 }, { - "id": 501, - "path": "/platform-api/meeting/meeting-records/get-meeting-attendance", - "relativePath": "platform-api/meeting/meeting-records/get-meeting-attendance", - "sourcePath": "/platform-api/meeting/meeting-records/get-meeting-attendance", - "title": "Get meeting attendance", - "description": "Get the users who attended or were absent from a meeting.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.059, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-meeting-attendance.mdx", - "navOrder": 770.059, - "edition": "enterprise" + "id": 2545, + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "relativePath": "sdk/react-native/message/creating-messages/create-quote-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "description": "OpenIM React Native SDK guide for create a reply message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3915, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx", + "navOrder": 631 }, { - "id": 502, - "path": "/platform-api/meeting/meeting-records/delete-meeting-records", - "relativePath": "platform-api/meeting/meeting-records/delete-meeting-records", - "sourcePath": "/platform-api/meeting/meeting-records/delete-meeting-records", - "title": "Delete meeting recordings", - "description": "Delete recording records by meeting or real-time room ID.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.06, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/delete-meeting-records.mdx", - "navOrder": 770.06, - "edition": "enterprise" + "id": 2546, + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "relativePath": "sdk/react-native/message/creating-messages/create-markdown-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "description": "OpenIM React Native SDK guide for create a markdown message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3916, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx", + "navOrder": 632 }, { - "id": 503, - "path": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", - "relativePath": "platform-api/meeting/meeting-signaling/get-room-by-group-id", - "sourcePath": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", - "title": "Get a call room by group ID", - "description": "Get the active real-time call room and participants associated with a group.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.061, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-room-by-group-id.mdx", - "navOrder": 770.061, - "edition": "enterprise" + "id": 2547, + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "relativePath": "sdk/react-native/message/creating-messages/create-forward-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "description": "OpenIM React Native SDK guide for create a forwarded message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3917, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx", + "navOrder": 633 }, { - "id": 504, - "path": "/platform-api/meeting/meeting-signaling/get-signal-rooms", - "relativePath": "platform-api/meeting/meeting-signaling/get-signal-rooms", - "sourcePath": "/platform-api/meeting/meeting-signaling/get-signal-rooms", - "title": "Get call rooms", - "description": "Get multiple real-time call rooms by room ID.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.062, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-signal-rooms.mdx", - "navOrder": 770.062, - "edition": "enterprise" + "id": 2548, + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "relativePath": "sdk/react-native/message/creating-messages/create-merger-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "description": "OpenIM React Native SDK guide for create a merged forward message.", + "product": "sdk", + "version": "v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 3918, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx", + "navOrder": 634 }, { - "id": 505, - "path": "/platform-api/meeting/meeting-signaling/get-signal-invitation", - "relativePath": "platform-api/meeting/meeting-signaling/get-signal-invitation", - "sourcePath": "/platform-api/meeting/meeting-signaling/get-signal-invitation", - "title": "Get a call invitation", - "description": "Get real-time call invitation and offline-push information for a room.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.063, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-signal-invitation.mdx", - "navOrder": 770.063, - "edition": "enterprise" - }, - { - "id": 506, - "path": "/platform-api/meeting/meeting-signaling/get-startup-invitation", - "relativePath": "platform-api/meeting/meeting-signaling/get-startup-invitation", - "sourcePath": "/platform-api/meeting/meeting-signaling/get-startup-invitation", - "title": "Get a startup call invitation", - "description": "Get a call invitation that a user must restore when the application starts.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.064, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-startup-invitation.mdx", - "navOrder": 770.064, - "edition": "enterprise" - }, - { - "id": 507, - "path": "/platform-api/meeting/meeting-chat/send-meeting-chat", - "relativePath": "platform-api/meeting/meeting-chat/send-meeting-chat", - "sourcePath": "/platform-api/meeting/meeting-chat/send-meeting-chat", - "title": "Send a meeting chat message", - "description": "Send a broadcast or targeted message within a meeting room.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.065, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-chat/send-meeting-chat.mdx", - "navOrder": 770.065, - "edition": "enterprise" - }, - { - "id": 508, - "path": "/platform-api/meeting/meeting-chat/pull-meeting-chat", - "relativePath": "platform-api/meeting/meeting-chat/pull-meeting-chat", - "sourcePath": "/platform-api/meeting/meeting-chat/pull-meeting-chat", - "title": "Pull meeting chat messages", - "description": "Incrementally pull meeting chat messages by creation time and Seq.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.066, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-chat/pull-meeting-chat.mdx", - "navOrder": 770.066, - "edition": "enterprise" - }, - { - "id": 509, - "path": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", - "relativePath": "platform-api/meeting/meeting-chat/revoke-meeting-chat", - "sourcePath": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", - "title": "Revoke a meeting chat message", - "description": "Revoke a meeting chat message by room and Seq.", - "product": "platform-api", - "version": "v3", - "platform": null, - "contextKey": "chat/platform-api", - "contextTitle": "Platform API", - "template": "api", - "status": "published", - "sourceIndex": 770.067, - "contentFile": "content/docs/chat/platform-api/meeting/meeting-chat/revoke-meeting-chat.mdx", - "navOrder": 770.067, - "edition": "enterprise" - }, - { - "id": 1351, - "path": "/sdk/error-codes", - "relativePath": "sdk/error-codes", - "sourcePath": "/sdk/error-codes", - "title": "Client SDK error codes", - "description": "Identify common OpenIMClientSDK error codes, distinguish their source, and apply safe handling guidance.", + "id": 2549, + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "relativePath": "sdk/react-native/message/creating-messages/create-advanced-text-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "Create a rich-text message", + "description": "OpenIM React Native SDK guide for create a rich-text message.", "product": "sdk", "version": "v4", - "platform": null, - "contextKey": "chat/sdk/common", - "contextTitle": "SDKs · Common reference · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2700, - "contentFile": "content/docs/chat/sdk/error-codes.mdx", - "navOrder": 1 + "status": "draft", + "sourceIndex": 3919, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx", + "navOrder": 635 }, { - "id": 1353, - "path": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", - "relativePath": "sdk/wasm/conversation/retrieving-conversations/search-conversations", - "sourcePath": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", - "title": "Search conversations", - "description": "Search local conversations by conversation name with the WASM SDK.", + "id": 2550, + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "relativePath": "sdk/react-native/message/creating-messages/create-advanced-quote-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "Create a rich-text reply", + "description": "OpenIM React Native SDK guide for create a rich-text reply.", "product": "sdk", "version": "v4", - "platform": "wasm", - "contextKey": "chat/sdk/wasm", - "contextTitle": "SDKs · WASM · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2723, - "contentFile": "content/docs/chat/sdk/wasm/conversation/retrieving-conversations/search-conversations.mdx", - "navOrder": 418 + "status": "draft", + "sourceIndex": 3920, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx", + "navOrder": 636 }, { - "id": 1354, - "path": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", - "relativePath": "sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", - "sourcePath": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", - "title": "Mark all conversations as read", - "description": "Clear the unread counts of all currently unread conversations with the WASM SDK.", + "id": 2551, + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "relativePath": "sdk/react-native/message/creating-messages/create-targeted-group-message", + "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "Create a targeted group message", + "description": "OpenIM React Native SDK guide for create a targeted group message.", "product": "sdk", "version": "v4", - "platform": "wasm", - "contextKey": "chat/sdk/wasm", - "contextTitle": "SDKs · WASM · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2724, - "contentFile": "content/docs/chat/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read.mdx", - "navOrder": 427 + "status": "draft", + "sourceIndex": 3921, + "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx", + "navOrder": 637 }, { - "id": 1355, - "path": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", - "relativePath": "sdk/wasm/conversation/managing-conversations/hide-all-conversations", - "sourcePath": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", - "title": "Hide all conversations", - "description": "Hide all conversations from the conversation list on the current device with the WASM SDK.", + "id": 2552, + "path": "/sdk/react-native/message/sending-messages/send-message", + "relativePath": "sdk/react-native/message/sending-messages/send-message", + "sourcePath": "/sdk/react-native/message/sending-messages/send-message", + "title": "Send a message", + "description": "OpenIM React Native SDK guide for send a message.", "product": "sdk", "version": "v4", - "platform": "wasm", - "contextKey": "chat/sdk/wasm", - "contextTitle": "SDKs · WASM · v4", + "platform": "react-native", + "contextKey": "chat/sdk/react-native", + "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2725, - "contentFile": "content/docs/chat/sdk/wasm/conversation/managing-conversations/hide-all-conversations.mdx", - "navOrder": 433 + "status": "draft", + "sourceIndex": 3922, + "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx", + "navOrder": 638 }, { - "id": 1356, - "path": "/sdk/react-native/user/overview-user", - "relativePath": "sdk/react-native/user/overview-user", - "sourcePath": "/sdk/react-native/user/overview-user", - "title": "User overview", - "description": "Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.", + "id": 2553, + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "relativePath": "sdk/react-native/message/sending-messages/send-message-not-oss", + "sourcePath": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "description": "OpenIM React Native SDK guide for send an uploaded media message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2726, - "contentFile": "content/docs/chat/sdk/react-native/user/overview-user.mdx", - "navOrder": 520 + "status": "draft", + "sourceIndex": 3923, + "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx", + "navOrder": 639 }, { - "id": 1400, - "path": "/sdk/react-native/user/overview-relationships", - "relativePath": "sdk/react-native/user/overview-relationships", - "sourcePath": "/sdk/react-native/user/overview-relationships", - "title": "Relationships overview", - "description": "Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.", + "id": 2554, + "path": "/sdk/react-native/message/receiving-messages/receive-messages", + "relativePath": "sdk/react-native/message/receiving-messages/receive-messages", + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "Receive messages", + "description": "OpenIM React Native SDK guide for receive messages.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2726.5, - "contentFile": "content/docs/chat/sdk/react-native/user/overview-relationships.mdx", - "navOrder": 529 + "status": "draft", + "sourceIndex": 3924, + "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx", + "navOrder": 640 }, { - "id": 1357, - "path": "/sdk/react-native/user/profile/get-users-info", - "relativePath": "sdk/react-native/user/profile/get-users-info", - "sourcePath": "/sdk/react-native/user/profile/get-users-info", - "title": "Get user profiles", - "description": "Get public user profiles with the OpenIM React Native SDK.", + "id": 2555, + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "relativePath": "sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "sourcePath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "description": "OpenIM React Native SDK guide for receive custom business messages.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2727, - "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-users-info.mdx", - "navOrder": 521 + "status": "draft", + "sourceIndex": 3925, + "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx", + "navOrder": 641 }, { - "id": 1358, - "path": "/sdk/react-native/user/profile/get-self-user-info", - "relativePath": "sdk/react-native/user/profile/get-self-user-info", - "sourcePath": "/sdk/react-native/user/profile/get-self-user-info", - "title": "Get your profile", - "description": "Get the current user profile with the OpenIM React Native SDK.", + "id": 2556, + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "relativePath": "sdk/react-native/message/retrieving-messages/load-older-messages", + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "description": "OpenIM React Native SDK guide for load message history.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2728, - "contentFile": "content/docs/chat/sdk/react-native/user/profile/get-self-user-info.mdx", - "navOrder": 522 + "status": "draft", + "sourceIndex": 3926, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx", + "navOrder": 642 }, { - "id": 1359, - "path": "/sdk/react-native/user/profile/set-self-info", - "relativePath": "sdk/react-native/user/profile/set-self-info", - "sourcePath": "/sdk/react-native/user/profile/set-self-info", - "title": "Update your profile", - "description": "Update the current user profile with the OpenIM React Native SDK.", + "id": 2557, + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "relativePath": "sdk/react-native/message/retrieving-messages/load-newer-messages", + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "Load message history in reverse", + "description": "OpenIM React Native SDK guide for load message history in reverse.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2729, - "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-self-info.mdx", - "navOrder": 523 + "status": "draft", + "sourceIndex": 3927, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx", + "navOrder": 643 }, { - "id": 1360, - "path": "/sdk/react-native/user/profile/set-global-message-reception", - "relativePath": "sdk/react-native/user/profile/set-global-message-reception", - "sourcePath": "/sdk/react-native/user/profile/set-global-message-reception", - "title": "Set global message reception", - "description": "Set the global message reception option with the OpenIM React Native SDK.", + "id": 2558, + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "relativePath": "sdk/react-native/message/retrieving-messages/find-messages-by-id", + "sourcePath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "description": "OpenIM React Native SDK guide for find messages by id.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2730, - "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-global-message-reception.mdx", - "navOrder": 524 + "status": "draft", + "sourceIndex": 3928, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx", + "navOrder": 644 }, { - "id": 1361, - "path": "/sdk/react-native/user/profile/set-friend-add-permission", - "relativePath": "sdk/react-native/user/profile/set-friend-add-permission", - "sourcePath": "/sdk/react-native/user/profile/set-friend-add-permission", - "title": "Set friend request permissions", - "description": "Set friend request permissions with the OpenIM React Native SDK.", + "id": 2559, + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "relativePath": "sdk/react-native/message/retrieving-messages/load-message-context", + "sourcePath": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "Load message context", + "description": "OpenIM React Native SDK guide for load message context.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2731, - "contentFile": "content/docs/chat/sdk/react-native/user/profile/set-friend-add-permission.mdx", - "navOrder": 525 + "status": "draft", + "sourceIndex": 3929, + "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx", + "navOrder": 645 }, { - "id": 1362, - "path": "/sdk/react-native/user/online-status/subscribe-users-status", - "relativePath": "sdk/react-native/user/online-status/subscribe-users-status", - "sourcePath": "/sdk/react-native/user/online-status/subscribe-users-status", - "title": "Subscribe to online status", - "description": "Subscribe to user online status with the OpenIM React Native SDK.", + "id": 2560, + "path": "/sdk/react-native/message/searching-messages/search-messages", + "relativePath": "sdk/react-native/message/searching-messages/search-messages", + "sourcePath": "/sdk/react-native/message/searching-messages/search-messages", + "title": "Search messages", + "description": "OpenIM React Native SDK guide for search messages.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2732, - "contentFile": "content/docs/chat/sdk/react-native/user/online-status/subscribe-users-status.mdx", - "navOrder": 526 + "status": "draft", + "sourceIndex": 3930, + "contentFile": "content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx", + "navOrder": 646 }, { - "id": 1363, - "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", - "relativePath": "sdk/react-native/user/online-status/get-subscribe-users-status", - "sourcePath": "/sdk/react-native/user/online-status/get-subscribe-users-status", - "title": "Get subscribed user status", - "description": "Get the status of subscribed users with the OpenIM React Native SDK.", + "id": 2561, + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "relativePath": "sdk/react-native/message/composing-messages/update-typing-status", + "sourcePath": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "Report typing status", + "description": "OpenIM React Native SDK guide for report typing status.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2733, - "contentFile": "content/docs/chat/sdk/react-native/user/online-status/get-subscribe-users-status.mdx", - "navOrder": 527 + "status": "draft", + "sourceIndex": 3931, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx", + "navOrder": 647 }, { - "id": 1364, - "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", - "relativePath": "sdk/react-native/user/online-status/unsubscribe-users-status", - "sourcePath": "/sdk/react-native/user/online-status/unsubscribe-users-status", - "title": "Unsubscribe from online status", - "description": "Cancel user online-status subscriptions with the OpenIM React Native SDK.", + "id": 2562, + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "relativePath": "sdk/react-native/message/composing-messages/get-typing-status", + "sourcePath": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "Get typing status", + "description": "OpenIM React Native SDK guide for get typing status.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2734, - "contentFile": "content/docs/chat/sdk/react-native/user/online-status/unsubscribe-users-status.mdx", - "navOrder": 528 + "status": "draft", + "sourceIndex": 3932, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx", + "navOrder": 648 }, { - "id": 1365, - "path": "/sdk/react-native/user/friends/get-friend-list-page", - "relativePath": "sdk/react-native/user/friends/get-friend-list-page", - "sourcePath": "/sdk/react-native/user/friends/get-friend-list-page", - "title": "Get the friend list", - "description": "Get the friend list with the OpenIM React Native SDK.", + "id": 2563, + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "relativePath": "sdk/react-native/message/composing-messages/change-input-states", + "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "Update input states", + "description": "OpenIM React Native SDK guide for update input states.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2735, - "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-friend-list-page.mdx", - "navOrder": 530 + "status": "draft", + "sourceIndex": 3933, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx", + "navOrder": 649 }, { - "id": 1366, - "path": "/sdk/react-native/user/friends/search-friends", - "relativePath": "sdk/react-native/user/friends/search-friends", - "sourcePath": "/sdk/react-native/user/friends/search-friends", - "title": "Search friends", - "description": "Search the current user's friends with the OpenIM React Native SDK.", + "id": 2564, + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "relativePath": "sdk/react-native/message/composing-messages/check-speech-to-text", + "sourcePath": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "description": "OpenIM React Native SDK guide for check audio transcription availability.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2736, - "contentFile": "content/docs/chat/sdk/react-native/user/friends/search-friends.mdx", - "navOrder": 531 + "status": "draft", + "sourceIndex": 3934, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx", + "navOrder": 650 }, { - "id": 1367, - "path": "/sdk/react-native/user/friends/get-specified-friends-info", - "relativePath": "sdk/react-native/user/friends/get-specified-friends-info", - "sourcePath": "/sdk/react-native/user/friends/get-specified-friends-info", - "title": "Get friend profiles", - "description": "Get specified friend profiles with the OpenIM React Native SDK.", + "id": 2565, + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "relativePath": "sdk/react-native/message/composing-messages/transcribe-audio", + "sourcePath": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "description": "OpenIM React Native SDK guide for transcribe audio.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2737, - "contentFile": "content/docs/chat/sdk/react-native/user/friends/get-specified-friends-info.mdx", - "navOrder": 532 + "status": "draft", + "sourceIndex": 3935, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx", + "navOrder": 651 }, { - "id": 1368, - "path": "/sdk/react-native/user/friends/check-friend", - "relativePath": "sdk/react-native/user/friends/check-friend", - "sourcePath": "/sdk/react-native/user/friends/check-friend", - "title": "Check friendship status", - "description": "Check friendships with the OpenIM React Native SDK.", + "id": 2566, + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "relativePath": "sdk/react-native/message/composing-messages/save-local-transcript", + "sourcePath": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "description": "OpenIM React Native SDK guide for save a local transcript.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2738, - "contentFile": "content/docs/chat/sdk/react-native/user/friends/check-friend.mdx", - "navOrder": 533 + "status": "draft", + "sourceIndex": 3936, + "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx", + "navOrder": 652 }, { - "id": 1369, - "path": "/sdk/react-native/user/friends/update-friends", - "relativePath": "sdk/react-native/user/friends/update-friends", - "sourcePath": "/sdk/react-native/user/friends/update-friends", - "title": "Update friend information", - "description": "Update friend information with the OpenIM React Native SDK.", + "id": 2567, + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "relativePath": "sdk/react-native/message/managing-messages/delete-local-message", + "sourcePath": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "description": "OpenIM React Native SDK guide for delete a local message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2739, - "contentFile": "content/docs/chat/sdk/react-native/user/friends/update-friends.mdx", - "navOrder": 534 + "status": "draft", + "sourceIndex": 3937, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx", + "navOrder": 653 }, { - "id": 1370, - "path": "/sdk/react-native/user/friends/delete-friend", - "relativePath": "sdk/react-native/user/friends/delete-friend", - "sourcePath": "/sdk/react-native/user/friends/delete-friend", - "title": "Delete a friend", - "description": "Delete a friend with the OpenIM React Native SDK.", + "id": 2568, + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "relativePath": "sdk/react-native/message/managing-messages/delete-saved-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "description": "OpenIM React Native SDK guide for delete messages in a batch.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2740, - "contentFile": "content/docs/chat/sdk/react-native/user/friends/delete-friend.mdx", - "navOrder": 535 + "status": "draft", + "sourceIndex": 3938, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx", + "navOrder": 654 }, { - "id": 1371, - "path": "/sdk/react-native/user/friend-applications/add-friend", - "relativePath": "sdk/react-native/user/friend-applications/add-friend", - "sourcePath": "/sdk/react-native/user/friend-applications/add-friend", - "title": "Send a friend application", - "description": "Send a friend request with the OpenIM React Native SDK.", + "id": 2569, + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "relativePath": "sdk/react-native/message/managing-messages/delete-user-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "description": "OpenIM React Native SDK guide for delete all messages from a user in a group chat.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2741, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/add-friend.mdx", - "navOrder": 536 + "status": "draft", + "sourceIndex": 3939, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx", + "navOrder": 655 }, { - "id": 1372, - "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", - "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", - "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", - "title": "Get received friend applications", - "description": "Get received friend requests with the OpenIM React Native SDK.", + "id": 2570, + "path": "/sdk/react-native/message/managing-messages/revoke-a-message", + "relativePath": "sdk/react-native/message/managing-messages/revoke-a-message", + "sourcePath": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "description": "OpenIM React Native SDK guide for revoke a message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2742, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient.mdx", - "navOrder": 537 + "status": "draft", + "sourceIndex": 3940, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx", + "navOrder": 656 }, { - "id": 1373, - "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", - "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", - "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", - "title": "Get sent friend applications", - "description": "Get sent friend requests with the OpenIM React Native SDK.", + "id": 2571, + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "relativePath": "sdk/react-native/message/managing-messages/modify-a-message", + "sourcePath": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "Modify a message", + "description": "OpenIM React Native SDK guide for modify a message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2743, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant.mdx", - "navOrder": 538 + "status": "draft", + "sourceIndex": 3941, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx", + "navOrder": 657 }, { - "id": 1374, - "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", - "relativePath": "sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", - "sourcePath": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", - "title": "Get pending application count", - "description": "Get the unhandled friend-request count with the OpenIM React Native SDK.", + "id": 2572, + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "relativePath": "sdk/react-native/message/managing-messages/insert-local-single-message", + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "description": "OpenIM React Native SDK guide for insert a local one-to-one message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2744, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count.mdx", - "navOrder": 539 + "status": "draft", + "sourceIndex": 3942, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx", + "navOrder": 658 }, { - "id": 1375, - "path": "/sdk/react-native/user/friend-applications/accept-friend-application", - "relativePath": "sdk/react-native/user/friend-applications/accept-friend-application", - "sourcePath": "/sdk/react-native/user/friend-applications/accept-friend-application", - "title": "Accept a friend application", - "description": "Accept a friend request with the OpenIM React Native SDK.", + "id": 2573, + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "relativePath": "sdk/react-native/message/managing-messages/insert-local-group-message", + "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "description": "OpenIM React Native SDK guide for insert a local group message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2745, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/accept-friend-application.mdx", - "navOrder": 540 + "status": "draft", + "sourceIndex": 3943, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx", + "navOrder": 659 }, { - "id": 1376, - "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", - "relativePath": "sdk/react-native/user/friend-applications/refuse-friend-application", - "sourcePath": "/sdk/react-native/user/friend-applications/refuse-friend-application", - "title": "Reject a friend application", - "description": "Reject a friend request with the OpenIM React Native SDK.", + "id": 2574, + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "relativePath": "sdk/react-native/message/managing-messages/clear-all-local-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "description": "OpenIM React Native SDK guide for clear all local messages.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2746, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/refuse-friend-application.mdx", - "navOrder": 541 + "status": "draft", + "sourceIndex": 3944, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx", + "navOrder": 660 }, { - "id": 1377, - "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", - "relativePath": "sdk/react-native/user/friend-applications/delete-friend-requests", - "sourcePath": "/sdk/react-native/user/friend-applications/delete-friend-requests", - "title": "Delete friend applications", - "description": "Delete friend-request records with the OpenIM React Native SDK.", + "id": 2575, + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "relativePath": "sdk/react-native/message/managing-messages/clear-all-messages", + "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "description": "OpenIM React Native SDK guide for clear local and server messages.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2747, - "contentFile": "content/docs/chat/sdk/react-native/user/friend-applications/delete-friend-requests.mdx", - "navOrder": 542 + "status": "draft", + "sourceIndex": 3945, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx", + "navOrder": 661 }, { - "id": 1378, - "path": "/sdk/react-native/user/blacklist/get-black-list", - "relativePath": "sdk/react-native/user/blacklist/get-black-list", - "sourcePath": "/sdk/react-native/user/blacklist/get-black-list", - "title": "Get the blacklist", - "description": "Get the blocklist with the OpenIM React Native SDK.", + "id": 2576, + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "relativePath": "sdk/react-native/message/managing-messages/set-message-local-ex", + "sourcePath": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "description": "OpenIM React Native SDK guide for set a local message extension.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2748, - "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/get-black-list.mdx", - "navOrder": 543 + "status": "draft", + "sourceIndex": 3946, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx", + "navOrder": 662 }, { - "id": 1379, - "path": "/sdk/react-native/user/blacklist/add-black", - "relativePath": "sdk/react-native/user/blacklist/add-black", - "sourcePath": "/sdk/react-native/user/blacklist/add-black", - "title": "Add a user to the blacklist", - "description": "Block a user with the OpenIM React Native SDK.", + "id": 2577, + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "relativePath": "sdk/react-native/message/managing-read-status/send-group-read-receipts", + "sourcePath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "description": "OpenIM React Native SDK guide for report group messages as read.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2749, - "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/add-black.mdx", - "navOrder": 544 + "status": "draft", + "sourceIndex": 3947, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx", + "navOrder": 663 }, { - "id": 1380, - "path": "/sdk/react-native/user/blacklist/remove-black", - "relativePath": "sdk/react-native/user/blacklist/remove-black", - "sourcePath": "/sdk/react-native/user/blacklist/remove-black", - "title": "Remove a user from the blacklist", - "description": "Unblock a user with the OpenIM React Native SDK.", + "id": 2578, + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "relativePath": "sdk/react-native/message/managing-read-status/get-group-message-readers", + "sourcePath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "description": "OpenIM React Native SDK guide for get members who read a group message.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2750, - "contentFile": "content/docs/chat/sdk/react-native/user/blacklist/remove-black.mdx", - "navOrder": 545 + "status": "draft", + "sourceIndex": 3948, + "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx", + "navOrder": 664 }, { - "id": 1401, - "path": "/sdk/react-native/conversation/overview-conversation", - "relativePath": "sdk/react-native/conversation/overview-conversation", - "sourcePath": "/sdk/react-native/conversation/overview-conversation", - "title": "Conversation overview", - "description": "Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.", + "id": 2579, + "path": "/sdk/react-native/file-uploads/upload-file", + "relativePath": "sdk/react-native/file-uploads/upload-file", + "sourcePath": "/sdk/react-native/file-uploads/upload-file", + "title": "Upload a file", + "description": "Upload a file independently and obtain its remote URL with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2751, - "contentFile": "content/docs/chat/sdk/react-native/conversation/overview-conversation.mdx", - "navOrder": 546 + "status": "draft", + "sourceIndex": 3949, + "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx", + "navOrder": 665 }, { - "id": 1402, - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", - "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", - "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", - "title": "Open a conversation", - "description": "Query a conversation by its chat target and session type.", + "id": 2580, + "path": "/sdk/react-native/calling/overview-calling", + "relativePath": "sdk/react-native/calling/overview-calling", + "sourcePath": "/sdk/react-native/calling/overview-calling", + "title": "Audio and video calling overview", + "description": "OpenIM React Native SDK guide for audio and video calling.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2752, - "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target.mdx", - "navOrder": 547 + "status": "draft", + "sourceIndex": 3950, + "contentFile": "content/docs/chat/sdk/react-native/calling/overview-calling.mdx", + "navOrder": 666 }, { - "id": 1403, - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", - "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversation-id", - "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", - "title": "Resolve a conversation ID", - "description": "Generate a conversation ID from a chat target and session type.", + "id": 2581, + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "relativePath": "sdk/react-native/calling/managing-calls/start-single-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "description": "Start a one-to-one audio or video call with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2753, - "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversation-id.mdx", - "navOrder": 548 + "status": "draft", + "sourceIndex": 3951, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx", + "navOrder": 667 }, { - "id": 1404, - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", - "relativePath": "sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", - "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", - "title": "Get conversations by ID", - "description": "Retrieve multiple conversations by their conversation IDs.", + "id": 2582, + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "relativePath": "sdk/react-native/calling/managing-calls/start-group-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "Start a group call", + "description": "Start a group audio or video call with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2754, - "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id.mdx", - "navOrder": 549 + "status": "draft", + "sourceIndex": 3952, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx", + "navOrder": 668 }, { - "id": 1405, - "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", - "relativePath": "sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", - "sourcePath": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", - "title": "Retrieve the conversation list", - "description": "Retrieve the current user's conversation list with pagination.", + "id": 2583, + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "relativePath": "sdk/react-native/calling/managing-calls/accept-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "Accept a call", + "description": "Accept a call invitation with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2755, - "contentFile": "content/docs/chat/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list.mdx", - "navOrder": 550 + "status": "draft", + "sourceIndex": 3953, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx", + "navOrder": 669 }, { - "id": 1406, - "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", - "relativePath": "sdk/react-native/conversation/managing-conversations/pin-conversation", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/pin-conversation", - "title": "Pin or unpin a conversation", - "description": "Pin or unpin a conversation for the current account.", + "id": 2584, + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "relativePath": "sdk/react-native/calling/managing-calls/reject-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "Reject a call", + "description": "Reject a call invitation with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2756, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/pin-conversation.mdx", - "navOrder": 551 + "status": "draft", + "sourceIndex": 3954, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx", + "navOrder": 670 }, { - "id": 1407, - "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", - "relativePath": "sdk/react-native/conversation/managing-conversations/mark-conversation", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation", - "title": "Mark or unmark a conversation", - "description": "Mark or unmark a conversation for the current account.", + "id": 2585, + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "relativePath": "sdk/react-native/calling/managing-calls/cancel-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "description": "Cancel a call invitation with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2757, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation.mdx", - "navOrder": 552 + "status": "draft", + "sourceIndex": 3955, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx", + "navOrder": 671 }, { - "id": 1408, - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-remark", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", - "title": "Set a conversation remark", - "description": "Set a remark for a conversation for the current account.", + "id": 2586, + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "relativePath": "sdk/react-native/calling/managing-calls/hang-up-call", + "sourcePath": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "Hang up a call", + "description": "Hang up a call with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2758, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-remark.mdx", - "navOrder": 553 + "status": "draft", + "sourceIndex": 3956, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx", + "navOrder": 672 }, { - "id": 1409, - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-extension", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", - "title": "Set conversation extra data", - "description": "Set the conversation extension string.", + "id": 2587, + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "relativePath": "sdk/react-native/calling/managing-calls/handle-call-events", + "sourcePath": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "description": "Listen for call events with OpenIM React Native SDK.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2759, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-extension.mdx", - "navOrder": 554 + "status": "draft", + "sourceIndex": 3957, + "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx", + "navOrder": 673 }, { - "id": 1410, - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-conversation-draft", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", - "title": "Set a conversation draft", - "description": "Save a draft for a conversation.", + "id": 2588, + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "relativePath": "sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending invitation", + "description": "Restore a pending call invitation.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2760, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-conversation-draft.mdx", - "navOrder": 555 + "status": "draft", + "sourceIndex": 3958, + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx", + "navOrder": 674 }, { - "id": 1411, - "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-message-receive-option", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", - "title": "Set conversation message reception", - "description": "Set the message reception option for a conversation.", + "id": 2589, + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "relativePath": "sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "description": "Get a call room by group ID.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2761, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-receive-option.mdx", - "navOrder": 556 + "status": "draft", + "sourceIndex": 3959, + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx", + "navOrder": 675 }, { - "id": 1412, - "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", - "relativePath": "sdk/react-native/conversation/managing-conversations/clear-group-mentions", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", - "title": "Reset group mention status", - "description": "Reset the mention status of a group conversation.", + "id": 2590, + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "relativePath": "sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get room credentials", + "description": "Get call credentials by room ID.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2762, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-group-mentions.mdx", - "navOrder": 557 + "status": "draft", + "sourceIndex": 3960, + "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx", + "navOrder": 676 }, { - "id": 1413, - "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", - "relativePath": "sdk/react-native/conversation/managing-conversations/mark-conversation-read", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", - "title": "Mark a conversation as read", - "description": "Mark a conversation as read for the current account.", + "id": 2591, + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "relativePath": "sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "sourcePath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "description": "Send a custom signal in a call room.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2763, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/mark-conversation-read.mdx", - "navOrder": 558 + "status": "draft", + "sourceIndex": 3961, + "contentFile": "content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx", + "navOrder": 677 }, { - "id": 1414, - "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", - "relativePath": "sdk/react-native/conversation/managing-conversations/get-total-unread-count", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", - "title": "Track the total unread count", - "description": "Get the total unread message count across the current account's conversations.", + "id": 2592, + "path": "/sdk/react-native/events/overview-events", + "relativePath": "sdk/react-native/events/overview-events", + "sourcePath": "/sdk/react-native/events/overview-events", + "title": "Events overview", + "description": "OpenIM React Native SDK guide for Events overview.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2764, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/get-total-unread-count.mdx", - "navOrder": 559 + "status": "draft", + "sourceIndex": 3962, + "contentFile": "content/docs/chat/sdk/react-native/events/overview-events.mdx", + "navOrder": 678 }, { - "id": 1415, - "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-private-chat", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-private-chat", - "title": "Enable or disable burn after reading", - "description": "Enable or disable burn after reading for a conversation.", + "id": 2593, + "path": "/sdk/react-native/logger", + "relativePath": "sdk/react-native/logger", + "sourcePath": "/sdk/react-native/logger", + "title": "Logging", + "description": "OpenIM React Native SDK guide for Logging.", "product": "sdk", "version": "v4", "platform": "react-native", "contextKey": "chat/sdk/react-native", "contextTitle": "SDKs · React Native · v4", "template": "guide", - "status": "published", - "sourceIndex": 2765, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-private-chat.mdx", - "navOrder": 560 + "status": "draft", + "sourceIndex": 3963, + "contentFile": "content/docs/chat/sdk/react-native/logger.mdx", + "navOrder": 679 }, { - "id": 1416, - "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-burn-duration", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", - "title": "Set the burn duration", - "description": "Set the burn-after-reading duration for a conversation.", + "id": 387, + "path": "/sdk/electron/getting-started/authenticate-and-init", + "relativePath": "sdk/electron/getting-started/authenticate-and-init", + "sourcePath": "/sdk/electron/getting-started/authenticate-and-init", + "title": "Authenticate and initialize", + "description": "Use the Electron FFI initSDK, login, and unInitSDK methods to establish a session, and understand how their parameters differ from WASM login.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": "electron", + "contextKey": "chat/sdk/electron", + "contextTitle": "SDKs · Electron · v4", "template": "guide", "status": "published", - "sourceIndex": 2766, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-burn-duration.mdx", - "navOrder": 561 + "sourceIndex": 1702, + "contentFile": "content/docs/chat/sdk/electron/getting-started/authenticate-and-init.mdx", + "navOrder": 1702 }, { - "id": 1417, - "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", - "relativePath": "sdk/react-native/conversation/managing-conversations/set-message-destruct", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", - "title": "Schedule server message deletion", - "description": "Configure scheduled deletion of messages stored on the server.", + "id": 388, + "path": "/sdk/electron/message/create-media-from-full-path", + "relativePath": "sdk/electron/message/create-media-from-full-path", + "sourcePath": "/sdk/electron/message/create-media-from-full-path", + "title": "Create media messages from full paths", + "description": "Use the Electron FFI *FromFullPath APIs to create image, video, audio, and file messages from absolute local paths.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": "electron", + "contextKey": "chat/sdk/electron", + "contextTitle": "SDKs · Electron · v4", "template": "guide", "status": "published", - "sourceIndex": 2767, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/set-message-destruct.mdx", - "navOrder": 562 + "sourceIndex": 1703, + "contentFile": "content/docs/chat/sdk/electron/message/create-media-from-full-path.mdx", + "navOrder": 1703 }, { - "id": 1418, - "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", - "relativePath": "sdk/react-native/conversation/managing-conversations/hide-a-conversation", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", - "title": "Hide a conversation", - "description": "Hide a conversation from the current account's conversation list.", + "id": 386, + "path": "/sdk/electron/logger/upload-logs", + "relativePath": "sdk/electron/logger/upload-logs", + "sourcePath": "/sdk/electron/logger/upload-logs", + "title": "Upload logs", + "description": "Use the Electron FFI uploadLogs method to upload client diagnostic logs.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": "electron", + "contextKey": "chat/sdk/electron", + "contextTitle": "SDKs · Electron · v4", "template": "guide", "status": "published", - "sourceIndex": 2768, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-a-conversation.mdx", - "navOrder": 563 + "sourceIndex": 1704, + "contentFile": "content/docs/chat/sdk/electron/logger/upload-logs.mdx", + "navOrder": 1704 }, { - "id": 1419, - "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", - "relativePath": "sdk/react-native/conversation/managing-conversations/hide-all-conversations", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", - "title": "Hide all conversations", - "description": "Hide all conversations for the current account.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 389, + "path": "/platform-api/webhooks/overview", + "relativePath": "platform-api/webhooks/overview", + "sourcePath": "/platform-api/webhooks/overview", + "title": "Overview", + "description": "OpenIM Webhooks overview, including delivery behavior, configuration, protocol, and callback coverage.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "overview", "status": "published", - "sourceIndex": 2769, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/hide-all-conversations.mdx", - "navOrder": 564 + "sourceIndex": 780, + "contentFile": "content/docs/chat/platform-api/webhooks/overview.mdx", + "navOrder": 780 }, { - "id": 1420, - "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", - "relativePath": "sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", - "title": "Delete a conversation and its messages", - "description": "Delete a conversation and the current account's messages in it.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 390, + "path": "/platform-api/webhooks/user/before-user-register", + "relativePath": "platform-api/webhooks/user/before-user-register", + "sourcePath": "/platform-api/webhooks/user/before-user-register", + "title": "Before user registration", + "description": "Validate or adjust user profiles before registration.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2770, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages.mdx", - "navOrder": 565 + "sourceIndex": 780.01, + "contentFile": "content/docs/chat/platform-api/webhooks/user/before-user-register.mdx", + "navOrder": 780.01 }, { - "id": 1421, - "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", - "relativePath": "sdk/react-native/conversation/managing-conversations/clear-conversation-messages", - "sourcePath": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", - "title": "Clear messages in a conversation", - "description": "Clear the current account's messages in a conversation without deleting the conversation.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 391, + "path": "/platform-api/webhooks/user/after-user-register", + "relativePath": "platform-api/webhooks/user/after-user-register", + "sourcePath": "/platform-api/webhooks/user/after-user-register", + "title": "After user registration", + "description": "Synchronize user profiles after registration completes.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2771, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversations/clear-conversation-messages.mdx", - "navOrder": 566 + "sourceIndex": 780.0101, + "contentFile": "content/docs/chat/platform-api/webhooks/user/after-user-register.mdx", + "navOrder": 780.0101 }, { - "id": 1422, - "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", - "title": "Conversation group overview", - "description": "Learn about conversation groups in the OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 392, + "path": "/platform-api/webhooks/user/before-update-user-info", + "relativePath": "platform-api/webhooks/user/before-update-user-info", + "sourcePath": "/platform-api/webhooks/user/before-update-user-info", + "title": "Before updating user information", + "description": "Validate or adjust nickname, avatar, and extension data before a user profile update.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2772, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups.mdx", - "navOrder": 567 + "sourceIndex": 780.0102, + "contentFile": "content/docs/chat/platform-api/webhooks/user/before-update-user-info.mdx", + "navOrder": 780.0102 }, { - "id": 1423, - "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", - "title": "Create a conversation group", - "description": "Create a conversation group for the current account.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 393, + "path": "/platform-api/webhooks/user/after-update-user-info", + "relativePath": "platform-api/webhooks/user/after-update-user-info", + "sourcePath": "/platform-api/webhooks/user/after-update-user-info", + "title": "After updating user information", + "description": "Synchronize nickname, avatar, and extension changes after a profile update.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2773, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group.mdx", - "navOrder": 568 - }, - { - "id": 1424, - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", - "title": "Get conversation groups", - "description": "Query the current account's conversation groups by type.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "published", - "sourceIndex": 2774, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups.mdx", - "navOrder": 569 + "sourceIndex": 780.0103, + "contentFile": "content/docs/chat/platform-api/webhooks/user/after-update-user-info.mdx", + "navOrder": 780.0103 }, { - "id": 1425, - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", - "title": "Get conversations in a group", - "description": "Query a conversation group and its paginated conversations.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 394, + "path": "/platform-api/webhooks/user/before-update-user-info-ex", + "relativePath": "platform-api/webhooks/user/before-update-user-info-ex", + "sourcePath": "/platform-api/webhooks/user/before-update-user-info-ex", + "title": "Before updating selected user fields", + "description": "Validate or adjust optional user profile fields before an update.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2775, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx", - "navOrder": 570 + "sourceIndex": 780.0104, + "contentFile": "content/docs/chat/platform-api/webhooks/user/before-update-user-info-ex.mdx", + "navOrder": 780.0104 }, { - "id": 1426, - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", - "title": "Get groups for a conversation", - "description": "Query the conversation groups that contain a conversation.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 395, + "path": "/platform-api/webhooks/user/after-update-user-info-ex", + "relativePath": "platform-api/webhooks/user/after-update-user-info-ex", + "sourcePath": "/platform-api/webhooks/user/after-update-user-info-ex", + "title": "After updating selected user fields", + "description": "Synchronize optional user profile fields after an update completes.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2776, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id.mdx", - "navOrder": 571 + "sourceIndex": 780.0105, + "contentFile": "content/docs/chat/platform-api/webhooks/user/after-update-user-info-ex.mdx", + "navOrder": 780.0105 }, { - "id": 1427, - "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", - "title": "Update a conversation group", - "description": "Update an existing conversation group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 396, + "path": "/platform-api/webhooks/relation/before-add-friend", + "relativePath": "platform-api/webhooks/relation/before-add-friend", + "sourcePath": "/platform-api/webhooks/relation/before-add-friend", + "title": "Before adding a friend", + "description": "Validate a friend request before it is created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2777, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group.mdx", - "navOrder": 572 + "sourceIndex": 780.02, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-add-friend.mdx", + "navOrder": 780.02 }, { - "id": 1428, - "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", - "title": "Reorder conversation groups", - "description": "Batch-update the sort values of conversation groups.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 397, + "path": "/platform-api/webhooks/relation/after-add-friend", + "relativePath": "platform-api/webhooks/relation/after-add-friend", + "sourcePath": "/platform-api/webhooks/relation/after-add-friend", + "title": "After adding a friend", + "description": "Synchronize a newly created friend request.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2778, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order.mdx", - "navOrder": 573 + "sourceIndex": 780.0201, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-add-friend.mdx", + "navOrder": 780.0201 }, { - "id": 1429, - "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", - "title": "Add conversations to groups", - "description": "Add one or more conversations to conversation groups.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 398, + "path": "/platform-api/webhooks/relation/before-add-friend-agree", + "relativePath": "platform-api/webhooks/relation/before-add-friend-agree", + "sourcePath": "/platform-api/webhooks/relation/before-add-friend-agree", + "title": "Before accepting a friend request", + "description": "Validate a friend-request acceptance.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2779, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups.mdx", - "navOrder": 574 + "sourceIndex": 780.0202, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-add-friend-agree.mdx", + "navOrder": 780.0202 }, { - "id": 1430, - "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", - "title": "Remove conversations from groups", - "description": "Remove one or more conversations from conversation groups.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 399, + "path": "/platform-api/webhooks/relation/after-add-friend-agree", + "relativePath": "platform-api/webhooks/relation/after-add-friend-agree", + "sourcePath": "/platform-api/webhooks/relation/after-add-friend-agree", + "title": "After accepting a friend request", + "description": "Synchronize a newly established friendship.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2780, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx", - "navOrder": 575 + "sourceIndex": 780.0203, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-add-friend-agree.mdx", + "navOrder": 780.0203 }, { - "id": 1431, - "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", - "relativePath": "sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", - "sourcePath": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", - "title": "Delete a conversation group", - "description": "Delete a conversation group and its conversation membership.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", + "id": 400, + "path": "/platform-api/webhooks/relation/after-delete-friend", + "relativePath": "platform-api/webhooks/relation/after-delete-friend", + "sourcePath": "/platform-api/webhooks/relation/after-delete-friend", + "title": "After deleting a friend", + "description": "Synchronize a deleted friendship.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", "status": "published", - "sourceIndex": 2781, - "contentFile": "content/docs/chat/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group.mdx", - "navOrder": 576 + "sourceIndex": 780.0204, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-delete-friend.mdx", + "navOrder": 780.0204 }, { - "id": 1432, - "path": "/sdk/react-native/group/overview-group", - "relativePath": "sdk/react-native/group/overview-group", - "sourcePath": "/sdk/react-native/group/overview-group", - "title": "Group overview", - "description": "OpenIM React Native SDK guide for group overview.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2782, - "contentFile": "content/docs/chat/sdk/react-native/group/overview-group.mdx", - "navOrder": 577 + "id": 401, + "path": "/platform-api/webhooks/relation/before-set-friend-remark", + "relativePath": "platform-api/webhooks/relation/before-set-friend-remark", + "sourcePath": "/platform-api/webhooks/relation/before-set-friend-remark", + "title": "Before setting a friend remark", + "description": "Validate or replace a friend remark.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0205, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-set-friend-remark.mdx", + "navOrder": 780.0205 }, { - "id": 1433, - "path": "/sdk/react-native/group/create-group", - "relativePath": "sdk/react-native/group/create-group", - "sourcePath": "/sdk/react-native/group/create-group", - "title": "Create a group", - "description": "OpenIM React Native SDK guide for create a group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2783, - "contentFile": "content/docs/chat/sdk/react-native/group/create-group.mdx", - "navOrder": 578 - }, - { - "id": 1434, - "path": "/sdk/react-native/group/update-group-profile", - "relativePath": "sdk/react-native/group/update-group-profile", - "sourcePath": "/sdk/react-native/group/update-group-profile", - "title": "Update group profile", - "description": "OpenIM React Native SDK guide for update group profile.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2784, - "contentFile": "content/docs/chat/sdk/react-native/group/update-group-profile.mdx", - "navOrder": 579 + "id": 402, + "path": "/platform-api/webhooks/relation/after-set-friend-remark", + "relativePath": "platform-api/webhooks/relation/after-set-friend-remark", + "sourcePath": "/platform-api/webhooks/relation/after-set-friend-remark", + "title": "After setting a friend remark", + "description": "Synchronize an updated friend remark.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0206, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-set-friend-remark.mdx", + "navOrder": 780.0206 }, { - "id": 1435, - "path": "/sdk/react-native/group/set-group-announcement", - "relativePath": "sdk/react-native/group/set-group-announcement", - "sourcePath": "/sdk/react-native/group/set-group-announcement", - "title": "Publish a group announcement", - "description": "OpenIM React Native SDK guide for publish a group announcement.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2785, - "contentFile": "content/docs/chat/sdk/react-native/group/set-group-announcement.mdx", - "navOrder": 580 + "id": 403, + "path": "/platform-api/webhooks/relation/before-add-black", + "relativePath": "platform-api/webhooks/relation/before-add-black", + "sourcePath": "/platform-api/webhooks/relation/before-add-black", + "title": "Before adding to the blacklist", + "description": "Validate a blacklist addition.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0207, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-add-black.mdx", + "navOrder": 780.0207 }, { - "id": 1436, - "path": "/sdk/react-native/group/set-group-extension", - "relativePath": "sdk/react-native/group/set-group-extension", - "sourcePath": "/sdk/react-native/group/set-group-extension", - "title": "Set group extra data", - "description": "OpenIM React Native SDK guide for set group extra data.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2786, - "contentFile": "content/docs/chat/sdk/react-native/group/set-group-extension.mdx", - "navOrder": 581 + "id": 404, + "path": "/platform-api/webhooks/relation/after-remove-black", + "relativePath": "platform-api/webhooks/relation/after-remove-black", + "sourcePath": "/platform-api/webhooks/relation/after-remove-black", + "title": "After removing from the blacklist", + "description": "Synchronize a blacklist removal.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0208, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-remove-black.mdx", + "navOrder": 780.0208 }, { - "id": 1437, - "path": "/sdk/react-native/group/set-group-join-verification", - "relativePath": "sdk/react-native/group/set-group-join-verification", - "sourcePath": "/sdk/react-native/group/set-group-join-verification", - "title": "Set group join verification", - "description": "OpenIM React Native SDK guide for set group join verification.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2787, - "contentFile": "content/docs/chat/sdk/react-native/group/set-group-join-verification.mdx", - "navOrder": 582 + "id": 405, + "path": "/platform-api/webhooks/relation/before-import-friends", + "relativePath": "platform-api/webhooks/relation/before-import-friends", + "sourcePath": "/platform-api/webhooks/relation/before-import-friends", + "title": "Before importing friends", + "description": "Validate or filter a batch of friend IDs before import.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0209, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/before-import-friends.mdx", + "navOrder": 780.0209 }, { - "id": 1438, - "path": "/sdk/react-native/group/set-group-member-profile-access", - "relativePath": "sdk/react-native/group/set-group-member-profile-access", - "sourcePath": "/sdk/react-native/group/set-group-member-profile-access", - "title": "Set member profile access", - "description": "OpenIM React Native SDK guide for set member profile access.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2788, - "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-profile-access.mdx", - "navOrder": 583 + "id": 406, + "path": "/platform-api/webhooks/relation/after-import-friends", + "relativePath": "platform-api/webhooks/relation/after-import-friends", + "sourcePath": "/platform-api/webhooks/relation/after-import-friends", + "title": "After importing friends", + "description": "Synchronize the result of a friend import.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.021, + "contentFile": "content/docs/chat/platform-api/webhooks/relation/after-import-friends.mdx", + "navOrder": 780.021 }, { - "id": 1439, - "path": "/sdk/react-native/group/set-group-member-friend-permission", - "relativePath": "sdk/react-native/group/set-group-member-friend-permission", - "sourcePath": "/sdk/react-native/group/set-group-member-friend-permission", - "title": "Set member friend request permission", - "description": "OpenIM React Native SDK guide for set member friend request permission.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2789, - "contentFile": "content/docs/chat/sdk/react-native/group/set-group-member-friend-permission.mdx", - "navOrder": 584 + "id": 407, + "path": "/platform-api/webhooks/group/before-create-group", + "relativePath": "platform-api/webhooks/group/before-create-group", + "sourcePath": "/platform-api/webhooks/group/before-create-group", + "title": "Before creating a group", + "description": "Validate or adjust group information and initial members before a group is created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.03, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-create-group.mdx", + "navOrder": 780.03 }, { - "id": 1440, - "path": "/sdk/react-native/group/change-group-mute", - "relativePath": "sdk/react-native/group/change-group-mute", - "sourcePath": "/sdk/react-native/group/change-group-mute", - "title": "Change group mute status", - "description": "OpenIM React Native SDK guide for change group mute status.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2790, - "contentFile": "content/docs/chat/sdk/react-native/group/change-group-mute.mdx", - "navOrder": 585 + "id": 408, + "path": "/platform-api/webhooks/group/after-create-group", + "relativePath": "platform-api/webhooks/group/after-create-group", + "sourcePath": "/platform-api/webhooks/group/after-create-group", + "title": "After creating a group", + "description": "Synchronize group information and initial members after a group is created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0301, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-create-group.mdx", + "navOrder": 780.0301 }, { - "id": 1441, - "path": "/sdk/react-native/group/join-group", - "relativePath": "sdk/react-native/group/join-group", - "sourcePath": "/sdk/react-native/group/join-group", - "title": "Apply to join a group", - "description": "OpenIM React Native SDK guide for apply to join a group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2791, - "contentFile": "content/docs/chat/sdk/react-native/group/join-group.mdx", - "navOrder": 586 + "id": 409, + "path": "/platform-api/webhooks/group/before-member-join-group", + "relativePath": "platform-api/webhooks/group/before-member-join-group", + "sourcePath": "/platform-api/webhooks/group/before-member-join-group", + "title": "Before members join a group", + "description": "Validate or adjust member profiles before users become group members.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0302, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-member-join-group.mdx", + "navOrder": 780.0302 }, { - "id": 1442, - "path": "/sdk/react-native/group/quit-group", - "relativePath": "sdk/react-native/group/quit-group", - "sourcePath": "/sdk/react-native/group/quit-group", - "title": "Leave a group", - "description": "OpenIM React Native SDK guide for leave a group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2792, - "contentFile": "content/docs/chat/sdk/react-native/group/quit-group.mdx", - "navOrder": 587 - }, - { - "id": 1443, - "path": "/sdk/react-native/group/dismiss-group", - "relativePath": "sdk/react-native/group/dismiss-group", - "sourcePath": "/sdk/react-native/group/dismiss-group", - "title": "Dismiss a group", - "description": "OpenIM React Native SDK guide for dismiss a group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2793, - "contentFile": "content/docs/chat/sdk/react-native/group/dismiss-group.mdx", - "navOrder": 588 + "id": 410, + "path": "/platform-api/webhooks/group/before-invite-user-to-group", + "relativePath": "platform-api/webhooks/group/before-invite-user-to-group", + "sourcePath": "/platform-api/webhooks/group/before-invite-user-to-group", + "title": "Before inviting users to a group", + "description": "Validate a group invitation and optionally refuse individual invitees.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0303, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-invite-user-to-group.mdx", + "navOrder": 780.0303 }, { - "id": 1444, - "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", - "relativePath": "sdk/react-native/group/retrieving-groups/get-specified-groups-info", - "sourcePath": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", - "title": "Get group information", - "description": "OpenIM React Native SDK guide for get group information.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2794, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-specified-groups-info.mdx", - "navOrder": 589 + "id": 411, + "path": "/platform-api/webhooks/group/before-apply-join-group", + "relativePath": "platform-api/webhooks/group/before-apply-join-group", + "sourcePath": "/platform-api/webhooks/group/before-apply-join-group", + "title": "Before applying to join a group", + "description": "Run authorization or risk checks before a group join application is created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0304, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-apply-join-group.mdx", + "navOrder": 780.0304 }, { - "id": 1445, - "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", - "relativePath": "sdk/react-native/group/retrieving-groups/get-joined-group-list", - "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", - "title": "Get joined groups", - "description": "OpenIM React Native SDK guide for get joined groups.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2795, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list.mdx", - "navOrder": 590 + "id": 412, + "path": "/platform-api/webhooks/group/after-join-group", + "relativePath": "platform-api/webhooks/group/after-join-group", + "sourcePath": "/platform-api/webhooks/group/after-join-group", + "title": "After joining a group", + "description": "Synchronize membership changes after a user joins a group.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0305, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-join-group.mdx", + "navOrder": 780.0305 }, { - "id": 1446, - "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", - "relativePath": "sdk/react-native/group/retrieving-groups/get-joined-group-list-page", - "sourcePath": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", - "title": "Get joined groups by page", - "description": "OpenIM React Native SDK guide for get joined groups by page.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2796, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/get-joined-group-list-page.mdx", - "navOrder": 591 + "id": 413, + "path": "/platform-api/webhooks/group/after-quit-group", + "relativePath": "platform-api/webhooks/group/after-quit-group", + "sourcePath": "/platform-api/webhooks/group/after-quit-group", + "title": "After leaving a group", + "description": "Synchronize membership changes after a user leaves a group.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0306, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-quit-group.mdx", + "navOrder": 780.0306 }, { - "id": 1447, - "path": "/sdk/react-native/group/retrieving-groups/is-join-group", - "relativePath": "sdk/react-native/group/retrieving-groups/is-join-group", - "sourcePath": "/sdk/react-native/group/retrieving-groups/is-join-group", - "title": "Check group membership", - "description": "OpenIM React Native SDK guide for check group membership.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2797, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/is-join-group.mdx", - "navOrder": 592 + "id": 414, + "path": "/platform-api/webhooks/group/after-kick-group-member", + "relativePath": "platform-api/webhooks/group/after-kick-group-member", + "sourcePath": "/platform-api/webhooks/group/after-kick-group-member", + "title": "After removing group members", + "description": "Synchronize membership changes after members are removed from a group.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0307, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-kick-group-member.mdx", + "navOrder": 780.0307 }, { - "id": 1448, - "path": "/sdk/react-native/group/retrieving-groups/search-groups", - "relativePath": "sdk/react-native/group/retrieving-groups/search-groups", - "sourcePath": "/sdk/react-native/group/retrieving-groups/search-groups", - "title": "Search groups", - "description": "OpenIM React Native SDK guide for search groups.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2798, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-groups/search-groups.mdx", - "navOrder": 593 + "id": 415, + "path": "/platform-api/webhooks/group/after-dismiss-group", + "relativePath": "platform-api/webhooks/group/after-dismiss-group", + "sourcePath": "/platform-api/webhooks/group/after-dismiss-group", + "title": "After dismissing a group", + "description": "Synchronize group state after a group is dismissed.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0308, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-dismiss-group.mdx", + "navOrder": 780.0308 }, { - "id": 1449, - "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", - "relativePath": "sdk/react-native/group/group-applications/get-group-application-list-as-recipient", - "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", - "title": "Get received group applications", - "description": "OpenIM React Native SDK guide for get received group applications.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2799, - "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-recipient.mdx", - "navOrder": 594 + "id": 416, + "path": "/platform-api/webhooks/group/after-transfer-group-owner", + "relativePath": "platform-api/webhooks/group/after-transfer-group-owner", + "sourcePath": "/platform-api/webhooks/group/after-transfer-group-owner", + "title": "After transferring group ownership", + "description": "Synchronize the owner change after group ownership is transferred.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0309, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-transfer-group-owner.mdx", + "navOrder": 780.0309 }, { - "id": 1450, - "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", - "relativePath": "sdk/react-native/group/group-applications/get-group-application-list-as-applicant", - "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", - "title": "Get sent group applications", - "description": "OpenIM React Native SDK guide for get sent group applications.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2800, - "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-list-as-applicant.mdx", - "navOrder": 595 + "id": 417, + "path": "/platform-api/webhooks/group/before-set-group-member-info", + "relativePath": "platform-api/webhooks/group/before-set-group-member-info", + "sourcePath": "/platform-api/webhooks/group/before-set-group-member-info", + "title": "Before updating group member information", + "description": "Validate or adjust fields before a group member profile is updated.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.031, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-set-group-member-info.mdx", + "navOrder": 780.031 }, { - "id": 1451, - "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", - "relativePath": "sdk/react-native/group/group-applications/get-group-application-unhandled-count", - "sourcePath": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", - "title": "Get pending group application count", - "description": "OpenIM React Native SDK guide for get pending group application count.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2801, - "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/get-group-application-unhandled-count.mdx", - "navOrder": 596 - }, - { - "id": 1452, - "path": "/sdk/react-native/group/group-applications/accept-group-application", - "relativePath": "sdk/react-native/group/group-applications/accept-group-application", - "sourcePath": "/sdk/react-native/group/group-applications/accept-group-application", - "title": "Accept a group application", - "description": "OpenIM React Native SDK guide for accept a group application.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2802, - "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/accept-group-application.mdx", - "navOrder": 597 + "id": 418, + "path": "/platform-api/webhooks/group/after-set-group-member-info", + "relativePath": "platform-api/webhooks/group/after-set-group-member-info", + "sourcePath": "/platform-api/webhooks/group/after-set-group-member-info", + "title": "After updating group member information", + "description": "Synchronize changes after a group member profile is updated.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0311, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-set-group-member-info.mdx", + "navOrder": 780.0311 }, { - "id": 1453, - "path": "/sdk/react-native/group/group-applications/refuse-group-application", - "relativePath": "sdk/react-native/group/group-applications/refuse-group-application", - "sourcePath": "/sdk/react-native/group/group-applications/refuse-group-application", - "title": "Reject a group application", - "description": "OpenIM React Native SDK guide for reject a group application.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2803, - "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/refuse-group-application.mdx", - "navOrder": 598 + "id": 419, + "path": "/platform-api/webhooks/group/before-set-group-info", + "relativePath": "platform-api/webhooks/group/before-set-group-info", + "sourcePath": "/platform-api/webhooks/group/before-set-group-info", + "title": "Before updating group information", + "description": "Validate or adjust group fields before group information is updated.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0312, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-set-group-info.mdx", + "navOrder": 780.0312 }, { - "id": 1454, - "path": "/sdk/react-native/group/group-applications/delete-group-requests", - "relativePath": "sdk/react-native/group/group-applications/delete-group-requests", - "sourcePath": "/sdk/react-native/group/group-applications/delete-group-requests", - "title": "Delete group applications", - "description": "OpenIM React Native SDK guide for delete group applications.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2804, - "contentFile": "content/docs/chat/sdk/react-native/group/group-applications/delete-group-requests.mdx", - "navOrder": 599 + "id": 420, + "path": "/platform-api/webhooks/group/after-set-group-info", + "relativePath": "platform-api/webhooks/group/after-set-group-info", + "sourcePath": "/platform-api/webhooks/group/after-set-group-info", + "title": "After updating group information", + "description": "Synchronize changes after group information is updated.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0313, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-set-group-info.mdx", + "navOrder": 780.0313 }, { - "id": 1455, - "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", - "relativePath": "sdk/react-native/group/retrieving-group-members/get-group-member-list", - "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", - "title": "Get group members", - "description": "OpenIM React Native SDK guide for get group members.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2805, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-group-member-list.mdx", - "navOrder": 600 + "id": 421, + "path": "/platform-api/webhooks/group/before-set-group-info-ex", + "relativePath": "platform-api/webhooks/group/before-set-group-info-ex", + "sourcePath": "/platform-api/webhooks/group/before-set-group-info-ex", + "title": "Before updating selected group fields", + "description": "Validate or adjust the selected fields before a partial group update.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0314, + "contentFile": "content/docs/chat/platform-api/webhooks/group/before-set-group-info-ex.mdx", + "navOrder": 780.0314 }, { - "id": 1456, - "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", - "relativePath": "sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", - "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", - "title": "Get group member profiles", - "description": "OpenIM React Native SDK guide for get group member profiles.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2806, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info.mdx", - "navOrder": 601 + "id": 422, + "path": "/platform-api/webhooks/group/after-set-group-info-ex", + "relativePath": "platform-api/webhooks/group/after-set-group-info-ex", + "sourcePath": "/platform-api/webhooks/group/after-set-group-info-ex", + "title": "After updating selected group fields", + "description": "Synchronize changes after a partial group information update.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0315, + "contentFile": "content/docs/chat/platform-api/webhooks/group/after-set-group-info-ex.mdx", + "navOrder": 780.0315 }, { - "id": 1457, - "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", - "relativePath": "sdk/react-native/group/retrieving-group-members/get-users-in-group", - "sourcePath": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", - "title": "Check users in a group", - "description": "OpenIM React Native SDK guide for check users in a group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2807, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/get-users-in-group.mdx", - "navOrder": 602 + "id": 423, + "path": "/platform-api/webhooks/message/before-send-single-message", + "relativePath": "platform-api/webhooks/message/before-send-single-message", + "sourcePath": "/platform-api/webhooks/message/before-send-single-message", + "title": "Before sending a one-to-one message", + "description": "Review, reject, or inspect fields before a one-to-one message is sent.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.04, + "contentFile": "content/docs/chat/platform-api/webhooks/message/before-send-single-message.mdx", + "navOrder": 780.04 }, { - "id": 1458, - "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", - "relativePath": "sdk/react-native/group/retrieving-group-members/search-group-members", - "sourcePath": "/sdk/react-native/group/retrieving-group-members/search-group-members", - "title": "Search group members", - "description": "OpenIM React Native SDK guide for search group members.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2808, - "contentFile": "content/docs/chat/sdk/react-native/group/retrieving-group-members/search-group-members.mdx", - "navOrder": 603 + "id": 424, + "path": "/platform-api/webhooks/message/after-send-single-message", + "relativePath": "platform-api/webhooks/message/after-send-single-message", + "sourcePath": "/platform-api/webhooks/message/after-send-single-message", + "title": "After sending a one-to-one message", + "description": "Synchronize a message event after a one-to-one message is sent.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0401, + "contentFile": "content/docs/chat/platform-api/webhooks/message/after-send-single-message.mdx", + "navOrder": 780.0401 }, { - "id": 1459, - "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", - "relativePath": "sdk/react-native/group/managing-group-members/invite-user-to-group", - "sourcePath": "/sdk/react-native/group/managing-group-members/invite-user-to-group", - "title": "Invite users to a group", - "description": "OpenIM React Native SDK guide for invite users to a group.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2809, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/invite-user-to-group.mdx", - "navOrder": 604 + "id": 425, + "path": "/platform-api/webhooks/message/before-send-group-message", + "relativePath": "platform-api/webhooks/message/before-send-group-message", + "sourcePath": "/platform-api/webhooks/message/before-send-group-message", + "title": "Before sending a group message", + "description": "Review, reject, or inspect fields before a group message is sent.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0402, + "contentFile": "content/docs/chat/platform-api/webhooks/message/before-send-group-message.mdx", + "navOrder": 780.0402 }, { - "id": 1460, - "path": "/sdk/react-native/group/managing-group-members/kick-group-member", - "relativePath": "sdk/react-native/group/managing-group-members/kick-group-member", - "sourcePath": "/sdk/react-native/group/managing-group-members/kick-group-member", - "title": "Remove group members", - "description": "OpenIM React Native SDK guide for remove group members.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2810, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/kick-group-member.mdx", - "navOrder": 605 - }, - { - "id": 1461, - "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", - "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-nickname", - "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", - "title": "Update a group nickname", - "description": "OpenIM React Native SDK guide for update a group nickname.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2811, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-nickname.mdx", - "navOrder": 606 + "id": 426, + "path": "/platform-api/webhooks/message/after-send-group-message", + "relativePath": "platform-api/webhooks/message/after-send-group-message", + "sourcePath": "/platform-api/webhooks/message/after-send-group-message", + "title": "After sending a group message", + "description": "Synchronize a message event after a group message is sent.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0403, + "contentFile": "content/docs/chat/platform-api/webhooks/message/after-send-group-message.mdx", + "navOrder": 780.0403 }, { - "id": 1462, - "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", - "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-role-level", - "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", - "title": "Manage group administrators", - "description": "OpenIM React Native SDK guide for manage group administrators.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2812, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-role-level.mdx", - "navOrder": 607 + "id": 427, + "path": "/platform-api/webhooks/message/before-message-modify", + "relativePath": "platform-api/webhooks/message/before-message-modify", + "sourcePath": "/platform-api/webhooks/message/before-message-modify", + "title": "Before writing a message", + "description": "Adjust permitted message fields before the message is written.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0404, + "contentFile": "content/docs/chat/platform-api/webhooks/message/before-message-modify.mdx", + "navOrder": 780.0404 }, { - "id": 1463, - "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", - "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-avatar", - "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", - "title": "Update a group member avatar", - "description": "OpenIM React Native SDK guide for update a group member avatar.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2813, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-avatar.mdx", - "navOrder": 608 + "id": 428, + "path": "/platform-api/webhooks/message/after-single-message-read", + "relativePath": "platform-api/webhooks/message/after-single-message-read", + "sourcePath": "/platform-api/webhooks/message/after-single-message-read", + "title": "After one-to-one messages are read", + "description": "Synchronize read-state changes for one-to-one messages.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0405, + "contentFile": "content/docs/chat/platform-api/webhooks/message/after-single-message-read.mdx", + "navOrder": 780.0405 }, { - "id": 1464, - "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", - "relativePath": "sdk/react-native/group/managing-group-members/set-group-member-extension", - "sourcePath": "/sdk/react-native/group/managing-group-members/set-group-member-extension", - "title": "Set group member extra data", - "description": "OpenIM React Native SDK guide for set group member extra data.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2814, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/set-group-member-extension.mdx", - "navOrder": 609 + "id": 429, + "path": "/platform-api/webhooks/message/after-group-message-read", + "relativePath": "platform-api/webhooks/message/after-group-message-read", + "sourcePath": "/platform-api/webhooks/message/after-group-message-read", + "title": "After group messages are read", + "description": "Synchronize read-state changes for group messages.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0406, + "contentFile": "content/docs/chat/platform-api/webhooks/message/after-group-message-read.mdx", + "navOrder": 780.0406 }, { - "id": 1465, - "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", - "relativePath": "sdk/react-native/group/managing-group-members/transfer-group-owner", - "sourcePath": "/sdk/react-native/group/managing-group-members/transfer-group-owner", - "title": "Transfer group ownership", - "description": "OpenIM React Native SDK guide for transfer group ownership.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2815, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/transfer-group-owner.mdx", - "navOrder": 610 + "id": 430, + "path": "/platform-api/webhooks/message/after-revoke-message", + "relativePath": "platform-api/webhooks/message/after-revoke-message", + "sourcePath": "/platform-api/webhooks/message/after-revoke-message", + "title": "After revoking a message", + "description": "Synchronize a revoke event after a message is revoked.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0407, + "contentFile": "content/docs/chat/platform-api/webhooks/message/after-revoke-message.mdx", + "navOrder": 780.0407 }, { - "id": 1466, - "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", - "relativePath": "sdk/react-native/group/managing-group-members/change-group-member-mute", - "sourcePath": "/sdk/react-native/group/managing-group-members/change-group-member-mute", - "title": "Mute or unmute a group member", - "description": "OpenIM React Native SDK guide for mute or unmute a group member.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 2816, - "contentFile": "content/docs/chat/sdk/react-native/group/managing-group-members/change-group-member-mute.mdx", - "navOrder": 611 + "id": 431, + "path": "/platform-api/webhooks/push/before-online-push", + "relativePath": "platform-api/webhooks/push/before-online-push", + "sourcePath": "/platform-api/webhooks/push/before-online-push", + "title": "Before one-to-one online push", + "description": "Adjust target users or push policy before an online one-to-one push.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.05, + "contentFile": "content/docs/chat/platform-api/webhooks/push/before-online-push.mdx", + "navOrder": 780.05 }, { - "id": 2433, - "path": "/sdk/react-native/message/overview-message", - "relativePath": "sdk/react-native/message/overview-message", - "sourcePath": "/sdk/react-native/message/overview-message", - "title": "Message overview", - "description": "OpenIM React Native SDK guide for message overview.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3803, - "contentFile": "content/docs/chat/sdk/react-native/message/overview-message.mdx", - "navOrder": 612 + "id": 432, + "path": "/platform-api/webhooks/push/before-group-online-push", + "relativePath": "platform-api/webhooks/push/before-group-online-push", + "sourcePath": "/platform-api/webhooks/push/before-group-online-push", + "title": "Before group online push", + "description": "Adjust target users or push policy before an online group push.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0501, + "contentFile": "content/docs/chat/platform-api/webhooks/push/before-group-online-push.mdx", + "navOrder": 780.0501 }, { - "id": 2434, - "path": "/sdk/react-native/message/creating-messages/create-text-message", - "relativePath": "sdk/react-native/message/creating-messages/create-text-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-text-message", - "title": "Create a text message", - "description": "OpenIM React Native SDK guide for create a text message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3804, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-message.mdx", - "navOrder": 613 + "id": 433, + "path": "/platform-api/webhooks/push/before-offline-push", + "relativePath": "platform-api/webhooks/push/before-offline-push", + "sourcePath": "/platform-api/webhooks/push/before-offline-push", + "title": "Before offline push", + "description": "Adjust recipients and notification metadata before an offline push.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0502, + "contentFile": "content/docs/chat/platform-api/webhooks/push/before-offline-push.mdx", + "navOrder": 780.0502 }, { - "id": 2435, - "path": "/sdk/react-native/message/creating-messages/create-text-at-message", - "relativePath": "sdk/react-native/message/creating-messages/create-text-at-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-text-at-message", - "title": "Create an @ message", - "description": "OpenIM React Native SDK guide for create an @ message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3805, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-text-at-message.mdx", - "navOrder": 614 + "id": 434, + "path": "/platform-api/webhooks/push/after-user-online", + "relativePath": "platform-api/webhooks/push/after-user-online", + "sourcePath": "/platform-api/webhooks/push/after-user-online", + "title": "After a user comes online", + "description": "Synchronize presence after a user establishes an online connection.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0503, + "contentFile": "content/docs/chat/platform-api/webhooks/push/after-user-online.mdx", + "navOrder": 780.0503 }, { - "id": 2436, - "path": "/sdk/react-native/message/creating-messages/create-custom-message", - "relativePath": "sdk/react-native/message/creating-messages/create-custom-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-custom-message", - "title": "Create a custom message", - "description": "OpenIM React Native SDK guide for create a custom message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3806, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-custom-message.mdx", - "navOrder": 615 + "id": 435, + "path": "/platform-api/webhooks/push/after-user-offline", + "relativePath": "platform-api/webhooks/push/after-user-offline", + "sourcePath": "/platform-api/webhooks/push/after-user-offline", + "title": "After a user goes offline", + "description": "Synchronize presence after a user connection closes.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0504, + "contentFile": "content/docs/chat/platform-api/webhooks/push/after-user-offline.mdx", + "navOrder": 780.0504 }, { - "id": 2437, - "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", - "relativePath": "sdk/react-native/message/creating-messages/create-image-message-by-file", - "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-file", - "title": "Create an image message from a file", - "description": "OpenIM React Native SDK guide for create an image message from a file.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3807, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-file.mdx", - "navOrder": 616 + "id": 436, + "path": "/platform-api/webhooks/push/after-user-kick-off", + "relativePath": "platform-api/webhooks/push/after-user-kick-off", + "sourcePath": "/platform-api/webhooks/push/after-user-kick-off", + "title": "After a user is forced offline", + "description": "Synchronize connection state after a user is forced offline.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0505, + "contentFile": "content/docs/chat/platform-api/webhooks/push/after-user-kick-off.mdx", + "navOrder": 780.0505 }, { - "id": 2438, - "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", - "relativePath": "sdk/react-native/message/creating-messages/create-image-message-by-url", - "sourcePath": "/sdk/react-native/message/creating-messages/create-image-message-by-url", - "title": "Create an image message from a URL", - "description": "OpenIM React Native SDK guide for create an image message from a url.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3808, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-image-message-by-url.mdx", - "navOrder": 617 + "id": 437, + "path": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", + "relativePath": "platform-api/webhooks/conversation/before-create-single-chat-conversations", + "sourcePath": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", + "title": "Before creating one-to-one conversations", + "description": "Adjust default conversation properties before one-to-one conversations are first created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.06, + "contentFile": "content/docs/chat/platform-api/webhooks/conversation/before-create-single-chat-conversations.mdx", + "navOrder": 780.06, + "edition": "enterprise" }, { - "id": 2439, - "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", - "relativePath": "sdk/react-native/message/creating-messages/create-sound-message-by-file", - "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", - "title": "Create an audio message from a file", - "description": "OpenIM React Native SDK guide for create an audio message from a file.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3809, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-file.mdx", - "navOrder": 618 + "id": 438, + "path": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", + "relativePath": "platform-api/webhooks/conversation/after-create-single-chat-conversations", + "sourcePath": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", + "title": "After creating one-to-one conversations", + "description": "Synchronize complete conversation properties after one-to-one conversations are created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0601, + "contentFile": "content/docs/chat/platform-api/webhooks/conversation/after-create-single-chat-conversations.mdx", + "navOrder": 780.0601, + "edition": "enterprise" }, { - "id": 2440, - "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", - "relativePath": "sdk/react-native/message/creating-messages/create-sound-message-by-url", - "sourcePath": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", - "title": "Create an audio message from a URL", - "description": "OpenIM React Native SDK guide for create an audio message from a url.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3810, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-sound-message-by-url.mdx", - "navOrder": 619 + "id": 439, + "path": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", + "relativePath": "platform-api/webhooks/conversation/before-create-group-chat-conversations", + "sourcePath": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", + "title": "Before creating group conversations", + "description": "Adjust default conversation properties before group conversations are first created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0602, + "contentFile": "content/docs/chat/platform-api/webhooks/conversation/before-create-group-chat-conversations.mdx", + "navOrder": 780.0602, + "edition": "enterprise" }, { - "id": 2441, - "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", - "relativePath": "sdk/react-native/message/creating-messages/create-video-message-by-file", - "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-file", - "title": "Create a video message from files", - "description": "OpenIM React Native SDK guide for create a video message from files.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3811, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-file.mdx", - "navOrder": 620 + "id": 440, + "path": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", + "relativePath": "platform-api/webhooks/conversation/after-create-group-chat-conversations", + "sourcePath": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", + "title": "After creating group conversations", + "description": "Synchronize complete conversation properties after group conversations are created.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 780.0603, + "contentFile": "content/docs/chat/platform-api/webhooks/conversation/after-create-group-chat-conversations.mdx", + "navOrder": 780.0603, + "edition": "enterprise" }, { - "id": 2442, - "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", - "relativePath": "sdk/react-native/message/creating-messages/create-video-message-by-url", - "sourcePath": "/sdk/react-native/message/creating-messages/create-video-message-by-url", - "title": "Create a video message from URLs", - "description": "OpenIM React Native SDK guide for create a video message from urls.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3812, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-video-message-by-url.mdx", - "navOrder": 621 + "id": 441, + "path": "/platform-api/timer/overview", + "relativePath": "platform-api/timer/overview", + "sourcePath": "/platform-api/timer/overview", + "title": "Overview", + "description": "Overview of the OpenIM Enterprise timer-task service.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "overview", + "status": "published", + "sourceIndex": 750, + "contentFile": "content/docs/chat/platform-api/timer/overview.mdx", + "navOrder": 750, + "edition": "enterprise" }, { - "id": 2443, - "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", - "relativePath": "sdk/react-native/message/creating-messages/create-file-message-by-file", - "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-file", - "title": "Create a file message from a file", - "description": "OpenIM React Native SDK guide for create a file message from a file.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3813, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-file.mdx", - "navOrder": 622 + "id": 442, + "path": "/platform-api/meeting/overview", + "relativePath": "platform-api/meeting/overview", + "sourcePath": "/platform-api/meeting/overview", + "title": "Overview", + "description": "Overview of OpenIM Enterprise meetings, real-time calls, meeting chat, and recordings.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "overview", + "status": "published", + "sourceIndex": 770, + "contentFile": "content/docs/chat/platform-api/meeting/overview.mdx", + "navOrder": 770, + "edition": "enterprise" + }, + { + "id": 443, + "path": "/platform-api/user/account-governance/ban-user", + "relativePath": "platform-api/user/account-governance/ban-user", + "sourcePath": "/platform-api/user/account-governance/ban-user", + "title": "Ban users", + "description": "OpenIM Enterprise Platform API: ban specified users from continuing to use the service.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 624.101, + "contentFile": "content/docs/chat/platform-api/user/account-governance/ban-user.mdx", + "navOrder": 624.101, + "edition": "enterprise" + }, + { + "id": 444, + "path": "/platform-api/user/account-governance/unban-user", + "relativePath": "platform-api/user/account-governance/unban-user", + "sourcePath": "/platform-api/user/account-governance/unban-user", + "title": "Unban users", + "description": "OpenIM Enterprise Platform API: remove the ban from specified users.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 624.102, + "contentFile": "content/docs/chat/platform-api/user/account-governance/unban-user.mdx", + "navOrder": 624.102, + "edition": "enterprise" + }, + { + "id": 445, + "path": "/platform-api/user/account-governance/unregister-user", + "relativePath": "platform-api/user/account-governance/unregister-user", + "sourcePath": "/platform-api/user/account-governance/unregister-user", + "title": "Unregister users", + "description": "OpenIM Enterprise Platform API: unregister user accounts that no longer use the service.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 624.1030000000001, + "contentFile": "content/docs/chat/platform-api/user/account-governance/unregister-user.mdx", + "navOrder": 624.1030000000001, + "edition": "enterprise" + }, + { + "id": 446, + "path": "/platform-api/user/account-governance/list-disabled-users", + "relativePath": "platform-api/user/account-governance/list-disabled-users", + "sourcePath": "/platform-api/user/account-governance/list-disabled-users", + "title": "List disabled users", + "description": "OpenIM Enterprise Platform API: list disabled accounts by user, status, and pagination criteria.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 624.104, + "contentFile": "content/docs/chat/platform-api/user/account-governance/list-disabled-users.mdx", + "navOrder": 624.104, + "edition": "enterprise" + }, + { + "id": 447, + "path": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", + "relativePath": "platform-api/relation/managing-friend-requests/delete-sent-friend-requests", + "sourcePath": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", + "title": "Delete sent friend requests", + "description": "OpenIM Enterprise Platform API: delete friend requests sent by a specified user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 639.105, + "contentFile": "content/docs/chat/platform-api/relation/managing-friend-requests/delete-sent-friend-requests.mdx", + "navOrder": 639.105, + "edition": "enterprise" + }, + { + "id": 448, + "path": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", + "relativePath": "platform-api/relation/managing-friend-requests/delete-received-friend-requests", + "sourcePath": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", + "title": "Delete received friend requests", + "description": "OpenIM Enterprise Platform API: delete friend requests received by a specified user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 639.106, + "contentFile": "content/docs/chat/platform-api/relation/managing-friend-requests/delete-received-friend-requests.mdx", + "navOrder": 639.106, + "edition": "enterprise" + }, + { + "id": 449, + "path": "/platform-api/group/group-applications/get-group-application-badge-count", + "relativePath": "platform-api/group/group-applications/get-group-application-badge-count", + "sourcePath": "/platform-api/group/group-applications/get-group-application-badge-count", + "title": "Get the group application badge count", + "description": "OpenIM Enterprise Platform API: get the pending group-application badge count for a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 694.107, + "contentFile": "content/docs/chat/platform-api/group/group-applications/get-group-application-badge-count.mdx", + "navOrder": 694.107, + "edition": "enterprise" + }, + { + "id": 450, + "path": "/platform-api/group/group-applications/clear-group-application-badge-count", + "relativePath": "platform-api/group/group-applications/clear-group-application-badge-count", + "sourcePath": "/platform-api/group/group-applications/clear-group-application-badge-count", + "title": "Clear the group application badge count", + "description": "OpenIM Enterprise Platform API: clear the current group-application badge count for a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 694.1080000000001, + "contentFile": "content/docs/chat/platform-api/group/group-applications/clear-group-application-badge-count.mdx", + "navOrder": 694.1080000000001, + "edition": "enterprise" + }, + { + "id": 451, + "path": "/platform-api/group/group-applications/delete-user-group-requests", + "relativePath": "platform-api/group/group-applications/delete-user-group-requests", + "sourcePath": "/platform-api/group/group-applications/delete-user-group-requests", + "title": "Delete applications sent by a user", + "description": "OpenIM Enterprise Platform API: delete a user's applications to selected groups.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 694.109, + "contentFile": "content/docs/chat/platform-api/group/group-applications/delete-user-group-requests.mdx", + "navOrder": 694.109, + "edition": "enterprise" + }, + { + "id": 452, + "path": "/platform-api/group/group-applications/delete-group-received-requests", + "relativePath": "platform-api/group/group-applications/delete-group-received-requests", + "sourcePath": "/platform-api/group/group-applications/delete-group-received-requests", + "title": "Delete applications received by a group", + "description": "OpenIM Enterprise Platform API: delete selected applications received by a group.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 694.11, + "contentFile": "content/docs/chat/platform-api/group/group-applications/delete-group-received-requests.mdx", + "navOrder": 694.11, + "edition": "enterprise" + }, + { + "id": 453, + "path": "/platform-api/message/content-processing/translate-text", + "relativePath": "platform-api/message/content-processing/translate-text", + "sourcePath": "/platform-api/message/content-processing/translate-text", + "title": "Translate text", + "description": "OpenIM Enterprise Platform API: translate text and return the detected source language.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.111, + "contentFile": "content/docs/chat/platform-api/message/content-processing/translate-text.mdx", + "navOrder": 725.111, + "edition": "enterprise" + }, + { + "id": 454, + "path": "/platform-api/message/streaming-messages/append-stream-message", + "relativePath": "platform-api/message/streaming-messages/append-stream-message", + "sourcePath": "/platform-api/message/streaming-messages/append-stream-message", + "title": "Append stream-message packets", + "description": "OpenIM Enterprise Platform API: append indexed text packets to a stream message.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.112, + "contentFile": "content/docs/chat/platform-api/message/streaming-messages/append-stream-message.mdx", + "navOrder": 725.112, + "edition": "enterprise" + }, + { + "id": 455, + "path": "/platform-api/message/streaming-messages/put-stream-message", + "relativePath": "platform-api/message/streaming-messages/put-stream-message", + "sourcePath": "/platform-api/message/streaming-messages/put-stream-message", + "title": "Upload stream-message content", + "description": "OpenIM Enterprise Platform API: continuously upload UTF-8 content to a stream message over HTTP PUT.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.113, + "contentFile": "content/docs/chat/platform-api/message/streaming-messages/put-stream-message.mdx", + "navOrder": 725.113, + "edition": "enterprise" }, { - "id": 2444, - "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", - "relativePath": "sdk/react-native/message/creating-messages/create-file-message-by-url", - "sourcePath": "/sdk/react-native/message/creating-messages/create-file-message-by-url", - "title": "Create a file message from a URL", - "description": "OpenIM React Native SDK guide for create a file message from a url.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3814, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-file-message-by-url.mdx", - "navOrder": 623 + "id": 456, + "path": "/platform-api/message/read-status/mark-conversation-read", + "relativePath": "platform-api/message/read-status/mark-conversation-read", + "sourcePath": "/platform-api/message/read-status/mark-conversation-read", + "title": "Mark a conversation read through a Seq", + "description": "OpenIM Enterprise Platform API: advance a user's read position in a conversation to a message Seq.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.114, + "contentFile": "content/docs/chat/platform-api/message/read-status/mark-conversation-read.mdx", + "navOrder": 725.114, + "edition": "enterprise" }, { - "id": 2445, - "path": "/sdk/react-native/message/creating-messages/create-card-message", - "relativePath": "sdk/react-native/message/creating-messages/create-card-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-card-message", - "title": "Create a contact card message", - "description": "OpenIM React Native SDK guide for create a contact card message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3815, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-card-message.mdx", - "navOrder": 624 + "id": 457, + "path": "/platform-api/message/managing-messages/modify-message", + "relativePath": "platform-api/message/managing-messages/modify-message", + "sourcePath": "/platform-api/message/managing-messages/modify-message", + "title": "Modify a message", + "description": "Modify message content by conversation ID and Seq with the OpenIM Enterprise Platform API.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.115, + "contentFile": "content/docs/chat/platform-api/message/managing-messages/modify-message.mdx", + "navOrder": 725.115, + "edition": "enterprise" }, { - "id": 2446, - "path": "/sdk/react-native/message/creating-messages/create-location-message", - "relativePath": "sdk/react-native/message/creating-messages/create-location-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-location-message", - "title": "Create a location message", - "description": "OpenIM React Native SDK guide for create a location message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3816, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-location-message.mdx", - "navOrder": 625 + "id": 458, + "path": "/platform-api/message/unread-count/get-conversations-unread-count", + "relativePath": "platform-api/message/unread-count/get-conversations-unread-count", + "sourcePath": "/platform-api/message/unread-count/get-conversations-unread-count", + "title": "Get conversation unread counts", + "description": "OpenIM Enterprise Platform API: get a user's unread counts for selected conversations.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.116, + "contentFile": "content/docs/chat/platform-api/message/unread-count/get-conversations-unread-count.mdx", + "navOrder": 725.116, + "edition": "enterprise" }, { - "id": 2447, - "path": "/sdk/react-native/message/creating-messages/create-face-message", - "relativePath": "sdk/react-native/message/creating-messages/create-face-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-face-message", - "title": "Create an emoji message", - "description": "OpenIM React Native SDK guide for create an emoji message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3817, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-face-message.mdx", - "navOrder": 626 + "id": 459, + "path": "/platform-api/message/unread-count/clear-conversations-unread-count", + "relativePath": "platform-api/message/unread-count/clear-conversations-unread-count", + "sourcePath": "/platform-api/message/unread-count/clear-conversations-unread-count", + "title": "Clear conversation unread counts", + "description": "OpenIM Enterprise Platform API: clear a user's unread counts in selected conversations.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.1170000000001, + "contentFile": "content/docs/chat/platform-api/message/unread-count/clear-conversations-unread-count.mdx", + "navOrder": 725.1170000000001, + "edition": "enterprise" }, { - "id": 2448, - "path": "/sdk/react-native/message/creating-messages/create-quote-message", - "relativePath": "sdk/react-native/message/creating-messages/create-quote-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-quote-message", - "title": "Create a reply message", - "description": "OpenIM React Native SDK guide for create a reply message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3818, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-quote-message.mdx", - "navOrder": 627 + "id": 460, + "path": "/platform-api/message/unread-count/reset-conversation-unread", + "relativePath": "platform-api/message/unread-count/reset-conversation-unread", + "sourcePath": "/platform-api/message/unread-count/reset-conversation-unread", + "title": "Set a conversation unread count", + "description": "OpenIM Enterprise Platform API: set a target unread count for migration or state correction.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 725.118, + "contentFile": "content/docs/chat/platform-api/message/unread-count/reset-conversation-unread.mdx", + "navOrder": 725.118, + "edition": "enterprise" }, { - "id": 2449, - "path": "/sdk/react-native/message/creating-messages/create-markdown-message", - "relativePath": "sdk/react-native/message/creating-messages/create-markdown-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-markdown-message", - "title": "Create a Markdown message", - "description": "OpenIM React Native SDK guide for create a markdown message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3819, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-markdown-message.mdx", - "navOrder": 628 + "id": 461, + "path": "/platform-api/conversation/conversation-groups/create-conversation-group", + "relativePath": "platform-api/conversation/conversation-groups/create-conversation-group", + "sourcePath": "/platform-api/conversation/conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "OpenIM Enterprise Platform API: create a conversation group for a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.119, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/create-conversation-group.mdx", + "navOrder": 745.119, + "edition": "enterprise" + }, + { + "id": 462, + "path": "/platform-api/conversation/conversation-groups/update-conversation-group", + "relativePath": "platform-api/conversation/conversation-groups/update-conversation-group", + "sourcePath": "/platform-api/conversation/conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "OpenIM Enterprise Platform API: update a conversation group's name, extension data, or hidden state.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.12, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/update-conversation-group.mdx", + "navOrder": 745.12, + "edition": "enterprise" + }, + { + "id": 463, + "path": "/platform-api/conversation/conversation-groups/delete-conversation-group", + "relativePath": "platform-api/conversation/conversation-groups/delete-conversation-group", + "sourcePath": "/platform-api/conversation/conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "OpenIM Enterprise Platform API: delete a conversation group owned by a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.121, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/delete-conversation-group.mdx", + "navOrder": 745.121, + "edition": "enterprise" + }, + { + "id": 464, + "path": "/platform-api/conversation/conversation-groups/list-conversation-groups", + "relativePath": "platform-api/conversation/conversation-groups/list-conversation-groups", + "sourcePath": "/platform-api/conversation/conversation-groups/list-conversation-groups", + "title": "List conversation groups", + "description": "OpenIM Enterprise Platform API: get a user's conversation groups and synchronization version.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.1220000000001, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/list-conversation-groups.mdx", + "navOrder": 745.1220000000001, + "edition": "enterprise" }, { - "id": 2450, - "path": "/sdk/react-native/message/creating-messages/create-forward-message", - "relativePath": "sdk/react-native/message/creating-messages/create-forward-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-forward-message", - "title": "Create a forwarded message", - "description": "OpenIM React Native SDK guide for create a forwarded message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3820, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-forward-message.mdx", - "navOrder": 629 + "id": 465, + "path": "/platform-api/conversation/conversation-groups/set-conversation-group-order", + "relativePath": "platform-api/conversation/conversation-groups/set-conversation-group-order", + "sourcePath": "/platform-api/conversation/conversation-groups/set-conversation-group-order", + "title": "Set conversation group order", + "description": "OpenIM Enterprise Platform API: set the display order of a user's conversation groups.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.123, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/set-conversation-group-order.mdx", + "navOrder": 745.123, + "edition": "enterprise" }, { - "id": 2451, - "path": "/sdk/react-native/message/creating-messages/create-merger-message", - "relativePath": "sdk/react-native/message/creating-messages/create-merger-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-merger-message", - "title": "Create a merged forward message", - "description": "OpenIM React Native SDK guide for create a merged forward message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3821, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-merger-message.mdx", - "navOrder": 630 + "id": 466, + "path": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", + "relativePath": "platform-api/conversation/conversation-groups/add-conversations-to-groups", + "sourcePath": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "OpenIM Enterprise Platform API: add conversations to one or more conversation groups.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.124, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/add-conversations-to-groups.mdx", + "navOrder": 745.124, + "edition": "enterprise" }, { - "id": 2452, - "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", - "relativePath": "sdk/react-native/message/creating-messages/create-advanced-text-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-text-message", - "title": "Create a rich-text message", - "description": "OpenIM React Native SDK guide for create a rich-text message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3822, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-text-message.mdx", - "navOrder": 631 + "id": 467, + "path": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", + "relativePath": "platform-api/conversation/conversation-groups/remove-conversations-from-groups", + "sourcePath": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "OpenIM Enterprise Platform API: remove conversations from one or more conversation groups.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 745.125, + "contentFile": "content/docs/chat/platform-api/conversation/conversation-groups/remove-conversations-from-groups.mdx", + "navOrder": 745.125, + "edition": "enterprise" }, { - "id": 2453, - "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", - "relativePath": "sdk/react-native/message/creating-messages/create-advanced-quote-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", - "title": "Create a rich-text reply", - "description": "OpenIM React Native SDK guide for create a rich-text reply.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3823, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx", - "navOrder": 632 + "id": 468, + "path": "/platform-api/timer/managing-tasks/create-timer-task", + "relativePath": "platform-api/timer/managing-tasks/create-timer-task", + "sourcePath": "/platform-api/timer/managing-tasks/create-timer-task", + "title": "Create a timer task", + "description": "OpenIM Enterprise Platform API: schedule a task that invokes a business callback.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 750.026, + "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/create-timer-task.mdx", + "navOrder": 750.026, + "edition": "enterprise" }, { - "id": 2454, - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "relativePath": "sdk/react-native/message/creating-messages/create-targeted-group-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "Create a targeted group message", - "description": "OpenIM React Native SDK guide for create a targeted group message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3824, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx", - "navOrder": 633 + "id": 469, + "path": "/platform-api/timer/managing-tasks/update-timer-task", + "relativePath": "platform-api/timer/managing-tasks/update-timer-task", + "sourcePath": "/platform-api/timer/managing-tasks/update-timer-task", + "title": "Update a timer task", + "description": "OpenIM Enterprise Platform API: update timer execution, retry, category, and callback settings.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 750.027, + "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/update-timer-task.mdx", + "navOrder": 750.027, + "edition": "enterprise" }, { - "id": 2455, - "path": "/sdk/react-native/message/sending-messages/send-message", - "relativePath": "sdk/react-native/message/sending-messages/send-message", - "sourcePath": "/sdk/react-native/message/sending-messages/send-message", - "title": "Send a message", - "description": "OpenIM React Native SDK guide for send a message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3825, - "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx", - "navOrder": 634 + "id": 470, + "path": "/platform-api/timer/managing-tasks/delete-timer-task", + "relativePath": "platform-api/timer/managing-tasks/delete-timer-task", + "sourcePath": "/platform-api/timer/managing-tasks/delete-timer-task", + "title": "Delete a timer task", + "description": "OpenIM Enterprise Platform API: delete a specified timer task owned by a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 750.028, + "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/delete-timer-task.mdx", + "navOrder": 750.028, + "edition": "enterprise" }, { - "id": 2456, - "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", - "relativePath": "sdk/react-native/message/sending-messages/send-message-not-oss", - "sourcePath": "/sdk/react-native/message/sending-messages/send-message-not-oss", - "title": "Send an uploaded media message", - "description": "OpenIM React Native SDK guide for send an uploaded media message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3826, - "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx", - "navOrder": 635 + "id": 471, + "path": "/platform-api/timer/managing-tasks/get-timer-task", + "relativePath": "platform-api/timer/managing-tasks/get-timer-task", + "sourcePath": "/platform-api/timer/managing-tasks/get-timer-task", + "title": "Get a timer task", + "description": "OpenIM Enterprise Platform API: get a timer task by task and user ID.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 750.029, + "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/get-timer-task.mdx", + "navOrder": 750.029, + "edition": "enterprise" }, { - "id": 2457, - "path": "/sdk/react-native/message/receiving-messages/receive-messages", - "relativePath": "sdk/react-native/message/receiving-messages/receive-messages", - "sourcePath": "/sdk/react-native/message/receiving-messages/receive-messages", - "title": "Receive messages", - "description": "OpenIM React Native SDK guide for receive messages.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3827, - "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx", - "navOrder": 636 + "id": 472, + "path": "/platform-api/timer/managing-tasks/list-timer-tasks", + "relativePath": "platform-api/timer/managing-tasks/list-timer-tasks", + "sourcePath": "/platform-api/timer/managing-tasks/list-timer-tasks", + "title": "List timer tasks", + "description": "OpenIM Enterprise Platform API: list a user's timer tasks by category with pagination.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 750.03, + "contentFile": "content/docs/chat/platform-api/timer/managing-tasks/list-timer-tasks.mdx", + "navOrder": 750.03, + "edition": "enterprise" }, { - "id": 2458, - "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", - "relativePath": "sdk/react-native/message/receiving-messages/receive-custom-business-messages", - "sourcePath": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", - "title": "Receive custom business messages", - "description": "OpenIM React Native SDK guide for receive custom business messages.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3828, - "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx", - "navOrder": 637 + "id": 473, + "path": "/platform-api/meeting/meeting-management/book-meeting", + "relativePath": "platform-api/meeting/meeting-management/book-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/book-meeting", + "title": "Schedule a meeting", + "description": "OpenIM Enterprise Platform API: schedule a meeting for a future start time.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.031, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/book-meeting.mdx", + "navOrder": 770.031, + "edition": "enterprise" }, { - "id": 2459, - "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", - "relativePath": "sdk/react-native/message/retrieving-messages/load-older-messages", - "sourcePath": "/sdk/react-native/message/retrieving-messages/load-older-messages", - "title": "Load message history", - "description": "OpenIM React Native SDK guide for load message history.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3829, - "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx", - "navOrder": 638 + "id": 474, + "path": "/platform-api/meeting/meeting-management/create-immediate-meeting", + "relativePath": "platform-api/meeting/meeting-management/create-immediate-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/create-immediate-meeting", + "title": "Create an immediate meeting", + "description": "OpenIM Enterprise Platform API: create a meeting immediately and return real-time connection details.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.032, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/create-immediate-meeting.mdx", + "navOrder": 770.032, + "edition": "enterprise" }, { - "id": 2460, - "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", - "relativePath": "sdk/react-native/message/retrieving-messages/load-newer-messages", - "sourcePath": "/sdk/react-native/message/retrieving-messages/load-newer-messages", - "title": "Load message history in reverse", - "description": "OpenIM React Native SDK guide for load message history in reverse.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3830, - "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx", - "navOrder": 639 + "id": 475, + "path": "/platform-api/meeting/meeting-management/join-meeting", + "relativePath": "platform-api/meeting/meeting-management/join-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/join-meeting", + "title": "Join a meeting", + "description": "OpenIM Enterprise Platform API: validate a participant and meeting password, then issue connection details.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.033, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/join-meeting.mdx", + "navOrder": 770.033, + "edition": "enterprise" }, { - "id": 2461, - "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", - "relativePath": "sdk/react-native/message/retrieving-messages/find-messages-by-id", - "sourcePath": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", - "title": "Find messages by ID", - "description": "OpenIM React Native SDK guide for find messages by id.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3831, - "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx", - "navOrder": 640 + "id": 476, + "path": "/platform-api/meeting/meeting-management/get-meeting-token", + "relativePath": "platform-api/meeting/meeting-management/get-meeting-token", + "sourcePath": "/platform-api/meeting/meeting-management/get-meeting-token", + "title": "Get a meeting token", + "description": "OpenIM Enterprise Platform API: issue real-time meeting connection details for a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.034, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/get-meeting-token.mdx", + "navOrder": 770.034, + "edition": "enterprise" }, { - "id": 2462, - "path": "/sdk/react-native/message/retrieving-messages/load-message-context", - "relativePath": "sdk/react-native/message/retrieving-messages/load-message-context", - "sourcePath": "/sdk/react-native/message/retrieving-messages/load-message-context", - "title": "Load message context", - "description": "OpenIM React Native SDK guide for load message context.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3832, - "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx", - "navOrder": 641 + "id": 477, + "path": "/platform-api/meeting/meeting-management/update-meeting", + "relativePath": "platform-api/meeting/meeting-management/update-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/update-meeting", + "title": "Update a meeting", + "description": "OpenIM Enterprise Platform API: update selected meeting information, settings, and invitees.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.035, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/update-meeting.mdx", + "navOrder": 770.035, + "edition": "enterprise" }, { - "id": 2463, - "path": "/sdk/react-native/message/searching-messages/search-messages", - "relativePath": "sdk/react-native/message/searching-messages/search-messages", - "sourcePath": "/sdk/react-native/message/searching-messages/search-messages", - "title": "Search messages", - "description": "OpenIM React Native SDK guide for search messages.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3833, - "contentFile": "content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx", - "navOrder": 642 + "id": 478, + "path": "/platform-api/meeting/meeting-management/get-meeting", + "relativePath": "platform-api/meeting/meeting-management/get-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/get-meeting", + "title": "Get a meeting", + "description": "OpenIM Enterprise Platform API: get a meeting's details, settings, and recurrence information.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.036, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/get-meeting.mdx", + "navOrder": 770.036, + "edition": "enterprise" }, { - "id": 2464, - "path": "/sdk/react-native/message/composing-messages/update-typing-status", - "relativePath": "sdk/react-native/message/composing-messages/update-typing-status", - "sourcePath": "/sdk/react-native/message/composing-messages/update-typing-status", - "title": "Report typing status", - "description": "OpenIM React Native SDK guide for report typing status.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3834, - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx", - "navOrder": 643 + "id": 479, + "path": "/platform-api/meeting/meeting-management/list-meetings", + "relativePath": "platform-api/meeting/meeting-management/list-meetings", + "sourcePath": "/platform-api/meeting/meeting-management/list-meetings", + "title": "List a user's meetings", + "description": "OpenIM Enterprise Platform API: list meetings created or attended by a user, filtered by status.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.037, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/list-meetings.mdx", + "navOrder": 770.037, + "edition": "enterprise" + }, + { + "id": 480, + "path": "/platform-api/meeting/meeting-management/invite-meeting-users", + "relativePath": "platform-api/meeting/meeting-management/invite-meeting-users", + "sourcePath": "/platform-api/meeting/meeting-management/invite-meeting-users", + "title": "Invite users to a meeting", + "description": "OpenIM Enterprise Platform API: invite users to an existing meeting and return per-user results.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.038, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/invite-meeting-users.mdx", + "navOrder": 770.038, + "edition": "enterprise" }, { - "id": 2465, - "path": "/sdk/react-native/message/composing-messages/get-typing-status", - "relativePath": "sdk/react-native/message/composing-messages/get-typing-status", - "sourcePath": "/sdk/react-native/message/composing-messages/get-typing-status", - "title": "Get typing status", - "description": "OpenIM React Native SDK guide for get typing status.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3835, - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx", - "navOrder": 644 + "id": 481, + "path": "/platform-api/meeting/meeting-management/leave-meeting", + "relativePath": "platform-api/meeting/meeting-management/leave-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/leave-meeting", + "title": "Leave a meeting", + "description": "OpenIM Enterprise Platform API: remove a specified user's active participation in a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.039, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/leave-meeting.mdx", + "navOrder": 770.039, + "edition": "enterprise" }, { - "id": 2466, - "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", - "relativePath": "sdk/react-native/message/composing-messages/check-speech-to-text", - "sourcePath": "/sdk/react-native/message/composing-messages/check-speech-to-text", - "title": "Check audio transcription availability", - "description": "OpenIM React Native SDK guide for check audio transcription availability.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3836, - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx", - "navOrder": 646 + "id": 482, + "path": "/platform-api/meeting/meeting-management/end-meeting", + "relativePath": "platform-api/meeting/meeting-management/end-meeting", + "sourcePath": "/platform-api/meeting/meeting-management/end-meeting", + "title": "End or cancel a meeting", + "description": "OpenIM Enterprise Platform API: cancel a scheduled meeting or end an active meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.04, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/end-meeting.mdx", + "navOrder": 770.04, + "edition": "enterprise" }, { - "id": 2467, - "path": "/sdk/react-native/message/composing-messages/transcribe-audio", - "relativePath": "sdk/react-native/message/composing-messages/transcribe-audio", - "sourcePath": "/sdk/react-native/message/composing-messages/transcribe-audio", - "title": "Transcribe audio", - "description": "OpenIM React Native SDK guide for transcribe audio.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3837, - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx", - "navOrder": 647 + "id": 483, + "path": "/platform-api/meeting/meeting-management/get-user-related-meetings", + "relativePath": "platform-api/meeting/meeting-management/get-user-related-meetings", + "sourcePath": "/platform-api/meeting/meeting-management/get-user-related-meetings", + "title": "Get user-related meetings", + "description": "OpenIM Enterprise Platform API: list meetings related to a user by status and time range.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.041, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-management/get-user-related-meetings.mdx", + "navOrder": 770.041, + "edition": "enterprise" }, { - "id": 2468, - "path": "/sdk/react-native/message/composing-messages/save-local-transcript", - "relativePath": "sdk/react-native/message/composing-messages/save-local-transcript", - "sourcePath": "/sdk/react-native/message/composing-messages/save-local-transcript", - "title": "Save a local transcript", - "description": "OpenIM React Native SDK guide for save a local transcript.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3838, - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx", - "navOrder": 648 + "id": 484, + "path": "/platform-api/meeting/meeting-settings/set-personal-setting", + "relativePath": "platform-api/meeting/meeting-settings/set-personal-setting", + "sourcePath": "/platform-api/meeting/meeting-settings/set-personal-setting", + "title": "Set personal meeting preferences", + "description": "Set a user's camera and microphone preferences for joining a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.042, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/set-personal-setting.mdx", + "navOrder": 770.042, + "edition": "enterprise" }, { - "id": 2469, - "path": "/sdk/react-native/message/composing-messages/change-input-states", - "relativePath": "sdk/react-native/message/composing-messages/change-input-states", - "sourcePath": "/sdk/react-native/message/composing-messages/change-input-states", - "title": "Update input states", - "description": "OpenIM React Native SDK guide for update input states.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3839, - "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx", - "navOrder": 645 + "id": 485, + "path": "/platform-api/meeting/meeting-settings/get-personal-setting", + "relativePath": "platform-api/meeting/meeting-settings/get-personal-setting", + "sourcePath": "/platform-api/meeting/meeting-settings/get-personal-setting", + "title": "Get personal meeting preferences", + "description": "Get a user's camera and microphone preferences for a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.043, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/get-personal-setting.mdx", + "navOrder": 770.043, + "edition": "enterprise" }, { - "id": 2470, - "path": "/sdk/react-native/message/managing-messages/delete-local-message", - "relativePath": "sdk/react-native/message/managing-messages/delete-local-message", - "sourcePath": "/sdk/react-native/message/managing-messages/delete-local-message", - "title": "Delete a local message", - "description": "OpenIM React Native SDK guide for delete a local message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3840, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx", - "navOrder": 649 + "id": 486, + "path": "/platform-api/meeting/meeting-settings/operate-all-streams", + "relativePath": "platform-api/meeting/meeting-settings/operate-all-streams", + "sourcePath": "/platform-api/meeting/meeting-settings/operate-all-streams", + "title": "Control participant media streams", + "description": "Control camera and microphone state across meeting participants.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.044, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/operate-all-streams.mdx", + "navOrder": 770.044, + "edition": "enterprise" }, { - "id": 2471, - "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", - "relativePath": "sdk/react-native/message/managing-messages/delete-saved-messages", - "sourcePath": "/sdk/react-native/message/managing-messages/delete-saved-messages", - "title": "Delete messages in a batch", - "description": "OpenIM React Native SDK guide for delete messages in a batch.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3841, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx", - "navOrder": 650 + "id": 487, + "path": "/platform-api/meeting/meeting-settings/modify-participant-name", + "relativePath": "platform-api/meeting/meeting-settings/modify-participant-name", + "sourcePath": "/platform-api/meeting/meeting-settings/modify-participant-name", + "title": "Modify a participant name", + "description": "Change a participant's display name within a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.045, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/modify-participant-name.mdx", + "navOrder": 770.045, + "edition": "enterprise" }, { - "id": 2472, - "path": "/sdk/react-native/message/managing-messages/delete-user-messages", - "relativePath": "sdk/react-native/message/managing-messages/delete-user-messages", - "sourcePath": "/sdk/react-native/message/managing-messages/delete-user-messages", - "title": "Delete all messages from a user in a group chat", - "description": "OpenIM React Native SDK guide for delete all messages from a user in a group chat.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3842, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx", - "navOrder": 651 + "id": 488, + "path": "/platform-api/meeting/meeting-settings/remove-participants", + "relativePath": "platform-api/meeting/meeting-settings/remove-participants", + "sourcePath": "/platform-api/meeting/meeting-settings/remove-participants", + "title": "Remove meeting participants", + "description": "Remove selected participants from a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.046, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/remove-participants.mdx", + "navOrder": 770.046, + "edition": "enterprise" }, { - "id": 2473, - "path": "/sdk/react-native/message/managing-messages/revoke-a-message", - "relativePath": "sdk/react-native/message/managing-messages/revoke-a-message", - "sourcePath": "/sdk/react-native/message/managing-messages/revoke-a-message", - "title": "Revoke a message", - "description": "OpenIM React Native SDK guide for revoke a message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3843, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx", - "navOrder": 652 + "id": 489, + "path": "/platform-api/meeting/meeting-settings/set-meeting-host", + "relativePath": "platform-api/meeting/meeting-settings/set-meeting-host", + "sourcePath": "/platform-api/meeting/meeting-settings/set-meeting-host", + "title": "Set meeting hosts", + "description": "Set the host and co-hosts of a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.047, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/set-meeting-host.mdx", + "navOrder": 770.047, + "edition": "enterprise" }, { - "id": 2474, - "path": "/sdk/react-native/message/managing-messages/modify-a-message", - "relativePath": "sdk/react-native/message/managing-messages/modify-a-message", - "sourcePath": "/sdk/react-native/message/managing-messages/modify-a-message", - "title": "Modify a message", - "description": "OpenIM React Native SDK guide for modify a message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3844, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx", - "navOrder": 653 + "id": 490, + "path": "/platform-api/meeting/meeting-settings/clean-previous-meetings", + "relativePath": "platform-api/meeting/meeting-settings/clean-previous-meetings", + "sourcePath": "/platform-api/meeting/meeting-settings/clean-previous-meetings", + "title": "Clean previous meeting state", + "description": "Clear stale meeting connection state retained before a user logs in.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.048, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-settings/clean-previous-meetings.mdx", + "navOrder": 770.048, + "edition": "enterprise" }, { - "id": 2475, - "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", - "relativePath": "sdk/react-native/message/managing-messages/insert-local-single-message", - "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-single-message", - "title": "Insert a local one-to-one message", - "description": "OpenIM React Native SDK guide for insert a local one-to-one message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3845, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx", - "navOrder": 654 + "id": 491, + "path": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", + "relativePath": "platform-api/meeting/recurring-meetings/create-repeat-meeting", + "sourcePath": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", + "title": "Create a recurring meeting", + "description": "Create a recurrence rule and generate its first meeting instance.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.049, + "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/create-repeat-meeting.mdx", + "navOrder": 770.049, + "edition": "enterprise" }, { - "id": 2476, - "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", - "relativePath": "sdk/react-native/message/managing-messages/insert-local-group-message", - "sourcePath": "/sdk/react-native/message/managing-messages/insert-local-group-message", - "title": "Insert a local group message", - "description": "OpenIM React Native SDK guide for insert a local group message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3846, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx", - "navOrder": 655 + "id": 492, + "path": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", + "relativePath": "platform-api/meeting/recurring-meetings/update-repeat-meeting", + "sourcePath": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", + "title": "Update a recurring meeting", + "description": "Update a recurrence definition and its future meeting instances.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.05, + "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/update-repeat-meeting.mdx", + "navOrder": 770.05, + "edition": "enterprise" }, { - "id": 2477, - "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", - "relativePath": "sdk/react-native/message/managing-messages/clear-all-local-messages", - "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-local-messages", - "title": "Clear all local messages", - "description": "OpenIM React Native SDK guide for clear all local messages.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3847, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx", - "navOrder": 656 + "id": 493, + "path": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", + "relativePath": "platform-api/meeting/recurring-meetings/delete-repeat-meeting", + "sourcePath": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", + "title": "Delete a recurring meeting", + "description": "Delete a recurring meeting definition.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.051, + "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/delete-repeat-meeting.mdx", + "navOrder": 770.051, + "edition": "enterprise" }, { - "id": 2478, - "path": "/sdk/react-native/message/managing-messages/clear-all-messages", - "relativePath": "sdk/react-native/message/managing-messages/clear-all-messages", - "sourcePath": "/sdk/react-native/message/managing-messages/clear-all-messages", - "title": "Clear local and server messages", - "description": "OpenIM React Native SDK guide for clear local and server messages.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3848, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx", - "navOrder": 657 + "id": 494, + "path": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", + "relativePath": "platform-api/meeting/recurring-meetings/get-repeat-meeting", + "sourcePath": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", + "title": "Get a recurring meeting", + "description": "Get a recurring meeting definition and generation state.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.052, + "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/get-repeat-meeting.mdx", + "navOrder": 770.052, + "edition": "enterprise" }, { - "id": 2479, - "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", - "relativePath": "sdk/react-native/message/managing-messages/set-message-local-ex", - "sourcePath": "/sdk/react-native/message/managing-messages/set-message-local-ex", - "title": "Set a local message extension", - "description": "OpenIM React Native SDK guide for set a local message extension.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3849, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx", - "navOrder": 658 + "id": 495, + "path": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", + "relativePath": "platform-api/meeting/recurring-meetings/list-repeat-meetings", + "sourcePath": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", + "title": "List recurring meetings", + "description": "List recurring meeting definitions created by a user.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.053, + "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/list-repeat-meetings.mdx", + "navOrder": 770.053, + "edition": "enterprise" + }, + { + "id": 496, + "path": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", + "relativePath": "platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", + "sourcePath": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", + "title": "List recurring meeting instances", + "description": "List meeting instances generated for a recurring meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.054, + "contentFile": "content/docs/chat/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances.mdx", + "navOrder": 770.054, + "edition": "enterprise" }, { - "id": 2480, - "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", - "relativePath": "sdk/react-native/message/managing-read-status/send-group-read-receipts", - "sourcePath": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", - "title": "Report group messages as read", - "description": "OpenIM React Native SDK guide for report group messages as read.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3850, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx", - "navOrder": 659 + "id": 497, + "path": "/platform-api/meeting/meeting-records/get-user-meeting-histories", + "relativePath": "platform-api/meeting/meeting-records/get-user-meeting-histories", + "sourcePath": "/platform-api/meeting/meeting-records/get-user-meeting-histories", + "title": "Get a user's meeting history", + "description": "List a user's meeting attendance history by time, status, and pagination.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.055, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-user-meeting-histories.mdx", + "navOrder": 770.055, + "edition": "enterprise" }, { - "id": 2481, - "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", - "relativePath": "sdk/react-native/message/managing-read-status/get-group-message-readers", - "sourcePath": "/sdk/react-native/message/managing-read-status/get-group-message-readers", - "title": "Get members who read a group message", - "description": "OpenIM React Native SDK guide for get members who read a group message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3851, - "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx", - "navOrder": 660 + "id": 498, + "path": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", + "relativePath": "platform-api/meeting/meeting-records/get-user-hosted-meetings", + "sourcePath": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", + "title": "Get meetings hosted by a user", + "description": "List meetings hosted by a user by time range and pagination.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.056, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-user-hosted-meetings.mdx", + "navOrder": 770.056, + "edition": "enterprise" }, { - "id": 2482, - "path": "/sdk/react-native/file-uploads/upload-file", - "relativePath": "sdk/react-native/file-uploads/upload-file", - "sourcePath": "/sdk/react-native/file-uploads/upload-file", - "title": "Upload a file", - "description": "Upload a file independently and obtain its remote URL with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3852, - "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx", - "navOrder": 661 + "id": 499, + "path": "/platform-api/meeting/meeting-records/get-meeting-records", + "relativePath": "platform-api/meeting/meeting-records/get-meeting-records", + "sourcePath": "/platform-api/meeting/meeting-records/get-meeting-records", + "title": "Get meeting recordings", + "description": "List meeting recordings by host, participant, time range, and pagination.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.057, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-meeting-records.mdx", + "navOrder": 770.057, + "edition": "enterprise" }, { - "id": 2483, - "path": "/sdk/react-native/calling/overview-calling", - "relativePath": "sdk/react-native/calling/overview-calling", - "sourcePath": "/sdk/react-native/calling/overview-calling", - "title": "Audio and video calling overview", - "description": "OpenIM React Native SDK guide for audio and video calling.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3853, - "contentFile": "content/docs/chat/sdk/react-native/calling/overview-calling.mdx", - "navOrder": 662 + "id": 500, + "path": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", + "relativePath": "platform-api/meeting/meeting-records/get-records-by-meeting-ids", + "sourcePath": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", + "title": "Get recordings by meeting IDs", + "description": "Get recording records for selected meeting IDs.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.058, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-records-by-meeting-ids.mdx", + "navOrder": 770.058, + "edition": "enterprise" }, { - "id": 2484, - "path": "/sdk/react-native/calling/managing-calls/start-single-call", - "relativePath": "sdk/react-native/calling/managing-calls/start-single-call", - "sourcePath": "/sdk/react-native/calling/managing-calls/start-single-call", - "title": "Start a one-to-one call", - "description": "Start a one-to-one audio or video call with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3854, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx", - "navOrder": 663 + "id": 501, + "path": "/platform-api/meeting/meeting-records/get-meeting-attendance", + "relativePath": "platform-api/meeting/meeting-records/get-meeting-attendance", + "sourcePath": "/platform-api/meeting/meeting-records/get-meeting-attendance", + "title": "Get meeting attendance", + "description": "Get the users who attended or were absent from a meeting.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.059, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/get-meeting-attendance.mdx", + "navOrder": 770.059, + "edition": "enterprise" }, { - "id": 2485, - "path": "/sdk/react-native/calling/managing-calls/start-group-call", - "relativePath": "sdk/react-native/calling/managing-calls/start-group-call", - "sourcePath": "/sdk/react-native/calling/managing-calls/start-group-call", - "title": "Start a group call", - "description": "Start a group audio or video call with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3855, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx", - "navOrder": 664 + "id": 502, + "path": "/platform-api/meeting/meeting-records/delete-meeting-records", + "relativePath": "platform-api/meeting/meeting-records/delete-meeting-records", + "sourcePath": "/platform-api/meeting/meeting-records/delete-meeting-records", + "title": "Delete meeting recordings", + "description": "Delete recording records by meeting or real-time room ID.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.06, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-records/delete-meeting-records.mdx", + "navOrder": 770.06, + "edition": "enterprise" }, { - "id": 2486, - "path": "/sdk/react-native/calling/managing-calls/accept-call", - "relativePath": "sdk/react-native/calling/managing-calls/accept-call", - "sourcePath": "/sdk/react-native/calling/managing-calls/accept-call", - "title": "Accept a call", - "description": "Accept a call invitation with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3856, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx", - "navOrder": 665 + "id": 503, + "path": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", + "relativePath": "platform-api/meeting/meeting-signaling/get-room-by-group-id", + "sourcePath": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", + "title": "Get a call room by group ID", + "description": "Get the active real-time call room and participants associated with a group.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.061, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-room-by-group-id.mdx", + "navOrder": 770.061, + "edition": "enterprise" + }, + { + "id": 504, + "path": "/platform-api/meeting/meeting-signaling/get-signal-rooms", + "relativePath": "platform-api/meeting/meeting-signaling/get-signal-rooms", + "sourcePath": "/platform-api/meeting/meeting-signaling/get-signal-rooms", + "title": "Get call rooms", + "description": "Get multiple real-time call rooms by room ID.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.062, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-signal-rooms.mdx", + "navOrder": 770.062, + "edition": "enterprise" }, { - "id": 2487, - "path": "/sdk/react-native/calling/managing-calls/reject-call", - "relativePath": "sdk/react-native/calling/managing-calls/reject-call", - "sourcePath": "/sdk/react-native/calling/managing-calls/reject-call", - "title": "Reject a call", - "description": "Reject a call invitation with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3857, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx", - "navOrder": 666 + "id": 505, + "path": "/platform-api/meeting/meeting-signaling/get-signal-invitation", + "relativePath": "platform-api/meeting/meeting-signaling/get-signal-invitation", + "sourcePath": "/platform-api/meeting/meeting-signaling/get-signal-invitation", + "title": "Get a call invitation", + "description": "Get real-time call invitation and offline-push information for a room.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.063, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-signal-invitation.mdx", + "navOrder": 770.063, + "edition": "enterprise" }, { - "id": 2488, - "path": "/sdk/react-native/calling/managing-calls/cancel-call", - "relativePath": "sdk/react-native/calling/managing-calls/cancel-call", - "sourcePath": "/sdk/react-native/calling/managing-calls/cancel-call", - "title": "Cancel a call invitation", - "description": "Cancel a call invitation with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3858, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx", - "navOrder": 667 + "id": 506, + "path": "/platform-api/meeting/meeting-signaling/get-startup-invitation", + "relativePath": "platform-api/meeting/meeting-signaling/get-startup-invitation", + "sourcePath": "/platform-api/meeting/meeting-signaling/get-startup-invitation", + "title": "Get a startup call invitation", + "description": "Get a call invitation that a user must restore when the application starts.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.064, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-signaling/get-startup-invitation.mdx", + "navOrder": 770.064, + "edition": "enterprise" }, { - "id": 2489, - "path": "/sdk/react-native/calling/managing-calls/hang-up-call", - "relativePath": "sdk/react-native/calling/managing-calls/hang-up-call", - "sourcePath": "/sdk/react-native/calling/managing-calls/hang-up-call", - "title": "Hang up a call", - "description": "Hang up a call with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3859, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx", - "navOrder": 668 + "id": 507, + "path": "/platform-api/meeting/meeting-chat/send-meeting-chat", + "relativePath": "platform-api/meeting/meeting-chat/send-meeting-chat", + "sourcePath": "/platform-api/meeting/meeting-chat/send-meeting-chat", + "title": "Send a meeting chat message", + "description": "Send a broadcast or targeted message within a meeting room.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.065, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-chat/send-meeting-chat.mdx", + "navOrder": 770.065, + "edition": "enterprise" }, { - "id": 2490, - "path": "/sdk/react-native/calling/managing-calls/handle-call-events", - "relativePath": "sdk/react-native/calling/managing-calls/handle-call-events", - "sourcePath": "/sdk/react-native/calling/managing-calls/handle-call-events", - "title": "Handle call events", - "description": "Listen for call events with OpenIM React Native SDK.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3860, - "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx", - "navOrder": 669 + "id": 508, + "path": "/platform-api/meeting/meeting-chat/pull-meeting-chat", + "relativePath": "platform-api/meeting/meeting-chat/pull-meeting-chat", + "sourcePath": "/platform-api/meeting/meeting-chat/pull-meeting-chat", + "title": "Pull meeting chat messages", + "description": "Incrementally pull meeting chat messages by creation time and Seq.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.066, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-chat/pull-meeting-chat.mdx", + "navOrder": 770.066, + "edition": "enterprise" }, { - "id": 2491, - "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", - "relativePath": "sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", - "sourcePath": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", - "title": "Restore a pending invitation", - "description": "Restore a pending call invitation.", + "id": 509, + "path": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", + "relativePath": "platform-api/meeting/meeting-chat/revoke-meeting-chat", + "sourcePath": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", + "title": "Revoke a meeting chat message", + "description": "Revoke a meeting chat message by room and Seq.", + "product": "platform-api", + "version": "v3", + "platform": null, + "contextKey": "chat/platform-api", + "contextTitle": "Platform API", + "template": "api", + "status": "published", + "sourceIndex": 770.067, + "contentFile": "content/docs/chat/platform-api/meeting/meeting-chat/revoke-meeting-chat.mdx", + "navOrder": 770.067, + "edition": "enterprise" + }, + { + "id": 1351, + "path": "/sdk/error-codes", + "relativePath": "sdk/error-codes", + "sourcePath": "/sdk/error-codes", + "title": "Client SDK error codes", + "description": "Identify common OpenIMClientSDK error codes, distinguish their source, and apply safe handling guidance.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": null, + "contextKey": "chat/sdk/common", + "contextTitle": "SDKs · Common reference · v4", "template": "guide", - "status": "draft", - "sourceIndex": 3861, - "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx", - "navOrder": 670 + "status": "published", + "sourceIndex": 2700, + "contentFile": "content/docs/chat/sdk/error-codes.mdx", + "navOrder": 1 }, { - "id": 2492, - "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", - "relativePath": "sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", - "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", - "title": "Get a group call room", - "description": "Get a call room by group ID.", + "id": 1353, + "path": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", + "relativePath": "sdk/wasm/conversation/retrieving-conversations/search-conversations", + "sourcePath": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", + "title": "Search conversations", + "description": "Search local conversations by conversation name with the WASM SDK.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": "wasm", + "contextKey": "chat/sdk/wasm", + "contextTitle": "SDKs · WASM · v4", "template": "guide", - "status": "draft", - "sourceIndex": 3862, - "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx", - "navOrder": 671 + "status": "published", + "sourceIndex": 2723, + "contentFile": "content/docs/chat/sdk/wasm/conversation/retrieving-conversations/search-conversations.mdx", + "navOrder": 418 }, { - "id": 2493, - "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", - "relativePath": "sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", - "sourcePath": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", - "title": "Get room credentials", - "description": "Get call credentials by room ID.", + "id": 1354, + "path": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", + "relativePath": "sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", + "sourcePath": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", + "title": "Mark all conversations as read", + "description": "Clear the unread counts of all currently unread conversations with the WASM SDK.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": "wasm", + "contextKey": "chat/sdk/wasm", + "contextTitle": "SDKs · WASM · v4", "template": "guide", - "status": "draft", - "sourceIndex": 3863, - "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx", - "navOrder": 672 + "status": "published", + "sourceIndex": 2724, + "contentFile": "content/docs/chat/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read.mdx", + "navOrder": 427 }, { - "id": 2494, - "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", - "relativePath": "sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", - "sourcePath": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", - "title": "Send a custom signal", - "description": "Send a custom signal in a call room.", + "id": 1355, + "path": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", + "relativePath": "sdk/wasm/conversation/managing-conversations/hide-all-conversations", + "sourcePath": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "Hide all conversations from the conversation list on the current device with the WASM SDK.", "product": "sdk", "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", + "platform": "wasm", + "contextKey": "chat/sdk/wasm", + "contextTitle": "SDKs · WASM · v4", "template": "guide", - "status": "draft", - "sourceIndex": 3864, - "contentFile": "content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx", - "navOrder": 673 + "status": "published", + "sourceIndex": 2725, + "contentFile": "content/docs/chat/sdk/wasm/conversation/managing-conversations/hide-all-conversations.mdx", + "navOrder": 433 } ] diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 8fe9e9eb8b..8503ee8292 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -5653,2262 +5653,2310 @@ "description": "OpenIM React Native SDK 入口,用于移动端应用。", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native overview", - "content": "概览 当聊天体验基于 React Native 构建,并且需要处理移动端连接、本地缓存、媒体选择、文件上传和推送通知交接时,可以从 React Native SDK 开始。 接入模型 客户端应在拿到后端为当前 userID 签发的 token 后初始化 SDK。登录前先注册连接事件和消息事件,再把会话状态同步到应用自己的状态管理中,保证前后台切换后界面可以稳定恢复。 移动端注意事项 验证应用前后台切换后的登录、重连和消息接收。 文件消息需要结合 iOS 和 Android 的媒体选择、上传权限和文件路径策略测试。 推送 token 注册应通过可信后端和对应平台通知服务完成。 排查移动端问题时记录发生时间、用户 ID、操作名称、 errCode 和 errMsg ,但不要记录 Token 或消息正文。 相关 SDK iOS SDK /sdk/ios/overview Android SDK /sdk/android/overview Flutter SDK /sdk/flutter/overview" - }, - { - "path": "/sdk/electron/getting-started/authenticate-and-init", - "title": "Authenticate and initialize", - "description": "Use the Electron FFI initSDK, login, and unInitSDK methods to establish a session, and understand how their parameters differ from WASM login.", - "context": "SDKs · Electron · v4", - "keywords": "sdk electron v4 sdk electron getting-started authenticate-and-init", - "content": "The Electron FFI SDK separates SDK initialization from user authentication. First call initSDK to configure the OpenIMServer addresses and local runtime directory, then call login with the userID and token. This differs from WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session , where a single InitAndLoginConfig is passed to login . This page covers only the Electron FFI lifecycle APIs. Use the WASM authentication page as a reference for the handling boundaries around connection success, token expiration, and forced sign out. When registering Electron FFI listeners, use the event enum exported by the current Electron SDK rather than copying the WASM SdkEvent type directly. Differences from WASM | Step | Electron FFI | WASM | | | | | | Configure server addresses and runtime | initSDK InitConfig | Included in login InitAndLoginConfig | | Submit user credentials | login userID, token | Included in the same login call | | Release the native SDK | unInitSDK | No equivalent public unload API; use logout to end the session | If the Electron renderer uses the WASM package, follow the WASM authentication page directly and do not call the initSDK described here. Initialize the SDK At initialization, InitConfig supplies server addresses, platform information, a local data directory, and logging options. Parameters | Field | Type | Required | Description | | | | | | | apiAddr | string | Yes | OpenIMServer HTTP API address. | | wsAddr | string | Yes | OpenIMServer WebSocket address. | | platformID | number | Yes | Current client platform value. It must conform to the OpenIMServer multi device login policy. | | dataDir | string | Yes | Writable absolute path for the native SDK's local data. | | systemType | string | Yes | System type identifier required by the Electron FFI SDK. | | logLevel | LogLevel | No | Logging level. | | logFilePath | string | No | Log file path. | | isLogStandardOutput | boolean | No | Whether to write logs to standard output. | await openimsdk.initSDK apiAddr, wsAddr, platformID, dataDir: '/absolute/path/to/openim data', systemType: 'electron', logLevel: LogLevel.Warn, isLogStandardOutput: false, ; When the initSDK Promise succeeds, the native SDK has initialized and can proceed to login. It has not established a user session, and a connection event has not necessarily arrived. Log in the current user Call login after initialization succeeds. FFI login accepts only the user's credentials. Parameters | Field | Type | Required | Description | | | | | | | userID | string | Yes | Current OpenIMSDK user ID. It must match the token. | | token | string | Yes | OpenIMSDK token issued by a trusted backend. | await openimsdk.login userID, token, ; When the login Promise succeeds, the login request has completed. Use connection events such as OnConnectSuccess to decide when business APIs that require a connection are available. See the WASM authentication page /sdk/wasm/getting started/authenticate and manage session for event registration. Log out and uninitialize When the user signs out or switches accounts, first call the shared logout method to end the session. Call unInitSDK afterward when the native resources must be released. await openimsdk.logout ; await openimsdk.unInitSDK ; unInitSDK takes no business parameters. When switching accounts, finish signing out the old account and clear its state before calling initSDK and login again when necessary. Do not initialize two native instances concurrently. Next steps Electron SDK overview /sdk/electron/overview WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session Create media messages from full paths /sdk/electron/message/create media from full path" + "content": "" }, { - "path": "/sdk/electron/message/create-media-from-full-path", - "title": "Create media messages from full paths", - "description": "Use the Electron FFI *FromFullPath APIs to create image, video, audio, and file messages from absolute local paths.", - "context": "SDKs · Electron · v4", - "keywords": "sdk electron v4 sdk electron message create-media-from-full-path", - "content": "Electron FFI provides a set of APIs for creating media messages from complete local file paths . They are intended for desktop applications that already have an absolute disk path, such as one returned by a system file picker. Browser applications and Electron applications using WASM should use the corresponding ByFile or ByURL methods. For images, see Create an image message from a file /sdk/wasm/message/creating messages/create image message by file and Create an image message from a URL /sdk/wasm/message/creating messages/create image message by url . For independent file uploads, see Upload a file /sdk/wasm/file uploads/upload file . After creating a MessageItem , send it with sendMessage just like any message that uses the shared message model. See Send a message /sdk/wasm/message/sending messages/send message for sending parameters and events. Supported methods | Method | Purpose | | | | | createImageMessageFromFullPath imagePath | Create an image message from an absolute local image path. | | createSoundMessageFromFullPath params | Create an audio message from an absolute local audio path. | | createVideoMessageFromFullPath params | Create a video message from absolute video and snapshot paths. | | createFileMessageFromFullPath params | Create a regular file message from an absolute local path. | These methods create message objects only. They do not send a message automatically or trigger a new message event. Image messages createImageMessageFromFullPath accepts the image's absolute file path directly. const data: message = await openimsdk.createImageMessageFromFullPath '/absolute/path/to/photo.jpg', ; await openimsdk.sendMessage recvID, groupID: '', message, ; Audio messages Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Absolute path to the audio file. | | duration | number | Yes | Audio duration. Pass an integer rather than a decimal value. | const data: message = await openimsdk.createSoundMessageFromFullPath soundPath: '/absolute/path/to/voice.m4a', duration: 3200, ; Video messages Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Absolute path to the video file. | | videoType | string | Yes | Video type, such as mp4 . | | duration | number | Yes | Video duration. Pass an integer rather than a decimal value. | | snapshotPath | string | Yes | Absolute path to the video cover snapshot. | const data: message = await openimsdk.createVideoMessageFromFullPath videoPath: '/absolute/path/to/clip.mp4', videoType: 'mp4', duration: 12000, snapshotPath: '/absolute/path/to/cover.jpg', ; File messages Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Absolute path to the file. | | fileName | string | Yes | File name displayed to conversation members. | const data: message = await openimsdk.createFileMessageFromFullPath filePath: '/absolute/path/to/report.pdf', fileName: 'report.pdf', ; Results When any of the four FromFullPath Promises succeeds, its data is a MessageItem ready to send. A subsequent successful sendMessage Promise means only that the send request completed. The recipient confirms delivery through its new message event. Related pages Electron SDK overview /sdk/electron/overview Send a message /sdk/wasm/message/sending messages/send message Upload a file /sdk/wasm/file uploads/upload file" + "path": "/sdk/react-native/getting-started/before-you-start", + "title": "开始之前", + "description": "准备 OpenIMServer、用户登录信息和 React Native 工程环境,再开始初始化和登录。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started before-you-start", + "content": "在 React Native 应用中接入 OpenIM SDK 前,需要准备可访问的 OpenIMServer、可信的用户认证流程,以及能够正常编译原生模块的 React Native 工程。 准备 OpenIMServer 如果还没有可用的 OpenIMServer,先按 Docker 部署指南 /docs/guides/quick deployment/docker 完成部署,并确认目标设备可以访问以下地址: | 字段 | 说明 | | | | | apiAddr | OpenIMServer HTTP API 地址,用于登录、同步和资源请求。 | | wsAddr | OpenIMServer WebSocket 地址,用于建立长连接和接收实时事件。 | 不要只验证服务在开发电脑本机可以访问。Android 模拟器、iOS 模拟器和真机的网络环境可能不同;生产环境还应检查 DNS、TLS 证书、防火墙、反向代理和 WebSocket 升级是否正常。 准备用户和 Token userID 标识 OpenIM 用户,Token 用于认证该用户。创建或绑定用户、签发 Token 和校验业务权限都应由可信后端完成。React Native 应用不能保存管理员 Token、secret 或其他服务端凭据。 后端接入 OpenIMServer REST API 前,可阅读 准备使用 Platform API /platform api/prepare to use api 和 签发会话 Token /platform api/user/managing session tokens/issue a session token 。业务后端完成自身账号认证后,只向客户端返回 SDK 登录所需的以下数据: | 数据 | 说明 | | | | | userID | 当前登录用户的 OpenIM 用户 ID。 | | token | 与该用户对应的登录 Token。 | | apiAddr | OpenIMServer HTTP API 地址。 | | wsAddr | OpenIMServer WebSocket 地址。 | userID 必须与 Token 对应。 准备 React Native 工程 接入前确认: 工程已经完成 React Native CLI 或 Expo 自定义开发客户端的原生配置。 Android 和 iOS 工程能够分别编译并运行。 确认 Android 和 iOS 的网络配置可用,目标设备能够正常访问 apiAddr 和 wsAddr 。 React Native SDK 通过原生模块运行,不适用 Expo Go。Expo 项目需要使用 expo prebuild 生成或更新包含 SDK 原生模块的 Android 和 iOS 工程,再构建自定义开发客户端。具体安装方式见 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 。 继续接入 准备完成后,先根据 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 完成依赖和原生工程配置,再按 认证与管理登录会话 /sdk/react native/getting started/authenticate and manage session 初始化 SDK 并登录,最后尝试 发送第一条消息 /sdk/react native/getting started/send first message 。" }, { - "path": "/sdk/electron/logger/upload-logs", - "title": "Upload logs", - "description": "Use the Electron FFI uploadLogs method to upload client diagnostic logs.", - "context": "SDKs · Electron · v4", - "keywords": "sdk electron v4 sdk electron logger upload-logs", - "content": "Electron FFI provides uploadLogs to upload diagnostic logs already written by the native SDK to the log collection service configured for the current OpenIMServer. See WASM logging /sdk/wasm/logger for browser side log configuration. The WASM package does not provide an equivalent uploadLogs method. Upload logs only when troubleshooting, when a user explicitly submits diagnostics, or when operations staff request them. Before uploading, confirm that logs do not contain tokens, message content, or other sensitive fields. If business context is required, use ex for a non sensitive diagnostic label; never put credentials in it. Upload logs Parameters | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines or line range configuration to read for the upload, as required by Electron FFI. | | cancelID | string | No | Cancellation identifier. When omitted, the SDK uses its default value. | | ex | string | No | Additional description attached to the upload. Omit it or pass an empty string when not needed. | await openimsdk.uploadLogs line: 2000, ex: 'desktop diag session', ; Result When the uploadLogs Promise succeeds, the current upload request has completed. It does not change conversations, messages, or user profiles, and it does not trigger business domain events. If the upload fails, record errCode , errMsg , and the current user ID to correlate the failure with OpenIMServer logs. Do not repeat the complete log content in the failure log. Related pages Electron SDK overview /sdk/electron/overview WASM logging /sdk/wasm/logger Authenticate and initialize /sdk/electron/getting started/authenticate and init" + "path": "/sdk/react-native/getting-started/environment-specific-implementation", + "title": "按 React Native 环境接入", + "description": "在 React Native CLI 或 Expo 自定义开发客户端中安装 OpenIM React Native SDK。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started environment-specific-implementation", + "content": "本页说明 React Native 工程的依赖和原生环境配置。 添加依赖 在 React Native CLI 项目中安装 在项目根目录安装 OpenIM React Native SDK: npm install @openim/rn client sdk cd ios && pod install && cd .. 也可以使用项目现有的包管理器执行等价命令。安装后分别构建 Android 和 iOS 工程,确认原生模块已正确链接。 在 Expo 项目中安装 OpenIM React Native SDK 包含 Android 和 iOS 原生模块,Expo Go 未包含这些模块,因此不能直接在 Expo Go 中使用。Expo 项目应先安装 OpenIM React Native SDK,再使用 expo prebuild clean 根据 Expo 配置生成或更新 android 和 ios 原生工程,最后在该原生工程中构建自定义开发客户端: npm install @openim/rn client sdk npx expo prebuild clean npx expo run:android npx expo run:ios 修改 Expo 配置或新增需要原生支持的依赖后,应重新执行 expo prebuild clean ,再重新构建开发客户端。可以安装 expo dev client ,获得适合 Expo 项目的开发客户端体验,但运行时仍使用自定义开发客户端,不要使用 Expo Go。 验证原生环境 完成安装和原生工程配置后,在 Android 和 iOS 工程中构建应用,确认 SDK 原生模块可以完成编译和加载。 下一步 认证与管理登录会话 /sdk/react native/getting started/authenticate and manage session" }, { - "path": "/platform-api/webhooks/overview", - "title": "Overview", - "description": "OpenIM Webhooks overview, including delivery behavior, configuration, protocol, and callback coverage.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks overview", - "content": "Webhooks let OpenIM notify a business backend over HTTP or HTTPS before or after an operation. Before event callbacks can validate, reject, or adjust an operation. After event callbacks synchronize completed user, relationship, group, message, presence, and conversation changes. Delivery model | Type | Invocation | Typical use | Effect on OpenIM | | | | | | | Before event | Synchronous | Moderation, authorization, field changes, risk controls | OpenIM waits for the response and uses failedContinue , actionCode , and nextCode to continue or stop. | | After event | Asynchronous | Synchronization, auditing, analytics, notifications | The operation has completed; the response cannot change its result. | Before event handlers are on the OpenIM request path and must remain low latency and highly available. After event delivery can still be affected by network, process, or queue failures, so it must not be the only persistence mechanism for financial or similarly critical events. Configure Webhooks Configure a common URL and enable callbacks in config/webhooks.yml : url: https://api.example.com/openim/webhooks beforeSendSingleMsg: enable: true timeout: 5 failedContinue: false deniedTypes: afterUserRegister: enable: true timeout: 5 | Setting | Description | | | | | url | Base receiver URL. OpenIM appends the callbackCommand . | | enable | Enables the callback. | | timeout | Receiver timeout in seconds. | | failedContinue | Whether a before event operation continues after receiver failure or timeout. | | attentionIds | User or group IDs observed by an after event callback. | | allowedTypes | Message content types allowed to trigger the callback. | | deniedTypes | Message content types excluded from the callback. | | insecureSkipVerify Enterprise | Skips HTTPS certificate verification. Use only in controlled tests. | | signature.algorithm Enterprise | HMAC SHA1 , HMAC SHA256 , HMAC SHA512 , RSA SHA256 , or ECDSA SHA256 . | | signature.signatureHeader Enterprise | Header carrying the signature. | | signature.nonceHeader Enterprise | Header carrying the signed nonce. | | signature.secret Enterprise | HMAC secret or asymmetric private key. | The current Enterprise signature covers the nonce header, not the full body. Always use HTTPS and validate signature, nonce freshness, and replay state. Request and response protocol OpenIM sends JSON with POST to WEBHOOK ADDRESS / callbackCommand and supplies operationID as a request header. Dispatch by callbackCommand , not arrival order, and make handlers idempotent using the event's business key, message ID, or operationID . Before event responses use: \"actionCode\":0,\"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"nextCode\":0 CallbackAction | Value | Name | Description | | | | | | 0 | ActionAllow | Use nextCode to continue or stop. This is the value required by the current common response parser. | | 1 | ActionForbidden | Reserved. To reject, return actionCode: 0 , nextCode: 1 , and a business error. | CallbackNextCode | Value | Name | Description | | | | | | 0 | Continue | Continue the OpenIM operation. | | 1 | Stop | Stop the operation using errCode , errMsg , and errDlt . | Callback coverage Users: registration and profile updates. Relationships: friend requests, acceptance, deletion, remarks, blacklist changes, and imports. Groups: creation, joining, leaving, dismissal, ownership, and group/member profile updates. Messages: one to one and group sends, final message modification, read status, and revocation. Push and presence: online/offline push targeting and user online, offline, or forced logout state. Conversations: creation callbacks are available in OpenIM Enterprise. Integration guidance Host receivers on a stable backend, never on a client. Define strict before event timeouts and an explicit failedContinue policy. Acknowledge after event callbacks quickly, then enqueue expensive work. Restrict source addresses, rate, and body size at the gateway, and use HTTPS." + "path": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "title": "认证与管理登录会话", + "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", + "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别,可选 Debug 、 Info 、 Warn 、 Error 、 Fatal 和 Panic 。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" }, { - "path": "/platform-api/webhooks/user/before-user-register", - "title": "Before user registration", - "description": "Validate or adjust user profiles before registration.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user before-user-register", - "content": "Validate, reject, or adjust user profiles before OpenIM registers them. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeUserRegisterCommand . | | users | UserInfo | Users about to be registered. See UserInfo /platform api/user/overview userinfo . | Response Return the common before event response. An optional users array replaces the profiles OpenIM will process. Use nextCode: 1 with a business error to reject registration. Processing rules Configuration key: beforeUserRegister . OpenIM waits synchronously; failure behavior follows failedContinue ." + "path": "/sdk/react-native/getting-started/send-first-message", + "title": "发送第一条消息", + "description": "在 React Native 应用中发送并验证第一条单聊文本消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started send-first-message", + "content": "本页用一条单聊文本消息验证 OpenIM React Native SDK 已完成接入。开始前,先按 认证与管理登录会话 /sdk/react native/getting started/authenticate and manage session 完成 SDK 初始化和登录,并准备两个用户账号:一个作为发送方,一个作为接收方。两个账号都需要完成登录。 创建文本消息并发送 发送方调用 createTextMessage 创建待发送的 MessageItem ,再调用 sendMessage 将消息发送给接收方。将示例中的 user b 替换为接收方的真实用户 ID;单聊填写 recvID , groupID 传空字符串。 const message = await OpenIMSDK.createTextMessage '你好,OpenIMSDK' ; await OpenIMSDK.sendMessage recvID: 'user b', groupID: '', message, ; 接收消息 接收方应在发送方发送消息前设置 onRecvNewMessage 监听;发送方发送消息后,该监听函数会收到对应的 MessageItem : function handleNewMessage message: MessageItem console.log \"onRecvNewMessage\", message // 设置监听 OpenIMSDK.on 'onRecvNewMessage', handleNewMessage ; 完整的消息事件和消息状态处理方式见 接收消息 /sdk/react native/message/receiving messages/receive messages 。" }, { - "path": "/platform-api/webhooks/user/after-user-register", - "title": "After user registration", - "description": "Synchronize user profiles after registration completes.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user after-user-register", - "content": "Synchronize user profiles after OpenIM registration completes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserRegisterCommand . | | users | UserInfo | Registered users. See UserInfo /platform api/user/overview userinfo . | Response Return an HTTP success response promptly. The registration is already complete and cannot be changed by this response. Processing rules Configuration key: afterUserRegister . Process idempotently by user ID or operationID ." + "path": "/sdk/react-native/user/overview-user", + "title": "用户概览", + "description": "了解 React Native SDK 中的当前用户资料、公开用户资料、账号设置和在线状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-user", + "content": "OpenIM React Native SDK 使用 userID 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。 好友、好友申请和黑名单属于用户之间的关系链能力,见 关系链概览 /sdk/react native/user/overview relationships 。 用户相关类型 React Native SDK 会根据使用场景返回不同的用户对象: | 类型 | 适用场景 | 主要 API | | | | | | SelfUserInfo | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | getSelfUserInfo 、 setSelfInfo | | PublicUserItem | 查询应用用户和展示公开资料卡 | getUsersInfo | | UserOnlineState | 用户在线状态和在线平台列表 | subscribeUsersStatus 、 getSubscribeUsersStatus 、 unsubscribeUsersStatus | SelfUserInfo 表示当前登录用户, PublicUserItem 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。 功能入口 | 需求 | 推荐页面 | | | | | 按 userID 查询公开资料,用于展示资料卡 | 获取用户资料 /sdk/react native/user/profile/get users info | | 读取或更新当前用户的昵称、头像和扩展信息 | 获取当前用户资料 /sdk/react native/user/profile/get self user info 、 更新当前用户资料 /sdk/react native/user/profile/set self info | | 设置账号级消息接收方式 | 设置全局消息接收方式 /sdk/react native/user/profile/set global message reception | | 设置其他用户添加当前账号时的处理策略 | 设置好友添加权限 /sdk/react native/user/profile/set friend add permission | | 订阅、读取和取消订阅在线状态 | 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 、 获取已订阅用户状态 /sdk/react native/user/online status/get subscribe users status 、 取消订阅用户状态 /sdk/react native/user/online status/unsubscribe users status | | 管理好友、好友申请或黑名单 | 关系链概览 /sdk/react native/user/overview relationships | 事件监听 用户状态变化会触发事件,具体的事件监听详见: 当前用户资料变化见 更新当前用户资料 /sdk/react native/user/profile/set self info 。 用户在线状态变化见 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 。 好友、好友申请和黑名单变化见 关系链概览 /sdk/react native/user/overview relationships 。" }, { - "path": "/platform-api/webhooks/user/before-update-user-info", - "title": "Before updating user information", - "description": "Validate or adjust nickname, avatar, and extension data before a user profile update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user before-update-user-info", - "content": "Validate or adjust profile fields before OpenIM updates a user. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoCommand Request body | Property | Required | Type | Description | | | | | | | callbackCommand | Yes | string | callbackBeforeUpdateUserInfoCommand . | | userID | Yes | string | User being updated. | | nickName | No | string | Proposed nickname. | | faceURL | No | string | Proposed avatar URL. | | ex | No | string | Proposed extension data. | Response Return the common before event response and optional nickName , faceURL , or ex replacements. Only returned business fields override the pending update. Processing rules Configuration key: beforeUpdateUserInfo . Use nextCode: 1 to reject the update." + "path": "/sdk/react-native/user/profile/get-users-info", + "title": "获取用户资料", + "description": "OpenIM React Native SDK 获取用户资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-users-info", + "content": "调用 getUsersInfo 按用户 ID 批量查询公开用户信息,适合用于展示好友候选人或陌生人资料卡的业务场景。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。 const userIDList = Array.from new Set 'user a', 'user b' ; const users = await OpenIMSDK.getUsersInfo userIDList ; 参数说明 userIDList 是要查询的用户 ID 数组。调用前建议去重,并控制单次请求数量。 返回结果 返回查询到的 PublicUserItem : | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | ex | string | 账号级扩展字段,格式由业务约定。 | 返回数组不保证与输入 ID 按位置一一对应。 该接口只读取其他用户的公开信息。如果要获取用户自己的信息,详见: 获取当前用户资料 /sdk/react native/user/profile/get self user info 、 更新当前用户资料 /sdk/react native/user/profile/set self info 。" }, { - "path": "/platform-api/webhooks/user/after-update-user-info", - "title": "After updating user information", - "description": "Synchronize nickname, avatar, and extension changes after a profile update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user after-update-user-info", - "content": "Synchronize a completed user profile update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoCommand Request body Includes callbackCommand , userID , nickName , faceURL , and ex with the resulting profile values. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfo . Process idempotently by user ID and operationID ." + "path": "/sdk/react-native/user/profile/get-self-user-info", + "title": "获取当前用户资料", + "description": "OpenIM React Native SDK 获取当前用户资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-self-user-info", + "content": "调用 getSelfUserInfo 获取当前登录账号的用户信息。 const currentUser = await OpenIMSDK.getSelfUserInfo ; 返回结果 返回当前账号的 SelfUserInfo : | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,用于标识当前账号。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number | 用户记录创建时间。 | | globalRecvMsgOpt | MessageReceiveOptType | 当前账号的全局消息接收方式。 | | ex | string | 由业务约定的账号级扩展字符串。 | 完成初始化并登录后调用该方法,可用于展示当前账号的头像、昵称和全局消息接收设置。切换账号时,清理已保存的当前用户信息。" }, { - "path": "/platform-api/webhooks/user/before-update-user-info-ex", - "title": "Before updating selected user fields", - "description": "Validate or adjust optional user profile fields before an update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user before-update-user-info-ex", - "content": "Validate or adjust only the optional profile fields included in a selected field update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoExCommand Request body Includes callbackCommand , required userID , and optional nickName , faceURL , and ex values. Response Return the common before event response plus only the replacement fields that OpenIM should apply. Processing rules Configuration key: beforeUpdateUserInfoEx . Omitted fields remain untouched; nextCode: 1 rejects the update." + "path": "/sdk/react-native/user/profile/set-self-info", + "title": "更新当前用户资料", + "description": "OpenIM React Native SDK 更新当前用户资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-self-info", + "content": "setSelfInfo 更新当前登录账号的基础展示资料。只传入本次需要更新的 nickname 、 faceURL 或 ex 。 await OpenIMSDK.setSelfInfo nickname: nickname.trim , faceURL, ex: mergedExtra, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string | 否 | 新昵称。 | | faceURL | string | 否 | 新头像地址。 | | ex | string | 否 | 扩展用户信息。 | 至少传入一个实际要更新的资料字段。 ex 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展用户信息。 更新当前用户资料后会触发 OnSelfInfoUpdated 事件,事件会携带更新后的用户信息。 监听当前用户资料变化 用户个人信息更新时,触发 OnSelfInfoUpdated 事件,以下为设置监听的示例: function handleSelfInfoUpdated selfUserInfo: SelfUserInfo // ... ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; 退出登录、切换账号或销毁用户状态层时,要取消监听。" }, { - "path": "/platform-api/webhooks/user/after-update-user-info-ex", - "title": "After updating selected user fields", - "description": "Synchronize optional user profile fields after an update completes.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user after-update-user-info-ex", - "content": "Synchronize the fields changed by a completed selected field user update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoExCommand Request body Includes callbackCommand , userID , and the optional nickName , faceURL , and ex fields that changed. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfoEx . Process idempotently by user ID and operationID ." + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "设置全局消息接收方式", + "description": "OpenIM React Native SDK 设置全局消息接收方式。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-global-message-reception", + "content": "globalRecvMsgOpt 是当前账号的全局消息接收方式。使用 setSelfInfo 更新该字段: await OpenIMSDK.setSelfInfo globalRecvMsgOpt: MessageReceiveOptType.NotNotify, ; 参数说明 | 枚举值 | 数值 | 说明 | | | | | | MessageReceiveOptType.Normal | 0 | 正常接收消息,并允许通知。 | | MessageReceiveOptType.NotNotify | 2 | 接收消息,但不通知。 | 设置完成后,当前用户信息会通过 OnSelfInfoUpdated 事件更新,事件监听方式见 更新当前用户资料 /sdk/react native/user/profile/set self info 。 全局消息接收方式是账号级设置;单个会话还可以使用会话级消息接收设置。" }, { - "path": "/platform-api/webhooks/relation/before-add-friend", - "title": "Before adding a friend", - "description": "Validate a friend request before it is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-add-friend", - "content": "Validate a friend request before it is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | | ex | string | Extension data | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriend . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "设置好友添加权限", + "description": "OpenIM React Native SDK 设置好友添加权限。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-friend-add-permission", + "content": "addFriendPermission 控制其他用户添加当前账号时,是否需要当前用户确认。使用 setSelfInfo 更新该账号级设置: await OpenIMSDK.setSelfInfo addFriendPermission: AddFriendPermission.AddFriendAllowed, ; 参数说明 | 枚举值 | 数值 | 含义 | | | | | | AddFriendPermission.AddFriendAllowed | 0 | 允许添加,但需要当前用户审核好友申请。 | | AddFriendPermission.AddFriendAllowedNoReview | 1 | 允许添加,并直接建立好友关系,无需当前用户审核。 | | AddFriendPermission.AddFriendDenied | 2 | 不允许其他用户添加当前账号。 | 此设置只影响后续的添加行为,不会删除已有好友关系,也不会自动处理已经存在的待审核申请。设置完成后,当前用户信息会通过 OnSelfInfoUpdated 事件更新,监听方式见 更新当前用户资料 /sdk/react native/user/profile/set self info 。" }, { - "path": "/platform-api/webhooks/relation/after-add-friend", - "title": "After adding a friend", - "description": "Synchronize a newly created friend request.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-add-friend", - "content": "Synchronize a newly created friend request. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriend . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "订阅用户在线状态", + "description": "OpenIM React Native SDK 订阅用户在线状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status subscribe-users-status", + "content": "调用 subscribeUsersStatus 订阅指定用户的在线状态。建议只订阅当前界面需要展示的用户。 const userIDs = ...new Set visibleUserIDs.filter Boolean ; const states = await OpenIMSDK.subscribeUsersStatus userIDs ; 返回这些用户当前的 UserOnlineState ,字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 状态所属用户的 ID。 | | status | OnlineState | OnlineState.Online 表示在线, OnlineState.Offline 表示离线。 | | platformIDs | Platform (可选) | 用户当前在线的平台列表。 | 在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看应用或某个会话。 监听在线状态变化 订阅用户的在线状态变化时,触发 OnUserStatusChanged 事件: const handleStatusChanged = state: UserOnlineState = // 按 state.userID 更新在线状态 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; 退出登录、切换账号或不再需要展示这些用户时,取消订阅并移除监听。" }, { - "path": "/platform-api/webhooks/relation/before-add-friend-agree", - "title": "Before accepting a friend request", - "description": "Validate a friend-request acceptance.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-add-friend-agree", - "content": "Validate a friend request acceptance. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriendAgree . OpenIM waits synchronously; timeout behavior follows failedContinue . The protocol retains the historical field names blackUserID , HandleResult , and HandleMsg ; parse them exactly as shown." + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "获取已订阅用户状态", + "description": "OpenIM React Native SDK 获取已订阅用户状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status get-subscribe-users-status", + "content": "调用 getSubscribeUsersStatus 获取当前账号已订阅用户的在线状态。 const states = await OpenIMSDK.getSubscribeUsersStatus ; 返回已订阅用户的 UserOnlineState 。目标用户尚未订阅时,请先调用 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 。" }, { - "path": "/platform-api/webhooks/relation/after-add-friend-agree", - "title": "After accepting a friend request", - "description": "Synchronize a newly established friendship.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-add-friend-agree", - "content": "Synchronize a newly established friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriendAgree . Process idempotently using the relationship key and operationID . The protocol retains these historical field names." + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "取消订阅用户状态", + "description": "OpenIM React Native SDK 取消订阅用户状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status unsubscribe-users-status", + "content": "调用 unsubscribeUsersStatus 取消订阅指定用户的在线状态。 await OpenIMSDK.unsubscribeUsersStatus userIDs ; 页面翻页、搜索结果变化、退出登录或不再需要展示这些用户时,应取消对应订阅。" }, { - "path": "/platform-api/webhooks/relation/after-delete-friend", - "title": "After deleting a friend", - "description": "Synchronize a deleted friendship.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-delete-friend", - "content": "Synchronize a deleted friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterDeleteFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDeleteFriendCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Deleted friend | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterDeleteFriend . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/overview-relationships", + "title": "关系链概览", + "description": "了解 React Native SDK 中的好友、好友申请和黑名单能力。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-relationships", + "content": "关系链记录当前用户与其他用户之间的好友关系、好友申请和黑名单。用户资料、账号设置和在线状态属于用户能力,见 用户概览 /sdk/react native/user/overview user 。 关系链对象 React Native SDK 会根据使用场景返回不同的对象: | 类型 | 适用场景 | 主要 API | | | | | | PublicUserItem | 查询公开用户资料、展示好友候选人或陌生人资料卡 | getUsersInfo | | FriendUserItem | 好友列表、好友备注、置顶和关系扩展字段 | getFriendListPage 、 getSpecifiedFriendsInfo | | FriendshipInfo | 检查当前用户与目标用户的好友关系 | checkFriend | | FriendApplicationItem | 收到或发出的好友申请及其处理状态 | getFriendApplicationListAsRecipient 、 getFriendApplicationListAsApplicant | | BlackUserItem | 当前账号维护的黑名单关系 | getBlackList 、 addBlack 、 removeBlack | 功能入口 | 需求 | 推荐页面 | | | | | 查询公开用户资料 | 获取用户资料 /sdk/react native/user/profile/get users info | | 分页、搜索或按 ID 查询好友关系 | 分页获取好友列表 /sdk/react native/user/friends/get friend list page 、 搜索好友 /sdk/react native/user/friends/search friends 、 查询指定好友资料 /sdk/react native/user/friends/get specified friends info | | 检查好友关系 | 检查好友关系 /sdk/react native/user/friends/check friend | | 更新或删除好友关系 | 更新好友资料 /sdk/react native/user/friends/update friends 、 删除好友 /sdk/react native/user/friends/delete friend | | 发送或处理好友申请 | 发送好友申请 /sdk/react native/user/friend applications/add friend 、 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 、 接受好友申请 /sdk/react native/user/friend applications/accept friend application 、 拒绝好友申请 /sdk/react native/user/friend applications/refuse friend application | | 查看和维护黑名单 | 获取黑名单 /sdk/react native/user/blacklist/get black list 、 将用户加入黑名单 /sdk/react native/user/blacklist/add black 、 将用户移出黑名单 /sdk/react native/user/blacklist/remove black | 事件监听 关系链状态变化会触发事件,具体的事件监听详见: 好友申请变化见 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 。 好友关系和好友资料变化见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。 黑名单变化见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" }, { - "path": "/platform-api/webhooks/relation/before-set-friend-remark", - "title": "Before setting a friend remark", - "description": "Validate or replace a friend remark.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-set-friend-remark", - "content": "Validate or replace a friend remark. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Proposed remark | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeSetFriendRemark . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return remark to replace the pending value." + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "分页获取好友列表", + "description": "OpenIM React Native SDK 分页获取好友列表。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-friend-list-page", + "content": "调用 getFriendListPage 分页获取当前用户的好友列表。 const friends = await OpenIMSDK.getFriendListPage offset: 0, count: 50, filterBlack: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的好友数量。 | | filterBlack | boolean | 否 | 是否过滤黑名单用户。 | 返回当前页的 FriendUserItem 。继续加载时按请求条目数增加 offset ;好友增删后重新请求列表。 好友信息字段 FriendUserItem 类型字段说明: | 字段 | 类型 | 说明 | | | | | | userID | string | 好友用户 ID。 | | nickname | string | 好友昵称。 | | faceURL | string | 好友头像地址。 | | remark | string | 当前用户为好友设置的备注。 | | isPinned | boolean | 是否置顶。 | | ownerUserID | string | 好友关系所属用户 ID。 | | operatorUserID | string | 最近执行关系操作的用户 ID。 | | addSource | number | 好友关系添加来源。 | | createTime | number | 好友关系创建时间。 | | ex | string | 好友关系扩展字段。 | | attachedInfo | string | SDK 附加信息。 | remark 、 isPinned 和 ex 属于好友关系,不是账号级用户信息。 监听好友变化 好友关系变化时,触发 OnFriendAdded 、 OnFriendInfoChanged 或 OnFriendDeleted 事件。事件直接携带对应的好友信息: const handleFriendAdd = friend: FriendUserItem = // 新增好友 ; const handleFriendChanged = friend: FriendUserItem = // 按 friend.userID 更新好友列表 ; const handleFriendDeleted = friend: FriendUserItem = // 按 friend.userID 从好友列表移除 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.on OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.on OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.off OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.off OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; 退出登录、切换账号或销毁好友列表状态时,取消这些监听。" }, { - "path": "/platform-api/webhooks/relation/after-set-friend-remark", - "title": "After setting a friend remark", - "description": "Synchronize an updated friend remark.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-set-friend-remark", - "content": "Synchronize an updated friend remark. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Resulting remark | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetFriendRemark . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friends/search-friends", + "title": "搜索好友", + "description": "OpenIM React Native SDK 搜索好友。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends search-friends", + "content": "调用 searchFriends 搜索当前用户的好友。提交搜索前应去除关键词首尾空格;当前请求使用 keywordList 中的第一个非空关键词。 const friends = await OpenIMSDK.searchFriends keywordList: keyword.trim , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词数组,当前使用第一个非空关键词。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchNickname | boolean | 是 | 是否匹配好友昵称。 | | isSearchRemark | boolean | 是 | 是否匹配好友备注。 | 返回 SearchedFriendsInfo 。每项包含好友信息字段和 relationship : 0 表示黑名单关系, 1 表示好友关系。" }, { - "path": "/platform-api/webhooks/relation/before-add-black", - "title": "Before adding to the blacklist", - "description": "Validate a blacklist addition.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-add-black", - "content": "Validate a blacklist addition. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User being blocked | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddBlack . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "查询指定好友资料", + "description": "OpenIM React Native SDK 查询指定好友资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-specified-friends-info", + "content": "调用 getSpecifiedFriendsInfo 按用户 ID 查询指定好友的关系信息。 const friends = await OpenIMSDK.getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userIDList | string | 是 | 要查询的用户 ID 列表。 | | filterBlack | boolean | 否 | 是否过滤黑名单用户。 | 返回匹配的 FriendUserItem ,数组不保证与输入 ID 按位置一一对应。字段说明见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。 查询陌生人的公开用户信息时,使用 获取用户资料 /sdk/react native/user/profile/get users info 。" }, { - "path": "/platform-api/webhooks/relation/after-remove-black", - "title": "After removing from the blacklist", - "description": "Synchronize a blacklist removal.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-remove-black", - "content": "Synchronize a blacklist removal. HTTP request POST WEBHOOK ADDRESS /callbackAfterRemoveBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterRemoveBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User removed from the blacklist | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRemoveBlack . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friends/check-friend", + "title": "检查好友关系", + "description": "OpenIM React Native SDK 检查好友关系。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends check-friend", + "content": "调用 checkFriend 批量检查当前用户与指定用户的好友关系。 const checks = await OpenIMSDK.checkFriend 'user a', 'user b' ; 返回的 FriendshipInfo 与输入用户 ID 按 userID 对应: | 字段 | 类型 | 说明 | | | | | | userID | string | 被检查用户的 ID。 | | result | number | 1 表示是好友, 0 表示不是好友。 | 需要判断黑名单关系时,另行调用 获取黑名单 /sdk/react native/user/blacklist/get black list 。" }, { - "path": "/platform-api/webhooks/relation/before-import-friends", - "title": "Before importing friends", - "description": "Validate or filter a batch of friend IDs before import.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-import-friends", - "content": "Validate or filter a batch of friend IDs before import. HTTP request POST WEBHOOK ADDRESS /callbackBeforeImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Friend IDs to import | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeImportFriends . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return friendUserIDs to replace the import set." + "path": "/sdk/react-native/user/friends/update-friends", + "title": "更新好友资料", + "description": "OpenIM React Native SDK 更新好友资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends update-friends", + "content": "使用 updateFriends 更新 friendUserIDs 中的所有好友。 await OpenIMSDK.updateFriends friendUserIDs: friendUserID , remark: remark, isPinned: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendUserIDs | string | 是 | 要更新的好友用户 ID 列表。 | | remark | string | 否 | 新备注。 | | isPinned | boolean | 否 | 是否置顶。 | | ex | string | 否 | 新扩展字符串。 | 除 friendUserIDs 外,至少传入一个要更新的字段。不同好友需要不同值时,分别调用该方法。更新好友资料后会触发 OnFriendInfoChanged 事件,监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" }, { - "path": "/platform-api/webhooks/relation/after-import-friends", - "title": "After importing friends", - "description": "Synchronize the result of a friend import.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-import-friends", - "content": "Synchronize the result of a friend import. HTTP request POST WEBHOOK ADDRESS /callbackAfterImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Imported friend IDs | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterImportFriends . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friends/delete-friend", + "title": "删除好友", + "description": "OpenIM React Native SDK 删除好友。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends delete-friend", + "content": "调用 deleteFriend 删除当前用户与指定用户的好友关系。 await OpenIMSDK.deleteFriend friendUserID ; friendUserID 是要删除的好友用户 ID。删除好友后会触发 OnFriendDeleted 事件,事件携带被删除好友的信息;好友列表的监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" }, { - "path": "/platform-api/webhooks/group/before-create-group", - "title": "Before creating a group", - "description": "Validate or adjust group information and initial members before a group is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-create-group", - "content": "Validate or adjust group information and initial members before a group is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | introduction | string | Group introduction. | | faceURL | string | Group avatar URL. | | ownerUserID | string | Group owner user ID. | | createTime | int | Group creation time in milliseconds. | | memberCount | int | Initial member count. | | ex | string | Extension data. | | status | int | Group status. | | creatorUserID | string | Group creator user ID. | | groupType | int | Group type. | | needVerification | int | Join verification policy. | | lookMemberInfo | int | Whether ordinary members can view member profiles. | | applyMemberFriend | int | Whether ordinary members can add other members as friends. | | notificationUpdateTime | int | Announcement update time in milliseconds. | | notificationUserID | string | User who last updated the announcement. | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | | initMemberList | object | Initial members, each containing userID and roleLevel . | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may also return the mutable group fields shown above to replace the values OpenIM is about to process. Processing rules Configuration key: beforeCreateGroup . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/add-friend", + "title": "发送好友申请", + "description": "OpenIM React Native SDK 发送好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications add-friend", + "content": "调用 addFriend 向指定用户发送好友申请。 await OpenIMSDK.addFriend toUserID, reqMsg, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 要申请添加的用户 ID。 | | reqMsg | string | 是 | 申请附言;没有内容时传空字符串。 | 发送成功只表示好友申请已提交,不表示对方已经同意。申请状态变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听相关事件。" }, { - "path": "/platform-api/webhooks/group/after-create-group", - "title": "After creating a group", - "description": "Synchronize group information and initial members after a group is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-create-group", - "content": "Synchronize group information and initial members after a group is created. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupCommand and the complete group snapshot described by GroupInfo /platform api/group/overview groupinfo . It also includes initMemberList , announcement metadata, and these Enterprise fields: | Property | Type | Description | | | | | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | Response Return HTTP success promptly. Group creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroup . Process idempotently using groupID or operationID ." + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "获取收到的好友申请", + "description": "OpenIM React Native SDK 获取收到的好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-recipient", + "content": "调用 getFriendApplicationListAsRecipient 分页查询当前用户收到的好友申请。 const applications = await OpenIMSDK.getFriendApplicationListAsRecipient handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | handleResults | number | 是 | 要查询的申请处理结果。 | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的申请数量。 | | 枚举值 | 数值 | 含义 | | | | | | ApplicationHandleResult.Unprocessed | 0 | 待处理。 | | ApplicationHandleResult.Agree | 1 | 已同意。 | | ApplicationHandleResult.Reject | 1 | 已拒绝。 | 返回当前页的 FriendApplicationItem 。 好友申请字段 FriendApplicationItem 类型字段说明: | 字段 | 类型 | 说明 | | | | | | fromUserID | string | 申请发起人的用户 ID。 | | fromNickname | string | 申请发起人的昵称。 | | fromFaceURL | string | 申请发起人的头像地址。 | | toUserID | string | 申请接收人的用户 ID。 | | toNickname | string | 申请接收人的昵称。 | | toFaceURL | string | 申请接收人的头像地址。 | | reqMsg | string | 申请附言。 | | handleResult | ApplicationHandleResult | 当前处理结果。 | | handlerUserID | string | 执行处理的用户 ID。 | | handleMsg | string | 处理时填写的说明。 | | handleTime | number | 处理时间。 | | createTime | number | 申请记录创建时间。 | | ex | string | 申请记录扩展字符串。 | 监听好友申请变化 好友申请变化时,触发 OnFriendApplicationAdded 、 OnFriendApplicationAccepted 、 OnFriendApplicationRejected 或 OnFriendApplicationDeleted 事件。事件直接携带 FriendApplicationItem : const handleApplicationChanged = application: FriendApplicationItem = // 按 fromUserID 和 toUserID 更新申请记录 ; const handleApplicationDeleted = application: FriendApplicationItem = // 按 fromUserID 和 toUserID 移除申请记录 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; 申请记录使用 fromUserID 和 toUserID 共同定位。退出登录、切换账号或销毁申请列表状态时,取消这些监听。" }, { - "path": "/platform-api/webhooks/group/before-member-join-group", - "title": "Before members join a group", - "description": "Validate or adjust member profiles before users become group members.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-member-join-group", - "content": "Validate or adjust member profiles before users become group members. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMembersJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeMembersJoinGroupCommand . | | groupID | string | Group ID. | | memberList | object | Members about to join, including userID and ex . | | groupEx | string | Group extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . memberCallbackList may contain adjusted profiles for the members OpenIM is about to add. Processing rules Configuration key: beforeMemberJoinGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the operation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "获取发出的好友申请", + "description": "OpenIM React Native SDK 获取发出的好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-applicant", + "content": "调用 getFriendApplicationListAsApplicant 分页查询当前用户发出的好友申请。 const applications = await OpenIMSDK.getFriendApplicationListAsApplicant offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的申请数量。 | 返回当前页的 FriendApplicationItem 。申请记录字段见 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 。" }, { - "path": "/platform-api/webhooks/group/before-invite-user-to-group", - "title": "Before inviting users to a group", - "description": "Validate a group invitation and optionally refuse individual invitees.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-invite-user-to-group", - "content": "Validate a group invitation and optionally refuse individual invitees. HTTP request POST WEBHOOK ADDRESS /callbackBeforeInviteJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeInviteJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reason | string | Invitation reason. | | invitedUserIDs | string | User IDs to invite. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . Set refusedMembersAccount to the user IDs that must not be added. Processing rules Configuration key: beforeInviteUserToGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the entire invitation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "获取未处理好友申请数", + "description": "OpenIM React Native SDK 获取未处理好友申请数。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-unhandled-count", + "content": "调用 getFriendApplicationUnhandledCount 查询指定时间点之后未处理的好友申请数量。 const count = await OpenIMSDK.getFriendApplicationUnhandledCount time, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | time | number | 是 | 查询起始时间,通常使用上次查看申请列表的时间。 | 返回该时间点之后的未处理好友申请数量。" }, { - "path": "/platform-api/webhooks/group/before-apply-join-group", - "title": "Before applying to join a group", - "description": "Run authorization or risk checks before a group join application is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-apply-join-group", - "content": "Run authorization or risk checks before a group join application is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeJoinGroupCommand . | | groupID | string | Group ID. | | groupType | string | Group type. | | applyID | string | Applicant user ID. | | reqMessage | string | Application message. | | ex | string | Extension data. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the application. Processing rules Configuration key: beforeApplyJoinGroup . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "接受好友申请", + "description": "OpenIM React Native SDK 接受好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications accept-friend-application", + "content": "调用 acceptFriendApplication 接受好友申请。 await OpenIMSDK.acceptFriendApplication toUserID: applicantUserID, handleMsg: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 申请发起人的用户 ID。 | | handleMsg | string | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | 接受后会建立好友关系,并触发好友申请状态变化和 OnFriendAdded 事件。好友列表变化的监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" }, { - "path": "/platform-api/webhooks/group/after-join-group", - "title": "After joining a group", - "description": "Synchronize membership changes after a user joins a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-join-group", - "content": "Synchronize membership changes after a user joins a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reqMessage | string | Join application or invitation message. | | joinSource | int | Source of the membership change. | | inviterUserID | string | Inviter user ID, when applicable. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterJoinGroup . Process idempotently using the group and user identifiers or operationID ." + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "拒绝好友申请", + "description": "OpenIM React Native SDK 拒绝好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications refuse-friend-application", + "content": "调用 refuseFriendApplication 拒绝好友申请。 await OpenIMSDK.refuseFriendApplication toUserID: applicantUserID, handleMsg: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 申请发起人的用户 ID。 | | handleMsg | string | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | 申请状态变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听相关事件。" }, { - "path": "/platform-api/webhooks/group/after-quit-group", - "title": "After leaving a group", - "description": "Synchronize membership changes after a user leaves a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-quit-group", - "content": "Synchronize membership changes after a user voluntarily leaves a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterQuitGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterQuitGroupCommand . | | groupID | string | Group ID. | | userID | string | User who left the group. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterQuitGroup . Process idempotently using groupID:userID ." + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "删除好友申请", + "description": "OpenIM React Native SDK 删除好友申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications delete-friend-requests", + "content": "调用 deleteFriendRequests 批量删除好友申请记录。 参数说明 数组中的每一项使用以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | fromUserID | string | 是 | 申请发起人的用户 ID。 | | toUserID | string | 是 | 申请接收人的用户 ID。 | await OpenIMSDK.deleteFriendRequests fromUserID, toUserID , ; 删除记录不等于拒绝申请,也不会删除已经建立的好友关系。申请记录变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听 OnFriendApplicationDeleted 。" }, { - "path": "/platform-api/webhooks/group/after-kick-group-member", - "title": "After removing group members", - "description": "Synchronize membership changes after members are removed from a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-kick-group-member", - "content": "Synchronize membership changes after members are removed from a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterKickGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterKickGroupCommand . | | groupID | string | Group ID. | | kickedUserIDs | string | Removed user IDs. | | reason | string | Removal reason. | Response Return HTTP success promptly. The membership changes are already complete and cannot be changed by this response. Processing rules Configuration key: afterKickGroupMember . Process each member idempotently using groupID:userID ." + "path": "/sdk/react-native/user/blacklist/get-black-list", + "title": "获取黑名单", + "description": "OpenIM React Native SDK 获取黑名单。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist get-black-list", + "content": "调用 getBlackList 获取当前账号的黑名单。 const blockedUsers = await OpenIMSDK.getBlackList ; 返回 BlackUserItem ,常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 被拉黑的用户 ID。 | | nickname | string | 被拉黑用户的昵称。 | | faceURL | string | 被拉黑用户的头像地址。 | | ownerUserID | string | 黑名单关系所属用户 ID。 | | operatorUserID | string | 执行拉黑操作的用户 ID。 | | createTime | number | 黑名单创建时间。 | | addSource | number | 黑名单添加来源。 | | ex | string | 黑名单扩展字段。 | 资料卡或联系人列表判断黑名单关系时,应使用 userID 。黑名单与群组管理是独立能力,群成员禁言或移除请使用群组相关 API。 监听黑名单变化 黑名单变化时,触发 OnBlackAdded 或 OnBlackDeleted 事件,事件直接携带对应的黑名单用户信息: const handleBlackAdded = blackUser: BlackUserItem = // 按 blackUser.userID 加入或更新记录 ; const handleBlackDeleted = blackUser: BlackUserItem = // 按 blackUser.userID 移除记录 ; OpenIMSDK.on OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.on OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; OpenIMSDK.off OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.off OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; 退出登录、切换账号或销毁黑名单状态时,取消这些监听。" }, { - "path": "/platform-api/webhooks/group/after-dismiss-group", - "title": "After dismissing a group", - "description": "Synchronize group state after a group is dismissed.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-dismiss-group", - "content": "Synchronize group state after a group is dismissed. HTTP request POST WEBHOOK ADDRESS /callbackAfterDisMissGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDisMissGroupCommand . The historical capitalization is part of the protocol. | | groupID | string | Group ID. | | ownerID | string | Group owner user ID. | | groupType | string | Group type. | | membersID | string | IDs of members affected by dismissal. | Response Return HTTP success promptly. Group dismissal is already complete and cannot be changed by this response. Processing rules Configuration key: afterDismissGroup . Process idempotently using groupID ." + "path": "/sdk/react-native/user/blacklist/add-black", + "title": "将用户加入黑名单", + "description": "OpenIM React Native SDK 将用户加入黑名单。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist add-black", + "content": "调用 addBlack 将指定用户加入当前账号的黑名单。 await OpenIMSDK.addBlack toUserID, ex, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 要加入黑名单的用户 ID。 | | ex | string | 否 | 黑名单关系的扩展信息。 | 加入黑名单后会触发 OnBlackAdded 事件。黑名单列表和事件监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" }, { - "path": "/platform-api/webhooks/group/after-transfer-group-owner", - "title": "After transferring group ownership", - "description": "Synchronize the owner change after group ownership is transferred.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-transfer-group-owner", - "content": "Synchronize the owner change after group ownership is transferred. HTTP request POST WEBHOOK ADDRESS /callbackAfterTransferGroupOwnerCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterTransferGroupOwnerCommand . | | groupID | string | Group ID. | | oldOwnerUserID | string | Previous owner user ID. | | newOwnerUserID | string | New owner user ID. | Response Return HTTP success promptly. The ownership transfer is already complete and cannot be changed by this response. Processing rules Configuration key: afterTransferGroupOwner . Process idempotently using groupID and newOwnerUserID ." + "path": "/sdk/react-native/user/blacklist/remove-black", + "title": "将用户移出黑名单", + "description": "OpenIM React Native SDK 将用户移出黑名单。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", + "content": "调用 removeBlack 将指定用户移出当前账号的黑名单。 await OpenIMSDK.removeBlack blackUserID ; blackUserID 是要移出黑名单的用户 ID。移出后会触发 OnBlackDeleted 事件,监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" }, { - "path": "/platform-api/webhooks/group/before-set-group-member-info", - "title": "Before updating group member information", - "description": "Validate or adjust fields before a group member profile is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-set-group-member-info", - "content": "Validate or adjust fields before a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Group nickname, when changed. | | faceURL | string | Avatar URL, when changed. | | roleLevel | int | Group role level, when changed. | | ex | string | Extension data, when changed. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return nickName , faceURL , roleLevel , and ex to replace the pending values. Processing rules Configuration key: beforeSetGroupMemberInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/overview-conversation", + "title": "会话概览", + "description": "了解 React Native SDK 中的会话、会话状态和会话分组能力。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation overview-conversation", + "content": "在 OpenIM React Native SDK 中,会话表示当前登录账号维护的一条聊天状态。单聊和群聊都会对应一个 ConversationItem ,其中包含会话列表展示信息、未读状态、草稿和消息接收设置等内容。 会话记录与聊天目标使用不同的标识: conversationID 标识当前账号的会话记录,单聊目标使用对方的 userID ,群聊目标使用 groupID 。群组资料、成员和权限仍通过群组相关 API 管理。 会话标识 | 标识 | 用途 | | | | | conversationID | 当前账号的会话记录 ID,用于会话设置、消息历史和未读状态。 | | userID | 单聊中的对方用户 ID。 | | groupID | 群聊对应的群组 ID。 | | sourceID | 按类型查询会话时传入的聊天目标:单聊传 userID ,群聊传 groupID 。 | 如需根据聊天目标获取 conversationID ,可调用 生成会话 ID /sdk/react native/conversation/retrieving conversations/get conversation id ,传入 sourceID 和 sessionType 。 会话数据 ConversationItem 同时包含列表展示信息和当前账号的会话设置: | 分类 | 字段 | 说明 | | | | | | 标识和类型 | conversationID 、 conversationType | 定位会话记录并区分单聊和群聊。 | | 列表展示 | showName 、 faceURL 、 latestMsg 、 latestMsgSendTime | 展示会话名称、头像和最后一条消息。 | | 未读和提醒 | unreadCount 、 groupAtType | 展示未读数和群聊 @ 提醒状态。 | | 列表组织 | isPinned 、 isMarked 、 draftText 、 remark | 管理置顶、标记、草稿和当前账号的会话备注。 | | 消息策略 | recvMsgOpt 、 isPrivateChat 、 burnDuration 、 isMsgDestruct 、 msgDestructTime | 设置消息接收、阅后即焚和服务端消息删除。 | | 其他状态和扩展 | isNotInGroup 、 attachedInfo 、 ex | 表示群组关系状态、SDK 附加信息和业务扩展。 | 按任务查找 | 任务 | 相关页面 | | | | | 获取一个或多个会话 | 查询指定会话 /sdk/react native/conversation/retrieving conversations/get conversation by target 、 按 ID 批量获取会话 /sdk/react native/conversation/retrieving conversations/get conversations by id 、 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list | | 整理会话列表 | 置顶或取消置顶会话 /sdk/react native/conversation/managing conversations/pin conversation 、 标记或取消标记会话 /sdk/react native/conversation/managing conversations/mark conversation 、 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups | | 管理草稿、备注和扩展字段 | 设置会话草稿 /sdk/react native/conversation/managing conversations/set conversation draft 、 设置会话备注 /sdk/react native/conversation/managing conversations/set conversation remark 、 设置会话扩展字段 /sdk/react native/conversation/managing conversations/set conversation extension | | 设置消息接收和保留策略 | 设置会话消息接收方式 /sdk/react native/conversation/managing conversations/set message receive option 、 开启或关闭阅后即焚 /sdk/react native/conversation/managing conversations/set private chat 、 定期删除服务端消息 /sdk/react native/conversation/managing conversations/set message destruct | | 处理未读数和群组提醒 | 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 、 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 、 重置群聊 @ 状态 /sdk/react native/conversation/managing conversations/clear group mentions | 隐藏、删除和清空 隐藏、删除和清空作用范围不同: | 操作 | 作用 | | | | | 隐藏会话 /sdk/react native/conversation/managing conversations/hide a conversation | 从当前账号的会话列表中隐藏一条会话,新消息到达后可能重新出现。 | | 删除会话及消息 /sdk/react native/conversation/managing conversations/delete conversation with messages | 删除会话记录和当前账号在该会话中的消息。 | | 清空会话消息 /sdk/react native/conversation/managing conversations/clear conversation messages | 保留会话记录,只清除当前账号在该会话中的消息。 | 事件监听 会话状态变化会触发事件,具体的事件监听详见: 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 介绍会话新增和会话字段变化的监听方式。 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 介绍当前账号总未读数的监听方式。 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 介绍会话分组和分组成员变化的监听方式。" }, { - "path": "/platform-api/webhooks/group/after-set-group-member-info", - "title": "After updating group member information", - "description": "Synchronize changes after a group member profile is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-set-group-member-info", - "content": "Synchronize changes after a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Updated group nickname, when present. | | faceURL | string | Updated avatar URL, when present. | | roleLevel | int | Updated group role level, when present. | | ex | string | Updated extension data, when present. | Response Return HTTP success promptly. The member profile update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupMemberInfo . Process idempotently using groupID:userID ." + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "查询指定会话", + "description": "根据聊天目标和会话类型查询指定会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-by-target", + "content": "调用 getOneConversation 根据聊天目标和会话类型获取一个会话。 const conversation = await OpenIMSDK.getOneConversation sourceID: targetUserID, sessionType: SessionType.Single, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | | sessionType | SessionType | 是 | 会话类型。单聊使用 SessionType.Single ,群聊使用 SessionType.Group 。 | 返回结果 调用完成后返回 ConversationItem 。会话字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/group/before-set-group-info", - "title": "Before updating group information", - "description": "Validate or adjust group fields before group information is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-set-group-info", - "content": "Validate or adjust group fields before group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoCommand , operationID , groupID , and the pending groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return the pending group fields to replace the values OpenIM is about to store. Processing rules Configuration key: beforeSetGroupInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "生成会话 ID", + "description": "根据聊天目标和会话类型生成会话 ID。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-id", + "content": "调用 getConversationIDBySessionType 根据聊天目标和会话类型获取会话 ID。 const conversationID = await OpenIMSDK.getConversationIDBySessionType sourceID: targetUserID, sessionType: SessionType.Single, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | | sessionType | SessionType | 是 | 会话类型。单聊使用 SessionType.Single ,群聊使用 SessionType.Group 。 | 返回结果 调用完成后返回 string 类型的 conversationID 。" }, { - "path": "/platform-api/webhooks/group/after-set-group-info", - "title": "After updating group information", - "description": "Synchronize changes after group information is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-set-group-info", - "content": "Synchronize changes after group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoCommand , operationID , groupID , and the updated groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return HTTP success promptly. The group update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfo . Process idempotently using groupID or operationID ." + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "按 ID 批量获取会话", + "description": "按 conversationID 批量获取会话信息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversations-by-id", + "content": "已经持有一组会话 ID 时,调用 getMultipleConversation 批量获取会话信息。 const conversations = await OpenIMSDK.getMultipleConversation conversationIDList ; 参数说明 conversationIDList 是要查询的会话 ID 数组。 返回结果 调用完成后返回 ConversationItem ,返回结果可能少于传入的会话 ID 数量,未返回的会话 ID 表示 SDK 当前未找到对应会话。单个会话的字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/group/before-set-group-info-ex", - "title": "Before updating selected group fields", - "description": "Validate or adjust the selected fields before a partial group update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-set-group-info-ex", - "content": "Validate or adjust the selected fields before a partial group update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoExCommand , operationID , groupID , and only the group fields selected for update: groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , or applyMemberFriend . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return selected group fields to replace the pending values. Processing rules Configuration key: beforeSetGroupInfoEx . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "获取会话列表", + "description": "分页获取当前登录账号的会话列表。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations retrieve-conversation-list", + "content": "使用 getConversationListSplit 分页获取会话。 const conversations = await OpenIMSDK.getConversationListSplit offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。继续加载时按已请求的条目数递增。 | | count | number | 是 | 本次请求的会话数量。 | 返回结果 调用完成后返回当前页的 ConversationItem 。当返回数量小于 count 时,表示已经读取到当前列表末尾。 会话字段 ConversationItem 同时包含聊天目标、列表展示和当前账号的会话设置: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 会话 ID。 | | conversationType | SessionType | 会话类型,单聊或群聊。 | | userID | string | 单聊对方的用户 ID;群聊中通常为空。 | | groupID | string | 群聊对应的群组 ID;单聊中通常为空。 | | showName | string | 会话的展示名称。 | | faceURL | string | 会话的展示头像地址。 | | recvMsgOpt | MessageReceiveOptType | 当前会话的消息接收方式。 | | unreadCount | number | 当前会话的未读消息数。 | | groupAtType | GroupAtType | 群聊中的提醒状态;单聊不使用。 | | latestMsg | string | 最后一条消息的 JSON 序列化内容。 | | latestMsgSendTime | number | 最后一条消息的发送时间。 | | draftText | string | 当前设备保存的会话草稿。 | | draftTextTime | number | 草稿更新时间。 | | isPrivateChat | boolean | 是否开启私聊阅后即焚。 | | burnDuration | number | 私聊阅后即焚时长。 | | isMsgDestruct | boolean | 是否开启服务端消息定期删除。 | | msgDestructTime | number | 服务端消息定期删除周期。 | | isPinned | boolean | 会话是否置顶。 | | isMarked 商业版 | boolean | 会话是否已标记。 | | isNotInGroup | boolean | 当前账号是否已不在该群组中。 | | attachedInfo | string | SDK 附加信息。 | | ex | string (可选) | 会话扩展字符串。 | | remark 商业版 | string (可选) | 会话备注。 | 拉取会话列表时,应按 conversationID 合并分页结果去重,避免同一会话重复出现在列表中。刷新列表时从 offset: 0 重新读取。 监听会话变化 新建会话时触发 OnNewConversation ,已有会话发生变化时触发 OnConversationChanged 。两个事件的回调参数都是 ConversationItem 。 function handleNewConversation conversations: ConversationItem // ... function handleConversationChanged conversations: ConversationItem // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleConversationChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleConversationChanged ; 退出登录、切换账号或销毁会话列表状态时,取消监听。" }, { - "path": "/platform-api/webhooks/group/after-set-group-info-ex", - "title": "After updating selected group fields", - "description": "Synchronize changes after a partial group information update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-set-group-info-ex", - "content": "Synchronize changes after selected group fields are updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoExCommand , operationID , groupID , and the updated values among groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend . Response Return HTTP success promptly. The partial update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfoEx . Process idempotently using groupID or operationID ." + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "置顶或取消置顶会话", + "description": "置顶或取消置顶会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations pin-conversation", + "content": "调用 pinConversation 设置会话是否置顶。 await OpenIMSDK.pinConversation conversationID, isPinned: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isPinned | boolean | 是 | true 置顶, false 取消置顶。 | 返回结果 调用完成后,会话的 isPinned 状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/message/before-send-single-message", - "title": "Before sending a one-to-one message", - "description": "Review, reject, or inspect fields before a one-to-one message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message before-send-single-message", - "content": "Use this callback for content moderation, policy enforcement, or field validation before a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendSingleMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSendSingleMsgCommand . | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID. | | serverMsgID | string | OpenIM server message ID. | | clientMsgID | string | Client message ID. | | operationID | string | OpenIM operation trace ID. | | senderPlatformID | int | Sender platform ID. | | senderNickname | string | Sender nickname. | | sessionType | int | Conversation type. | | msgFrom | int | Message source. | | contentType | int | Message content type /platform api/message/message content types . | | status | int | Message status. | | sendTime | int | Send time in milliseconds. | | createTime | int | Creation time in milliseconds. | | content | string | JSON string for the selected message content type. | | seq | int | Message sequence number. | | atUserList | string | Mentioned user IDs. | | faceURL | string | Sender avatar URL. | | ex | string | Extension data. | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendSingleMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "标记或取消标记会话", + "description": "标记或取消标记会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation", + "content": "调用 setConversation 设置会话的标记状态。 await OpenIMSDK.setConversation conversationID, isMarked: true, ; 将 isMarked 设置为 false 可取消标记。标记状态属于当前登录账号,会话标记后会出现在内置的标记会话分组中。会话分组的查询和管理方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isMarked | boolean | 否 | true 标记, false 取消标记。 | 返回结果 调用完成后,会话的 isMarked 状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/message/after-send-single-message", - "title": "After sending a one-to-one message", - "description": "Synchronize a message event after a one-to-one message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-send-single-message", - "content": "Synchronize a message event after a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendSingleMsgCommand Request body The payload contains callbackCommand: callbackAfterSendSingleMsgCommand and the complete message snapshot described on Before sending a one to one message /platform api/webhooks/message/before send single message , including serverMsgID , clientMsgID , seq , sender and recipient IDs, content, timestamps, and keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendSingleMsg . Process idempotently using clientMsgID , optionally scoped by the conversation ID." + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "设置会话备注", + "description": "设置会话备注。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-remark", + "content": "调用 setConversation 设置当前账号的会话备注。 await OpenIMSDK.setConversation conversationID, remark: '项目讨论', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | remark | string | 否 | 会话备注。传入空字符串可清除已有备注。 | 显示会话名称时,可根据产品规则优先使用 remark ,没有备注时使用会话原有的 showName 。会话备注不会更新用户资料或群组名称。 返回结果 调用完成后,会话的 remark 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/message/before-send-group-message", - "title": "Before sending a group message", - "description": "Review, reject, or inspect fields before a group message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message before-send-group-message", - "content": "Use this callback for content moderation, policy enforcement, or field validation before a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendGroupMsgCommand Request body The payload contains callbackCommand: callbackBeforeSendGroupMsgCommand , groupID , and the common message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message , except recvID ; group callbacks use groupID instead to identify the destination. Group messages also expose this field: | Property | Type | Description | | | | | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendGroupMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "设置会话扩展字段", + "description": "设置会话扩展字段。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-extension", + "content": "使用 setConversation 设置会话的扩展字段 ex 。 await OpenIMSDK.setConversation conversationID, ex: JSON.stringify category: 'work', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | ex | string | 否 | 会话扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 | 如果业务需要保留已有扩展内容,应先读取当前 ex ,再按业务规则更新后写回。 返回结果 调用完成后,会话的 ex 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/message/after-send-group-message", - "title": "After sending a group message", - "description": "Synchronize a message event after a group message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-send-group-message", - "content": "Synchronize a message event after a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendGroupMsgCommand Request body The payload contains callbackCommand: callbackAfterSendGroupMsgCommand , groupID , and the complete message snapshot described on Before sending a group message /platform api/webhooks/message/before send group message . It also includes keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendGroupMsg . Process idempotently using clientMsgID , scoped by groupID when necessary." + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "设置会话草稿", + "description": "设置会话草稿。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-draft", + "content": "使用 setConversationDraft 保存会话草稿。用户离开聊天页面、切换会话或准备退出时,可以提交当前编辑内容。 await OpenIMSDK.setConversationDraft conversationID, draftText: editorValue, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要保存草稿的会话 ID。 | | draftText | string | 是 | 草稿内容。传入空字符串可清除草稿。 | 输入过程中建议由业务侧维护编辑器状态并合并保存,离开页面前再提交最新内容。 返回结果 调用完成后,草稿已保存。会话列表中的 draftText 和 draftTextTime 变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。切换账号或退出登录时,同时清理业务侧的编辑器状态。" }, { - "path": "/platform-api/webhooks/message/before-message-modify", - "title": "Before writing a message", - "description": "Adjust permitted message fields before the message is written.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message before-message-modify", - "content": "Adjust permitted message fields before the message is written to OpenIM storage. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMsgModifyCommand Request body The payload contains callbackCommand: callbackBeforeMsgModifyCommand and the message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message . recvID and keyVersion are Enterprise extensions for this callback. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace content , recipient or group identifiers, message IDs, sender profile, conversation and content types, status, sending options, offline push data, mention data, attachments, and extension data. Processing rules Configuration key: beforeMsgModify . OpenIM waits synchronously. Use nextCode: 1 to reject writing the message; timeout behavior follows failedContinue . Return only fields that should replace the values OpenIM is about to write." + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "设置会话消息接收方式", + "description": "设置会话消息接收方式。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-receive-option", + "content": "调用 setConversationRecvMessageOpt 设置单个会话的消息接收方式。 await OpenIMSDK.setConversationRecvMessageOpt conversationID, opt: MessageReceiveOptType.NotNotify, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | opt | MessageReceiveOptType | 是 | 会话消息接收方式。 | MessageReceiveOptType 常用值如下: | 枚举值 | 数值 | 说明 | | | | | | MessageReceiveOptType.Normal | 0 | 正常接收消息并允许提醒。 | | MessageReceiveOptType.NotReceive | 1 | 不接收该会话的消息。 | | MessageReceiveOptType.NotNotify | 2 | 接收消息但不提醒。 | 返回结果 调用完成后,会话的 recvMsgOpt 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。账号级默认接收策略请参考用户资料中的 设置全局消息接收方式 /sdk/react native/user/profile/set global message reception 。" }, { - "path": "/platform-api/webhooks/message/after-single-message-read", - "title": "After one-to-one messages are read", - "description": "Synchronize read-state changes for one-to-one messages.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-single-message-read", - "content": "Synchronize read state changes after one to one messages are marked as read. HTTP request POST WEBHOOK ADDRESS /callbackAfterSingleMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSingleMsgReadCommand . | | conversationID | string | Conversation ID. | | userID | string | User whose read state changed. | | Seqs | int | Message sequence numbers marked as read. The capitalization is part of the protocol. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterSingleMsgRead . Process idempotently using conversationID , userID , and the sequence numbers." + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "重置群聊 @ 状态", + "description": "重置群聊 @ 状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-group-mentions", + "content": "用户处理群聊中的提及消息后,调用 resetConversationGroupAtType 重置会话的群组提醒状态。 await OpenIMSDK.resetConversationGroupAtType conversationID ; 参数说明 conversationID 为要重置提醒状态的群聊会话 ID。 该方法将会话的 groupAtType 恢复为普通状态,不用于主动设置“有人提及我”或“提及所有人”等状态。重置群组提醒和 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 是两个独立操作。 返回结果 调用完成后,会话的群组提醒状态已重置。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/message/after-group-message-read", - "title": "After group messages are read", - "description": "Synchronize read-state changes for group messages.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-group-message-read", - "content": "Synchronize a read event after group message read state is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterGroupMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterGroupMsgReadCommand . | | sendID | string | Message sender user ID. | | receiveID | string | Message recipient user ID. | | unreadMsgNum | int | Current unread message count. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterGroupMsgRead . Process duplicate callbacks idempotently." + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "标记会话已读", + "description": "标记会话已读。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation-read", + "content": "用户打开会话并阅读当前消息后,调用 markConversationMessageAsRead 标记会话已读。 await OpenIMSDK.markConversationMessageAsRead conversationID ; 参数说明 conversationID 为要标记已读的会话 ID。 返回结果 调用完成后,当前账号在该会话中的未读状态已更新。会话列表中的未读数变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。群聊中该方法只处理当前账号的会话未读状态。" }, { - "path": "/platform-api/webhooks/message/after-revoke-message", - "title": "After revoking a message", - "description": "Synchronize a revoke event after a message is revoked.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-revoke-message", - "content": "Synchronize a revoke event after a message is revoked. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAfterMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAfterMsgCommand . | | conversationID | string | Conversation ID. | | seq | int | Sequence number of the revoked message. | | userID | string | User who initiated the revoke operation. | Response Return HTTP success promptly. The revoke operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRevokeMsg . Process idempotently using conversationID:seq ." + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "获取消息总未读数", + "description": "获取消息总未读数。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations get-total-unread-count", + "content": "调用 getTotalUnreadMsgCount 获取当前账号所有会话的总未读数。不要尝试通过累加已加载会话分页中的 unreadCount 来计算会话总未读数,这样会遗漏未加载的会话的未读数。 const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount ; 返回结果 调用完成后返回 number 类型的总未读数。 事件监听 应用处于前台时,可通过 OnTotalUnreadMessageCountChanged 监听总未读数变化: function handleTotalUnreadChanged totalUnread: number // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; 组件销毁、退出登录或切换账号时,取消监听。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "开启或关闭阅后即焚", + "description": "开启或关闭阅后即焚。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-private-chat", + "content": "调用 setConversationPrivateChat 开启或关闭会话的阅后即焚模式。阅后即焚的持续时长通过 setConversationBurnDuration 单独设置,详见 设置阅后即焚时长 /sdk/react native/conversation/managing conversations/set burn duration 。 await OpenIMSDK.setConversationPrivateChat conversationID, isPrivate: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isPrivate | boolean | 是 | true 开启, false 关闭。 | 返回结果 调用完成后,会话的阅后即焚状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "设置阅后即焚时长", + "description": "设置阅后即焚时长。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-burn-duration", + "content": "调用 setConversationBurnDuration 设置会话的阅后即焚时长,单位为秒。该方法只设置持续时长,是否启用阅后即焚由 开启或关闭阅后即焚 /sdk/react native/conversation/managing conversations/set private chat 控制。不要将 burnDuration 与服务端消息定期删除的 msgDestructTime 混淆。 await OpenIMSDK.setConversationBurnDuration conversationID, burnDuration: 30, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | burnDuration | number | 是 | 阅后即焚持续时长,单位为秒。 | 返回结果 调用完成后,会话的阅后即焚时长已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "定期删除服务端消息", + "description": "定期删除服务端消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-destruct", + "content": "调用 setConversation 设置会话的服务端消息定期删除策略。 await OpenIMSDK.setConversation conversationID, isMsgDestruct: true, msgDestructTime: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isMsgDestruct | boolean | 否 | 是否开启服务端消息定期删除。 | | msgDestructTime | number | 否 | 消息删除周期,单位为秒。 | 启用策略时同时传入 isMsgDestruct: true 和 msgDestructTime 。传入 isMsgDestruct: false 可关闭策略。注意该策略与阅后即焚的区别,阅后即焚使用 isPrivateChat 和 burnDuration 。 服务端消息定期删除只影响服务端保存的消息。已经同步到设备的本地消息不会被主动删除;在清理本地数据或更换设备后,已从服务端删除的消息无法再次获取。 返回结果 调用完成后,服务端消息定期删除策略已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/push/before-online-push", - "title": "Before one-to-one online push", - "description": "Adjust target users or push policy before an online one-to-one push.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push before-online-push", - "content": "Adjust target users or push policy before an online one to one push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | userIDList | string | Target user IDs. | | title | string | Push title. | | desc | string | Push summary. | | ex | string | Extension data. | | iOSPushSound | string | iOS notification sound. | | iOSBadgeCount | boolean | Whether to update the iOS badge. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID when present. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "隐藏会话", + "description": "隐藏会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-a-conversation", + "content": "调用 hideConversation 隐藏当前账号会话列表中的一个会话。新消息到达或会话状态再次同步后,该会话可能重新出现在会话列表中。 await OpenIMSDK.hideConversation conversationID ; 参数说明 conversationID 为要隐藏的会话 ID。 返回结果 调用完成后,可以先从当前会话列表中移除对应的 conversationID 的会话。如果后续收到 OnConversationChanged ,按 conversationID 更新列表;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/push/before-group-online-push", - "title": "Before group online push", - "description": "Adjust target users or push policy before an online group push.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push before-group-online-push", - "content": "Adjust target users or push policy before an online group push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeGroupOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeGroupOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | | seq | int | Message sequence number. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the online recipients and offlinePushInfo may replace fallback push metadata. Processing rules Configuration key: beforeGroupOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "隐藏全部会话", + "description": "隐藏全部会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-all-conversations", + "content": "调用 hideAllConversations 隐藏当前账号的全部会话。 await OpenIMSDK.hideAllConversations ; 调用完成后,重新查询 会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 和 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count ,刷新界面数据。新消息到达或会话状态再次同步后,会话可能重新出现在列表中。" }, { - "path": "/platform-api/webhooks/push/before-offline-push", - "title": "Before offline push", - "description": "Adjust recipients and notification metadata before an offline push.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push before-offline-push", - "content": "Adjust the actual recipients and notification metadata before an offline push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOfflinePushCommand Request body The payload contains callbackCommand: callbackBeforeOfflinePushCommand and the recipient, platform, notification, message, conversation, mention, and content fields described on Before one to one online push /platform api/webhooks/push/before online push . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOfflinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "删除会话及消息", + "description": "删除会话及消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations delete-conversation-with-messages", + "content": "调用 deleteConversationAndDeleteAllMsg 删除会话记录和当前账号下的会话消息。 await OpenIMSDK.deleteConversationAndDeleteAllMsg conversationID ; 参数说明 conversationID 为要删除的会话 ID。 返回结果 调用完成后,可以清除当前页面的消息列表和会话列表项。后续如收到 OnConversationChanged ,按 conversationID 更新列表;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/push/after-user-online", - "title": "After a user comes online", - "description": "Synchronize presence after a user establishes an online connection.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push after-user-online", - "content": "Synchronize presence after a user establishes an online connection. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOnlineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOnlineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | isAppBackground | boolean | Whether the client application is in the background. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already online and cannot be changed by this response. Processing rules Configuration key: afterUserOnline . Process idempotently using userID , platformID , and connID ." + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "清空会话消息", + "description": "清空会话消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-conversation-messages", + "content": "调用 clearConversationAndDeleteAllMsg 清除当前账号的会话消息,不会删除会话。 await OpenIMSDK.clearConversationAndDeleteAllMsg conversationID ; 参数说明 conversationID 为要清空消息的会话 ID。 返回结果 调用完成后,清空当前页面的消息列表。会话的最新消息、摘要和未读状态如有变化,可通过 OnConversationChanged 事件或重新查询会话列表获取最新数据;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" }, { - "path": "/platform-api/webhooks/push/after-user-offline", - "title": "After a user goes offline", - "description": "Synchronize presence after a user connection closes.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push after-user-offline", - "content": "Synchronize presence after a user connection closes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOfflineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOfflineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already offline and cannot be changed by this response. Processing rules Configuration key: afterUserOffline . Process idempotently using userID , platformID , and connID ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "会话分组概览", + "description": "会话分组概览。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups overview-conversation-groups", + "content": "会话分组用于将当前账号的会话列表按业务场景分类,例如工作、待处理或自定义类别。 分组类型 ConversationGroupType 包含以下类型: | 枚举值 | 数值 | 说明 | | | | | | ConversationGroupType.ConversationGroupTypeNormal | 0 | 普通自定义分组。 | | ConversationGroupType.ConversationGroupTypeFilter | 1 | 按规则筛选的分组。 | | ConversationGroupType.ConversationGroupTypeAll | 2 | 查询全部类型的分组。 | 分组字段 ConversationGroup 通过 conversationGroupID 作为分组标识: | 字段 | 类型 | 说明 | | | | | | conversationGroupID | string | 会话分组 ID。 | | name | string | 分组名称。 | | serial | number | 分组排序值。 | | version | number | 分组数据版本。 | | conversationGroupType | ConversationGroupType | 分组类型。 | | hidden | boolean | 分组是否隐藏。 | | unreadCount | number | 分组内会话的未读总数。 | | conversationIDs | string | 当前属于该分组的会话 ID。 | | ex | string (可选) | 业务扩展字符串。 | 监听分组变化 分组操作完成后,相关事件会返回新增、更新或删除的分组;分组成员变化事件会返回分组、会话 ID 和会话详情。事件回调参数直接传递实体,不包含 data 字段。应用应按 conversationGroupID 更新分组,按事件中的 conversationIDs 更新成员关系。 const handleGroupAdded = groups: ConversationGroup = // ... ; const handleGroupChanged = groups: ConversationGroup = // ... ; const handleGroupDeleted = groups: ConversationGroup = // ... ; const handleGroupMemberAdded = payload: ConversationGroupMemberChangedCallbackData = // ... ; const handleGroupMemberDeleted = payload: ConversationGroupMemberChangedCallbackData = // ... ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.on OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.off OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/platform-api/webhooks/push/after-user-kick-off", - "title": "After a user is forced offline", - "description": "Synchronize connection state after a user is forced offline.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push after-user-kick-off", - "content": "Synchronize connection state after a user is forced offline. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserKickOffCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserKickOffCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | Response Return HTTP success promptly. The user has already been forced offline and this response cannot reverse the operation. Processing rules Configuration key: afterUserKickOff . Process idempotently using the user, platform, and operation identifiers." + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "创建会话分组", + "description": "创建会话分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups create-conversation-group", + "content": "调用 createConversationGroup 为当前账号创建会话分组。创建普通分组时至少传入 name ,也可以同时将一个会话加入新分组。 const group = await OpenIMSDK.createConversationGroup name: '工作', order: 100, conversationID, conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 分组名称。 | | order | number | 否 | 分组排序值。 | | ex | string | 否 | 分组扩展字符串。 | | conversationID | string | 否 | 创建后立即加入分组的会话 ID。 | | conversationGroupType | ConversationGroupType | 否 | 分组类型,普通自定义分组使用 ConversationGroupTypeNormal 。 | 返回结果 调用完成后返回新建的 ConversationGroupResp ,其中包含 conversationGroupID 、 name 、 order 和 conversationIDs 等分组信息。分组变化会通过 OnConversationGroupAdded 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", - "title": "Before creating one-to-one conversations", - "description": "Adjust default conversation properties before one-to-one conversations are first created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation before-create-single-chat-conversations", - "content": "Adjust default properties before one to one conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateSingleChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateSingleChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | user id | string | Other participant user ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateSingleChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "查询会话分组列表", + "description": "查询会话分组列表。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-groups", + "content": "调用 getConversationGroups 按分组类型获取当前账号的会话分组。 const groups = await OpenIMSDK.getConversationGroups ConversationGroupType.ConversationGroupTypeNormal, ; 参数说明 参数为 ConversationGroupType :普通自定义分组使用 ConversationGroupTypeNormal ,查询全部类型使用 ConversationGroupTypeAll 。 返回结果 调用完成后返回匹配的 ConversationGroup 。字段说明见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。分组只保存会话 ID;需要同时读取会话详情时,使用 查询分组内会话 /sdk/react native/conversation/managing conversation groups/get conversation group info with conversations 。" }, { - "path": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", - "title": "After creating one-to-one conversations", - "description": "Synchronize complete conversation properties after one-to-one conversations are created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation after-create-single-chat-conversations", - "content": "Synchronize complete properties after one to one conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateSingleChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateSingleChatConversationsCommand and the complete property set described on Before creating one to one conversations /platform api/webhooks/conversation/before create single chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateSingleChatConversations . Process idempotently using owner user id:conversation id ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "查询分组内会话", + "description": "查询分组内会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-info-with-conversations", + "content": "调用 getConversationGroupInfoWithConversations 获取一个会话分组的信息以及该分组的分页会话列表。 const result = await OpenIMSDK.getConversationGroupInfoWithConversations conversationGroupID, pagination: pageNumber: 1, showNumber: 20, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要查询的会话分组 ID。 | | pagination.pageNumber | number | 是 | 页码,从 1 开始。 | | pagination.showNumber | number | 是 | 每页返回的会话数量。 | 返回结果 调用完成后返回包含以下字段的对象: | 字段 | 类型 | 说明 | | | | | | group | ConversationGroup | 当前分组信息。 | | conversationTotal | number | 分组中的会话总数。 | | conversationElems | ConversationItem | 当前页的会话详情。 | 当已加载会话数量达到 conversationTotal 时,可以停止继续请求。会话字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list ,分组字段说明见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", - "title": "Before creating group conversations", - "description": "Adjust default conversation properties before group conversations are first created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation before-create-group-chat-conversations", - "content": "Adjust default properties before group conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | group id | string | Group ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateGroupChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "查询会话所属分组", + "description": "查询会话所属分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-ids-by-conversation-id", + "content": "一个会话可以属于多个会话分组。调用 getConversationGroupByConversationID 获取该会话所属的分组。需要查询所有分组或按类型筛选时,使用 查询会话分组列表 /sdk/react native/conversation/managing conversation groups/get conversation groups 。 const groups = await OpenIMSDK.getConversationGroupByConversationID conversationID ; 参数说明 conversationID 为 OpenIM 会话 ID,不是聊天群组 ID。 返回结果 调用完成后返回 ConversationGroup ,每个元素都是一个完整的分组对象。" }, { - "path": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", - "title": "After creating group conversations", - "description": "Synchronize complete conversation properties after group conversations are created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation after-create-group-chat-conversations", - "content": "Synchronize complete properties after group conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupChatConversationsCommand and the complete property set described on Before creating group conversations /platform api/webhooks/conversation/before create group chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroupChatConversations . Process idempotently using owner user id:conversation id ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "更新会话分组", + "description": "更新会话分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups update-conversation-group", + "content": "调用 updateConversationGroup 修改已有会话分组。只传入需要更新的字段。 const group = await OpenIMSDK.updateConversationGroup conversationGroupID, name: '重点工作', hidden: false, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要更新的会话分组 ID。 | | name | string | 否 | 新的分组名称。 | | ex | string | 否 | 新的分组扩展字符串。 | | hidden | boolean | 否 | 是否隐藏分组。 | 返回结果 调用完成后返回更新后的 ConversationGroupResp 。分组变化会通过 OnConversationGroupChanged 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/timer/overview", - "title": "Overview", - "description": "Overview of the OpenIM Enterprise timer-task service.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer overview", - "content": "The timer module lets a backend register delayed tasks that call a configured business handler at the scheduled time. It is suitable for message reminders, scheduled operations, and business compensation, but it is not a high frequency real time scheduler. Capabilities Create a timer task /platform api/timer/managing tasks/create timer task Update a timer task /platform api/timer/managing tasks/update timer task Delete a timer task /platform api/timer/managing tasks/delete timer task Get a timer task /platform api/timer/managing tasks/get timer task List timer tasks /platform api/timer/managing tasks/list timer tasks Resource representations TimerTaskCallbackConfig | Property | Type | Description | | | | | | callbackMethod | string | Callback strategy. See TimerTaskCallbackMethod timertaskcallbackmethod . | | callbackPayload | string | Business payload passed to the callback handler. | TimerTask | Property | Type | Description | | | | | | taskID | string | Timer task ID. | | taskName | string | Display name. | | taskCategory | string | Business defined task category. | | srcUserID | string | User associated with the task. | | executeAt | int | Scheduled execution time as a Unix timestamp in milliseconds. | | executeBefore | int | Latest permitted execution time as a Unix timestamp in milliseconds. | | maxRetry | int | Maximum retries after execution failure. | | callbackConfig | TimerTaskCallbackConfig | Callback method and payload. | | createdAt | int | Creation time in Unix milliseconds. | | updatedAt | int | Last update time in Unix milliseconds. | | dedupKey | string | Business idempotency key used to prevent duplicate creation. | Enumerations TimerTaskStatus | Value | Name | Description | | | | | | 0 | Pending | Waiting for execution. | | 1 | Processing | Currently executing. | TimerTaskCallbackMethod | Value | Description | | | | | openim message | Invoke an OpenIM message operation. | | openim http | Invoke a configured HTTP handler. | | openim rpc | Invoke a preconfigured RPC handler. | | preset | Invoke a server side preset handler. | Integration guidance Call timer endpoints from an authorized business backend. Validate the target user, callback destination, and tenant boundary before creating or changing a task. Use a stable dedupKey for retryable task creation." + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "调整会话分组顺序", + "description": "调整会话分组顺序。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups set-conversation-group-order", + "content": "调用 setConversationGroupOrder 批量调整会话分组的排序值。 await OpenIMSDK.setConversationGroupOrder conversationGroupID: firstGroupID, order: 100 , conversationGroupID: secondGroupID, order: 200 , ; 参数说明 方法接收数组,每个元素包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要调整顺序的分组 ID。 | | order | number | 是 | 新的排序值,产品侧应统一排序方向。 | 返回结果 调用完成后不返回分组数据。界面可以按提交的排序值更新,也可以通过 OnConversationGroupChanged 事件或重新查询分组获取最新信息;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/meeting/overview", - "title": "Overview", - "description": "Overview of OpenIM Enterprise meetings, real-time calls, meeting chat, and recordings.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting overview", - "content": "The meeting module provides scheduled and immediate meetings, participant controls, recurring meetings, meeting chat, recording queries, and real time call recovery. All endpoints in this module are available only in OpenIM Enterprise and must be called through an authorized business backend. Capabilities Meeting management Schedule a meeting /platform api/meeting/meeting management/book meeting Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Join a meeting /platform api/meeting/meeting management/join meeting Get a meeting token /platform api/meeting/meeting management/get meeting token Update a meeting /platform api/meeting/meeting management/update meeting Get a meeting /platform api/meeting/meeting management/get meeting List a user's meetings /platform api/meeting/meeting management/list meetings Invite users to a meeting /platform api/meeting/meeting management/invite meeting users Leave a meeting /platform api/meeting/meeting management/leave meeting End or cancel a meeting /platform api/meeting/meeting management/end meeting Meeting controls and records Set personal meeting preferences /platform api/meeting/meeting settings/set personal setting Control participant media streams /platform api/meeting/meeting settings/operate all streams Remove meeting participants /platform api/meeting/meeting settings/remove participants Create a recurring meeting /platform api/meeting/recurring meetings/create repeat meeting Get meeting recordings /platform api/meeting/meeting records/get meeting records Get meeting attendance /platform api/meeting/meeting records/get meeting attendance Real time calls and meeting chat Get a call room by group ID /platform api/meeting/meeting signaling/get room by group id Get a startup call invitation /platform api/meeting/meeting signaling/get startup invitation Send a meeting chat message /platform api/meeting/meeting chat/send meeting chat Pull meeting chat messages /platform api/meeting/meeting chat/pull meeting chat Resource representations LiveKit | Property | Type | Description | | | | | | token | string | Participant access token. | | url | string | Real time service URL. | SystemGeneratedMeetingInfo | Property | Type | Description | | | | | | creatorUserID | string | Creator user ID. | | creatorNickname | string | Creator display name. | | status | string | Meeting status. | | startTime | int | Start time in Unix milliseconds. | | meetingID | string | Meeting ID. | CreatorDefinedMeetingInfo | Property | Type | Description | | | | | | title | string | Meeting title. | | scheduledTime | int | Scheduled start in Unix milliseconds. | | meetingDuration | int | Duration in seconds. | | password | string | Password, or empty when not required. | | timeZone | string | Creator selected time zone. | | hostUserID | string | Primary host user ID. | | coHostUSerID | string | Co host user IDs. The protocol uses this exact capitalization. | | inviteeUserIDs | string | Invitee user IDs. | MeetingInfo | Property | Type | Description | | | | | | systemGenerated | SystemGeneratedMeetingInfo | Server generated identity and status. | | creatorDefinedMeeting | CreatorDefinedMeetingInfo | Creator defined meeting information. | MeetingSetting | Property | Type | Description | | | | | | canParticipantsEnableCamera | bool | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | bool | Whether participants may unmute microphones. | | canParticipantsShareScreen | bool | Whether participants may share screens. | | disableCameraOnJoin | bool | Whether cameras start disabled. | | disableMicrophoneOnJoin | bool | Whether microphones start muted. | | canParticipantJoinMeetingEarly | bool | Whether participants may join early. | | lockMeeting | bool | Whether new participants are prevented from joining. | | audioEncouragement | bool | Whether active speaker highlighting is enabled. | | videoMirroring | bool | Whether video mirroring is enabled. | | recordOn | bool | Whether server side recording is enabled by policy. | MeetingInfoSetting | Property | Type | Description | | | | | | info | MeetingInfo | Meeting identity and creator defined information. | | setting | MeetingSetting | Meeting level settings. | | repeatInfo | MeetingRepeatInfo | Recurrence information for this instance. | MeetingRepeatInfoReq | Property | Type | Description | | | | | | endDate | int | Recurrence end in Unix milliseconds. | | repeatTimes | int | Planned number of instances. | | repeatType | RepeatType | Recurrence frequency. | | interval | int | Interval between occurrences. | | repeatDaysOfWeek | DayOfWeek | Weekdays included by the rule. | MeetingRepeatInfo Includes every MeetingRepeatInfoReq property plus repeatMeetingID and repeatSequence . RepeatMeetingData | Property | Type | Description | | | | | | repeatMeetingID | string | Recurring meeting ID. | | creatorUserID | string | Creator user ID. | | creatorDefinedMeetingInfo | CreatorDefinedMeetingInfo | Shared meeting information. | | setting | MeetingSetting | Shared settings. | | repeatInfo | MeetingRepeatInfo | Recurrence rule and identity. | | generatedCount | int | Number of generated instances. | | nextScheduleTime | int | Next scheduled generation time. | | status | RepeatStatus | Recurrence status. | PersonalMeetingSetting | Property | Type | Description | | | | | | cameraOnEntry | bool | Whether the camera is enabled on entry. | | microphoneOnEntry | bool | Whether the microphone is enabled on entry. | MeetingUser | Property | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Display name. | FileRecord | Property | Type | Description | | | | | | size | string | File size in the format returned by the service. | | fileURL | string | Recording file URL. | MeetingRecord | Property | Type | Description | | | | | | roomID | string | Meeting or call room ID. | | meetingName | string | Meeting name. | | ex | string | Business extension data. | | hostUserID | string | Host user ID. | | hostUserNickname | string | Host display name. | | createTime | int | Creation time in Unix milliseconds. | | startTime | int | Start time in Unix milliseconds. | | endTime | int | End time in Unix milliseconds. | | joinedUsers | MeetingUser | Participants recorded for the meeting. | | status | int | Meeting record status. | | fileRecords | FileRecord | Recording files. | | egressID | string | Recording job ID. | | downloadUrl | string | Recording download URL. | | egressUploading | bool | Whether a recording is still uploading. | | recordStatus | int | See RecordStatus recordstatus . | | videoFileSize | int | Video size in bytes. | | videoCoverUrl | string | Video cover URL. | | videoName | string | Video filename. | UserMeetingHistory Contains roomID , meetingName , hostUserID , hostUserNickname , startTime , endTime , status , and ex for a meeting attended by a user. HostedMeeting Contains roomID , meetingName , status , startTime , endTime , and ex for a meeting hosted by a user. MeetingChatMessage | Property | Type | Description | | | | | | seq | int | Meeting chat Seq. | | sendID | string | Sender user ID. | | contentType | int | Content type. See Message content types /platform api/message/message content types . | | content | string | Message content. | | createTimeMs | int | Creation time in Unix milliseconds. | | dstUserIDs | string | Target users; empty means room broadcast. | | nickname | string | Sender display name. | | faceURL | string | Sender avatar URL. | InviteeInfo | Property | Type | Description | | | | | | inviteeUserIDs | string | Replacement invitee list used by meeting updates. | InvitationInfo | Property | Type | Description | | | | | | inviterUserID | string | Invitation sender. | | inviteeUserIDList | string | Invitees. | | customData | string | Business extension data. | | groupID | string | Related group ID. | | roomID | string | Call room ID. | | timeout | int | Invitation timeout. | | mediaType | string | Call media type. | | platformID | int | Originating platform. See PlatformID /platform api/user/overview platformid . | | sessionType | int | Call session type. See ConversationType /platform api/conversation/overview conversationtype . | | initiateTime | int | Invitation initiation time. | | busyLineUserIDList | string | Users whose lines are busy. | Enumerations RepeatType | Value | Name | Description | | | | | | 0 | REPEAT TYPE NONE | Does not repeat. | | 1 | REPEAT TYPE DAILY | Daily. | | 2 | REPEAT TYPE WEEKLY | Weekly. | | 3 | REPEAT TYPE WEEKDAY | Weekdays. | | 4 | REPEAT TYPE MONTHLY | Monthly. | | 5 | REPEAT TYPE YEARLY | Yearly. | | 6 | REPEAT TYPE HOURLY | Hourly. | DayOfWeek | Value | Name | | | | | 0 | SUNDAY | | 1 | MONDAY | | 2 | TUESDAY | | 3 | WEDNESDAY | | 4 | THURSDAY | | 5 | FRIDAY | | 6 | SATURDAY | RepeatStatus | Value | Name | Description | | | | | | 0 | REPEAT STATUS UNKNOWN | Unknown. | | 1 | REPEAT STATUS ACTIVE | Active. | | 2 | REPEAT STATUS COMPLETED | Completed. | RecordStatus | Value | Name | Description | | | | | | 0 | NotStarted | Not started. | | 1 | Completed | Completed. | | 2 | Failed | Failed. | | 3 | Processing | Processing. | Integration guidance Authenticate users and validate meeting, room, recording, and tenant permissions in the business backend. Treat real time connection tokens and recording URLs as sensitive resources. Use the meeting chat Seq and creation marker together when incrementally restoring meeting chat." + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "添加会话到分组", + "description": "添加会话到分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups add-conversations-to-groups", + "content": "调用 addConversationsToGroups 将一个或多个会话添加到一个或多个会话分组。 await OpenIMSDK.addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要添加的会话 ID。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID。 | 返回结果 调用完成后,分组与会话的关联请求已完成。关联变化会通过 OnConversationGroupMemberAdded 事件通知,事件参数包含分组、会话 ID 和会话详情;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/user/account-governance/ban-user", - "title": "Ban users", - "description": "OpenIM Enterprise Platform API: ban specified users from continuing to use the service.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance ban-user", - "content": "Ban one or more users from continuing to use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/ban user Request example curl request POST \"$ API ADDRESS /user/ban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to ban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "从分组移除会话", + "description": "从分组移除会话。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups remove-conversations-from-groups", + "content": "调用 removeConversationsFromGroups 将一个或多个会话从指定会话分组中移除。 await OpenIMSDK.removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要移除的会话 ID。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID。 | 返回结果 调用完成后,分组与会话的关联移除请求已完成。关联变化会通过 OnConversationGroupMemberDeleted 事件通知,事件参数包含分组和会话 ID;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/user/account-governance/unban-user", - "title": "Unban users", - "description": "OpenIM Enterprise Platform API: remove the ban from specified users.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance unban-user", - "content": "Remove the ban from one or more OpenIM users. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unban user Request example curl request POST \"$ API ADDRESS /user/unban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "删除会话分组", + "description": "删除会话分组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", + "content": "调用 deleteConversationGroup 删除会话分组及其会话关联。 await OpenIMSDK.deleteConversationGroup conversationGroupID ; 参数 conversationGroupID 为会话分组 ID。 返回结果 调用完成后,分组删除请求已完成。该操作不会删除会话或消息。分组变化会通过 OnConversationGroupDeleted 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" }, { - "path": "/platform-api/user/account-governance/unregister-user", - "title": "Unregister users", - "description": "OpenIM Enterprise Platform API: unregister user accounts that no longer use the service.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance unregister-user", - "content": "Unregister one or more user accounts that no longer use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unregister user Request example curl request POST \"$ API ADDRESS /user/unregister user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unregister. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/group/overview-group", + "title": "群组概览", + "description": "了解 React Native SDK 中的群组资料、成员、入群申请和群组事件。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group overview-group", + "content": "OpenIM 的多人聊天由群组承载。在群组相关 API 中,使用 groupID 标识目标群组,例如查询群资料、管理群成员和处理入群申请。创建群组后,可从返回的群组信息中获取 groupID 。群聊会话使用 conversationID 标识,用于会话设置、消息历史和未读状态等操作。 conversationID 与 groupID 分别表示会话和群组,调用时不要混淆。 核心数据类型 | 类型 | 用途 | | | | | GroupItem | 群名称、头像、公告、群主、入群验证方式、成员数和扩展字段。 | | GroupMemberItem | 用户在指定群内的昵称、角色、禁言状态和入群信息。 | 群成员角色由 GroupMemberRole 表示: Normal 为普通成员, Admin 为管理员, Owner 为群主。 GroupItem 常用字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 群组 ID。 | | groupName | string | 群组名称。 | | notification | string | 群组公告。 | | friendUserIDs | string | 群组好友用户 ID 信息。 | | remark | string | 当前账号设置的群组备注。 | GroupMemberItem 常用字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 成员所属的群组 ID。 | | userID | string | 成员用户 ID。 | | nickname | string | 用户在当前群内的昵称。 | | faceURL | string | 用户在当前群内的头像地址。 | | roleLevel | GroupMemberRole | 成员角色。 | | muteEndTime | number | 禁言结束时间。 | | joinTime | number | 加入群组的时间。 | | joinSource | GroupJoinSource | 入群来源。 | | inviterUserID | string | 邀请该成员入群的用户 ID。 | | operatorUserID | string | 最近操作该成员资料的用户 ID。 | | ex | string | 群成员扩展字符串。 | nickname 、 faceURL 和 roleLevel 均属于当前群组中的成员资料;同一用户在其他群组中可能不同。 按任务查找页面 | 任务 | 页面 | | | | | 创建和维护群资料 | 创建群组 /sdk/react native/group/create group 、 更新群名称、简介和头像 /sdk/react native/group/update group profile 、 发布或更新群公告 /sdk/react native/group/set group announcement 、 设置群组扩展字段 /sdk/react native/group/set group extension | | 设置入群和成员权限 | 设置入群验证方式 /sdk/react native/group/set group join verification 、 设置成员资料查看权限 /sdk/react native/group/set group member profile access 、 设置群内添加好友权限 /sdk/react native/group/set group member friend permission | | 加入、退出或解散群组 | 申请加入群组 /sdk/react native/group/join group 、 退出群组 /sdk/react native/group/quit group 、 解散群组 /sdk/react native/group/dismiss group | | 查询群组 | 查询指定群组资料 /sdk/react native/group/retrieving groups/get specified groups info 、 分页获取已加入群组 /sdk/react native/group/retrieving groups/get joined group list page 、 搜索群组 /sdk/react native/group/retrieving groups/search groups | | 查询和处理入群申请 | 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 、 获取发出的入群申请 /sdk/react native/group/group applications/get group application list as applicant | | 查询和管理群成员 | 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 、 邀请用户加入群组 /sdk/react native/group/managing group members/invite user to group 、 移除群成员 /sdk/react native/group/managing group members/kick group member 、 设置管理员 /sdk/react native/group/managing group members/set group member role level 、 转让群主 /sdk/react native/group/managing group members/transfer group owner | | 管理群聊发言权限 | 设置群组全员禁言 /sdk/react native/group/change group mute 、 设置群成员禁言 /sdk/react native/group/managing group members/change group member mute | 监听群组变化 当前账号加入或退出群组、群资料变化以及群组解散时,分别触发 OnJoinedGroupAdded 、 OnJoinedGroupDeleted 、 OnGroupInfoChanged 和 OnGroupDismissed 。这些事件回调直接接收 GroupItem : const handleJoinedGroupAdded = group: GroupItem = // 将 group 添加到已加入群组列表 ; const handleJoinedGroupDeleted = group: GroupItem = // 根据 group.groupID 从已加入群组列表删除群组 ; const handleGroupInfoChanged = group: GroupItem = // 根据 group.groupID 更新群组资料 ; const handleGroupDismissed = group: GroupItem = // 根据 group.groupID 关闭或移除已解散的群组 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.on OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.off OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; 退出登录、切换账号或销毁群组相关状态时,取消这些监听。群成员变化的监听见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list ,入群申请变化的监听见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" }, { - "path": "/platform-api/user/account-governance/list-disabled-users", - "title": "List disabled users", - "description": "OpenIM Enterprise Platform API: list disabled accounts by user, status, and pagination criteria.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance list-disabled-users", - "content": "List disabled accounts by user ID, status, and pagination criteria. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/page find disable users Request example curl request POST \"$ API ADDRESS /user/page find disable users\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to query. | | status | No | int | Account status filter. | | pagination | Yes | RequestPagination | Pagination settings. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"users\": \"userID\": \"user 001\", \"nickname\": \"Example user\", \"faceURL\": \"https://example.com/avatar.png\", \"ex\": \" \", \"createTime\": 1719800000000, \"appMangerLevel\": 0, \"globalRecvMsgOpt\": 0, \"status\": 1, \"addFriendPermission\": 0, \"category\": \"default\" , \"total\": 1 Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | | data.users | UserInfo | User records. See UserInfo /platform api/user/overview userinfo . | | data.total | int | Total number of matching records. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Pagination and request array limits follow the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/group/create-group", + "title": "创建群组", + "description": "OpenIM React Native SDK 创建群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group create-group", + "content": "调用 createGroup 创建群组,并设置初始成员、管理员和群主。 const group = await OpenIMSDK.createGroup memberUserIDs: 'user 003', 'user 004' , adminUserIDs: 'user 002' , ownerUserID: currentUserID, groupInfo: groupName: '项目讨论组', groupType: GroupType.WorkingGroup, faceURL: 'https://example.com/group.png', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | memberUserIDs | string | 是 | 初始普通成员的用户 ID。 | | adminUserIDs | string | 否 | 初始管理员的用户 ID。 | | ownerUserID | string | 否 | 群主用户 ID;不传时使用当前用户。 | | groupInfo | Partial | 是 | 初始群资料。常用字段包括 groupName 、 groupType 和 faceURL 。 | 普通成员、管理员和群主不能重复。 groupInfo.groupType 使用 GroupType.WorkingGroup 创建普通群组。 返回结果 调用完成后返回新建群组的 GroupItem 。可以使用返回对象中的 groupID 打开群资料或群聊页面。当前账号加入群组后,会通过 OnJoinedGroupAdded 返回群组信息,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", - "title": "Delete sent friend requests", - "description": "OpenIM Enterprise Platform API: delete friend requests sent by a specified user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-sent-friend-requests", - "content": "Delete selected friend request records sent by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests from user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"fromUserID\":\"user 001\",\"toUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | fromUserID | Yes | string | User ID of the request sender. | | toUserIDs | Yes | string | User IDs of the request recipients whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request sender. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List sent friend requests /platform api/relation/managing friend requests/list sent friend requests" + "path": "/sdk/react-native/group/update-group-profile", + "title": "更新群名称、简介和头像", + "description": "OpenIM React Native SDK 更新群组资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group update-group-profile", + "content": "调用 setGroupInfo 更新群名称、群简介或群头像。只传入本次需要修改的字段。 await OpenIMSDK.setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string | 否 | 新群名称。 | | introduction | string | 否 | 新群简介。 | | faceURL | string | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个需要修改的群资料字段,未传入的字段保持原值。 返回结果 调用完成后,群组资料已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", - "title": "Delete received friend requests", - "description": "OpenIM Enterprise Platform API: delete friend requests received by a specified user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-received-friend-requests", - "content": "Delete selected friend request records received by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests to user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests to user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"toUserID\":\"user 001\",\"fromUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | toUserID | Yes | string | User ID of the request recipient. | | fromUserIDs | Yes | string | User IDs of the request senders whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request recipient. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List received friend requests /platform api/relation/managing friend requests/list received friend requests" + "path": "/sdk/react-native/group/set-group-announcement", + "title": "发布或更新群公告", + "description": "OpenIM React Native SDK 发布群公告。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-announcement", + "content": "调用 setGroupInfo 设置或更新群公告。 await OpenIMSDK.setGroupInfo groupID, notification: announcement, ; groupID 为目标群组 ID, notification 为公告内容。传入空字符串可以清空群公告;群公告与群简介 introduction 是两个独立字段。 返回结果 调用完成后,群公告已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/group/group-applications/get-group-application-badge-count", - "title": "Get the group application badge count", - "description": "OpenIM Enterprise Platform API: get the pending group-application badge count for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications get-group-application-badge-count", - "content": "Get the group application badge count currently displayed for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/get group application badge count Request example curl request POST \"$ API ADDRESS /group/get group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"data\": \"count\":1 Response properties | Property | Type | Description | | | | | | data.count | int | Current group application badge count. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to read the user's application state. Related pages Group overview /platform api/group/overview Clear the group application badge count /platform api/group/group applications/clear group application badge count" + "path": "/sdk/react-native/group/set-group-extension", + "title": "设置群组扩展字段", + "description": "OpenIM React Native SDK 设置群组扩展字段。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-extension", + "content": "调用 setGroupInfo 设置群组的 ex 扩展字段。 await OpenIMSDK.setGroupInfo groupID, ex: JSON.stringify projectID: 'project 42', , ; groupID 为目标群组 ID, ex 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 返回结果 调用完成后,群组扩展字段已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/group/group-applications/clear-group-application-badge-count", - "title": "Clear the group application badge count", - "description": "OpenIM Enterprise Platform API: clear the current group-application badge count for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications clear-group-application-badge-count", - "content": "Clear the group application badge count currently stored for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/clear group application badge count Request example curl request POST \"$ API ADDRESS /group/clear group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response The API returns the common response envelope. errCode is 0 when the count was cleared successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to update the user's application state. Related pages Group overview /platform api/group/overview Get the group application badge count /platform api/group/group applications/get group application badge count" + "path": "/sdk/react-native/group/set-group-join-verification", + "title": "设置入群验证方式", + "description": "OpenIM React Native SDK 设置进群验证。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-join-verification", + "content": "调用 setGroupInfo 设置申请和邀请用户加入群组时的验证方式。 await OpenIMSDK.setGroupInfo groupID, needVerification: GroupVerificationType.AllNeed, ; 参数说明 groupID 为目标群组 ID, needVerification 使用 GroupVerificationType : | 枚举值 | 数值 | 说明 | | | | | | GroupVerificationType.ApplyNeedInviteNot | 0 | 用户申请需要审核,群成员邀请可直接入群。 | | GroupVerificationType.AllNeed | 1 | 用户申请和普通成员邀请都需要审核;群主或管理员邀请除外。 | | GroupVerificationType.AllNot | 2 | 用户申请和邀请都可直接入群。 | 返回结果 调用完成后,群组入群验证方式已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/group/group-applications/delete-user-group-requests", - "title": "Delete applications sent by a user", - "description": "OpenIM Enterprise Platform API: delete a user's applications to selected groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications delete-user-group-requests", - "content": "Delete join application records sent by a user to selected groups. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests from user Request example curl request POST \"$ API ADDRESS /group/delete group requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\",\"groupIDs\": \"group 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User who sent the applications. | | groupIDs | Yes | string | Groups whose application records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target user. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List applications sent by a user /platform api/group/group applications/list user requested group applications" + "path": "/sdk/react-native/group/set-group-member-profile-access", + "title": "设置成员资料查看权限", + "description": "OpenIM React Native SDK 设置群成员资料权限。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-profile-access", + "content": "调用 setGroupInfo 设置群成员资料查看权限。该设置只控制群成员资料查看权限,与 设置群内添加好友权限 /sdk/react native/group/set group member friend permission 相互独立。 await OpenIMSDK.setGroupInfo groupID, lookMemberInfo: AllowType.NotAllowed, ; 参数说明 groupID 为目标群组 ID, lookMemberInfo 使用 AllowType : | 枚举值 | 数值 | 说明 | | | | | | AllowType.Allowed | 0 | 允许成员查看其他成员资料。 | | AllowType.NotAllowed | 1 | 不允许成员查看其他成员资料。 | 返回结果 调用完成后,群成员资料查看权限已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/group/group-applications/delete-group-received-requests", - "title": "Delete applications received by a group", - "description": "OpenIM Enterprise Platform API: delete selected applications received by a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications delete-group-received-requests", - "content": "Delete selected join application records received by a group. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests to group Request example curl request POST \"$ API ADDRESS /group/delete group requests to group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"groupID\":\"group 001\",\"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | Group that received the applications. | | userIDs | Yes | string | Applicants whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target group. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List group applications /platform api/group/group applications/list received group applications" + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "设置群内添加好友权限", + "description": "OpenIM React Native SDK 设置群成员好友申请权限。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-friend-permission", + "content": "调用 setGroupInfo 设置是否允许群成员通过群组关系向其他成员发送好友申请。该设置只控制从群成员关系发起好友申请的入口,与 设置成员资料查看权限 /sdk/react native/group/set group member profile access 相互独立。 await OpenIMSDK.setGroupInfo groupID, applyMemberFriend: AllowType.NotAllowed, ; 参数说明 groupID 为目标群组 ID, applyMemberFriend 使用 AllowType : | 枚举值 | 数值 | 说明 | | | | | | AllowType.Allowed | 0 | 允许通过群成员关系发起好友申请。 | | AllowType.NotAllowed | 1 | 不允许通过群成员关系发起好友申请。 | 返回结果 调用完成后,群内添加好友权限已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/content-processing/translate-text", - "title": "Translate text", - "description": "OpenIM Enterprise Platform API: translate text and return the detected source language.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message content-processing translate-text", - "content": "Translate text into a target language and return the detected source language. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /third/translate text Request example curl request POST \"$ API ADDRESS /third/translate text\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"content\":\"Hello\",\"sourceLanguageCode\":\"en\",\"targetLanguageCode\":\"zh CN\" ' Request body | Parameter | Required | Type | Description | | | | | | | content | Yes | string | Text to translate. | | sourceLanguageCode | Yes | string | Source BCP 47 language tag. Leave empty to enable detection. | | targetLanguageCode | Yes | string | Target BCP 47 language tag. | Response data.translatedText contains the translation and data.detectedLanguageCode contains the detected source BCP 47 tag. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Input size and language availability limits depend on the delivered translation service. Related pages Message overview /platform api/message/overview" + "path": "/sdk/react-native/group/change-group-mute", + "title": "设置群组全员禁言", + "description": "OpenIM React Native SDK 修改群组禁言状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group change-group-mute", + "content": "调用 changeGroupMute 开启或关闭群组全员禁言。 await OpenIMSDK.changeGroupMute groupID, isMute: true, muteBypassUserIDs: serviceAccountUserID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | isMute | boolean | 是 | true 开启群组禁言, false 关闭群组禁言。 | | muteBypassUserIDs 商业版 | string | 否 | 群组禁言期间仍允许发言的用户 ID。 | 不要把全部成员传入 muteBypassUserIDs 。群主和管理员是否可以发言由服务端权限控制。 返回结果 调用完成后,群组全员禁言设置已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/streaming-messages/append-stream-message", - "title": "Append stream-message packets", - "description": "OpenIM Enterprise Platform API: append indexed text packets to a stream message.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message streaming-messages append-stream-message", - "content": "Append a batch of indexed text packets to an existing stream message and optionally mark the stream complete. HTTP request POST API ADDRESS /msg/append stream msg Request example curl request POST \"$ API ADDRESS /msg/append stream msg\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"clientMsgID\":\"client msg 001\",\"startIndex\":0,\"packets\": \"Hello\", \" world\" ,\"end\":true ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | Conversation containing the stream message. | | clientMsgID | Yes | string | Client message ID of the stream message. | | startIndex | Yes | int | Index assigned to the first packet in this batch. | | packets | Yes | string | Ordered stream message packets. | | end | Yes | bool | Whether this batch completes the stream. | Response The common response has errCode: 0 when the batch was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Preserve packet indexes when retrying; do not blindly append duplicate content. Related pages Upload stream message content /platform api/message/streaming messages/put stream message" + "path": "/sdk/react-native/group/join-group", + "title": "申请加入群组", + "description": "OpenIM React Native SDK 申请加入群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group join-group", + "content": "调用 joinGroup 使用群组 ID、申请说明和加入途径发起入群请求。 await OpenIMSDK.joinGroup groupID, reqMsg: '申请加入项目讨论组', joinSource: GroupJoinSource.Search, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reqMsg | string | 是 | 入群申请说明;没有说明时传空字符串。 | | joinSource | GroupJoinSource | 是 | 发起入群的途径。 | | ex | string | 否 | 业务扩展字符串。 | joinSource 常用值如下: | 枚举值 | 数值 | 说明 | | | | | | GroupJoinSource.Invitation | 2 | 通过邀请加入。 | | GroupJoinSource.Search | 3 | 通过搜索加入。 | | GroupJoinSource.QrCode | 4 | 通过二维码加入。 | joinSource 只记录加入途径,不决定是否需要审核。 返回结果 调用完成后,入群请求已提交。当前账号成功加入群组后,会通过 OnJoinedGroupAdded 返回群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/streaming-messages/put-stream-message", - "title": "Upload stream-message content", - "description": "OpenIM Enterprise Platform API: continuously upload UTF-8 content to a stream message over HTTP PUT.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message streaming-messages put-stream-message", - "content": "Continuously write UTF 8 output from a model or business service to the same stream message. HTTP request PUT API ADDRESS /msg/append stream msg?conversationID= CONVERSATION ID &clientMsgID= CLIENT MSG ID &operationID= OPERATION ID Request example curl request PUT \"$ API ADDRESS /msg/append stream msg?conversationID=si user 001 user 002&clientMsgID=client msg 001&operationID=$ OPERATION ID \" \\ header \"Content Type: text/plain; charset=utf 8\" header \"token: $ TOKEN \" \\ data binary 'Generated response content' Request parameters | Parameter | Location | Required | Type | Description | | | | | | | | conversationID | Query or header | Yes | string | Conversation containing the stream message. | | clientMsgID | Query or header | Yes | string | Client message ID of the stream message. | | operationID | Query or header | Yes | string | Unique trace ID for this request. | | token | Header | Yes | string | Valid user or administrator token. | | body | Body | Yes | bytes | UTF 8 stream message content. | Response The server returns write results as a stream. Handle interrupted connections and partial writes; do not retry a chunk until its state is known. Permissions and limits Available only in OpenIM Enterprise. The body must be valid UTF 8. conversationID and clientMsgID must identify the same appendable stream message. Related pages Append stream message packets /platform api/message/streaming messages/append stream message" + "path": "/sdk/react-native/group/quit-group", + "title": "退出群组", + "description": "OpenIM React Native SDK 退出群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group quit-group", + "content": "调用 quitGroup 退出当前账号已加入的群组。 await OpenIMSDK.quitGroup groupID ; groupID 为要退出的群组 ID。群主如果要退出群组,需要先转让群主身份。 返回结果 调用完成后,当前账号已退出目标群组。当前账号成功退出群组后,会触发 OnJoinedGroupDeleted ,回调参数为对应的群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/read-status/mark-conversation-read", - "title": "Mark a conversation read through a Seq", - "description": "OpenIM Enterprise Platform API: advance a user's read position in a conversation to a message Seq.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message read-status mark-conversation-read", - "content": "Advance a user's read position in a conversation to the specified message Seq. Use this for read state migration or correction when the exact read boundary is known. HTTP request POST API ADDRESS /msg/mark conversation read Request example curl request POST \"$ API ADDRESS /msg/mark conversation read\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"userID\":\"user 001\",\"seq\":125 ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | userID | Yes | string | User whose read position is updated. | | seq | Yes | int | Last message Seq treated as read. | Response The common response has errCode: 0 when the read position was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the Seq belongs to the specified conversation before changing imported state. Related pages Set a conversation unread count /platform api/message/unread count/reset conversation unread" + "path": "/sdk/react-native/group/dismiss-group", + "title": "解散群组", + "description": "OpenIM React Native SDK 解散群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group dismiss-group", + "content": "调用 dismissGroup 解散群组。 await OpenIMSDK.dismissGroup groupID ; groupID 为要解散的群组 ID。解散群组会影响所有成员,调用权限由服务端校验。 返回结果 调用完成后,群组已解散。群组解散后,相关客户端会触发 OnGroupDismissed ,回调参数为已解散的群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/managing-messages/modify-message", - "title": "Modify a message", - "description": "Modify message content by conversation ID and Seq with the OpenIM Enterprise Platform API.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message managing-messages modify-message", - "content": "Modify the content of a message identified by conversation ID and Seq. The response reports the modification time and count. This endpoint is available in OpenIM Enterprise. HTTP request POST API ADDRESS /msg/modify message Request example curl request POST \"$ API ADDRESS /msg/modify message\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"seq\":1,\"newContent\":\"updated content\",\"oldContent\":\"original content\" ' Enterprise: this endpoint requires the corresponding Enterprise service. Availability and authorization depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | seq | Yes | int | Message Seq. | | newContent | Yes | string | New message content. | | oldContent | Yes | string | Previous message content used for concurrency validation. | Response \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"modifiedTime\": 1719800000000, \"modifiedCount\": 1 | Field | Type | Description | | | | | | data.modifiedTime | int | Modification time as a Unix timestamp in milliseconds. | | data.modifiedCount | int | Number of modifications recorded for the message. | Authorize the operator and target resource in your business backend. Relevant clients can receive the synchronized message change according to the delivered Enterprise version. Related pages Message overview /platform api/message/overview Revoke a message /platform api/message/managing messages/revoke msg Error codes /platform api/error codes" + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "查询指定群组资料", + "description": "按群组 ID 批量查询群组资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-specified-groups-info", + "content": "调用 getSpecifiedGroupsInfo ,根据群组 ID 查询指定群组的资料。 const groups = await OpenIMSDK.getSpecifiedGroupsInfo 'group 001', 'group 002', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组。 | 返回结果 调用完成后返回匹配的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/unread-count/get-conversations-unread-count", - "title": "Get conversation unread counts", - "description": "OpenIM Enterprise Platform API: get a user's unread counts for selected conversations.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message unread-count get-conversations-unread-count", - "content": "Get a user's unread message counts for selected conversations. HTTP request POST API ADDRESS /msg/get conversations unread count Request example curl request POST \"$ API ADDRESS /msg/get conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is queried. | | conversationIDs | Yes | string | Conversations to query. | Response data.unreadCount maps each conversation ID to its unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Message overview /platform api/message/overview" + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "获取已加入群组", + "description": "查询当前账号已加入的全部群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list", + "content": "调用 getJoinedGroupList 获取当前账号已加入的全部群组。 const groups = await OpenIMSDK.getJoinedGroupList ; 返回结果 调用完成后返回 GroupItem 。群组数量较多时,可使用 分页获取已加入群组 /sdk/react native/group/retrieving groups/get joined group list page 分批读取。" }, { - "path": "/platform-api/message/unread-count/clear-conversations-unread-count", - "title": "Clear conversation unread counts", - "description": "OpenIM Enterprise Platform API: clear a user's unread counts in selected conversations.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message unread-count clear-conversations-unread-count", - "content": "Clear a user's unread counts in selected conversations. HTTP request POST API ADDRESS /msg/clear conversations unread count Request example curl request POST \"$ API ADDRESS /msg/clear conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is cleared. | | conversationIDs | Yes | string | Conversations to clear. | Response data.unreadCount maps each requested conversation ID to its resulting unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Clearing unread counts changes user state; validate the target user and conversations. Related pages Get conversation unread counts /platform api/message/unread count/get conversations unread count" + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "分页获取已加入群组", + "description": "分页查询当前账号已加入的群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list-page", + "content": "调用 getJoinedGroupListPage 分页获取当前账号已加入的群组。 const groups = await OpenIMSDK.getJoinedGroupListPage offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的群组数量。 | 继续读取下一页时,将 offset 设置为已读取的群组数量。 返回结果 调用完成后返回当前页的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/message/unread-count/reset-conversation-unread", - "title": "Set a conversation unread count", - "description": "OpenIM Enterprise Platform API: set a target unread count for migration or state correction.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message unread-count reset-conversation-unread", - "content": "Set a target unread count for a user in selected conversations. This operation is intended for data migration or state correction; it is distinct from setting an exact read Seq. HTTP request POST API ADDRESS /msg/reset conversation unread Request example curl request POST \"$ API ADDRESS /msg/reset conversation unread\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"num\":3 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is changed. | | conversationIDs | Yes | string | Conversations to update. | | num | Yes | int | Target unread count. | Response The common response has errCode: 0 when the target state was applied. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. For an exact imported read boundary, use Mark a conversation read through a Seq /platform api/message/read status/mark conversation read . Related pages Migrate to OpenIM /platform api/migration to openim" + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "检查是否已加入群组", + "description": "检查当前账号是否已加入指定群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups is-join-group", + "content": "调用 isJoinGroup 检查当前账号是否已加入指定群组。 const isJoined = await OpenIMSDK.isJoinGroup 'group 001' ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要检查的群组 ID。 | 返回结果 调用完成后返回 boolean : true 表示当前账号已加入群组, false 表示尚未加入。" }, { - "path": "/platform-api/conversation/conversation-groups/create-conversation-group", - "title": "Create a conversation group", - "description": "OpenIM Enterprise Platform API: create a conversation group for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups create-conversation-group", - "content": "Create a conversation group for a user and optionally add one conversation to it. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/create conversation group Request example curl request POST \"$ API ADDRESS /conversation/create conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"order\":1,\"ex\":\" \",\"conversationID\":\"si user 001 user 002\",\"conversationGroupType\":1 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the group. | | name | Yes | string | Display name. | | order | Yes | int | Display order. | | ex | No | string | Business extension data. | | conversationID | No | string | Conversation to add when creating the group. | | conversationGroupType | Yes | ConversationGroupType | 0 : normal group; 1 : filter group. | Response data.group contains the created ConversationGroup /platform api/conversation/overview conversationgroup , including its ID, conversations, type, order, version, and creation time. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over ownerUserID and the optional conversation. Related pages Conversation overview /platform api/conversation/overview List conversation groups /platform api/conversation/conversation groups/list conversation groups" + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "搜索群组", + "description": "搜索当前账号可查询的群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups search-groups", + "content": "调用 searchGroups ,按群组 ID 或群名称搜索群组。 const groups = await OpenIMSDK.searchGroups keywordList: '项目' , isSearchGroupID: false, isSearchGroupName: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词列表。 | | isSearchGroupID | boolean | 是 | 是否匹配群组 ID。 | | isSearchGroupName | boolean | 是 | 是否匹配群组名称。 | 返回结果 调用完成后返回匹配的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/conversation/conversation-groups/update-conversation-group", - "title": "Update a conversation group", - "description": "OpenIM Enterprise Platform API: update a conversation group's name, extension data, or hidden state.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups update-conversation-group", - "content": "Update a conversation group's display name, extension data, or hidden state. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/update conversation group Request example curl request POST \"$ API ADDRESS /conversation/update conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"ex\":\" \",\"Hidden\":false ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | | name | No | StringValue | New display name. | | ex | No | StringValue | New business extension data. | | Hidden | No | BoolValue | Whether the group is hidden. The request field uses this exact capitalization. | Response data.group contains the updated ConversationGroup /platform api/conversation/overview conversationgroup . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit optional wrapper fields that should remain unchanged. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "获取收到的入群申请", + "description": "查询当前账号收到的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-recipient", + "content": "群主或管理员可以调用 getGroupApplicationListAsRecipient 查询收到的入群申请。 const applications = await OpenIMSDK.getGroupApplicationListAsRecipient groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | | handleResults | number | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的申请数量。 | ApplicationHandleResult 的常用值如下: | 枚举值 | 数值 | 含义 | | | | | | ApplicationHandleResult.Unprocessed | 0 | 待处理。 | | ApplicationHandleResult.Agree | 1 | 已同意。 | | ApplicationHandleResult.Reject | 1 | 已拒绝。 | 返回结果 调用完成后返回当前账号有权处理的 GroupApplicationItem 。 入群申请字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 申请加入的群组 ID。 | | userID | string | 申请人的用户 ID。 | | nickname | string | 申请记录中的申请人昵称。 | | userFaceURL | string | 申请记录中的申请人头像地址。 | | reqMsg | string | 入群申请附言。 | | reqTime | number | 申请时间。 | | joinSource | GroupJoinSource | 入群申请来源。 | | handleResult | ApplicationHandleResult | 当前处理结果。 | | handleUserID | string | 处理申请的用户 ID。 | | handledMsg | string | 处理申请时填写的说明。 | | handledTime | number | 处理时间。 | | groupName | string | 申请记录中的群组名称。 | | groupFaceURL | string | 申请记录中的群组头像地址。 | | groupType | GroupType | 群组类型。 | | ownerUserID | string | 群主用户 ID。 | | creatorUserID | string | 群组创建者用户 ID。 | | introduction | string | 申请记录中的群组简介。 | | notification | string | 申请记录中的群组公告。 | | memberCount | number | 申请记录中的群成员数量。 | | status | GroupStatus | 申请记录中的群组状态。 | | createTime | number | 申请记录创建时间,Unix 毫秒时间戳。 | | ex | string | 申请记录扩展字符串。 | 申请记录中的昵称、头像和群组资料以记录创建时的内容为准。需要展示最新资料时,分别查询当前用户资料或群组资料。 监听入群申请变化 新增、处理或删除入群申请时,分别触发 OnGroupApplicationAdded 、 OnGroupApplicationAccepted 、 OnGroupApplicationRejected 或 OnGroupApplicationDeleted 。事件回调直接接收 GroupApplicationItem : const handleApplicationChanged = application: GroupApplicationItem = // 按 groupID 和 userID 更新申请记录 ; const handleApplicationDeleted = application: GroupApplicationItem = // 按 groupID 和 userID 删除申请记录 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; 退出登录、切换账号或销毁申请列表状态时,取消这些监听。" }, { - "path": "/platform-api/conversation/conversation-groups/delete-conversation-group", - "title": "Delete a conversation group", - "description": "OpenIM Enterprise Platform API: delete a conversation group owned by a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups delete-conversation-group", - "content": "Delete a conversation group owned by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/delete conversation group Request example curl request POST \"$ API ADDRESS /conversation/delete conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | Response The common response has errCode: 0 when the group was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Deleting a group does not delete the conversations it contained. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "获取发出的入群申请", + "description": "查询当前账号发出的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-applicant", + "content": "调用 getGroupApplicationListAsApplicant 查询当前账号发出的入群申请。 const applications = await OpenIMSDK.getGroupApplicationListAsApplicant groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed, ApplicationHandleResult.Agree, ApplicationHandleResult.Reject, , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | | handleResults | number | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的申请数量。 | ApplicationHandleResult 的取值见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。 返回结果 调用完成后返回当前账号发出的 GroupApplicationItem 。申请字段说明和申请变化事件监听见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" }, { - "path": "/platform-api/conversation/conversation-groups/list-conversation-groups", - "title": "List conversation groups", - "description": "OpenIM Enterprise Platform API: get a user's conversation groups and synchronization version.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups list-conversation-groups", - "content": "Get a user's conversation groups and their synchronization version. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/get conversation groups Request example curl request POST \"$ API ADDRESS /conversation/get conversation groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"maxVersion\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | maxVersion | No | Int64Value | Highest group version already known by the caller. | Response | Property | Type | Description | | | | | | data.groups | ConversationGroup | Group records. See ConversationGroup /platform api/conversation/overview conversationgroup . | | data.maxVersion | int | Highest version represented by this result. | | data.full | bool | Whether the result is a full snapshot. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Treat full and maxVersion as synchronization metadata; do not infer a full snapshot from an empty array alone. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "获取未处理入群申请数", + "description": "查询指定时间点之后未处理的入群申请数量。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-unhandled-count", + "content": "调用 getGroupApplicationUnhandledCount 查询指定时间点之后仍未处理的入群申请数量。 const count = await OpenIMSDK.getGroupApplicationUnhandledCount time: 0, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | time | number | 是 | 统计起点的 Unix 毫秒时间戳;传 0 表示统计全部待处理申请。 | 返回结果 调用完成后返回 number ,表示指定时间点之后待处理的入群申请数量。" }, { - "path": "/platform-api/conversation/conversation-groups/set-conversation-group-order", - "title": "Set conversation group order", - "description": "OpenIM Enterprise Platform API: set the display order of a user's conversation groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups set-conversation-group-order", - "content": "Set the display order of multiple conversation groups for a user. HTTP request POST API ADDRESS /conversation/set conversation group order Request example curl request POST \"$ API ADDRESS /conversation/set conversation group order\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"orders\": \"conversationGroupID\":\"conversation group 001\",\"order\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | orders | Yes | ConversationGroupOrder | Group IDs and their target order values. See ConversationGroupOrder /platform api/conversation/overview conversationgrouporder . | Response The common response has errCode: 0 when the order was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Supply each target group at most once. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "接受入群申请", + "description": "同意指定用户的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications accept-group-application", + "content": "调用 acceptGroupApplication 同意指定用户的入群申请。 await OpenIMSDK.acceptGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: '同意加入', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请对应的群组 ID。 | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | handleMsg | string | 是 | 处理说明;没有说明时传空字符串。 | 调用完成后,入群申请已被同意。申请状态变化时会触发 OnGroupApplicationAccepted ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" }, { - "path": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", - "title": "Add conversations to groups", - "description": "OpenIM Enterprise Platform API: add conversations to one or more conversation groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups add-conversations-to-groups", - "content": "Add selected conversations to one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/add conversations to groups Request example curl request POST \"$ API ADDRESS /conversation/add conversations to groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to add. | | conversationGroupIDs | Yes | string | Destination group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "拒绝入群申请", + "description": "拒绝指定用户的入群申请。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications refuse-group-application", + "content": "调用 refuseGroupApplication 拒绝指定用户的入群申请。 await OpenIMSDK.refuseGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: '暂不接受该申请', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请对应的群组 ID。 | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | handleMsg | string | 是 | 拒绝原因;没有说明时传空字符串。 | 调用完成后,入群申请已被拒绝。申请状态变化时会触发 OnGroupApplicationRejected ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" }, { - "path": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", - "title": "Remove conversations from groups", - "description": "OpenIM Enterprise Platform API: remove conversations from one or more conversation groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups remove-conversations-from-groups", - "content": "Remove selected conversations from one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/remove conversations from groups Request example curl request POST \"$ API ADDRESS /conversation/remove conversations from groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to remove. | | conversationGroupIDs | Yes | string | Source group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Removing a conversation from a group does not delete the conversation. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "删除入群申请", + "description": "批量删除指定的入群申请记录。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications delete-group-requests", + "content": "调用 deleteGroupRequests 批量删除指定的入群申请记录。 await OpenIMSDK.deleteGroupRequests fromUserID: application.userID, groupID: application.groupID, , ; 参数说明 数组中的每一项包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | groupID | string | 是 | 申请对应的群组 ID。 | 删除申请记录不会处理待处理申请。如需同意或拒绝申请,分别使用 接受入群申请 /sdk/react native/group/group applications/accept group application 和 拒绝入群申请 /sdk/react native/group/group applications/refuse group application 。 调用完成后表示删除请求已完成。申请记录删除时会触发 OnGroupApplicationDeleted ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" }, { - "path": "/platform-api/timer/managing-tasks/create-timer-task", - "title": "Create a timer task", - "description": "OpenIM Enterprise Platform API: schedule a task that invokes a business callback.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks create-timer-task", - "content": "Schedule a task that invokes a configured business handler at the specified time. HTTP request POST API ADDRESS /timer/create timer task Request example curl request POST \"$ API ADDRESS /timer/create timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskName\":\"Reminder\",\"taskCategory\":\"reminder\",\"executeAt\":1719800000000,\"executeBefore\":1719800060000,\"maxRetry\":1,\"callbackConfig\": \"callbackMethod\":\"openim http\",\"callbackPayload\":\" \\\"event\\\":\\\"reminder\\\" \" ,\"userID\":\"user 001\",\"dedupKey\":\"reminder 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskName | Yes | string | Task name. | | taskCategory | Yes | string | Business defined category. | | executeAt | Yes | int | Scheduled Unix time in milliseconds. | | executeBefore | Yes | int | Latest permitted execution time in milliseconds. | | maxRetry | Yes | int | Maximum retry count. | | callbackConfig | Yes | TimerTaskCallbackConfig | See TimerTaskCallbackConfig /platform api/timer/overview timertaskcallbackconfig . | | userID | Yes | string | Associated OpenIM user ID. | | dedupKey | Yes | string | Stable business idempotency key. | Response data.task contains the created TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Reuse dedupKey when retrying the same logical creation request. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "分页查询群成员", + "description": "分页查询指定群组的成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-group-member-list", + "content": "调用 getGroupMemberList 分页查询指定群组的成员,并按成员角色筛选。 const members = await OpenIMSDK.getGroupMemberList groupID: 'group 001', filter: GroupMemberFilter.All, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | filter | GroupMemberFilter | 是 | 成员角色筛选条件。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的成员数量。 | GroupMemberFilter 的取值如下: | 枚举值 | 数值 | 说明 | | | | | | GroupMemberFilter.All | 0 | 全部成员。 | | GroupMemberFilter.Owner | 1 | 仅群主。 | | GroupMemberFilter.Admin | 2 | 仅管理员。 | | GroupMemberFilter.Normal | 3 | 仅普通成员。 | | GroupMemberFilter.AdminAndNormal | 4 | 管理员和普通成员。 | | GroupMemberFilter.AdminAndOwner | 5 | 管理员和群主。 | 继续读取下一页时,将 offset 设置为已读取的成员数量。 返回结果 调用完成后返回当前页的 GroupMemberItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。 监听群成员变化 成员加入、退出或资料变化时,分别触发 OnGroupMemberAdded 、 OnGroupMemberDeleted 和 OnGroupMemberInfoChanged 。事件回调直接接收 GroupMemberItem : const handleMemberAdded = member: GroupMemberItem = // 将 member 添加到对应群组的成员列表 ; const handleMemberDeleted = member: GroupMemberItem = // 根据 member.groupID 和 member.userID 删除成员 ; const handleMemberChanged = member: GroupMemberItem = // 根据 member.groupID 和 member.userID 更新成员资料 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.on OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.off OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; 退出登录、切换账号或销毁成员列表状态时,取消这些监听。" }, { - "path": "/platform-api/timer/managing-tasks/update-timer-task", - "title": "Update a timer task", - "description": "OpenIM Enterprise Platform API: update timer execution, retry, category, and callback settings.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks update-timer-task", - "content": "Update a timer task's schedule, category, retry policy, or callback configuration. HTTP request POST API ADDRESS /timer/update timer task Request example curl request POST \"$ API ADDRESS /timer/update timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"taskName\":\"Updated reminder\",\"executeAt\":1719900000000,\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | | taskName | No | string | New name. | | taskCategory | No | string | New business category. | | executeAt | No | int | New execution time in Unix milliseconds. | | executeBefore | No | int | New latest execution time in Unix milliseconds. | | maxRetry | No | int | New maximum retry count. | | callbackConfig | No | TimerTaskCallbackConfig | New callback configuration. | Response The common response has errCode: 0 when the task was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit fields that should remain unchanged. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "查询指定群成员资料", + "description": "查询指定用户在目标群组中的成员资料。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-specified-group-members-info", + "content": "调用 getSpecifiedGroupMembersInfo 查询指定用户在一个群组中的成员资料。 const members = await OpenIMSDK.getSpecifiedGroupMembersInfo groupID: 'group 001', userIDList: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要查询的成员用户 ID 数组。 | 返回结果 调用完成后返回匹配的 GroupMemberItem ,字段说明见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/timer/managing-tasks/delete-timer-task", - "title": "Delete a timer task", - "description": "OpenIM Enterprise Platform API: delete a specified timer task owned by a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks delete-timer-task", - "content": "Delete a specified timer task owned by a user. HTTP request POST API ADDRESS /timer/delete timer task Request example curl request POST \"$ API ADDRESS /timer/delete timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response The common response has errCode: 0 when the task was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Do not assume deletion cancels a callback that has already started executing. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "查询用户入群状态", + "description": "查询一组用户中哪些用户属于指定群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-users-in-group", + "content": "调用 getUsersInGroup 查询指定用户中已加入目标群组的用户 ID。 const userIDs = await OpenIMSDK.getUsersInGroup groupID: 'group 001', userIDList: 'user 001', 'user 002', 'user 003' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要检查的用户 ID 数组。 | 返回结果 调用完成后返回 string ,其中包含已加入目标群组的用户 ID。" }, { - "path": "/platform-api/timer/managing-tasks/get-timer-task", - "title": "Get a timer task", - "description": "OpenIM Enterprise Platform API: get a timer task by task and user ID.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks get-timer-task", - "content": "Get the complete configuration of a timer task. HTTP request POST API ADDRESS /timer/get timer task Request example curl request POST \"$ API ADDRESS /timer/get timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response data.task contains the requested TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may access the target user's task. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "搜索群成员", + "description": "在指定群组中搜索成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members search-group-members", + "content": "调用 searchGroupMembers ,按用户 ID 或群内昵称搜索指定群组中的成员。 const members = await OpenIMSDK.searchGroupMembers groupID: 'group 001', keywordList: '张' , isSearchUserID: false, isSearchMemberNickname: true, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | keywordList | string | 是 | 搜索关键词列表。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchMemberNickname | boolean | 是 | 是否匹配群内昵称。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的成员数量。 | 返回结果 调用完成后返回当前页匹配的 GroupMemberItem ,字段说明见 群组概览 /sdk/react native/group/overview group 。" }, { - "path": "/platform-api/timer/managing-tasks/list-timer-tasks", - "title": "List timer tasks", - "description": "OpenIM Enterprise Platform API: list a user's timer tasks by category with pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks list-timer-tasks", - "content": "List a user's timer tasks, optionally restricted to selected business categories. HTTP request POST API ADDRESS /timer/list timer task Request example curl request POST \"$ API ADDRESS /timer/list timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"pageCount\":1,\"pageSize\":20,\"userID\":\"user 001\",\"categories\": \"reminder\" ' Request body | Parameter | Required | Type | Description | | | | | | | pageCount | Yes | int | Page number starting at 1 . | | pageSize | Yes | int | Number of records per page. | | userID | Yes | string | User whose tasks are queried. | | categories | Yes | string | Business category filters. | Response data.tasks contains an array of TimerTask /platform api/timer/overview timertask records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Page size limits follow the delivered server version. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "邀请用户加入群组", + "description": "邀请一个或多个用户加入指定群组。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members invite-user-to-group", + "content": "调用 inviteUserToGroup 邀请一个或多个用户加入群组。 await OpenIMSDK.inviteUserToGroup groupID: 'group 001', reason: '邀请加入项目讨论组', userIDList: 'user 002', 'user 003' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 邀请说明;没有说明时传空字符串。 | | userIDList | string | 是 | 要邀请的用户 ID 数组。 | 调用完成后,邀请请求已提交。当用户实际加入群组时,会触发 OnGroupMemberAdded ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + }, + { + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "移除群成员", + "description": "从指定群组移除一个或多个成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members kick-group-member", + "content": "调用 kickGroupMember 从群组中移除一个或多个成员。 await OpenIMSDK.kickGroupMember groupID: 'group 001', reason: '已离开项目', userIDList: 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 移除原因;没有说明时传空字符串。 | | userIDList | string | 是 | 要移除的成员用户 ID 数组。 | 调用完成后,指定成员已被移出群组。成员移除时会触发 OnGroupMemberDeleted ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/book-meeting", - "title": "Schedule a meeting", - "description": "OpenIM Enterprise Platform API: schedule a meeting for a future start time.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management book-meeting", - "content": "Schedule a meeting for a future start time. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /rtc meeting/book meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/book meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Weekly sync\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": \"user 002\" ,\"inviteeUserIDs\": \"user 003\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ,\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence rule. Use a non recurring rule when scheduling a single meeting. | Response data.detail contains the created MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Scheduling does not return a real time connection token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate creator, host, co host, invitee, and tenant boundaries on your backend. All meeting times are Unix timestamps in milliseconds; meetingDuration is in seconds. Related pages Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "修改群内昵称", + "description": "修改指定成员在一个群组中的昵称。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-nickname", + "content": "调用 setGroupMemberInfo 修改指定成员的群内昵称。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', nickname: '项目负责人', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要修改昵称的成员用户 ID。 | | nickname | string | 是 | 成员在该群组中的新昵称。 | 群内昵称只作用于指定群组,不会修改用户的账号昵称。 调用完成后,群内昵称已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/create-immediate-meeting", - "title": "Create an immediate meeting", - "description": "OpenIM Enterprise Platform API: create a meeting immediately and return real-time connection details.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management create-immediate-meeting", - "content": "Create a meeting immediately and return the real time audio and video connection details for the creator. HTTP request POST API ADDRESS /rtc meeting/create immediate meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/create immediate meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Support call\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": ,\"inviteeUserIDs\": \"user 002\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":true,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule metadata, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | Response | Property | Type | Description | | | | | | data.detail | MeetingInfoSetting | Created meeting details and settings. | | data.liveKit | LiveKit | Real time service URL and access token for the creator. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Return data.liveKit only to the authenticated participant for whom it was issued. Related pages Join a meeting /platform api/meeting/meeting management/join meeting Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "设置管理员", + "description": "设置或取消指定成员的管理员身份。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-role-level", + "content": "调用 setGroupMemberInfo 设置指定成员为管理员,或取消其管理员身份。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', roleLevel: GroupMemberRole.Admin, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置角色的成员用户 ID。 | | roleLevel | GroupMemberRole | 是 | 要设置的成员角色。 | | 枚举值 | 数值 | 说明 | | | | | | GroupMemberRole.Normal | 20 | 普通成员;传入该值可取消管理员身份。 | | GroupMemberRole.Admin | 60 | 管理员。 | | GroupMemberRole.Owner | 100 | 群主角色,仅用于识别当前角色。 | 不能通过设置 GroupMemberRole.Owner 转让群主,应使用 转让群主 /sdk/react native/group/managing group members/transfer group owner 。 调用完成后,成员角色已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/join-meeting", - "title": "Join a meeting", - "description": "OpenIM Enterprise Platform API: validate a participant and meeting password, then issue connection details.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management join-meeting", - "content": "Validate the meeting and password, admit a participant, and issue real time connection details. HTTP request POST API ADDRESS /rtc meeting/join meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/join meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\",\"password\":\"123456\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | password | Yes | string | Meeting password; use an empty string for a meeting without a password. | Response data.liveKit contains the LiveKit /platform api/meeting/overview livekit service URL and participant access token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Issue connection details only after authenticating userID in your business system. Do not share or persist the returned participant token outside the meeting session. Related pages Get a meeting token /platform api/meeting/meeting management/get meeting token Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "更新群成员头像", + "description": "更新指定成员在一个群组中的头像。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-avatar", + "content": "调用 setGroupMemberInfo 更新指定成员的群内头像。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', faceURL: 'https://example.com/avatar.png', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要更新头像的成员用户 ID。 | | faceURL | string | 是 | 成员在该群组中的头像地址。 | 群内头像只作用于指定群组。需要修改账号头像时,使用 更新当前用户资料 /sdk/react native/user/profile/set self info 。 调用完成后,群内头像已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/get-meeting-token", - "title": "Get a meeting token", - "description": "OpenIM Enterprise Platform API: issue real-time meeting connection details for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting-token", - "content": "Issue real time audio and video connection details for a specified meeting participant. HTTP request POST API ADDRESS /rtc meeting/get meeting token Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting token\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant for whom the token is issued. | Response data.meetingID identifies the meeting and data.liveKit contains the LiveKit /platform api/meeting/overview livekit URL and participant token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Authenticate the participant before issuing the token and return it only to that participant. Related pages Join a meeting /platform api/meeting/meeting management/join meeting" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "设置群成员扩展字段", + "description": "设置指定群成员的扩展字符串。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-extension", + "content": "调用 setGroupMemberInfo 设置指定成员的 ex 扩展字段。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', ex: JSON.stringify title: 'maintainer', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置扩展字段的成员用户 ID。 | | ex | string | 是 | 群成员扩展字符串,可按业务需要传递 JSON 字符串或其他格式的字符串。 | 调用完成后,成员扩展字段已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/update-meeting", - "title": "Update a meeting", - "description": "OpenIM Enterprise Platform API: update selected meeting information, settings, and invitees.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management update-meeting", - "content": "Update selected meeting information, recurrence settings, participant permissions, and invitees. HTTP request POST API ADDRESS /rtc meeting/update meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/update meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"updatingUserID\":\"user 001\",\"title\":\"Updated weekly sync\",\"scheduledTime\":1719900000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ,\"repeatMeetingID\":\"repeat meeting 001\",\"repeatSequence\":1 ,\"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"inviteeInfo\": \"inviteeUserIDs\": \"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | updatingUserID | Yes | string | User performing the update. | | title | No | StringValue | New title. | | scheduledTime | No | Int64Value | New start time in Unix milliseconds. | | meetingDuration | No | Int64Value | New duration in seconds. | | password | No | StringValue | New password, including an empty value to remove it. | | timeZone | No | StringValue | New creator selected time zone. | | repeatInfo | Yes | MeetingRepeatInfo | Recurrence information associated with this meeting. | | canParticipantsEnableCamera | No | BoolValue | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | No | BoolValue | Whether participants may unmute microphones. | | canParticipantsShareScreen | No | BoolValue | Whether participants may share screens. | | disableCameraOnJoin | No | BoolValue | Whether cameras start disabled. | | disableMicrophoneOnJoin | No | BoolValue | Whether microphones start muted. | | canParticipantJoinMeetingEarly | No | BoolValue | Whether participants may join early. | | lockMeeting | No | BoolValue | Whether new participants are blocked from joining. | | audioEncouragement | No | BoolValue | Whether active speaker highlighting is enabled. | | videoMirroring | No | BoolValue | Whether video mirroring is enabled. | | inviteeInfo | Yes | InviteeInfo | Updated invitee user IDs. | Response The common response has errCode: 0 when the update was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Use wrapper fields to distinguish omitted values from explicit zero, empty, or false values. Related pages Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "转让群主", + "description": "将群主身份转让给另一名群成员。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members transfer-group-owner", + "content": "调用 transferGroupOwner 将群主身份转让给另一名群成员。 await OpenIMSDK.transferGroupOwner groupID: 'group 001', newOwnerUserID: 'user 002', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | newOwnerUserID | string | 是 | 新群主的用户 ID,必须是该群组的成员。 | 调用完成后,群主身份已转让。原群主和新群主的成员角色变化会通过 OnGroupMemberInfoChanged 通知;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/get-meeting", - "title": "Get a meeting", - "description": "OpenIM Enterprise Platform API: get a meeting's details, settings, and recurrence information.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting", - "content": "Get a meeting's system and creator defined information, meeting settings, and recurrence information. HTTP request POST API ADDRESS /rtc meeting/get meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"meetingID\":\"meeting 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the meeting. | | meetingID | Yes | string | Meeting ID. | Response data.meetingDetail contains a MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the requesting user may view the target meeting. Related pages Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "设置群成员禁言", + "description": "设置或解除指定群成员的禁言状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", + "content": "调用 changeGroupMemberMute 设置指定成员的禁言时长;传入 0 可解除禁言。 await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置禁言的成员用户 ID。 | | mutedSeconds | number | 是 | 禁言时长,单位为秒;传 0 解除禁言。 | 调用完成后,成员禁言状态已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ,可读取事件参数的 muteEndTime 获取禁言结束时间;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" }, { - "path": "/platform-api/meeting/meeting-management/list-meetings", - "title": "List a user's meetings", - "description": "OpenIM Enterprise Platform API: list meetings created or attended by a user, filtered by status.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management list-meetings", - "content": "List meetings created or attended by a user, restricted to selected meeting statuses. HTTP request POST API ADDRESS /rtc meeting/get meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose meetings are queried. | | status | Yes | string | Meeting status filters. | Response data.meetingDetails contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Status values must match those supported by the delivered meeting service. Related pages Get user related meetings /platform api/meeting/meeting management/get user related meetings" + "path": "/sdk/react-native/message/overview-message", + "title": "消息概览", + "description": "OpenIM React Native SDK 消息概览。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message overview-message", + "content": "OpenIM React Native SDK 使用 MessageItem 表示一条消息。创建消息仅生成待发送的 MessageItem ;要将消息发送给单聊用户或群组,还需要调用发送 API。接收、查询以及删除、撤回、修改等状态变化则通过各自的 API 或事件处理。 消息列表使用 clientMsgID 识别、去重和更新单条消息。 MessageItem 不包含 conversationID ,消息所属会话应从当前会话、历史查询参数或事件上下文中获取。 消息处理流程 | 阶段 | 相关能力 | 说明 | | | | | | 创建 | create Message | 创建待发送的 MessageItem 。 | | 发送 | sendMessage 、 sendMessageNotOss | 将消息发送到单聊或群聊。 | | 接收 | 新消息事件 | 接收实时消息、离线消息和仅在线消息。 | | 查询 | 历史消息、按 ID 查找和搜索 | 按会话读取或定位已保存的消息。 | | 状态变化 | 撤回、删除、修改和已读回执 | 根据调用结果和对应事件更新消息列表。 | MessageItem 类型 创建、发送、接收和查询消息时,得到的消息对象都是 MessageItem 。常用公共字段如下: | 字段 | 类型 | 说明 | | | | | | clientMsgID | string | 客户端消息 ID,用于消息去重、更新和定位。 | | serverMsgID | string | 服务端消息 ID。 | | sessionType | SessionType | 会话类型,用于区分单聊和群聊。 | | sendID | string | 发送者用户 ID。 | | recvID | string | 单聊消息的接收方用户 ID。 | | groupID | string | 群聊消息所属的群组 ID。 | | contentType | MessageType | 消息内容类型,决定使用哪个内容字段渲染。 | | createTime | number | 消息对象创建时间。 | | sendTime | number | 消息发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | Platform | 发送消息的客户端平台。 | | status | MessageStatus | 消息发送状态。 | | isRead | boolean | 已读状态。 | | senderNickname | string | 发送者昵称。 | | senderFaceUrl | string | 发送者头像 URL。 | | offlinePush | OfflinePush | 离线推送配置。 | | content | string | SDK 序列化的消息内容。渲染时应读取与 contentType 对应的内容字段。 | | ex | string | 消息扩展字段。 | | localEx | string | 仅当前设备使用的消息扩展字段。 | 消息内容保存在 MessageItem 中与 contentType 对应的字段内: | 内容 | 字段 | | | | | 文本、富文本和 Markdown | textElem 、 advancedTextElem 、 markdownTextElem | | 图片、音频、视频和文件 | pictureElem 、 soundElem 、 videoElem 、 fileElem | | @ 消息 | atTextElem | | 回复消息 | quoteElem | | 合并转发 | mergeElem | | 名片、位置和表情 | cardElem 、 locationElem 、 faceElem | | 自定义消息 | customElem | | 通知、输入状态和附加状态 | notificationElem 、 typingElem 、 attachedInfoElem | 内容字段均为可选字段。一条消息通常只使用与其 contentType 对应的内容字段;渲染前应先判断 contentType ,再读取相应字段。 创建并发送消息 先调用对应的创建 API 得到 MessageItem ,再调用发送 API。由 SDK 上传本地媒体文件时使用 发送消息 /sdk/react native/message/sending messages/send message ;媒体文件已经有远端 URL 时使用 发送不经 OSS 的消息 /sdk/react native/message/sending messages/send message not oss 。 | 内容 | 页面 | | | | | 文本和富文本 | 创建文本消息 /sdk/react native/message/creating messages/create text message 、 创建富文本消息 /sdk/react native/message/creating messages/create advanced text message | | @ 消息 | 创建 @ 消息 /sdk/react native/message/creating messages/create text at message | | 图片、音频、视频和文件 | 创建图片消息 /sdk/react native/message/creating messages/create image message by file 、 创建音频消息 /sdk/react native/message/creating messages/create sound message by file 、 创建视频消息 /sdk/react native/message/creating messages/create video message by file 、 创建文件消息 /sdk/react native/message/creating messages/create file message by file | | 名片、位置和表情 | 创建名片消息 /sdk/react native/message/creating messages/create card message 、 创建位置消息 /sdk/react native/message/creating messages/create location message 、 创建表情消息 /sdk/react native/message/creating messages/create face message | | 回复、转发和合并转发 | 创建回复消息 /sdk/react native/message/creating messages/create quote message 、 创建转发消息 /sdk/react native/message/creating messages/create forward message 、 创建合并转发消息 /sdk/react native/message/creating messages/create merger message | | 自定义消息 | 创建自定义消息 /sdk/react native/message/creating messages/create custom message | 按任务查看能力 | 任务 | 页面 | | | | | 接收实时、离线和仅在线消息 | 接收消息 /sdk/react native/message/receiving messages/receive messages | | 接收自定义业务消息 | 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages | | 加载历史消息或消息上下文 | 加载历史消息 /sdk/react native/message/retrieving messages/load older messages 、 读取消息上下文 /sdk/react native/message/retrieving messages/load message context | | 按 ID 查找或搜索消息 | 按 ID 查找消息 /sdk/react native/message/retrieving messages/find messages by id 、 搜索消息 /sdk/react native/message/searching messages/search messages | | 删除、撤回或修改消息 | 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 、 撤回消息 /sdk/react native/message/managing messages/revoke a message 、 修改消息 /sdk/react native/message/managing messages/modify a message | | 管理仅当前设备使用的消息数据 | 删除本地消息 /sdk/react native/message/managing messages/delete local message 、 设置消息本地扩展 /sdk/react native/message/managing messages/set message local ex | | 上报或查询群消息已读 | 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts 、 查询群消息已读成员 /sdk/react native/message/managing read status/get group message readers | | 上报或查询输入状态 | 上报输入状态 /sdk/react native/message/composing messages/update typing status 、 查询输入状态 /sdk/react native/message/composing messages/get typing status | | 识别音频文字 | 检查语音识别能力 /sdk/react native/message/composing messages/check speech to text 、 识别音频文字 /sdk/react native/message/composing messages/transcribe audio | 事件处理 消息相关事件的完整监听代码分别位于以下页面: 新消息、离线消息和仅在线消息: OnRecvNewMessage 、 OnRecvOfflineNewMessage 、 OnRecvOnlineOnlyMessage ,见 接收消息 /sdk/react native/message/receiving messages/receive messages 。 自定义业务消息: OnRecvCustomBusinessMessage ,见 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 。 消息删除: OnMsgDeleted ,见 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 。 消息撤回: OnNewRecvMessageRevoked ,见 撤回消息 /sdk/react native/message/managing messages/revoke a message 。 消息修改: OnMessageModified ,见 修改消息 /sdk/react native/message/managing messages/modify a message 。 群消息已读状态: OnRecvGroupReadReceipt ,见 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts 。 输入状态变化: OnInputStatusChanged ,见 更新输入状态 /sdk/react native/message/composing messages/change input states 。" }, { - "path": "/platform-api/meeting/meeting-management/invite-meeting-users", - "title": "Invite users to a meeting", - "description": "OpenIM Enterprise Platform API: invite users to an existing meeting and return per-user results.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management invite-meeting-users", - "content": "Invite multiple users to an existing meeting and return per user processing results. HTTP request POST API ADDRESS /rtc meeting/invite meeting invitees Request example curl request POST \"$ API ADDRESS /rtc meeting/invite meeting invitees\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"inviterUserID\":\"user 001\",\"inviteeUserIDs\": \"user 002\",\"user 003\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | inviterUserID | Yes | string | User initiating the invitation. | | inviteeUserIDs | Yes | string | Users to invite. | Response | Property | Type | Description | | | | | | data.successUserIDList | string | Users successfully added to the invitation state. | | data.failedUserIDList | string | Users whose invitations failed. | | data.meetingDetail | MeetingInfoSetting | Updated meeting details. | An overall errCode: 0 does not imply that every invitee succeeded; inspect both user ID lists. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that inviterUserID has permission to invite participants. Related pages Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "创建文本消息", + "description": "OpenIM React Native SDK 创建文本消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-message", + "content": "调用 createTextMessage 创建一条待发送的文本消息。 const message = await OpenIMSDK.createTextMessage '你好,欢迎加入讨论。' ; 参数为文本内容。调用后返回 MessageItem ,将它传给 发送消息 /sdk/react native/message/sending messages/send message 的 message 字段即可发送。" }, { - "path": "/platform-api/meeting/meeting-management/leave-meeting", - "title": "Leave a meeting", - "description": "OpenIM Enterprise Platform API: remove a specified user's active participation in a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management leave-meeting", - "content": "Make a specified participant leave the current meeting without ending the meeting for everyone else. HTTP request POST API ADDRESS /rtc meeting/leave meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/leave meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant leaving the meeting. | Response The common response has errCode: 0 when the participant state was updated. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. This operation does not end or cancel the meeting. Related pages End a meeting /platform api/meeting/meeting management/end meeting" + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "创建 @ 消息", + "description": "OpenIM React Native SDK 创建 @ 消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-at-message", + "content": "使用 createTextAtMessage 创建群聊中的 @ 消息。 text 中的 @ 文本与 atUserIDList 应对应。 const message = await OpenIMSDK.createTextAtMessage text: '@user 001 请确认发布内容。', atUserIDList: 'user 001' , atUsersInfo: atUserID: 'user 001', groupNickname: '小李', , , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | @ 消息的正文。 | | atUserIDList | string | 是 | 被提及的用户 ID 列表。 | | atUsersInfo | AtUsersInfoItem | 否 | 被提及用户在群内的展示名。 | | message | MessageItem | 否 | 附带的消息对象。 | 调用后返回待发送的 MessageItem 。将它传给 发送消息 /sdk/react native/message/sending messages/send message 的 message 字段即可发送。" }, { - "path": "/platform-api/meeting/meeting-management/end-meeting", - "title": "End or cancel a meeting", - "description": "OpenIM Enterprise Platform API: cancel a scheduled meeting or end an active meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management end-meeting", - "content": "Cancel a scheduled meeting or end an active meeting for all participants. HTTP request POST API ADDRESS /rtc meeting/end meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/end meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\",\"endType\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | endType | Yes | MeetingEndType | 0 CancelType cancels a scheduled meeting; 1 EndType ends an active meeting. | Response The common response has errCode: 0 when the requested state transition completed. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent business permission before ending a meeting for all participants. Related pages Leave a meeting /platform api/meeting/meeting management/leave meeting" + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "创建自定义消息", + "description": "OpenIM React Native SDK 创建自定义消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-custom-message", + "content": "使用 createCustomMessage 创建自定义业务消息。业务双方需要约定 data 、 extension 的数据格式。 const message = await OpenIMSDK.createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify version: 1 , description: '任务卡片', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | data | string | 是 | 业务数据字符串,可传 JSON 字符串。 | | extension | string | 是 | 业务扩展信息字符串。 | | description | string | 是 | 消息说明,也可作为不支持该消息类型时的降级展示文本。 | 调用后返回待发送的 MessageItem 。接收端应校验业务数据的格式和版本;服务端业务通知的监听方式见 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 。" }, { - "path": "/platform-api/meeting/meeting-management/get-user-related-meetings", - "title": "Get user-related meetings", - "description": "OpenIM Enterprise Platform API: list meetings related to a user by status and time range.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management get-user-related-meetings", - "content": "List meetings related to a user by meeting status and optional time range. HTTP request POST API ADDRESS /rtc meeting/get user related meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get user related meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ,\"startTime\":1719800000000,\"endTime\":1722400000000 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose related meetings are queried. | | status | Yes | string | Meeting status filters. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | Response data.meetings contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records matching both the status and time constraints. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Ensure endTime is not earlier than startTime . Related pages List a user's meetings /platform api/meeting/meeting management/list meetings" + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "使用文件创建图片消息", + "description": "OpenIM React Native SDK 使用文件创建图片消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-file", + "content": "使用 createImageMessageFromFullPath 根据本地图片完整路径创建消息。 const message = await OpenIMSDK.createImageMessageFromFullPath imagePath ; imagePath 是图片在设备上的完整路径。调用后返回待发送的 MessageItem ;使用 发送消息 /sdk/react native/message/sending messages/send message 发送时,SDK 会处理本地资源上传。" }, { - "path": "/platform-api/meeting/meeting-settings/set-personal-setting", - "title": "Set personal meeting preferences", - "description": "Set a user's camera and microphone preferences for joining a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings set-personal-setting", - "content": "Set a user's camera and microphone preferences for joining a meeting. HTTP request POST API ADDRESS /rtc meeting/set personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | cameraOnEntry | No | BoolValue | Whether the camera is enabled on entry. | | microphoneOnEntry | No | BoolValue | Whether the microphone is enabled on entry. | Response errCode: 0 means the preference update succeeded. Permissions and limits Available only in OpenIM Enterprise. Omit wrapper values that should remain unchanged; explicit false disables the preference." + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "使用 URL 创建图片消息", + "description": "OpenIM React Native SDK 使用 URL 创建图片消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-url", + "content": "使用 createImageMessageByURL 根据已上传图片的资源信息创建消息。原图、大图和缩略图可共用同一资源信息,也可按业务需要分别传入不同尺寸或质量的资源。 const picture = uuid: 'image 001', type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: 'https://www.example.com/picture.png', ; const message = await OpenIMSDK.createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourcePicture | PicBaseInfo | 是 | 原图资源信息。 | | bigPicture | PicBaseInfo | 是 | 大图资源信息。 | | snapshotPicture | PicBaseInfo | 是 | 缩略图资源信息。 | | sourcePath | string | 是 | 图片本地路径;只有远端资源时传空字符串。 | 每个 PicBaseInfo 包含 uuid 、 type 、 size 、 width 、 height 和 url ,分别表示资源标识、类型、字节大小、像素尺寸和远端地址。调用后返回待发送的 MessageItem ,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" }, { - "path": "/platform-api/meeting/meeting-settings/get-personal-setting", - "title": "Get personal meeting preferences", - "description": "Get a user's camera and microphone preferences for a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings get-personal-setting", - "content": "Get a user's personal audio and video preferences for a meeting. HTTP request POST API ADDRESS /rtc meeting/get personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | Response data.setting contains a PersonalMeetingSetting /platform api/meeting/overview personalmeetingsetting with cameraOnEntry and microphoneOnEntry . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may read the participant's meeting preferences." + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "使用文件创建音频消息", + "description": "OpenIM React Native SDK 使用文件创建音频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-file", + "content": "使用 createSoundMessageFromFullPath 根据设备上的音频文件创建消息。 const message = await OpenIMSDK.createSoundMessageFromFullPath soundPath, duration: 18, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | soundPath | string | 是 | 音频文件的完整路径。 | | duration | number | 是 | 音频时长,单位为秒。 | 调用后返回待发送的 MessageItem 。使用 发送消息 /sdk/react native/message/sending messages/send message 时,SDK 会处理本地音频资源上传。" }, { - "path": "/platform-api/meeting/meeting-settings/operate-all-streams", - "title": "Control participant media streams", - "description": "Control camera and microphone state across meeting participants.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings operate-all-streams", - "content": "Apply camera or microphone state changes across meeting participants. HTTP request POST API ADDRESS /rtc meeting/operate meeting all stream Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | operatorUserID | Yes | string | User performing the operation. | | cameraOnEntry | No | BoolValue | Target camera state. | | microphoneOnEntry | No | BoolValue | Target microphone state. | Response data.streamNotExistUserIDList identifies participants without a matching media stream. data.failedUserIDList identifies other failed operations. Inspect both lists even when errCode is 0 . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "使用 URL 创建音频消息", + "description": "OpenIM React Native SDK 使用 URL 创建音频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-url", + "content": "使用 createSoundMessageByURL 根据已上传音频的资源信息创建消息。 const message = await OpenIMSDK.createSoundMessageByURL uuid: 'audio 001', soundPath: '', sourceUrl: 'https://www.example.com/sound.mp3', dataSize: 54000, duration: 18, soundType: 'audio/mpeg', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | uuid | string | 是 | 音频资源标识。 | | soundPath | string | 是 | 本地音频路径;只有远端资源时传空字符串。 | | sourceUrl | string | 是 | 已上传音频的地址。 | | dataSize | number | 是 | 音频大小,单位为字节。 | | duration | number | 是 | 音频时长,单位为秒。 | | soundType | string | 否 | 音频类型。 | 调用后返回待发送的 MessageItem 。资源信息应以实际上传结果为准,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" }, { - "path": "/platform-api/meeting/meeting-settings/modify-participant-name", - "title": "Modify a participant name", - "description": "Change a participant's display name within a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings modify-participant-name", - "content": "Change a participant's display name within a meeting without changing the user's global profile. HTTP request POST API ADDRESS /rtc meeting/modify meeting participant name Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserID | Yes | string | Target participant. | | nickname | Yes | string | New in meeting display name. | Response errCode: 0 means the in meeting name was updated. Permissions and limits Available only in OpenIM Enterprise. This operation does not update UserInfo.nickname ." + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "使用文件创建视频消息", + "description": "OpenIM React Native SDK 使用文件创建视频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-file", + "content": "使用 createVideoMessageFromFullPath 根据设备上的视频文件和封面图创建消息。 const message = await OpenIMSDK.createVideoMessageFromFullPath videoPath, videoType: 'video/mp4', duration: 36, snapshotPath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | videoPath | string | 是 | 视频文件的完整路径。 | | videoType | string | 是 | 视频类型。 | | duration | number | 是 | 视频时长,单位为秒。 | | snapshotPath | string | 是 | 视频封面图的完整路径。 | 调用后返回待发送的 MessageItem 。发送时使用 发送消息 /sdk/react native/message/sending messages/send message 处理本地视频和封面图资源。" }, { - "path": "/platform-api/meeting/meeting-settings/remove-participants", - "title": "Remove meeting participants", - "description": "Remove selected participants from a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings remove-participants", - "content": "Remove selected participants from an active meeting. HTTP request POST API ADDRESS /rtc meeting/remove participants Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserIDs | Yes | string | Participants to remove. | Response Inspect data.successUserIDList and data.failedUserIDList ; a successful envelope can still contain per user failures. Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "使用 URL 创建视频消息", + "description": "OpenIM React Native SDK 使用 URL 创建视频消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-url", + "content": "使用 createVideoMessageByURL 根据已上传的视频及封面图资源创建消息。 const message = await OpenIMSDK.createVideoMessageByURL videoPath: '', duration: 36, videoType: 'video/mp4', videoUUID: 'video 001', videoUrl: 'https://www.example.com/video.mp4', videoSize: 820000, snapshotPath: '', snapshotUUID: 'cover 001', snapshotSize: 42000, snapshotUrl: 'https://www.example.com/snapshot.png', snapshotWidth: 1280, snapshotHeight: 720, snapShotType: 'image/jpeg', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | videoPath | string | 是 | 本地视频路径;只有远端资源时传空字符串。 | | duration | number | 是 | 视频时长,单位为秒。 | | videoType | string | 是 | 视频类型。 | | videoUUID 、 videoUrl 、 videoSize | string 、 string 、 number | 是 | 视频资源标识、远端地址和字节大小。 | | snapshotPath | string | 是 | 本地封面图路径;只有远端资源时传空字符串。 | | snapshotUUID 、 snapshotUrl 、 snapshotSize | string 、 string 、 number | 是 | 封面图资源标识、远端地址和字节大小。 | | snapshotWidth 、 snapshotHeight | number | 是 | 封面图宽高,单位为像素。 | | snapShotType | string | 否 | 封面图类型。 | 调用后返回待发送的 MessageItem ,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" }, { - "path": "/platform-api/meeting/meeting-settings/set-meeting-host", - "title": "Set meeting hosts", - "description": "Set the host and co-hosts of a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings set-meeting-host", - "content": "Set the primary host and co host list of a meeting. HTTP request POST API ADDRESS /rtc meeting/set meeting host info Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | hostUserID | No | StringValue | New primary host. | | coHostUserIDs | Yes | string | Complete co host user ID list. | Response errCode: 0 means host information was updated. Permissions and limits Available only in OpenIM Enterprise. Validate role transfer authority before changing the primary host." + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "使用文件创建文件消息", + "description": "OpenIM React Native SDK 使用文件创建文件消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-file", + "content": "使用 createFileMessageFromFullPath 根据设备上的文件创建消息。 const message = await OpenIMSDK.createFileMessageFromFullPath filePath, fileName: '产品说明.pdf', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filePath | string | 是 | 文件的完整路径。 | | fileName | string | 是 | 对外展示的文件名。 | 调用后返回待发送的 MessageItem 。使用 发送消息 /sdk/react native/message/sending messages/send message 时,SDK 会处理本地文件上传。" }, { - "path": "/platform-api/meeting/meeting-settings/clean-previous-meetings", - "title": "Clean previous meeting state", - "description": "Clear stale meeting connection state retained before a user logs in.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings clean-previous-meetings", - "content": "Clear stale meeting connection state retained before a user starts a new login session. HTTP request POST API ADDRESS /rtc meeting/clean previous meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose stale state is cleared. | | reasonCode | Yes | int | Business reason code. | | reason | Yes | string | Human readable cleanup reason. | Response errCode: 0 means stale meeting state was cleared. Permissions and limits Available only in OpenIM Enterprise. Use this for stale connection recovery, not as a general meeting history deletion API." + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "使用 URL 创建文件消息", + "description": "OpenIM React Native SDK 使用 URL 创建文件消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-url", + "content": "使用 createFileMessageByURL 根据已上传文件的资源信息创建消息。 const message = await OpenIMSDK.createFileMessageByURL filePath: '', fileName: '产品说明.pdf', uuid: 'file 001', sourceUrl: 'https://www.example.com/产品说明.pdf', fileSize: 256000, fileType: 'application/pdf', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filePath | string | 是 | 本地文件路径;只有远端资源时传空字符串。 | | fileName | string | 是 | 对外展示的文件名。 | | uuid | string | 是 | 文件资源标识。 | | sourceUrl | string | 是 | 已上传文件的地址。 | | fileSize | number | 是 | 文件大小,单位为字节。 | | fileType | string | 否 | 文件类型。 | 调用后返回待发送的 MessageItem 。资源信息应以实际上传结果为准,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" }, { - "path": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", - "title": "Create a recurring meeting", - "description": "Create a recurrence rule and generate its first meeting instance.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings create-repeat-meeting", - "content": "Create a recurrence definition and generate its first meeting instance. HTTP request POST API ADDRESS /rtc meeting/create repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting series creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Shared title, schedule, host, and invitees. | | setting | Yes | MeetingSetting | Shared meeting settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence end, count, type, interval, and weekdays. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . data.generatedMeeting contains the first MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instance. Permissions and limits Available only in OpenIM Enterprise. Validate recurrence boundaries and the creator's authority over all invitees." + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "创建名片消息", + "description": "OpenIM React Native SDK 创建名片消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-card-message", + "content": "使用 createCardMessage 创建用户名片消息。 const message = await OpenIMSDK.createCardMessage userID: 'user 002', nickname: '小王', faceURL: 'https://example.com/avatar.png', ex: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userID | string | 是 | 名片对应的用户 ID。 | | nickname | string | 是 | 名片展示的昵称。 | | faceURL | string | 是 | 名片展示的头像地址。 | | ex | string | 是 | 名片扩展信息,没有内容时传空字符串。 | 调用后返回待发送的 MessageItem 。 messageItem.cardElem 保存的是创建时传入的名片资料。" }, { - "path": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", - "title": "Update a recurring meeting", - "description": "Update a recurrence definition and its future meeting instances.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings update-repeat-meeting", - "content": "Update a recurrence definition and the future instances generated from it. HTTP request POST API ADDRESS /rtc meeting/update repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | updatingUserID | Yes | string | User performing the update. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Updated shared meeting information. | | setting | Yes | MeetingSetting | Updated shared settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Updated recurrence rule. | Response Returns updated data.repeatMeeting and the affected data.generatedMeeting . Permissions and limits Available only in OpenIM Enterprise. Do not assume completed or historical instances are rewritten." + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "创建位置消息", + "description": "OpenIM React Native SDK 创建位置消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-location-message", + "content": "使用 createLocationMessage 创建位置消息。 const message = await OpenIMSDK.createLocationMessage description: '上海市浦东新区', longitude: 121.4737, latitude: 31.2304, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | description | string | 是 | 位置名称或地址描述。 | | longitude | number | 是 | 经度。 | | latitude | number | 是 | 纬度。 | 调用后返回待发送的 MessageItem 。" }, { - "path": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", - "title": "Delete a recurring meeting", - "description": "Delete a recurring meeting definition.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings delete-repeat-meeting", - "content": "Delete a recurring meeting definition. HTTP request POST API ADDRESS /rtc meeting/delete repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | operatorUserID | Yes | string | User performing the deletion. | Response errCode: 0 means the recurrence definition was deleted. Permissions and limits Available only in OpenIM Enterprise. This response does not state that historical meeting instances or recordings were deleted." + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "创建表情消息", + "description": "OpenIM React Native SDK 创建表情消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-face-message", + "content": "使用 createFaceMessage 创建应用内约定的表情消息。 const message = await OpenIMSDK.createFaceMessage index: 12, data: JSON.stringify url: 'https://www.example.com/emoji.png', , ; index 是双方约定的表情索引, data 是由发送端和接收端共同约定的自定义格式字符串,用于传递表情的识别或渲染信息,例如图片 URL、固定键或其他业务数据。调用后返回待发送的 MessageItem 。" }, { - "path": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", - "title": "Get a recurring meeting", - "description": "Get a recurring meeting definition and generation state.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings get-repeat-meeting", - "content": "Get a recurrence definition, generation progress, next schedule time, and status. HTTP request POST API ADDRESS /rtc meeting/get repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may view the series." + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "创建回复消息", + "description": "OpenIM React Native SDK 创建回复消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-quote-message", + "content": "使用 createQuoteMessage 创建回复消息,并传入完整的原消息对象。 const message = await OpenIMSDK.createQuoteMessage text: '同意这个方案。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的文本内容。 | | message | MessageItem | 是 | 被回复的原消息。 | 调用后返回新的待发送 MessageItem 。接收端展示回复消息时,应注意处理原消息已删除或无法展示的情况。" }, { - "path": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", - "title": "List recurring meetings", - "description": "List recurring meeting definitions created by a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meetings", - "content": "List recurring meeting definitions created by a user. HTTP request POST API ADDRESS /rtc meeting/list repeat meetings Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Series creator. | Response data.repeatMeetings contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata records. These are recurrence definitions, not individual instances. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "创建 Markdown 消息", + "description": "OpenIM React Native SDK 创建 Markdown 消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-markdown-message", + "content": "使用 createMarkdownMessage 创建 Markdown 消息。 const message = await OpenIMSDK.createMarkdownMessage ' 发布完成\\n\\n Android\\n iOS', ; 参数是完整的 Markdown 文本。调用后返回待发送的 MessageItem ;接收端展示不可信 Markdown 文本时,应使用支持安全策略的 Markdown 渲染器。" }, { - "path": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", - "title": "List recurring meeting instances", - "description": "List meeting instances generated for a recurring meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meeting-instances", - "content": "List individual meeting instances already generated for a recurring meeting. HTTP request POST API ADDRESS /rtc meeting/list repeat meeting instances Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.meetings contains generated MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instances. Permissions and limits Available only in OpenIM Enterprise. Future instances not yet generated are not represented in this array." + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "创建转发消息", + "description": "OpenIM React Native SDK 创建转发消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-forward-message", + "content": "使用 createForwardMessage 根据已有消息创建一条转发消息。 const message = await OpenIMSDK.createForwardMessage sourceMessage ; 参数 sourceMessage 为完整的 MessageItem 。调用后返回新的待发送 MessageItem ,可发送到单聊或群聊。" }, { - "path": "/platform-api/meeting/meeting-records/get-user-meeting-histories", - "title": "Get a user's meeting history", - "description": "List a user's meeting attendance history by time, status, and pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-user-meeting-histories", - "content": "List a user's meeting attendance history. HTTP request POST API ADDRESS /rtc meeting/get user meeting histories Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Participant user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | | status | Yes | string | Meeting status filters. | Response data.total is the matching count. data.meetingHistories contains UserMeetingHistory /platform api/meeting/overview usermeetinghistory records. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "创建合并消息", + "description": "OpenIM React Native SDK 创建合并消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-merger-message", + "content": "使用 createMergerMessage 创建包含多条消息的合并转发消息。 const message = await OpenIMSDK.createMergerMessage messageList: selectedMessages, title: '项目讨论记录', summaryList: '小王:发布计划已确认', '小李:我会跟进测试' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | messageList | MessageItem | 是 | 要合并的消息列表。 | | title | string | 是 | 合并消息的标题。 | | summaryList | string | 是 | 合并消息展示的摘要列表。 | 调用后返回待发送的 MessageItem 。摘要内容应符合当前会话的展示与隐私规则。" }, { - "path": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", - "title": "Get meetings hosted by a user", - "description": "List meetings hosted by a user by time range and pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-user-hosted-meetings", - "content": "List meetings hosted by a user. HTTP request POST API ADDRESS /rtc meeting/get user hosted meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Host user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | Response data.total is the matching count. data.hostedMeetings contains HostedMeeting /platform api/meeting/overview hostedmeeting records. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "创建富文本消息", + "description": "OpenIM React Native SDK 创建富文本消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-text-message", + "content": "使用 createAdvancedTextMessage 创建带消息实体的富文本消息。 const message = await OpenIMSDK.createAdvancedTextMessage text: '请查看 https://openim.io', messageEntityList: type: 'url', offset: 4, length: 17, url: 'https://openim.io', , , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 富文本的原始文本。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | 每项 MessageEntity 包含 type 、 offset 、 length ,并可选传入 url 和 info 。调用后返回待发送的 MessageItem ,使用 发送消息 /sdk/react native/message/sending messages/send message 发送。" }, { - "path": "/platform-api/meeting/meeting-records/get-meeting-records", - "title": "Get meeting recordings", - "description": "List meeting recordings by host, participant, time range, and pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-records", - "content": "List recordings for meetings hosted or attended by selected users. HTTP request POST API ADDRESS /rtc meeting/get meeting records Request body | Parameter | Required | Type | Description | | | | | | | hostUserID | Yes | string | Host filter. | | joinedUserID | Yes | string | Participant filter. | | startTime | Yes | int | Range start in Unix milliseconds. | | endTime | Yes | int | Range end in Unix milliseconds. | | pagination | Yes | RequestPagination | Page settings. | Response data.total is the matching count. data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries, including files and recording status. Permissions and limits Available only in OpenIM Enterprise. Treat URLs as protected recording resources and apply business authorization before returning them." + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "创建富文本回复消息", + "description": "OpenIM React Native SDK 创建富文本回复消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", + "content": "使用 createAdvancedQuoteMessage 创建包含原消息引用和文本实体的富文本回复消息。 const message = await OpenIMSDK.createAdvancedQuoteMessage text: '我已查看相关链接。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的原始文本。 | | message | MessageItem | 是 | 被回复的原消息。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | MessageEntity 使用 type 、 offset 、 length 描述实体,并可按需要传入 url 或 info 。调用后返回待发送的 MessageItem 。" }, { - "path": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", - "title": "Get recordings by meeting IDs", - "description": "Get recording records for selected meeting IDs.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-records-by-meeting-ids", - "content": "Get recording records for selected meetings. HTTP request POST API ADDRESS /rtc meeting/get meeting records by meeting ids Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the recordings. | | meetingIDs | Yes | string | Meeting IDs to query. | Response data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every meeting ID." + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "创建定向群消息", + "description": "OpenIM React Native SDK 创建定向群消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", + "content": "使用 createTargetedGroupMessage 创建仅定向投递给指定群成员的消息对象。 const textMessage = await OpenIMSDK.createTextMessage '请相关成员查看。' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要定向发送的消息对象。 | | dstUserIDs | string | 是 | 接收该消息的群成员用户 ID 列表。 | 调用后返回待发送的 MessageItem 。发送时在 groupID 中指定目标群组,并通过 发送消息 /sdk/react native/message/sending messages/send message 投递。" }, { - "path": "/platform-api/meeting/meeting-records/get-meeting-attendance", - "title": "Get meeting attendance", - "description": "Get the users who attended or were absent from a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-attendance", - "content": "Get attendance results for a meeting. HTTP request POST API ADDRESS /rtc meeting/get meeting attendance Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | Response data.joinedUserIDs lists attendees and data.absentUserIDs lists invitees recorded as absent. Permissions and limits Available only in OpenIM Enterprise. Attendance reflects meeting service records, not arbitrary business attendance rules." + "path": "/sdk/react-native/message/sending-messages/send-message", + "title": "发送消息", + "description": "OpenIM React Native SDK 发送消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message", + "content": "调用 sendMessage 发送由消息创建 API 返回的 MessageItem 。单聊填写 recvID ,群聊填写 groupID 。 使用本地路径创建的图片、音频、视频和文件消息时,SDK 会在发送过程中自动上传资源。对于已通过 URL 创建、已有远端资源的媒体消息,请使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。 const sentMessage = await OpenIMSDK.sendMessage recvID: receiverUserID, groupID: '', message, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | | message | MessageItem | 是 | 待发送消息。 | | offlinePushInfo | OfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递。 | 调用后返回发送完成的 MessageItem 。 发送过程有进度时会触发 SendMessageProgress ,回调参数包含 progress 和 message : function handleSendMessageProgress info // ... // 设置监听 OpenIMSDK.on OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; // 取消监听 OpenIMSDK.off OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/platform-api/meeting/meeting-records/delete-meeting-records", - "title": "Delete meeting recordings", - "description": "Delete recording records by meeting or real-time room ID.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records delete-meeting-records", - "content": "Delete recording records for selected meeting or real time room IDs. HTTP request POST API ADDRESS /rtc meeting/delete meeting records Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time room IDs. | Response errCode: 0 means the requested recording records were deleted. Permissions and limits Available only in OpenIM Enterprise. This is destructive. Validate recording ownership and retention policy before calling it." + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "发送已上传的媒体消息", + "description": "OpenIM React Native SDK 发送已上传的媒体消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message-not-oss", + "content": "sendMessageNotOss 用于发送已经包含远端资源 URL 的图片、音频、视频或文件消息,不再走 SDK 的资源上传流程。 const sentMessage = await OpenIMSDK.sendMessageNotOss recvID: receiverUserID, groupID: '', message: uploadedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | | message | MessageItem | 是 | 通过 URL 型消息创建 API 创建的待发送消息。 | | offlinePushInfo | OfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递。 | 调用后返回发送完成的 MessageItem 。 message 中的资源地址、大小、类型和尺寸应来自实际上传结果;本地路径型媒体消息请使用 发送消息 /sdk/react native/message/sending messages/send message 。" }, { - "path": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", - "title": "Get a call room by group ID", - "description": "Get the active real-time call room and participants associated with a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-room-by-group-id", - "content": "Get the active real time call room associated with a group. HTTP request POST API ADDRESS /rtc meeting/signal get room by group id Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | OpenIM group ID. | Response Returns data.invitation , participant metadata, and data.roomID . Participant metadata combines group, group member, and user information for the active room. Permissions and limits Available only in OpenIM Enterprise. Validate access to the group before returning live room state." + "path": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "接收消息", + "description": "OpenIM React Native SDK 接收消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-messages", + "content": "新消息到达时会触发 OnRecvNewMessage ,回调参数为一条 MessageItem 。离线消息和只在线投递的消息分别通过 OnRecvOfflineNewMessage 、 OnRecvOnlineOnlyMessage 接收,三个事件的回调参数均为 MessageItem 。 function handleNewMessage message // ... function handleOfflineNewMessage message // ... function handleOnlineOnlyMessage message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; 使用 clientMsgID 识别消息。组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/platform-api/meeting/meeting-signaling/get-signal-rooms", - "title": "Get call rooms", - "description": "Get multiple real-time call rooms by room ID.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-rooms", - "content": "Get multiple real time call rooms and their current invitation and participant state. HTTP request POST API ADDRESS /rtc meeting/signal get rooms Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time call room IDs. | Response data.roomList contains room records with invitation metadata, participant metadata, and room IDs. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every room ID." + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "接收自定义业务消息", + "description": "OpenIM React Native SDK 接收自定义业务消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-custom-business-messages", + "content": "服务端下发自定义业务通知时会触发 OnRecvCustomBusinessMessage 。该事件的回调参数为业务数据,不是 MessageItem ;普通聊天自定义消息仍通过 接收消息 /sdk/react native/message/receiving messages/receive messages 中的新消息事件接收。 function handleCustomBusinessMessage data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; 业务侧应先校验收到的数据格式,再按自身协议处理。组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/platform-api/meeting/meeting-signaling/get-signal-invitation", - "title": "Get a call invitation", - "description": "Get real-time call invitation and offline-push information for a room.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-invitation", - "content": "Get the real time call invitation and associated offline push information for a room. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | Response data.invitationInfo contains InvitationInfo /platform api/meeting/overview invitationinfo . data.offlinePushInfo contains the invitation's offline push configuration. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "加载历史消息", + "description": "OpenIM React Native SDK 加载历史消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-older-messages", + "content": "使用 getAdvancedHistoryMessageList 分页加载会话中较早的历史消息。第一页的 startClientMsgID 传空字符串,继续加载时传入当前最早消息的 clientMsgID 。 const page = await OpenIMSDK.getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, viewType: ViewType.History, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | viewType | ViewType | 是 | 浏览历史消息时传 ViewType.History 。 | 返回结果 调用后返回 AdvancedGetMessageResult : | 字段 | 类型 | 说明 | | | | | | messageList | MessageItem | 当前页消息。 | | isEnd | boolean | 是否已到达较早一端的边界。 | | errCode | number | 本次历史读取的状态码。 | | errMsg | string | 与 errCode 对应的说明。 | 将 messageList 加入列表前,按 clientMsgID 去重。" }, { - "path": "/platform-api/meeting/meeting-signaling/get-startup-invitation", - "title": "Get a startup call invitation", - "description": "Get a call invitation that a user must restore when the application starts.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-startup-invitation", - "content": "Get a still relevant real time call invitation that should be restored when a user's application starts. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info start app Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose invitation state is restored. | Response Returns data.invitation and data.offlinePushInfo when a recoverable invitation exists. Permissions and limits Available only in OpenIM Enterprise. Revalidate timeout and room state before presenting the restored invitation." + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "反向加载历史消息", + "description": "OpenIM React Native SDK 反向加载历史消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-newer-messages", + "content": "使用 getAdvancedHistoryMessageListReverse 从消息锚点向较新的方向读取历史消息,适合定位消息后继续加载其后的记录。 const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse conversationID, startClientMsgID: anchorMessage.clientMsgID, count: 30, viewType: ViewType.History, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取消息的会话 ID。 | | startClientMsgID | string | 是 | 向较新方向读取时使用的锚点消息 ID。 | | count | number | 是 | 本次读取的消息数量。 | | viewType | ViewType | 是 | 浏览历史消息时传 ViewType.History 。 | 调用后返回 AdvancedGetMessageResult ,其中 messageList 是本页消息, isEnd 表示是否已到达较新一端的边界。其余返回字段见 加载历史消息 /sdk/react native/message/retrieving messages/load older messages 。" }, { - "path": "/platform-api/meeting/meeting-chat/send-meeting-chat", - "title": "Send a meeting chat message", - "description": "Send a broadcast or targeted message within a meeting room.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-chat send-meeting-chat", - "content": "Send a meeting room chat message to all participants or selected users. Meeting chat uses its own message model and is separate from the standard OpenIM message APIs. HTTP request POST API ADDRESS /rtc meeting/send meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | Sender user ID. | | type | Yes | int | Meeting chat business content type. | | payload | Yes | string | Message payload. | | dstUserIDs | Yes | string | Target users; an empty array broadcasts to the room. | | nickname | Yes | string | Sender display name. | | faceURL | Yes | string | Sender avatar URL. | Response data.message contains the created MeetingChatMessage /platform api/meeting/overview meetingchatmessage , including its Seq. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "按 ID 查找消息", + "description": "OpenIM React Native SDK 按 ID 查找消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages find-messages-by-id", + "content": "使用 findMessageList 根据会话 ID 和消息 ID 查找消息。适合从搜索结果、引用或通知跳转到一条已知消息时使用。 const result = await OpenIMSDK.findMessageList conversationID, clientMsgIDList: clientMsgID , , ; const targetMessage = result.findResultItems?. 0 ?.messageList 0 ; 参数说明 findMessageList 接收查询条件数组,每项包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标消息所属的会话 ID。 | | clientMsgIDList | string | 是 | 要查找的消息 ID 列表。 | 返回结果 调用后返回 SearchMessageResult ,按 ID 查找的结果位于 findResultItems 。每个结果项包含 conversationID 和 messageList ;找不到消息时,结果项或其消息列表可能为空。完整结果结构见 搜索消息 /sdk/react native/message/searching messages/search messages 。" }, { - "path": "/platform-api/meeting/meeting-chat/pull-meeting-chat", - "title": "Pull meeting chat messages", - "description": "Incrementally pull meeting chat messages by creation time and Seq.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-chat pull-meeting-chat", - "content": "Incrementally pull meeting chat messages using the meeting creation time and the last received Seq. HTTP request POST API ADDRESS /rtc meeting/pull meeting chat Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | createTime | Yes | int | Meeting/chat creation time in Unix milliseconds. | | currentSeq | Yes | int | Last meeting chat Seq already received. | | srcUserID | Yes | string | User performing the pull. | Response data.createTime is the returned stream's creation marker. data.messages contains ordered MeetingChatMessage /platform api/meeting/overview meetingchatmessage records. Permissions and limits Available only in OpenIM Enterprise. Persist the highest processed Seq and keep creation time paired with the same meeting." + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "读取消息上下文", + "description": "OpenIM React Native SDK 读取消息上下文。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-message-context", + "content": "使用 fetchSurroundingMessages 读取一条已知消息前后的上下文,适合从搜索结果或回复消息进入聊天记录。 const messageList = await OpenIMSDK.fetchSurroundingMessages startMessage: targetMessage, viewType: ViewType.Search, before: 20, after: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | startMessage | MessageItem | 是 | 已取得的锚点消息。 | | viewType | ViewType | 是 | 上下文查看类型;从搜索结果进入时可传 ViewType.Search 。 | | before | number | 是 | 锚点之前最多读取的消息数量。 | | after | number | 是 | 锚点之后最多读取的消息数量。 | 调用后返回 messageList ,其中 messageList 是锚点前后取得的 MessageItem 。返回数量可能少于 before + after ,例如锚点靠近记录边界或部分消息已删除。" }, { - "path": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", - "title": "Revoke a meeting chat message", - "description": "Revoke a meeting chat message by room and Seq.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-chat revoke-meeting-chat", - "content": "Revoke a meeting chat message by room ID and Seq. HTTP request POST API ADDRESS /rtc meeting/revoke meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | User performing the revocation. | | seq | Yes | int | Meeting chat message Seq. | | ex | Yes | string | Business extension data. | | sourceMessageSendTime | Yes | int | Original message send time. | | sourceMessageSendID | Yes | string | Original sender ID. | | sourceMessageSenderNickname | Yes | string | Original sender display name. | Response data.message contains the resulting MeetingChatMessage /platform api/meeting/overview meetingchatmessage . Permissions and limits Available only in OpenIM Enterprise. Enforce sender, host, or moderator revocation policy in the business backend." + "path": "/sdk/react-native/message/searching-messages/search-messages", + "title": "搜索消息", + "description": "OpenIM React Native SDK 搜索消息。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message searching-messages search-messages", + "content": "使用 searchLocalMessages 搜索当前账号已同步到本地的消息。 const result = await OpenIMSDK.searchLocalMessages conversationID, keywordList: '发布' , messageTypeList: MessageType.TextMessage , pageIndex: 1, count: 20, ; 参数说明 keywordList 可传入一个或多个关键词。单个搜索框通常传入一个去除首尾空格且非空的关键词。 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要搜索的会话 ID。 | | keywordList | string | 是 | 关键词列表;单个搜索框通常传入一个清理后的关键词。 | | keywordListMatchType | number | 否 | 多关键词匹配方式: 0 表示命中任意关键词(OR), 1 表示同时命中全部关键词(AND);省略时按 0 处理。 | | senderUserIDList | string | 否 | 仅搜索这些用户发送的消息。 | | messageTypeList | MessageType | 否 | 仅搜索指定类型的消息,例如文本消息和 @ 文本消息;省略时按 SDK 默认范围搜索。 | | searchTimePosition | number | 否 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 否 | 从 searchTimePosition 向前搜索的时间范围,单位为秒。 | | pageIndex | number | 否 | 搜索结果页码,从 1 开始。 | | count | number | 否 | 每页返回的消息数量。 | 返回结果 调用后返回 SearchMessageResult : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下的匹配消息总数。 | | searchResultItems | SearchMessageResultItem | 按会话组织的搜索结果。 | 每个 SearchMessageResultItem 包含会话信息和 messageList 。修改关键词或筛选条件时,从第一页重新搜索,避免混合不同条件的结果。需要定位命中消息前后的记录时见 读取消息上下文 /sdk/react native/message/retrieving messages/load message context 。" }, { - "path": "/sdk/error-codes", - "title": "客户端 SDK 错误码", - "description": "识别 OpenIMClientSDK 通用错误码、区分错误来源,并按网络、登录、消息和群组场景处理。", - "context": "SDKs · Common reference · v4", - "keywords": "sdk v4 sdk error-codes", - "content": "适用范围 本页汇总 OpenIMClientSDK 的通用客户端错误码。iOS、Android、Flutter、WASM、Electron 等客户端虽然通过不同语言的失败回调、异常或 Promise 暴露错误,但由 OpenIM SDK Core 返回的错误码语义保持一致。平台封装层、操作系统或运行时仍可能补充本页未列出的错误,处理时应同时保留错误信息和客户端 SDK 版本。 客户端调用还可能直接返回 OpenIMServer 的业务错误。此时不要只按客户端错误码表判断,应结合错误码来源处理。 判断错误来源 | 错误码 | 来源 | 处理方式 | | | | | | 0 | 通用成功码 | 表示业务处理成功,继续读取当前 API 的返回数据。 | | 1~9999 | OpenIMServer | 按 服务端 Platform API 错误码 /platform api/error codes 排查参数、权限、Token、群组或消息状态。 | | 本页列出的 10000~10401 | OpenIMClientSDK | 按客户端网络、生命周期、本地数据和操作条件排查。错误码并不连续,不要根据范围推断未定义值。 | | 20001~29999 | 业务服务端或 Webhook | 由接入方业务系统定义,应在业务后端维护含义和用户提示。 | 通用与登录状态 | 错误码 | 含义 | 处理建议 | | | | | | 10000 | 网络请求失败 | 检查设备网络、API 地址、WebSocket 地址、TLS 证书和代理配置。网络恢复后再重试。 | | 10001 | 网络请求超时 | 检查网络质量和服务状态。对于会改变状态的操作,先查询实际结果,再决定是否重试。 | | 10002 | 参数无效 | 对照当前 API 页面检查必填字段、数据类型、枚举值和互斥参数。 | | 10003 | 调用上下文已超时或取消 | 检查调用方超时设置、页面或任务生命周期,以及登录状态是否在调用期间发生变化。 | | 10004 | 资源初始化尚未完成 | 该错误可能出现在仍使用此定义的客户端版本中。等待 SDK 初始化和登录完成后再调用依赖本地资源的 API。 | | 10005 | 未识别的错误 | 保留错误信息、SDK 版本和触发 API;确认可复现步骤后再升级或提交诊断信息。 | | 10006 | SDK 内部错误 | 收集客户端日志和最小复现步骤,检查 SDK 版本兼容性;不要把内部错误信息直接展示给最终用户。 | | 10007 | 没有可应用的更新 | 当前同步或更新操作没有产生新数据。通常可继续使用现有状态,并按具体 API 的结果决定是否刷新。 | | 10008 | SDK 尚未初始化 | 先完成当前平台的 SDK 初始化流程,并等待初始化成功后再调用其他 API。 | | 10009 | SDK 尚未完成登录 | 等待登录成功事件或回调后再调用登录态 API,避免并发或重复发起登录。 | | 10100 | 用户 ID 不存在或尚未注册 | 确认用户已由可信业务后端注册到 OpenIMServer,并检查客户端使用的 userID 。 | | 10101 | 用户已经退出登录 | 停止调用登录态 API,清理当前会话状态;需要继续使用时重新获取 Token 并登录。 | | 10102 | 重复登录 | 不要在前一次登录尚未结束时再次登录。复用当前 SDK 实例,或先完成退出再切换账号。 | 消息相关错误 | 错误码 | 含义 | 处理建议 | | | | | | 10200 | 文件不存在 | 检查本地文件路径、临时文件有效期和读取权限,再重新创建或上传文件消息。 | | 10201 | 消息解压失败 | 检查客户端与服务端版本兼容性并重新同步消息;持续出现时保留日志排查消息数据。 | | 10202 | WebSocket 二进制消息解码失败 | 检查客户端与服务端协议版本是否匹配,并排查代理是否修改了 WebSocket 数据。 | | 10203 | 不支持的消息或二进制协议类型 | 使用当前 SDK 支持的消息类型,并确认客户端与服务端版本兼容。 | | 10204 | 当前消息不允许重复发送 | 只有发送失败的原消息可以重发;发送成功的消息如需再次发送,应重新创建消息对象。 | | 10205 | 不支持的消息内容类型 | 改用已支持的消息类型,或在客户端和服务端都完成对应自定义消息的兼容处理。 | | 10206 | 消息没有服务端序列号 | 该消息尚未具备依赖 seq 的操作条件。等待发送或同步完成,并以最新消息对象重试。 | | 10207 | 消息已经删除 | 从界面和本地业务状态移除该消息,不要继续对旧消息对象执行修改、撤回或查询操作。 | 会话与群组错误 | 错误码 | 含义 | 处理建议 | | | | | | 10301 | 当前会话或群类型不支持该操作 | 检查 API 的适用会话和群类型,不要对不支持的群组执行该操作。 | | 10302 | 当前操作只支持指定群类型 | 确认目标群的 groupType ,并改用与该群类型匹配的 API。 | | 10303 | 当前未读数已经为 0 | 以最新会话状态刷新界面,不要继续递减或重复清理未读数。 | | 10400 | 群组 ID 不存在 | 检查 groupID ,重新查询群资料,并确认群组尚未解散。 | | 10401 | 群组类型无效 | 使用当前 SDK 和 OpenIMServer 支持的群类型,并检查创建或查询结果中的 groupType 。 | 版本兼容 错误码定义会随客户端 SDK 版本演进。 10004 存在于部分已发布版本中;当前 OpenIM SDK Core 已将初始化与登录准备状态进一步区分为 10008 和 10009 。维护兼容旧版本的应用时可以继续识别 10004 ,新逻辑应优先分别处理未初始化和未登录状态。 不要把未出现在本页的整数自动归类为某个客户端错误。遇到未知错误时,应先确认错误来自客户端、OpenIMServer 还是业务 Webhook,再结合当前 SDK 版本的错误信息和发布说明处理。 处理建议 1. 先记录错误码、错误信息、调用的 API、客户端 SDK 版本和必要的业务目标标识;Token、完整消息内容等敏感信息必须脱敏。 2. 参数、登录状态和不支持的操作应先修正调用条件,不要自动重试。 3. 网络失败和超时可以采用退避重试;发送消息或其他状态变更操作重试前,应先查询或同步实际状态,避免重复执行。 4. 将技术错误映射为稳定的产品提示,不要直接把内部错误信息展示给最终用户。 5. 10005 、 10006 或解码类错误持续出现时,保留完整日志并使用对应平台的 WASM 日志 /sdk/wasm/logger 、 iOS 日志 /sdk/ios/logger 、 Flutter 日志 /sdk/flutter/logger 或 Electron 日志上传 /sdk/electron/logger/upload logs 说明进行诊断。 本页根据 旧版客户端错误码说明 https://github.com/openimsdk/docs/blob/a177b296f1abe53ba2cf7d897acf86467a45e7c6/docs/sdks/errcode.md 迁移,并与 OpenIM SDK Core 当前错误码定义 https://github.com/openimsdk/openim sdk core/blob/9267a252faab02bbc8ffab6223e6ae2341a0f7c9/pkg/sdkerrs/code.go 及 兼容版本定义 https://github.com/openimsdk/openim sdk core/blob/514c760dfae502c651e88646c9a7754b2767534d/pkg/sdkerrs/code.go 核对。" + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "上报输入状态", + "description": "OpenIM React Native SDK 上报输入状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages update-typing-status", + "content": "使用 typingStatusUpdate 向单聊对方上报输入状态提示内容。 await OpenIMSDK.typingStatusUpdate recvID: receiverUserID, msgTip: '正在输入…', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 是 | 接收输入提示的用户 ID。 | | msgTip | string | 是 | 要上报的输入提示文本。 | 调用完成后,输入提示已上报。需要根据会话焦点更新当前账号的输入状态时,使用 更新输入状态 /sdk/react native/message/composing messages/change input states 。" }, { - "path": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", - "title": "搜索会话", - "description": "使用 WASM SDK 按会话名称搜索本地会话。", - "context": "SDKs · WASM · v4", - "keywords": "sdk wasm v4 sdk wasm conversation retrieving-conversations search-conversations", - "content": "searchConversation 在 SDK 本地会话数据中按 showName 模糊匹配,适合实现会话列表内搜索。搜索词不能为空;该方法不会向服务端查询尚未同步到本地的会话。 const data: conversations = await openimsdk.searchConversation searchKeyword.trim ; renderConversationResults conversations ; Promise 成功返回匹配的 ConversationItem ,按 latestMsgSendTime 从新到旧排列。结果只反映调用时保存在本地的会话数据,查询本身不会触发事件。搜索结果需要实时更新时,监听 获取会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 中说明的会话事件,并使用 conversationID 更新对应结果。" + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "查询输入状态", + "description": "OpenIM React Native SDK 查询输入状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages get-typing-status", + "content": "使用 getInputStates 查询指定用户在会话中的当前输入状态。 const platformIDs = await OpenIMSDK.getInputStates conversationID, userID, ; const isTyping = platformIDs.length 0; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标会话 ID。 | | userID | string | 是 | 要查询输入状态的用户 ID。 | 调用后返回处于输入状态的平台 ID 数组;空数组表示该用户当前没有平台处于输入状态。持续显示输入状态时,处理 更新输入状态 /sdk/react native/message/composing messages/change input states 中的 OnInputStatusChanged 事件。" }, { - "path": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", - "title": "将全部会话标为已读", - "description": "使用 WASM SDK 清零当前所有未读会话的未读数。", - "context": "SDKs · WASM · v4", - "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations mark-all-conversations-read", - "content": "当用户明确执行“全部已读”时,调用 markAllConversationMessageAsRead 处理当前本地记录中的所有未读会话: await openimsdk.markAllConversationMessageAsRead ; Promise 成功表示 SDK 已完成本次找到的全部未读会话处理。它不等同于相关会话事件已经到达,也不保证其他客户端的界面已同步完成。 界面仍应在收到 OnConversationChanged 后,使用 conversationID 更新对应会话,并通过 OnTotalUnreadMessageCountChanged 更新总未读数;完整监听分别见 获取会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 和 获取会话总未读数 /sdk/wasm/conversation/managing conversations/get total unread count 。必要时重新查询会话列表和总未读数,并以最新结果为准。" + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "更新输入状态", + "description": "OpenIM React Native SDK 更新输入状态。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages change-input-states", + "content": "使用 changeInputStates 更新当前账号在会话中的输入状态。开始输入时传 focus: true ,发送消息、失焦或离开会话时传 false 。 await OpenIMSDK.changeInputStates conversationID, focus: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要更新输入状态的会话 ID。 | | focus | boolean | 是 | true 表示正在输入, false 表示停止输入。 | 避免在每个键盘事件中重复上报相同状态。输入状态变化时会触发 OnInputStatusChanged ,回调携带 conversationID 、 userID 和 platformIDs 。 function handleInputStatusChanged inputStatus // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", - "title": "隐藏全部会话", - "description": "使用 WASM SDK 从当前设备的会话列表隐藏全部会话。", - "context": "SDKs · WASM · v4", - "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations hide-all-conversations", - "content": "hideAllConversations 会重置当前设备上全部会话的列表状态、未读数、最新消息摘要和草稿,使这些会话不再出现在分页会话列表中: await openimsdk.hideAllConversations ; Promise 成功只表示本地会话状态已经完成重置。该操作不会删除本地消息记录或服务端消息,也不会删除群组、好友关系或其他客户端上的会话。后续收到新消息或重新建立有效会话状态时,相应会话仍可再次出现在列表中。 批量隐藏后应重新查询 会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 和 会话总未读数 /sdk/wasm/conversation/managing conversations/get total unread count ,并用最新结果更新界面。不要把 Promise 成功当成远端状态事件。" + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "检查语音识别能力", + "description": "OpenIM React Native SDK 检查语音识别能力。", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages check-speech-to-text", + "content": "speechToTextCapabilities 仅用于查询当前语音识别支持的音频格式、采样率、录音时长和文件大小等信息。实际执行语音识别的是 识别音频文字 /sdk/react native/message/composing messages/transcribe audio 。 const capabilities = await OpenIMSDK.speechToTextCapabilities ; 返回结果 调用后返回 SpeechToTextCapabilities : | 字段 | 类型 | 说明 | | | | | | format | string | 支持的音频格式。 | | sampleRateHz | number | 要求的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number | 最大录音时长,单位为毫秒。 | | maxFileSize | number | 最大文件大小,单位为字节。 | | provider | string | 当前语音识别服务提供方。 |" }, { - "path": "/sdk/react-native/user/overview-user", - "title": "用户概览", - "description": "了解 React Native SDK 中的当前用户资料、公开用户资料、账号设置和在线状态。", + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "识别音频文字", + "description": "OpenIM React Native SDK 识别音频文字。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user overview-user", - "content": "OpenIM React Native SDK 使用 userID 标识用户。用户相关 API 用于读取和更新当前账号资料、查询公开用户资料,以及订阅用户在线状态。 好友、好友申请和黑名单属于用户之间的关系链能力,见 关系链概览 /sdk/react native/user/overview relationships 。 用户相关类型 React Native SDK 会根据使用场景返回不同的用户对象: | 类型 | 适用场景 | 主要 API | | | | | | SelfUserInfo | 当前登录用户的资料、头像、昵称和账号级消息接收设置 | getSelfUserInfo 、 setSelfInfo | | PublicUserItem | 查询应用用户和展示公开资料卡 | getUsersInfo | | UserOnlineState | 用户在线状态和在线平台列表 | subscribeUsersStatus 、 getSubscribeUsersStatus 、 unsubscribeUsersStatus | SelfUserInfo 表示当前登录用户, PublicUserItem 表示可查询的公开用户信息。好友资料、黑名单关系和群成员资料分别使用关系链或群组能力中的对象。 功能入口 | 需求 | 推荐页面 | | | | | 按 userID 查询公开资料,用于展示资料卡 | 获取用户资料 /sdk/react native/user/profile/get users info | | 读取或更新当前用户的昵称、头像和扩展信息 | 获取当前用户资料 /sdk/react native/user/profile/get self user info 、 更新当前用户资料 /sdk/react native/user/profile/set self info | | 设置账号级消息接收方式 | 设置全局消息接收方式 /sdk/react native/user/profile/set global message reception | | 设置其他用户添加当前账号时的处理策略 | 设置好友添加权限 /sdk/react native/user/profile/set friend add permission | | 订阅、读取和取消订阅在线状态 | 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 、 获取已订阅用户状态 /sdk/react native/user/online status/get subscribe users status 、 取消订阅用户状态 /sdk/react native/user/online status/unsubscribe users status | | 管理好友、好友申请或黑名单 | 关系链概览 /sdk/react native/user/overview relationships | 事件监听 用户状态变化会触发事件,具体的事件监听详见: 当前用户资料变化见 更新当前用户资料 /sdk/react native/user/profile/set self info 。 用户在线状态变化见 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 。 好友、好友申请和黑名单变化见 关系链概览 /sdk/react native/user/overview relationships 。" + "keywords": "sdk react-native v4 sdk react-native message composing-messages transcribe-audio", + "content": "使用 speechToText 将设备上 SDK 可读取的本地音频文件识别为文字。传入本地路径,不传远端 URL、Base64 数据或上传后的文件名。 const text = await OpenIMSDK.speechToText filename ; 参数 filename 是本地音频文件路径。调用后返回 text ,其中 text 为识别结果。调用前先 检查语音识别能力 /sdk/react native/message/composing messages/check speech to text ;需要把结果保存在当前设备的语音消息中时见 保存本地转写结果 /sdk/react native/message/composing messages/save local transcript 。" }, { - "path": "/sdk/react-native/user/overview-relationships", - "title": "关系链概览", - "description": "了解 React Native SDK 中的好友、好友申请和黑名单能力。", + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "保存本地转写结果", + "description": "OpenIM React Native SDK 保存本地转写结果。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user overview-relationships", - "content": "关系链记录当前用户与其他用户之间的好友关系、好友申请和黑名单。用户资料、账号设置和在线状态属于用户能力,见 用户概览 /sdk/react native/user/overview user 。 关系链对象 React Native SDK 会根据使用场景返回不同的对象: | 类型 | 适用场景 | 主要 API | | | | | | PublicUserItem | 查询公开用户资料、展示好友候选人或陌生人资料卡 | getUsersInfo | | FriendUserItem | 好友列表、好友备注、置顶和关系扩展字段 | getFriendListPage 、 getSpecifiedFriendsInfo | | FriendshipInfo | 检查当前用户与目标用户的好友关系 | checkFriend | | FriendApplicationItem | 收到或发出的好友申请及其处理状态 | getFriendApplicationListAsRecipient 、 getFriendApplicationListAsApplicant | | BlackUserItem | 当前账号维护的黑名单关系 | getBlackList 、 addBlack 、 removeBlack | 功能入口 | 需求 | 推荐页面 | | | | | 查询公开用户资料 | 获取用户资料 /sdk/react native/user/profile/get users info | | 分页、搜索或按 ID 查询好友关系 | 分页获取好友列表 /sdk/react native/user/friends/get friend list page 、 搜索好友 /sdk/react native/user/friends/search friends 、 查询指定好友资料 /sdk/react native/user/friends/get specified friends info | | 检查好友关系 | 检查好友关系 /sdk/react native/user/friends/check friend | | 更新或删除好友关系 | 更新好友资料 /sdk/react native/user/friends/update friends 、 删除好友 /sdk/react native/user/friends/delete friend | | 发送或处理好友申请 | 发送好友申请 /sdk/react native/user/friend applications/add friend 、 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 、 接受好友申请 /sdk/react native/user/friend applications/accept friend application 、 拒绝好友申请 /sdk/react native/user/friend applications/refuse friend application | | 查看和维护黑名单 | 获取黑名单 /sdk/react native/user/blacklist/get black list 、 将用户加入黑名单 /sdk/react native/user/blacklist/add black 、 将用户移出黑名单 /sdk/react native/user/blacklist/remove black | 事件监听 关系链状态变化会触发事件,具体的事件监听详见: 好友申请变化见 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 。 好友关系和好友资料变化见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。 黑名单变化见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + "keywords": "sdk react-native v4 sdk react-native message composing-messages save-local-transcript", + "content": "使用 setMessageLocalContent 将转写文字写入当前设备的语音消息。传入完整的消息对象,并保留原有消息字段。 const updatedMessage = ...message, soundElem: ...message.soundElem, text: text: transcript, translate: message.soundElem?.text?.translate ?? , , , ; await OpenIMSDK.setMessageLocalContent conversationID, message: updatedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | MessageItem | 是 | 写入转写结果后的完整消息对象。 | 调用完成后,转写结果保存在当前设备的消息内容中。" }, { - "path": "/sdk/react-native/user/profile/get-users-info", - "title": "获取用户资料", - "description": "OpenIM React Native SDK 获取用户资料。", + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "删除本地消息", + "description": "OpenIM React Native SDK 删除本地消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile get-users-info", - "content": "调用 getUsersInfo 按用户 ID 批量查询公开用户信息,适合用于展示好友候选人或陌生人资料卡的业务场景。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。 const userIDList = Array.from new Set 'user a', 'user b' ; const users = await OpenIMSDK.getUsersInfo userIDList ; 参数说明 userIDList 是要查询的用户 ID 数组。调用前建议去重,并控制单次请求数量。 返回结果 返回查询到的 PublicUserItem : | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | ex | string | 账号级扩展字段,格式由业务约定。 | 返回数组不保证与输入 ID 按位置一一对应。 该接口只读取其他用户的公开信息。如果要获取用户自己的信息,详见: 获取当前用户资料 /sdk/react native/user/profile/get self user info 、 更新当前用户资料 /sdk/react native/user/profile/set self info 。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-local-message", + "content": "使用 deleteMessageFromLocalStorage 删除当前设备中指定会话的一条消息。 await OpenIMSDK.deleteMessageFromLocalStorage conversationID, clientMsgID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 要删除的消息 ID。 | 调用完成后,当前设备上的目标消息已删除。" }, { - "path": "/sdk/react-native/user/profile/get-self-user-info", - "title": "获取当前用户资料", - "description": "OpenIM React Native SDK 获取当前用户资料。", + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "批量删除消息", + "description": "OpenIM React Native SDK 批量删除消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile get-self-user-info", - "content": "调用 getSelfUserInfo 获取当前登录账号的用户信息。 const currentUser = await OpenIMSDK.getSelfUserInfo ; 返回结果 返回当前账号的 SelfUserInfo : | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,用于标识当前账号。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number | 用户记录创建时间。 | | globalRecvMsgOpt | MessageReceiveOptType | 当前账号的全局消息接收方式。 | | ex | string | 由业务约定的账号级扩展字符串。 | 完成初始化并登录后调用该方法,可用于展示当前账号的头像、昵称和全局消息接收设置。切换账号时,清理已保存的当前用户信息。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-saved-messages", + "content": "使用 deleteMessages 批量删除同一会话中的消息。 await OpenIMSDK.deleteMessages conversationID, clientMsgIDs, isSync: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要删除消息所属的会话 ID。 | | clientMsgIDs | string | 是 | 要删除的消息 ID 列表;列表中的消息应属于同一会话。 | | isSync | boolean | 是 | 是否将删除操作同步给会话另一方。为 true 时,会话双方都会删除对应消息;为 false 时,仅当前账号删除。 | 调用完成后,删除请求已完成。 isSync 为 true 时,会话另一方也会删除对应消息;为 false 时,仅当前账号删除,无论取值如何,当前账号的删除都会同步到该账号的其他设备。 监听消息删除 消息删除时会触发 OnMsgDeleted ,回调携带被删除的 MessageItem 。根据 clientMsgID 更新对应会话的消息列表。 function handleMessageDeleted message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/sdk/react-native/user/profile/set-self-info", - "title": "更新当前用户资料", - "description": "OpenIM React Native SDK 更新当前用户资料。", + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "删除群聊中指定用户的全部消息", + "description": "OpenIM React Native SDK 删除群聊中指定用户的全部消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile set-self-info", - "content": "setSelfInfo 更新当前登录账号的基础展示资料。只传入本次需要更新的 nickname 、 faceURL 或 ex 。 await OpenIMSDK.setSelfInfo nickname: nickname.trim , faceURL, ex: mergedExtra, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string | 否 | 新昵称。 | | faceURL | string | 否 | 新头像地址。 | | ex | string | 否 | 扩展用户信息。 | 至少传入一个实际要更新的资料字段。 ex 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展用户信息。 更新当前用户资料后会触发 OnSelfInfoUpdated 事件,事件会携带更新后的用户信息。 监听当前用户资料变化 用户个人信息更新时,触发 OnSelfInfoUpdated 事件,以下为设置监听的示例: function handleSelfInfoUpdated selfUserInfo: SelfUserInfo // ... ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; 退出登录、切换账号或销毁用户状态层时,要取消监听。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-user-messages", + "content": "使用 deleteUserAllMessagesInConv 删除指定用户在群聊会话中的全部消息。 await OpenIMSDK.deleteUserAllMessagesInConv conversationID, userID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标群聊的会话 ID。 | | userID | string | 是 | 要删除其消息的用户 ID。 | 这是群聊管理操作,调用完成后删除请求已完成,具体权限由服务端校验。 监听指定用户消息删除 删除完成后会触发 OnDeleteUserAllMsgsInConv ,回调携带 conversationID 和 userID ,可据此移除目标会话中该用户的消息。 function handleUserMessagesDeleted data // ... OpenIMSDK.on OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; OpenIMSDK.off OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/sdk/react-native/user/profile/set-global-message-reception", - "title": "设置全局消息接收方式", - "description": "OpenIM React Native SDK 设置全局消息接收方式。", + "path": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "撤回消息", + "description": "OpenIM React Native SDK 撤回消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile set-global-message-reception", - "content": "globalRecvMsgOpt 是当前账号的全局消息接收方式。使用 setSelfInfo 更新该字段: await OpenIMSDK.setSelfInfo globalRecvMsgOpt: MessageReceiveOptType.NotNotify, ; 参数说明 | 枚举值 | 数值 | 说明 | | | | | | MessageReceiveOptType.Normal | 0 | 正常接收消息,并允许通知。 | | MessageReceiveOptType.NotNotify | 2 | 接收消息,但不通知。 | 设置完成后,当前用户信息会通过 OnSelfInfoUpdated 事件更新,事件监听方式见 更新当前用户资料 /sdk/react native/user/profile/set self info 。 全局消息接收方式是账号级设置;单个会话还可以使用会话级消息接收设置。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages revoke-a-message", + "content": "使用 revokeMessage 撤回已发送的消息。撤回后,会话成员可看到消息撤回状态。 await OpenIMSDK.revokeMessage conversationID, clientMsgID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 要撤回的消息 ID。 | 调用完成后,撤回请求已完成。允许撤回的消息、发送者和时间范围由服务端校验。 监听消息撤回 消息撤回时会触发 OnNewRecvMessageRevoked ,回调携带 RevokedInfo 。使用其中的 clientMsgID 更新对应消息的撤回状态。 function handleMessageRevoked revokedInfo // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; 组件销毁、退出登录或切换账号时,取消监听。仅从当前设备移除消息时,使用 删除本地消息 /sdk/react native/message/managing messages/delete local message 。" }, { - "path": "/sdk/react-native/user/profile/set-friend-add-permission", - "title": "设置好友添加权限", - "description": "OpenIM React Native SDK 设置好友添加权限。", + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "修改消息", + "description": "OpenIM React Native SDK 修改消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile set-friend-add-permission", - "content": "addFriendPermission 控制其他用户添加当前账号时,是否需要当前用户确认。使用 setSelfInfo 更新该账号级设置: await OpenIMSDK.setSelfInfo addFriendPermission: AddFriendPermission.AddFriendAllowed, ; 参数说明 | 枚举值 | 数值 | 含义 | | | | | | AddFriendPermission.AddFriendAllowed | 0 | 允许添加,但需要当前用户审核好友申请。 | | AddFriendPermission.AddFriendAllowedNoReview | 1 | 允许添加,并直接建立好友关系,无需当前用户审核。 | | AddFriendPermission.AddFriendDenied | 2 | 不允许其他用户添加当前账号。 | 此设置只影响后续的添加行为,不会删除已有好友关系,也不会自动处理已经存在的待审核申请。设置完成后,当前用户信息会通过 OnSelfInfoUpdated 事件更新,监听方式见 更新当前用户资料 /sdk/react native/user/profile/set self info 。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages modify-a-message", + "content": "使用 modifyMessage 修改会话中已有消息的内容。 const updatedMessage = ...message, textElem: ...message.textElem, content: editedText, , ; const modifiedMessage = await OpenIMSDK.modifyMessage conversationID, message: updatedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | MessageItem | 是 | 修改后的完整消息对象,需保留原消息的 clientMsgID 及其他必要字段。 | 返回结果 调用后返回服务端确认的 MessageItem ,可使用返回消息替换列表中相同 clientMsgID 的消息。允许修改的消息类型、发送者和时间范围由服务端校验。 监听消息修改 消息修改时会触发 OnMessageModified ,回调直接携带修改后的 MessageItem 。 function handleMessageModified message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnMessageModified, handleMessageModified ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnMessageModified, handleMessageModified ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/sdk/react-native/user/online-status/subscribe-users-status", - "title": "订阅用户在线状态", - "description": "OpenIM React Native SDK 订阅用户在线状态。", + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "插入本地单聊消息", + "description": "OpenIM React Native SDK 插入本地单聊消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user online-status subscribe-users-status", - "content": "调用 subscribeUsersStatus 订阅指定用户的在线状态。建议只订阅当前界面需要展示的用户。 const userIDs = ...new Set visibleUserIDs.filter Boolean ; const states = await OpenIMSDK.subscribeUsersStatus userIDs ; 返回这些用户当前的 UserOnlineState ,字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 状态所属用户的 ID。 | | status | OnlineState | OnlineState.Online 表示在线, OnlineState.Offline 表示离线。 | | platformIDs | Platform (可选) | 用户当前在线的平台列表。 | 在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看应用或某个会话。 监听在线状态变化 订阅用户的在线状态变化时,触发 OnUserStatusChanged 事件: const handleStatusChanged = state: UserOnlineState = // 按 state.userID 更新在线状态 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; 退出登录、切换账号或不再需要展示这些用户时,取消订阅并移除监听。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-single-message", + "content": "使用 insertSingleMessageToLocalStorage 将一条消息写入当前设备的单聊记录。 await OpenIMSDK.insertSingleMessageToLocalStorage message, recvID, sendID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要写入的完整消息对象。 | | recvID | string | 是 | 单聊接收方的用户 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | 调用完成后,消息已写入当前设备的单聊记录。需要向对方发送消息时,使用 发送消息 /sdk/react native/message/sending messages/send message 。" }, { - "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", - "title": "获取已订阅用户状态", - "description": "OpenIM React Native SDK 获取已订阅用户状态。", + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "插入本地群聊消息", + "description": "OpenIM React Native SDK 插入本地群聊消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user online-status get-subscribe-users-status", - "content": "调用 getSubscribeUsersStatus 获取当前账号已订阅用户的在线状态。 const states = await OpenIMSDK.getSubscribeUsersStatus ; 返回已订阅用户的 UserOnlineState 。目标用户尚未订阅时,请先调用 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status 。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-group-message", + "content": "使用 insertGroupMessageToLocalStorage 将一条消息写入当前设备的群聊记录。 await OpenIMSDK.insertGroupMessageToLocalStorage message, groupID, sendID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要写入的完整消息对象。 | | groupID | string | 是 | 目标群组 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | 调用完成后,消息已写入当前设备的群聊记录。需要向群成员发送消息时,使用 发送消息 /sdk/react native/message/sending messages/send message 。" }, { - "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", - "title": "取消订阅用户状态", - "description": "OpenIM React Native SDK 取消订阅用户状态。", + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "清理全部本地消息", + "description": "OpenIM React Native SDK 清理全部本地消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user online-status unsubscribe-users-status", - "content": "调用 unsubscribeUsersStatus 取消订阅指定用户的在线状态。 await OpenIMSDK.unsubscribeUsersStatus userIDs ; 页面翻页、搜索结果变化、退出登录或不再需要展示这些用户时,应取消对应订阅。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-local-messages", + "content": "使用 deleteAllMsgFromLocal 清理当前登录账号在本设备上的全部消息。 await OpenIMSDK.deleteAllMsgFromLocal ; 这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本设备上的全部消息已清理;服务端仍保留历史记录。" }, { - "path": "/sdk/react-native/user/friends/get-friend-list-page", - "title": "分页获取好友列表", - "description": "OpenIM React Native SDK 分页获取好友列表。", + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "清理本地与服务端消息", + "description": "OpenIM React Native SDK 清理本地与服务端消息。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends get-friend-list-page", - "content": "调用 getFriendListPage 分页获取当前用户的好友列表。 const friends = await OpenIMSDK.getFriendListPage offset: 0, count: 50, filterBlack: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的好友数量。 | | filterBlack | boolean | 否 | 是否过滤黑名单用户。 | 返回当前页的 FriendUserItem 。继续加载时按请求条目数增加 offset ;好友增删后重新请求列表。 好友信息字段 FriendUserItem 类型字段说明: | 字段 | 类型 | 说明 | | | | | | userID | string | 好友用户 ID。 | | nickname | string | 好友昵称。 | | faceURL | string | 好友头像地址。 | | remark | string | 当前用户为好友设置的备注。 | | isPinned | boolean | 是否置顶。 | | ownerUserID | string | 好友关系所属用户 ID。 | | operatorUserID | string | 最近执行关系操作的用户 ID。 | | addSource | number | 好友关系添加来源。 | | createTime | number | 好友关系创建时间。 | | ex | string | 好友关系扩展字段。 | | attachedInfo | string | SDK 附加信息。 | remark 、 isPinned 和 ex 属于好友关系,不是账号级用户信息。 监听好友变化 好友关系变化时,触发 OnFriendAdded 、 OnFriendInfoChanged 或 OnFriendDeleted 事件。事件直接携带对应的好友信息: const handleFriendAdd = friend: FriendUserItem = // 新增好友 ; const handleFriendChanged = friend: FriendUserItem = // 按 friend.userID 更新好友列表 ; const handleFriendDeleted = friend: FriendUserItem = // 按 friend.userID 从好友列表移除 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.on OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.on OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.off OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.off OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; 退出登录、切换账号或销毁好友列表状态时,取消这些监听。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-messages", + "content": "使用 deleteAllMsgFromLocalAndSvr 清理当前登录账号在本地和服务端保存的全部消息。 await OpenIMSDK.deleteAllMsgFromLocalAndSvr ; 这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本地和服务端的清理请求已完成;其他会话成员已保存的消息副本不受影响。" }, { - "path": "/sdk/react-native/user/friends/search-friends", - "title": "搜索好友", - "description": "OpenIM React Native SDK 搜索好友。", + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "设置消息本地扩展", + "description": "OpenIM React Native SDK 设置消息本地扩展。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends search-friends", - "content": "调用 searchFriends 搜索当前用户的好友。提交搜索前应去除关键词首尾空格;当前请求使用 keywordList 中的第一个非空关键词。 const friends = await OpenIMSDK.searchFriends keywordList: keyword.trim , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词数组,当前使用第一个非空关键词。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchNickname | boolean | 是 | 是否匹配好友昵称。 | | isSearchRemark | boolean | 是 | 是否匹配好友备注。 | 返回 SearchedFriendsInfo 。每项包含好友信息字段和 relationship : 0 表示黑名单关系, 1 表示好友关系。" + "keywords": "sdk react-native v4 sdk react-native message managing-messages set-message-local-ex", + "content": "使用 setMessageLocalEx 为当前设备中的指定消息保存本地扩展数据。 await OpenIMSDK.setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify expanded: true , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 目标消息 ID。 | | localEx | string | 是 | 本地扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展数据。 | 调用完成后,本地扩展数据已保存到当前设备的消息中。" }, { - "path": "/sdk/react-native/user/friends/get-specified-friends-info", - "title": "查询指定好友资料", - "description": "OpenIM React Native SDK 查询指定好友资料。", + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "上报群消息已读", + "description": "OpenIM React Native SDK 上报群消息已读。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends get-specified-friends-info", - "content": "调用 getSpecifiedFriendsInfo 按用户 ID 查询指定好友的关系信息。 const friends = await OpenIMSDK.getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userIDList | string | 是 | 要查询的用户 ID 列表。 | | filterBlack | boolean | 否 | 是否过滤黑名单用户。 | 返回匹配的 FriendUserItem ,数组不保证与输入 ID 按位置一一对应。字段说明见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。 查询陌生人的公开用户信息时,使用 获取用户资料 /sdk/react native/user/profile/get users info 。" + "keywords": "sdk react-native v4 sdk react-native message managing-read-status send-group-read-receipts", + "content": "使用 sendGroupMessageReadReceipt 上报群聊中已读的消息。 await OpenIMSDK.sendGroupMessageReadReceipt conversationID, clientMsgIDs, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgIDs | string | 是 | 已读消息 ID 列表;列表中的消息应属于该群聊会话。 | 调用完成后,已读回执已上报。会话未读数的更新见 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 。 监听群消息已读变化 群消息的已读状态变化时会触发 OnRecvGroupReadReceipt ,回调携带 GroupMessageReceiptInfo ,其中包含 conversationID 和各消息的已读人数、未读人数及已读成员。 function handleGroupReadReceipt payload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; 组件销毁、退出登录或切换账号时,取消监听。" }, { - "path": "/sdk/react-native/user/friends/check-friend", - "title": "检查好友关系", - "description": "OpenIM React Native SDK 检查好友关系。", + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "查询群消息已读成员", + "description": "OpenIM React Native SDK 查询群消息已读成员。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends check-friend", - "content": "调用 checkFriend 批量检查当前用户与指定用户的好友关系。 const checks = await OpenIMSDK.checkFriend 'user a', 'user b' ; 返回的 FriendshipInfo 与输入用户 ID 按 userID 对应: | 字段 | 类型 | 说明 | | | | | | userID | string | 被检查用户的 ID。 | | result | number | 1 表示是好友, 0 表示不是好友。 | 需要判断黑名单关系时,另行调用 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", + "content": "使用 getGroupMessageReaderList 分页查询一条群消息的已读或未读成员。 const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgID | string | 是 | 要查询已读情况的消息 ID。 | | filter | GroupMessageReaderFilter | 是 | 成员筛选条件。 Read 查询已读成员, Unread 查询未读成员。 | | offset | number | 是 | 分页偏移量;首页传 0 。 | | count | number | 是 | 本次查询的成员数量。 | 返回结果 调用后返回当前页的 GroupMemberItem 。成员字段见 群组概览 /sdk/react native/group/overview group ;继续查询时递增 offset 。" }, { - "path": "/sdk/react-native/user/friends/update-friends", - "title": "更新好友资料", - "description": "OpenIM React Native SDK 更新好友资料。", + "path": "/sdk/react-native/file-uploads/upload-file", + "title": "上传文件", + "description": "使用 OpenIM React Native SDK 独立上传文件并获取远端资源 URL。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends update-friends", - "content": "使用 updateFriends 更新 friendUserIDs 中的所有好友。 await OpenIMSDK.updateFriends friendUserIDs: friendUserID , remark: remark, isPinned: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendUserIDs | string | 是 | 要更新的好友用户 ID 列表。 | | remark | string | 否 | 新备注。 | | isPinned | boolean | 否 | 是否置顶。 | | ex | string | 否 | 新扩展字符串。 | 除 friendUserIDs 外,至少传入一个要更新的字段。不同好友需要不同值时,分别调用该方法。更新好友资料后会触发 OnFriendInfoChanged 事件,监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" + "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", + "content": "uploadFile 用于独立上传本地文件,可用于头像、群头像、资料附件或其他业务文件。 const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 上传使用的文件名。 | | contentType | string | 是 | 文件的 MIME 类型。 | | uuid | string | 是 | 本次上传的业务标识。 | | cause | string | 否 | 业务约定的上传原因。 | | filepath | string | 是 | 应用可读取的本地文件路径。 | 调用完成后返回远端资源地址 url 。可将该地址用于更新头像、保存业务附件,或创建 URL 类型的媒体消息后再发送。 监听上传状态 上传过程中触发 UploadOnProgress 事件,回调参数包含当前已上传量 current 和文件总量 size 。上传完成时触发 UploadComplete 事件,回调参数的 data 包含 fileSize 、 streamSize 和 storageSize 。 function handleUploadProgress current, size // ... function handleUploadComplete data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // 取消监听 OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; 组件销毁、退出登录或切换账号时,应取消监听。" }, { - "path": "/sdk/react-native/user/friends/delete-friend", - "title": "删除好友", - "description": "OpenIM React Native SDK 删除好友。", + "path": "/sdk/react-native/calling/overview-calling", + "title": "音视频通话概览", + "description": "OpenIM React Native SDK 音视频通话概览。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends delete-friend", - "content": "调用 deleteFriend 删除当前用户与指定用户的好友关系。 await OpenIMSDK.deleteFriend friendUserID ; friendUserID 是要删除的好友用户 ID。删除好友后会触发 OnFriendDeleted 事件,事件携带被删除好友的信息;好友列表的监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" + "keywords": "sdk react-native v4 sdk react-native calling overview-calling", + "content": "OpenIM React Native SDK 提供音视频通话的信令 API,用于发起和处理通话邀请、查询房间信息及同步通话状态。它只处理通话业务信令,不负责音视频采集与播放、媒体房间连接或通话界面渲染。 发起或接受通话后,SDK 返回 roomID 、 token 和 liveURL 等房间凭据。应用需要将这些凭据交给实时音视频媒体引擎加入通话房间,并自行处理设备权限、媒体轨道、弱网策略和界面状态。 通话流程 1. 调用 signalingInvite 发起单聊通话,或调用 signalingInviteInGroup 发起群聊通话。 2. 被邀请用户通过 OnReceiveNewInvitation 收到通话邀请,选择接受或拒绝。 3. 接受邀请后调用 signalingAccept ,使用返回的房间凭据加入通话房间。 4. 通话期间根据邀请状态、参与者状态、媒体流状态和自定义信令更新通话界面。 5. 发起方可取消尚未接通的邀请;通话参与者可挂断已建立的通话。 核心数据 | 数据 | 说明 | | | | | RtcInvite | 通话邀请,包含邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 | | RtcInviteResults | 发起、接受通话或查询房间凭据后返回的 roomID 、 token 和 liveURL 。 | | CallingRoomData | 按群组查询得到的房间 ID、邀请信息和参与者资料。 | | OnReceiveNewInvitationPayload | 收到通话邀请时的事件参数,包含 invitation 、可选的 offlinePushInfo 和参与者资料。 | customData 和自定义信令均为业务自定义字符串,可按业务协议传递 JSON 或其他格式的数据。 通话状态 调用发起、接受、拒绝、取消或挂断 API 后,可根据对应调用结果更新当前操作的界面。其他用户或设备的通话状态通过事件接收。使用 roomID 区分通话;参与者状态同时使用 roomID 和 userID 区分。 邀请生命周期、参与者进出房间和媒体流变化的监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。自定义信令的监听方式见 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal 。 按任务查找页面 | 任务 | 页面 | | | | | 发起单聊或群聊通话 | 发起单聊通话 /sdk/react native/calling/managing calls/start single call 、 发起群聊通话 /sdk/react native/calling/managing calls/start group call | | 接受或拒绝邀请 | 接受通话 /sdk/react native/calling/managing calls/accept call 、 拒绝通话 /sdk/react native/calling/managing calls/reject call | | 取消邀请或挂断通话 | 取消通话邀请 /sdk/react native/calling/managing calls/cancel call 、 挂断通话 /sdk/react native/calling/managing calls/hang up call | | 查询房间或恢复待处理邀请 | 查询群组通话房间 /sdk/react native/calling/retrieving call information/get room by group id 、 获取通话房间 Token /sdk/react native/calling/retrieving call information/get token by room id 、 恢复待处理的通话邀请 /sdk/react native/calling/retrieving call information/restore pending invitation | | 处理事件和自定义信令 | 处理通话事件 /sdk/react native/calling/managing calls/handle call events 、 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal |" }, { - "path": "/sdk/react-native/user/friend-applications/add-friend", - "title": "发送好友申请", - "description": "OpenIM React Native SDK 发送好友申请。", + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "发起单聊通话", + "description": "使用 OpenIM React Native SDK 发起单聊音视频通话。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications add-friend", - "content": "调用 addFriend 向指定用户发送好友申请。 await OpenIMSDK.addFriend toUserID, reqMsg, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 要申请添加的用户 ID。 | | reqMsg | string | 是 | 申请附言;没有内容时传空字符串。 | 发送成功只表示好友申请已提交,不表示对方已经同意。申请状态变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听相关事件。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-single-call", + "content": "调用 signalingInvite 发起单聊音视频通话。调用完成后返回房间凭据,应用可使用其中的 roomID 、 token 和 liveURL 接入实时音视频媒体引擎。 const roomCredentials = await OpenIMSDK.signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , groupID: '', roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Single, platformID: currentPlatform, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | RtcInvite | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起通话的当前用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户 ID 列表;单聊时传入对方用户 ID。 | | invitation.groupID | string | 是 | 单聊传空字符串。 | | invitation.roomID | string | 是 | 本次通话的房间 ID,后续通话操作和状态处理使用该值识别通话。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,例如 audio 或 video 。 | | invitation.sessionType | SessionType | 是 | 单聊传入 SessionType.Single 。 | | invitation.platformID | Platform | 是 | 发起端平台;传入当前客户端对应的 Platform 枚举值。 | | invitation.customData | string | 否 | 随邀请传递的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表。发起新邀请时通常不填写。 | | offlinePushInfo | OfflinePush | 否 | 被邀请用户离线时使用的推送内容。 | | offlinePushInfo.title | string | 条件必填 | 提供 offlinePushInfo 时填写推送标题。 | | offlinePushInfo.desc | string | 条件必填 | 提供 offlinePushInfo 时填写推送正文。 | | offlinePushInfo.ex | string | 条件必填 | 提供 offlinePushInfo 时填写扩展字符串;没有内容时传空字符串。 | | offlinePushInfo.iOSPushSound | string | 条件必填 | 提供 offlinePushInfo 时填写 iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 条件必填 | 提供 offlinePushInfo 时说明是否更新 iOS 角标。 | 返回结果 调用完成后返回 RtcInviteResults : | 字段 | 类型 | 说明 | | | | | | roomID | string | 通话房间 ID。 | | token | string | 加入通话房间使用的凭据。 | | liveURL | string | 通话服务返回的房间地址。 | | busyLineUserIDList | string | 处于忙线状态的被邀请用户 ID 列表。 | 被邀请用户会通过 OnReceiveNewInvitation 收到 OnReceiveNewInvitationPayload 。接受、拒绝、取消和挂断等状态变化见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" }, { - "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", - "title": "获取收到的好友申请", - "description": "OpenIM React Native SDK 获取收到的好友申请。", + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "发起群聊通话", + "description": "使用 OpenIM React Native SDK 发起群聊音视频通话。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-recipient", - "content": "调用 getFriendApplicationListAsRecipient 分页查询当前用户收到的好友申请。 const applications = await OpenIMSDK.getFriendApplicationListAsRecipient handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | handleResults | number | 是 | 要查询的申请处理结果。 | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的申请数量。 | | 枚举值 | 数值 | 含义 | | | | | | ApplicationHandleResult.Unprocessed | 0 | 待处理。 | | ApplicationHandleResult.Agree | 1 | 已同意。 | | ApplicationHandleResult.Reject | 1 | 已拒绝。 | 返回当前页的 FriendApplicationItem 。 好友申请字段 FriendApplicationItem 类型字段说明: | 字段 | 类型 | 说明 | | | | | | fromUserID | string | 申请发起人的用户 ID。 | | fromNickname | string | 申请发起人的昵称。 | | fromFaceURL | string | 申请发起人的头像地址。 | | toUserID | string | 申请接收人的用户 ID。 | | toNickname | string | 申请接收人的昵称。 | | toFaceURL | string | 申请接收人的头像地址。 | | reqMsg | string | 申请附言。 | | handleResult | ApplicationHandleResult | 当前处理结果。 | | handlerUserID | string | 执行处理的用户 ID。 | | handleMsg | string | 处理时填写的说明。 | | handleTime | number | 处理时间。 | | createTime | number | 申请记录创建时间。 | | ex | string | 申请记录扩展字符串。 | 监听好友申请变化 好友申请变化时,触发 OnFriendApplicationAdded 、 OnFriendApplicationAccepted 、 OnFriendApplicationRejected 或 OnFriendApplicationDeleted 事件。事件直接携带 FriendApplicationItem : const handleApplicationChanged = application: FriendApplicationItem = // 按 fromUserID 和 toUserID 更新申请记录 ; const handleApplicationDeleted = application: FriendApplicationItem = // 按 fromUserID 和 toUserID 移除申请记录 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; 申请记录使用 fromUserID 和 toUserID 共同定位。退出登录、切换账号或销毁申请列表状态时,取消这些监听。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-group-call", + "content": "调用 signalingInviteInGroup 发起群聊音视频通话。 groupID 用于标识发起通话的群组。 inviteeUserIDList 指定本次邀请的群成员,不会自动邀请群内全部成员。 const roomCredentials = await OpenIMSDK.signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: memberUserIDs, groupID, roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Group, platformID: currentPlatform, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | RtcInvite | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起通话的当前用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 本次邀请的群成员用户 ID 列表。 | | invitation.groupID | string | 是 | 目标群组 ID。 | | invitation.roomID | string | 是 | 本次群聊通话的房间 ID。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,例如 audio 或 video 。 | | invitation.sessionType | SessionType | 是 | 群聊传入 SessionType.Group 。 | | invitation.platformID | Platform | 是 | 发起端平台;传入当前客户端对应的 Platform 枚举值。 | | invitation.customData | string | 否 | 随邀请传递的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表。发起新邀请时通常不填写。 | | offlinePushInfo | OfflinePush | 否 | 被邀请用户离线时使用的推送内容。 | | offlinePushInfo.title | string | 条件必填 | 提供 offlinePushInfo 时填写推送标题。 | | offlinePushInfo.desc | string | 条件必填 | 提供 offlinePushInfo 时填写推送正文。 | | offlinePushInfo.ex | string | 条件必填 | 提供 offlinePushInfo 时填写扩展字符串;没有内容时传空字符串。 | | offlinePushInfo.iOSPushSound | string | 条件必填 | 提供 offlinePushInfo 时填写 iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 条件必填 | 提供 offlinePushInfo 时说明是否更新 iOS 角标。 | 调用完成后返回 RtcInviteResults ,其中包含 roomID 、 token 、 liveURL 和可选的 busyLineUserIDList 。字段说明见 发起单聊通话 /sdk/react native/calling/managing calls/start single call 。 被邀请成员会通过 OnReceiveNewInvitation 收到 OnReceiveNewInvitationPayload 。成员的接受、拒绝和离开状态见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" }, { - "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", - "title": "获取发出的好友申请", - "description": "OpenIM React Native SDK 获取发出的好友申请。", + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "接受通话", + "description": "使用 OpenIM React Native SDK 接受通话邀请。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-applicant", - "content": "调用 getFriendApplicationListAsApplicant 分页查询当前用户发出的好友申请。 const applications = await OpenIMSDK.getFriendApplicationListAsApplicant offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的申请数量。 | 返回当前页的 FriendApplicationItem 。申请记录字段见 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls accept-call", + "content": "收到 OnReceiveNewInvitation 事件后,调用 signalingAccept 接受通话邀请。 const roomCredentials = await OpenIMSDK.signalingAccept opUserID: currentUserID, invitation, ; opUserID 是当前接受邀请的用户 ID。 invitation 应使用 OnReceiveNewInvitation 事件回调提供的完整 invitation 对象。 调用完成后返回 RtcInviteResults ,包含通话房间的 roomID 、 token 和 liveURL 。其他参与者会通过 OnInviteeAccepted 事件收到接受结果,事件回调中的 invitation.roomID 用于识别本次通话。事件监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" }, { - "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", - "title": "获取未处理好友申请数", - "description": "OpenIM React Native SDK 获取未处理好友申请数。", + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "拒绝通话", + "description": "使用 OpenIM React Native SDK 拒绝通话邀请。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-unhandled-count", - "content": "调用 getFriendApplicationUnhandledCount 查询指定时间点之后未处理的好友申请数量。 const count = await OpenIMSDK.getFriendApplicationUnhandledCount time, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | time | number | 是 | 查询起始时间,通常使用上次查看申请列表的时间。 | 返回该时间点之后的未处理好友申请数量。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls reject-call", + "content": "收到通话邀请后,如不接受,调用 signalingReject 拒绝邀请。 await OpenIMSDK.signalingReject opUserID: currentUserID, invitation, ; opUserID 是当前拒绝邀请的用户 ID。 invitation 使用 OnReceiveNewInvitation 事件回调提供的完整 invitation 对象。 调用完成后,拒绝请求已完成。发起方会通过 OnInviteeRejected 事件收到拒绝结果,事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" }, { - "path": "/sdk/react-native/user/friend-applications/accept-friend-application", - "title": "接受好友申请", - "description": "OpenIM React Native SDK 接受好友申请。", + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "取消通话邀请", + "description": "使用 OpenIM React Native SDK 取消通话邀请。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications accept-friend-application", - "content": "调用 acceptFriendApplication 接受好友申请。 await OpenIMSDK.acceptFriendApplication toUserID: applicantUserID, handleMsg: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 申请发起人的用户 ID。 | | handleMsg | string | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | 接受后会建立好友关系,并触发好友申请状态变化和 OnFriendAdded 事件。好友列表变化的监听方式见 分页获取好友列表 /sdk/react native/user/friends/get friend list page 。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls cancel-call", + "content": "发起方在通话尚未接通时,调用 signalingCancel 取消邀请。 await OpenIMSDK.signalingCancel opUserID: currentUserID, invitation, ; opUserID 是当前发起取消操作的用户 ID。 invitation 使用发起通话时保存的完整 RtcInvite 对象。 调用完成后,取消邀请请求已完成。被邀请用户会通过 OnInvitationCancelled 事件收到取消结果,事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" }, { - "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", - "title": "拒绝好友申请", - "description": "OpenIM React Native SDK 拒绝好友申请。", + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "挂断通话", + "description": "使用 OpenIM React Native SDK 挂断通话。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications refuse-friend-application", - "content": "调用 refuseFriendApplication 拒绝好友申请。 await OpenIMSDK.refuseFriendApplication toUserID: applicantUserID, handleMsg: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 申请发起人的用户 ID。 | | handleMsg | string | 是 | 处理申请时附带的说明,没有内容时传空字符串。 | 申请状态变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听相关事件。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls hang-up-call", + "content": "通话建立后,调用 signalingHungUp 挂断通话。 await OpenIMSDK.signalingHungUp opUserID: currentUserID, invitation, ; opUserID 是当前挂断通话的用户 ID。 invitation 使用本次通话的完整 RtcInvite 对象,其中的 roomID 应与当前通话房间一致。 调用完成后,挂断请求已完成。其他参与者会通过 OnHangUp 事件收到通话结束信息;事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" }, { - "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", - "title": "删除好友申请", - "description": "OpenIM React Native SDK 删除好友申请。", + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "处理通话事件", + "description": "使用 OpenIM React Native SDK 监听通话事件。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications delete-friend-requests", - "content": "调用 deleteFriendRequests 批量删除好友申请记录。 参数说明 数组中的每一项使用以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | fromUserID | string | 是 | 申请发起人的用户 ID。 | | toUserID | string | 是 | 申请接收人的用户 ID。 | await OpenIMSDK.deleteFriendRequests fromUserID, toUserID , ; 删除记录不等于拒绝申请,也不会删除已经建立的好友关系。申请记录变化时,可在 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 页面监听 OnFriendApplicationDeleted 。" + "keywords": "sdk react-native v4 sdk react-native calling managing-calls handle-call-events", + "content": "通话相关事件用于接收邀请状态、参与者状态和媒体流状态。邀请类事件从回调参数的 invitation 读取房间信息;媒体流变化直接提供 roomID 。发送和接收自定义信令见 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal 。 事件参数 | 事件 | 回调参数类型 | 常用字段 | | | | | | OnReceiveNewInvitation | OnReceiveNewInvitationPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInviteeAccepted | OnInviteeAcceptedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInviteeRejected | OnInviteeRejectedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInvitationCancelled | OnInvitationCancelledPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInvitationTimeout | OnReceiveNewInvitationPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInviteeAcceptedByOtherDevice | OnInviteeAcceptedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInviteeRejectedByOtherDevice | OnInviteeRejectedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnHangUp | OnHangUpPayload | invitation 、 userID 、 offlinePushInfo 。 | | OnRoomParticipantConnected | OnRoomParticipantConnectedPayload | invitation 、 groupID 、 participant 。 | | OnRoomParticipantDisconnected | OnRoomParticipantDisconnectedPayload | invitation 、 groupID 、 participant 。 | | OnStreamChange | OnStreamChangePayload | roomID 、 streamType 、 mute 。 | 使用 invitation.roomID 或 roomID 区分通话;参与者信息中使用 participant.userInfo.userID 区分用户。 function handleReceiveNewInvitation payload: OnReceiveNewInvitationPayload // ... function handleInviteeAccepted payload: OnInviteeAcceptedPayload // ... function handleInviteeRejected payload: OnInviteeRejectedPayload // ... function handleInvitationCancelled payload: OnInvitationCancelledPayload // ... function handleInvitationTimeout payload: OnReceiveNewInvitationPayload // ... function handleInviteeAcceptedByOtherDevice payload: OnInviteeAcceptedPayload // ... function handleInviteeRejectedByOtherDevice payload: OnInviteeRejectedPayload // ... function handleHangUp payload: OnHangUpPayload // ... function handleRoomParticipantConnected payload: OnRoomParticipantConnectedPayload // ... function handleRoomParticipantDisconnected payload: OnRoomParticipantDisconnectedPayload // ... function handleStreamChange payload: OnStreamChangePayload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.on OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.on OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.on OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.on OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.on OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice ; OpenIMSDK.on OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice ; OpenIMSDK.on OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected ; OpenIMSDK.on OpenIMEvent.OnStreamChange, handleStreamChange ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.off OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.off OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.off OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.off OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.off OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice ; OpenIMSDK.off OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice ; OpenIMSDK.off OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected ; OpenIMSDK.off OpenIMEvent.OnStreamChange, handleStreamChange ; 组件销毁、退出登录或切换账号时,应取消监听。" }, { - "path": "/sdk/react-native/user/blacklist/get-black-list", - "title": "获取黑名单", - "description": "OpenIM React Native SDK 获取黑名单。", + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "恢复待处理的通话邀请", + "description": "恢复待处理的通话邀请。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user blacklist get-black-list", - "content": "调用 getBlackList 获取当前账号的黑名单。 const blockedUsers = await OpenIMSDK.getBlackList ; 返回 BlackUserItem ,常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 被拉黑的用户 ID。 | | nickname | string | 被拉黑用户的昵称。 | | faceURL | string | 被拉黑用户的头像地址。 | | ownerUserID | string | 黑名单关系所属用户 ID。 | | operatorUserID | string | 执行拉黑操作的用户 ID。 | | createTime | number | 黑名单创建时间。 | | addSource | number | 黑名单添加来源。 | | ex | string | 黑名单扩展字段。 | 资料卡或联系人列表判断黑名单关系时,应使用 userID 。黑名单与群组管理是独立能力,群成员禁言或移除请使用群组相关 API。 监听黑名单变化 黑名单变化时,触发 OnBlackAdded 或 OnBlackDeleted 事件,事件直接携带对应的黑名单用户信息: const handleBlackAdded = blackUser: BlackUserItem = // 按 blackUser.userID 加入或更新记录 ; const handleBlackDeleted = blackUser: BlackUserItem = // 按 blackUser.userID 移除记录 ; OpenIMSDK.on OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.on OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; OpenIMSDK.off OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.off OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; 退出登录、切换账号或销毁黑名单状态时,取消这些监听。" + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information restore-pending-invitation", + "content": "应用启动或恢复到前台时,调用 getSignalingInvitationInfoStartApp 获取仍待处理的通话邀请。 const invitation, offlinePushInfo = await OpenIMSDK.getSignalingInvitationInfoStartApp ; 返回结果 | 字段 | 类型 | 说明 | | | | | | invitation | RtcInvite 或 null | 待处理的通话邀请;没有待处理邀请时为 null 。 | | offlinePushInfo | OfflinePush | 邀请携带的离线推送内容。 | 当 invitation 不为 null 时,可使用其中的邀请信息恢复来电展示。后续取消、超时、接受和挂断等状态通过 处理通话事件 /sdk/react native/calling/managing calls/handle call events 接收。" }, { - "path": "/sdk/react-native/user/blacklist/add-black", - "title": "将用户加入黑名单", - "description": "OpenIM React Native SDK 将用户加入黑名单。", + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "查询群组通话房间", + "description": "按群组 ID 查询通话房间。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user blacklist add-black", - "content": "调用 addBlack 将指定用户加入当前账号的黑名单。 await OpenIMSDK.addBlack toUserID, ex, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | toUserID | string | 是 | 要加入黑名单的用户 ID。 | | ex | string | 否 | 黑名单关系的扩展信息。 | 加入黑名单后会触发 OnBlackAdded 事件。黑名单列表和事件监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-room-by-group-id", + "content": "调用 signalingGetRoomByGroupID 按群组 ID 获取群聊通话房间信息; groupID 是目标群组 ID。 const room = await OpenIMSDK.signalingGetRoomByGroupID groupID ; 返回结果 调用完成后返回 CallingRoomData : | 字段 | 类型 | 说明 | | | | | | roomID | string | 通话房间 ID。 | | invitation | RtcInvite (可选) | 房间对应的通话邀请信息。 | | participant | ParticipantInfo (可选) | 当前房间的参与者资料。 | participant 中的 userInfo 是用户资料;群聊场景还可能包含 groupMemberInfo 和 groupInfo 。调用后可使用 roomID 查询房间凭据或处理对应的通话状态。" }, { - "path": "/sdk/react-native/user/blacklist/remove-black", - "title": "将用户移出黑名单", - "description": "OpenIM React Native SDK 将用户移出黑名单。", + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "获取通话房间 Token", + "description": "按房间 ID 获取通话凭据。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", - "content": "调用 removeBlack 将指定用户移出当前账号的黑名单。 await OpenIMSDK.removeBlack blackUserID ; blackUserID 是要移出黑名单的用户 ID。移出后会触发 OnBlackDeleted 事件,监听方式见 获取黑名单 /sdk/react native/user/blacklist/get black list 。" + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-token-by-room-id", + "content": "已知通话房间 ID、需要获取房间凭据时,调用 signalingGetTokenByRoomID ; roomID 是目标通话房间 ID。 const roomCredentials = await OpenIMSDK.signalingGetTokenByRoomID roomID ; 返回结果 调用完成后返回 RtcInviteResults ,包含 roomID 、 token 、 liveURL 和可选的 busyLineUserIDList 。将返回的房间凭据交给实时音视频媒体引擎加入通话房间。" }, { - "path": "/sdk/react-native/conversation/overview-conversation", - "title": "会话概览", - "description": "了解 React Native SDK 中的会话、会话状态和会话分组能力。", + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "发送自定义信令", + "description": "在通话房间中发送自定义信令。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation overview-conversation", - "content": "在 OpenIM React Native SDK 中,会话表示当前登录账号维护的一条聊天状态。单聊和群聊都会对应一个 ConversationItem ,其中包含会话列表展示信息、未读状态、草稿和消息接收设置等内容。 会话记录与聊天目标使用不同的标识: conversationID 标识当前账号的会话记录,单聊目标使用对方的 userID ,群聊目标使用 groupID 。群组资料、成员和权限仍通过群组相关 API 管理。 会话标识 | 标识 | 用途 | | | | | conversationID | 当前账号的会话记录 ID,用于会话设置、消息历史和未读状态。 | | userID | 单聊中的对方用户 ID。 | | groupID | 群聊对应的群组 ID。 | | sourceID | 按类型查询会话时传入的聊天目标:单聊传 userID ,群聊传 groupID 。 | 如需根据聊天目标获取 conversationID ,可调用 生成会话 ID /sdk/react native/conversation/retrieving conversations/get conversation id ,传入 sourceID 和 sessionType 。 会话数据 ConversationItem 同时包含列表展示信息和当前账号的会话设置: | 分类 | 字段 | 说明 | | | | | | 标识和类型 | conversationID 、 conversationType | 定位会话记录并区分单聊和群聊。 | | 列表展示 | showName 、 faceURL 、 latestMsg 、 latestMsgSendTime | 展示会话名称、头像和最后一条消息。 | | 未读和提醒 | unreadCount 、 groupAtType | 展示未读数和群聊 @ 提醒状态。 | | 列表组织 | isPinned 、 isMarked 、 draftText 、 remark | 管理置顶、标记、草稿和当前账号的会话备注。 | | 消息策略 | recvMsgOpt 、 isPrivateChat 、 burnDuration 、 isMsgDestruct 、 msgDestructTime | 设置消息接收、阅后即焚和服务端消息删除。 | | 其他状态和扩展 | isNotInGroup 、 attachedInfo 、 ex | 表示群组关系状态、SDK 附加信息和业务扩展。 | 按任务查找 | 任务 | 相关页面 | | | | | 获取一个或多个会话 | 查询指定会话 /sdk/react native/conversation/retrieving conversations/get conversation by target 、 按 ID 批量获取会话 /sdk/react native/conversation/retrieving conversations/get conversations by id 、 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list | | 整理会话列表 | 置顶或取消置顶会话 /sdk/react native/conversation/managing conversations/pin conversation 、 标记或取消标记会话 /sdk/react native/conversation/managing conversations/mark conversation 、 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups | | 管理草稿、备注和扩展字段 | 设置会话草稿 /sdk/react native/conversation/managing conversations/set conversation draft 、 设置会话备注 /sdk/react native/conversation/managing conversations/set conversation remark 、 设置会话扩展字段 /sdk/react native/conversation/managing conversations/set conversation extension | | 设置消息接收和保留策略 | 设置会话消息接收方式 /sdk/react native/conversation/managing conversations/set message receive option 、 开启或关闭阅后即焚 /sdk/react native/conversation/managing conversations/set private chat 、 定期删除服务端消息 /sdk/react native/conversation/managing conversations/set message destruct | | 处理未读数和群组提醒 | 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 、 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 、 重置群聊 @ 状态 /sdk/react native/conversation/managing conversations/clear group mentions | 隐藏、删除和清空 隐藏、删除和清空作用范围不同: | 操作 | 作用 | | | | | 隐藏会话 /sdk/react native/conversation/managing conversations/hide a conversation | 从当前账号的会话列表中隐藏一条会话,新消息到达后可能重新出现。 | | 删除会话及消息 /sdk/react native/conversation/managing conversations/delete conversation with messages | 删除会话记录和当前账号在该会话中的消息。 | | 清空会话消息 /sdk/react native/conversation/managing conversations/clear conversation messages | 保留会话记录,只清除当前账号在该会话中的消息。 | 事件监听 会话状态变化会触发事件,具体的事件监听详见: 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 介绍会话新增和会话字段变化的监听方式。 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 介绍当前账号总未读数的监听方式。 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 介绍会话分组和分组成员变化的监听方式。" + "keywords": "sdk react-native v4 sdk react-native calling sending-custom-signals send-a-custom-signal", + "content": "调用 signalingSendCustomSignal 向通话房间发送业务自定义信令,例如举手或切换布局。 customInfo 是字符串;需要传递结构化数据时,可传入 JSON 字符串。 await OpenIMSDK.signalingSendCustomSignal roomID, customInfo: JSON.stringify type: 'hand raised', , ; 参数说明 | 参数 | 类型 | 说明 | | | | | | roomID | string | 目标通话房间 ID。 | | customInfo | string | 业务自定义信令内容。 | 调用完成后,自定义信令发送请求已完成。 接收自定义信令 其他参与者发送自定义信令时触发 OnReceiveCustomSignal 事件,回调参数类型为 OnReceiveCustomSignalPayload ,包含 roomID 和 customInfo 。 function handleCustomSignal payload: OnReceiveCustomSignalPayload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; 组件销毁、退出登录或切换账号时,应取消监听。接收 customInfo 后,按业务协议解析并处理其中的数据。" }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", - "title": "查询指定会话", - "description": "根据聊天目标和会话类型查询指定会话。", + "path": "/sdk/react-native/events/overview-events", + "title": "事件概览", + "description": "了解 OpenIM React Native SDK 的事件模型、事件分类和监听生命周期。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-by-target", - "content": "调用 getOneConversation 根据聊天目标和会话类型获取一个会话。 const conversation = await OpenIMSDK.getOneConversation sourceID: targetUserID, sessionType: SessionType.Single, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | | sessionType | SessionType | 是 | 会话类型。单聊使用 SessionType.Single ,群聊使用 SessionType.Group 。 | 返回结果 调用完成后返回 ConversationItem 。会话字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "keywords": "sdk react-native v4 sdk react-native events overview-events", + "content": "事件机制概览 OpenIM React Native SDK 通过 OpenIMEvent 定义事件名称,并使用统一的事件监听接口通知连接状态、数据变化和业务信令。 调用 OpenIMSDK.on 设置监听,调用 OpenIMSDK.off 取消监听。事件名称既可以使用 OpenIMEvent 中的枚举值,也可以直接传入对应的事件字符串,直接使用字符串时,必须与 SDK 定义的事件名完全一致。 function handleEvent payload: unknown // 根据事件参数更新应用状态 // 设置监听 OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleEvent ; // 或者 OpenIMSDK.on \"onConversationChanged\", handleEvent ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleEvent ; // 或者 OpenIMSDK.off \"onConversationChanged\", handleEvent ; 每个事件的回调参数由 SDK 的事件声明决定,可能是实体对象、数组、进度值或错误信息。具体事件的参数格式和处理示例见对应功能页面。 事件分类 React Native SDK 的事件按业务领域分为以下类别: | 事件类别 | 典型事件 | 说明 | | | | | | 连接与登录状态 | OnConnecting 、 OnConnectSuccess 、 OnConnectFailed 、 OnKickedOffline 、 OnUserTokenExpired 、 OnUserTokenInvalid | 连接建立、连接失败、强制下线和 Token 状态变化。 | | 初始化同步 | OnSyncServerStart 、 OnSyncServerProgress 、 OnSyncServerFinish 、 OnSyncServerFailed | 登录后 SDK 同步服务端数据的生命周期。 | | 用户与在线状态 | OnSelfInfoUpdated 、 OnUserStatusChanged | 当前用户资料和用户在线状态变化。 | | 好友与黑名单 | OnFriendAdded 、 OnFriendDeleted 、 OnFriendInfoChanged 、 OnFriendApplicationAdded 、 OnBlackAdded | 好友关系、好友申请和黑名单变化。 | | 会话与未读状态 | OnNewConversation 、 OnConversationChanged 、 OnTotalUnreadMessageCountChanged 、 OnInputStatusChanged | 会话列表、未读数和输入状态变化。 | | 会话分组 | OnConversationGroupAdded 、 OnConversationGroupChanged 、 OnConversationGroupDeleted | 会话分组及分组成员变化。 | | 群组与群成员 | OnGroupInfoChanged 、 OnGroupMemberAdded 、 OnGroupMemberDeleted 、 OnGroupApplicationAdded 、 OnJoinedGroupAdded | 群资料、群成员、入群申请和已加入群组变化。 | | 消息 | OnRecvNewMessage 、 OnMsgDeleted 、 OnNewRecvMessageRevoked 、 OnMessageModified 、 OnRecvC2CReadReceipt | 新消息、消息删除、撤回、修改和单聊已读回执。 | | 文件上传 | UploadOnProgress 、 UploadComplete | 文件上传进度和上传完成。 | | 音视频通话 | OnReceiveNewInvitation 、 OnInviteeAccepted 、 OnInvitationCancelled 、 OnHangUp 、 OnReceiveCustomSignal | 通话邀请、参与者状态和通话信令变化。 | | 自定义业务消息 | OnRecvCustomBusinessMessage | 自定义业务消息。 | 注册时机与生命周期 React Native SDK 可以在任意时机注册全局事件监听。完成 initSDK 并登录后,SDK 才会触发连接、同步及业务数据等事件回调;如果需要接收这些事件,应在对应操作前完成监听注册。 React Native SDK 支持对同一事件同时注册多个监听函数,事件触发时,所有监听函数都会收到回调,这与 Flutter 和 Android SDK 的单一 listener 机制不同。虽然 React Native SDK 允许同一事件注册多个监听,但仍建议在应用中集中注册和管理回调,避免页面渲染或组件重复进入时注册相同的业务处理逻辑。 监听函数应保持稳定引用。退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off 取消监听。 连接与初始化同步事件 连接事件用于反映 SDK 与服务端的连接状态: | 事件 | 说明 | | | | | OnConnecting | SDK 开始连接服务端。 | | OnConnectSuccess | SDK 连接成功。 | | OnConnectFailed | 连接失败及错误信息。 | | OnKickedOffline | 当前账号在其他端登录或被服务端强制下线。 | | OnUserTokenExpired | 当前登录 Token 已过期。 | | OnUserTokenInvalid | 当前登录 Token 无效。 | 登录后,SDK 通过以下事件通知初始化同步状态: | 事件 | 说明 | | | | | OnSyncServerStart | 开始同步。 | | OnSyncServerProgress | 当前同步进度。 | | OnSyncServerFinish | 本轮同步完成。 | | OnSyncServerFailed | 本轮同步失败。 | 同步完成后,应用可重新查询当前界面需要的数据;后续用户、好友、会话、群组、消息和通话变化由对应业务事件通知。 按业务领域处理事件 各业务页面提供对应事件的完整参数说明和监听示例: | 事件范围 | 参考页面 | | | | | 用户资料和在线状态 | 更新当前用户资料 /sdk/react native/user/profile/set self info 、 订阅用户在线状态 /sdk/react native/user/online status/subscribe users status | | 好友关系、好友申请和黑名单 | 分页获取好友列表 /sdk/react native/user/friends/get friend list page 、 获取收到的好友申请 /sdk/react native/user/friend applications/get friend application list as recipient 、 获取黑名单 /sdk/react native/user/blacklist/get black list | | 会话、未读数和会话分组 | 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 、 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count 、 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups | | 群组、群成员和入群申请 | 群组概览 /sdk/react native/group/overview group 、 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 、 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list | | 消息和消息状态 | 接收消息 /sdk/react native/message/receiving messages/receive messages 、 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 、 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 、 撤回消息 /sdk/react native/message/managing messages/revoke a message 、 修改消息 /sdk/react native/message/managing messages/modify a message 、 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts | | 文件上传 | 上传文件 /sdk/react native/file uploads/upload file | | 音视频通话和自定义信令 | 处理通话事件 /sdk/react native/calling/managing calls/handle call events 、 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal |" }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", - "title": "生成会话 ID", - "description": "根据聊天目标和会话类型生成会话 ID。", + "path": "/sdk/react-native/logger", + "title": "日志", + "description": "配置 OpenIM React Native SDK 日志,写入应用诊断信息并上传日志。", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-id", - "content": "调用 getConversationIDBySessionType 根据聊天目标和会话类型获取会话 ID。 const conversationID = await OpenIMSDK.getConversationIDBySessionType sourceID: targetUserID, sessionType: SessionType.Single, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 单聊传对方用户 ID,群聊传群组 ID。 | | sessionType | SessionType | 是 | 会话类型。单聊使用 SessionType.Single ,群聊使用 SessionType.Group 。 | 返回结果 调用完成后返回 string 类型的 conversationID 。" + "keywords": "sdk react-native v4 sdk react-native logger", + "content": "OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。 初始化日志配置 调用 initSDK 时配置日志目录和日志级别: await OpenIMSDK.initSDK apiAddr, wsAddr, dataDir, logFilePath, logLevel: LogLevel.Debug, isLogStandardOutput: true, ; | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIM 服务端 API 地址。 | | wsAddr | string | OpenIM WebSocket 长连接地址。 | | dataDir | string | SDK 本地数据目录,应位于应用可写目录。 | | logFilePath | string | SDK 日志目录,应位于应用可写目录。 | | logLevel | LogLevel | 日志详细程度,可选 Debug 、 Info 、 Warn 、 Error 、 Fatal 和 Panic 。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 | 开发诊断可使用 LogLevel.Debug 。生产环境通常使用 LogLevel.Warn 或 LogLevel.Error ,并关闭不必要的标准输出。 写入应用日志 调用 logs 将业务诊断信息写入 SDK 日志: await OpenIMSDK.logs logLevel: LogLevel.Error, file: 'chatRepository.ts', line: 184, msgs: 'send message failed', err: error.message, keyAndValue: 'conversationID', conversationID, 'clientMsgID', clientMsgID, , ; | 参数 | 类型 | 说明 | | | | | | logLevel | number | 本条日志的级别。 | | file | string | 调用位置所在的文件名或模块名。 | | line | number | 调用位置的行号。 | | msgs | string | 简短的业务动作或诊断描述。 | | err | string | 错误信息;没有错误信息时传空字符串。 | | keyAndValue | string | 附加诊断字段,按“键、值”成对传入。 | keyAndValue 只记录排查所需的非敏感标识,例如 conversationID 、 clientMsgID 、 groupID 或 roomID 。 上传日志 用户主动提交诊断日志时,调用 uploadLogs 上传客户端日志: await OpenIMSDK.uploadLogs line: 2000, cancelID: 'support ticket 42', ex: 'user initiated diagnostics', ; | 参数 | 类型 | 是否必填 | 说明 | | | | | | | line | number | 是 | 本次上传读取的日志行数配置。 | | cancelID | string | 否 | 本次上传的标识。 | | ex | string | 否 | 附加诊断说明,不能包含凭据或隐私数据。 | 调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。" }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", - "title": "按 ID 批量获取会话", - "description": "按 conversationID 批量获取会话信息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversations-by-id", - "content": "已经持有一组会话 ID 时,调用 getMultipleConversation 批量获取会话信息。 const conversations = await OpenIMSDK.getMultipleConversation conversationIDList ; 参数说明 conversationIDList 是要查询的会话 ID 数组。 返回结果 调用完成后返回 ConversationItem ,返回结果可能少于传入的会话 ID 数量,未返回的会话 ID 表示 SDK 当前未找到对应会话。单个会话的字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/sdk/electron/getting-started/authenticate-and-init", + "title": "Authenticate and initialize", + "description": "Use the Electron FFI initSDK, login, and unInitSDK methods to establish a session, and understand how their parameters differ from WASM login.", + "context": "SDKs · Electron · v4", + "keywords": "sdk electron v4 sdk electron getting-started authenticate-and-init", + "content": "The Electron FFI SDK separates SDK initialization from user authentication. First call initSDK to configure the OpenIMServer addresses and local runtime directory, then call login with the userID and token. This differs from WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session , where a single InitAndLoginConfig is passed to login . This page covers only the Electron FFI lifecycle APIs. Use the WASM authentication page as a reference for the handling boundaries around connection success, token expiration, and forced sign out. When registering Electron FFI listeners, use the event enum exported by the current Electron SDK rather than copying the WASM SdkEvent type directly. Differences from WASM | Step | Electron FFI | WASM | | | | | | Configure server addresses and runtime | initSDK InitConfig | Included in login InitAndLoginConfig | | Submit user credentials | login userID, token | Included in the same login call | | Release the native SDK | unInitSDK | No equivalent public unload API; use logout to end the session | If the Electron renderer uses the WASM package, follow the WASM authentication page directly and do not call the initSDK described here. Initialize the SDK At initialization, InitConfig supplies server addresses, platform information, a local data directory, and logging options. Parameters | Field | Type | Required | Description | | | | | | | apiAddr | string | Yes | OpenIMServer HTTP API address. | | wsAddr | string | Yes | OpenIMServer WebSocket address. | | platformID | number | Yes | Current client platform value. It must conform to the OpenIMServer multi device login policy. | | dataDir | string | Yes | Writable absolute path for the native SDK's local data. | | systemType | string | Yes | System type identifier required by the Electron FFI SDK. | | logLevel | LogLevel | No | Logging level. | | logFilePath | string | No | Log file path. | | isLogStandardOutput | boolean | No | Whether to write logs to standard output. | await openimsdk.initSDK apiAddr, wsAddr, platformID, dataDir: '/absolute/path/to/openim data', systemType: 'electron', logLevel: LogLevel.Warn, isLogStandardOutput: false, ; When the initSDK Promise succeeds, the native SDK has initialized and can proceed to login. It has not established a user session, and a connection event has not necessarily arrived. Log in the current user Call login after initialization succeeds. FFI login accepts only the user's credentials. Parameters | Field | Type | Required | Description | | | | | | | userID | string | Yes | Current OpenIMSDK user ID. It must match the token. | | token | string | Yes | OpenIMSDK token issued by a trusted backend. | await openimsdk.login userID, token, ; When the login Promise succeeds, the login request has completed. Use connection events such as OnConnectSuccess to decide when business APIs that require a connection are available. See the WASM authentication page /sdk/wasm/getting started/authenticate and manage session for event registration. Log out and uninitialize When the user signs out or switches accounts, first call the shared logout method to end the session. Call unInitSDK afterward when the native resources must be released. await openimsdk.logout ; await openimsdk.unInitSDK ; unInitSDK takes no business parameters. When switching accounts, finish signing out the old account and clear its state before calling initSDK and login again when necessary. Do not initialize two native instances concurrently. Next steps Electron SDK overview /sdk/electron/overview WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session Create media messages from full paths /sdk/electron/message/create media from full path" }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", - "title": "获取会话列表", - "description": "分页获取当前登录账号的会话列表。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations retrieve-conversation-list", - "content": "使用 getConversationListSplit 分页获取会话。 const conversations = await OpenIMSDK.getConversationListSplit offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。继续加载时按已请求的条目数递增。 | | count | number | 是 | 本次请求的会话数量。 | 返回结果 调用完成后返回当前页的 ConversationItem 。当返回数量小于 count 时,表示已经读取到当前列表末尾。 会话字段 ConversationItem 同时包含聊天目标、列表展示和当前账号的会话设置: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 会话 ID。 | | conversationType | SessionType | 会话类型,单聊或群聊。 | | userID | string | 单聊对方的用户 ID;群聊中通常为空。 | | groupID | string | 群聊对应的群组 ID;单聊中通常为空。 | | showName | string | 会话的展示名称。 | | faceURL | string | 会话的展示头像地址。 | | recvMsgOpt | MessageReceiveOptType | 当前会话的消息接收方式。 | | unreadCount | number | 当前会话的未读消息数。 | | groupAtType | GroupAtType | 群聊中的提醒状态;单聊不使用。 | | latestMsg | string | 最后一条消息的 JSON 序列化内容。 | | latestMsgSendTime | number | 最后一条消息的发送时间。 | | draftText | string | 当前设备保存的会话草稿。 | | draftTextTime | number | 草稿更新时间。 | | isPrivateChat | boolean | 是否开启私聊阅后即焚。 | | burnDuration | number | 私聊阅后即焚时长。 | | isMsgDestruct | boolean | 是否开启服务端消息定期删除。 | | msgDestructTime | number | 服务端消息定期删除周期。 | | isPinned | boolean | 会话是否置顶。 | | isMarked 商业版 | boolean | 会话是否已标记。 | | isNotInGroup | boolean | 当前账号是否已不在该群组中。 | | attachedInfo | string | SDK 附加信息。 | | ex | string (可选) | 会话扩展字符串。 | | remark 商业版 | string (可选) | 会话备注。 | 拉取会话列表时,应按 conversationID 合并分页结果去重,避免同一会话重复出现在列表中。刷新列表时从 offset: 0 重新读取。 监听会话变化 新建会话时触发 OnNewConversation ,已有会话发生变化时触发 OnConversationChanged 。两个事件的回调参数都是 ConversationItem 。 function handleNewConversation conversations: ConversationItem // ... function handleConversationChanged conversations: ConversationItem // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleConversationChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleConversationChanged ; 退出登录、切换账号或销毁会话列表状态时,取消监听。" + "path": "/sdk/electron/message/create-media-from-full-path", + "title": "Create media messages from full paths", + "description": "Use the Electron FFI *FromFullPath APIs to create image, video, audio, and file messages from absolute local paths.", + "context": "SDKs · Electron · v4", + "keywords": "sdk electron v4 sdk electron message create-media-from-full-path", + "content": "Electron FFI provides a set of APIs for creating media messages from complete local file paths . They are intended for desktop applications that already have an absolute disk path, such as one returned by a system file picker. Browser applications and Electron applications using WASM should use the corresponding ByFile or ByURL methods. For images, see Create an image message from a file /sdk/wasm/message/creating messages/create image message by file and Create an image message from a URL /sdk/wasm/message/creating messages/create image message by url . For independent file uploads, see Upload a file /sdk/wasm/file uploads/upload file . After creating a MessageItem , send it with sendMessage just like any message that uses the shared message model. See Send a message /sdk/wasm/message/sending messages/send message for sending parameters and events. Supported methods | Method | Purpose | | | | | createImageMessageFromFullPath imagePath | Create an image message from an absolute local image path. | | createSoundMessageFromFullPath params | Create an audio message from an absolute local audio path. | | createVideoMessageFromFullPath params | Create a video message from absolute video and snapshot paths. | | createFileMessageFromFullPath params | Create a regular file message from an absolute local path. | These methods create message objects only. They do not send a message automatically or trigger a new message event. Image messages createImageMessageFromFullPath accepts the image's absolute file path directly. const data: message = await openimsdk.createImageMessageFromFullPath '/absolute/path/to/photo.jpg', ; await openimsdk.sendMessage recvID, groupID: '', message, ; Audio messages Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Absolute path to the audio file. | | duration | number | Yes | Audio duration. Pass an integer rather than a decimal value. | const data: message = await openimsdk.createSoundMessageFromFullPath soundPath: '/absolute/path/to/voice.m4a', duration: 3200, ; Video messages Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Absolute path to the video file. | | videoType | string | Yes | Video type, such as mp4 . | | duration | number | Yes | Video duration. Pass an integer rather than a decimal value. | | snapshotPath | string | Yes | Absolute path to the video cover snapshot. | const data: message = await openimsdk.createVideoMessageFromFullPath videoPath: '/absolute/path/to/clip.mp4', videoType: 'mp4', duration: 12000, snapshotPath: '/absolute/path/to/cover.jpg', ; File messages Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Absolute path to the file. | | fileName | string | Yes | File name displayed to conversation members. | const data: message = await openimsdk.createFileMessageFromFullPath filePath: '/absolute/path/to/report.pdf', fileName: 'report.pdf', ; Results When any of the four FromFullPath Promises succeeds, its data is a MessageItem ready to send. A subsequent successful sendMessage Promise means only that the send request completed. The recipient confirms delivery through its new message event. Related pages Electron SDK overview /sdk/electron/overview Send a message /sdk/wasm/message/sending messages/send message Upload a file /sdk/wasm/file uploads/upload file" }, { - "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", - "title": "置顶或取消置顶会话", - "description": "置顶或取消置顶会话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations pin-conversation", - "content": "调用 pinConversation 设置会话是否置顶。 await OpenIMSDK.pinConversation conversationID, isPinned: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isPinned | boolean | 是 | true 置顶, false 取消置顶。 | 返回结果 调用完成后,会话的 isPinned 状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/sdk/electron/logger/upload-logs", + "title": "Upload logs", + "description": "Use the Electron FFI uploadLogs method to upload client diagnostic logs.", + "context": "SDKs · Electron · v4", + "keywords": "sdk electron v4 sdk electron logger upload-logs", + "content": "Electron FFI provides uploadLogs to upload diagnostic logs already written by the native SDK to the log collection service configured for the current OpenIMServer. See WASM logging /sdk/wasm/logger for browser side log configuration. The WASM package does not provide an equivalent uploadLogs method. Upload logs only when troubleshooting, when a user explicitly submits diagnostics, or when operations staff request them. Before uploading, confirm that logs do not contain tokens, message content, or other sensitive fields. If business context is required, use ex for a non sensitive diagnostic label; never put credentials in it. Upload logs Parameters | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines or line range configuration to read for the upload, as required by Electron FFI. | | cancelID | string | No | Cancellation identifier. When omitted, the SDK uses its default value. | | ex | string | No | Additional description attached to the upload. Omit it or pass an empty string when not needed. | await openimsdk.uploadLogs line: 2000, ex: 'desktop diag session', ; Result When the uploadLogs Promise succeeds, the current upload request has completed. It does not change conversations, messages, or user profiles, and it does not trigger business domain events. If the upload fails, record errCode , errMsg , and the current user ID to correlate the failure with OpenIMServer logs. Do not repeat the complete log content in the failure log. Related pages Electron SDK overview /sdk/electron/overview WASM logging /sdk/wasm/logger Authenticate and initialize /sdk/electron/getting started/authenticate and init" }, { - "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", - "title": "标记或取消标记会话", - "description": "标记或取消标记会话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation", - "content": "调用 setConversation 设置会话的标记状态。 await OpenIMSDK.setConversation conversationID, isMarked: true, ; 将 isMarked 设置为 false 可取消标记。标记状态属于当前登录账号,会话标记后会出现在内置的标记会话分组中。会话分组的查询和管理方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isMarked | boolean | 否 | true 标记, false 取消标记。 | 返回结果 调用完成后,会话的 isMarked 状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/overview", + "title": "Overview", + "description": "OpenIM Webhooks overview, including delivery behavior, configuration, protocol, and callback coverage.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks overview", + "content": "Webhooks let OpenIM notify a business backend over HTTP or HTTPS before or after an operation. Before event callbacks can validate, reject, or adjust an operation. After event callbacks synchronize completed user, relationship, group, message, presence, and conversation changes. Delivery model | Type | Invocation | Typical use | Effect on OpenIM | | | | | | | Before event | Synchronous | Moderation, authorization, field changes, risk controls | OpenIM waits for the response and uses failedContinue , actionCode , and nextCode to continue or stop. | | After event | Asynchronous | Synchronization, auditing, analytics, notifications | The operation has completed; the response cannot change its result. | Before event handlers are on the OpenIM request path and must remain low latency and highly available. After event delivery can still be affected by network, process, or queue failures, so it must not be the only persistence mechanism for financial or similarly critical events. Configure Webhooks Configure a common URL and enable callbacks in config/webhooks.yml : url: https://api.example.com/openim/webhooks beforeSendSingleMsg: enable: true timeout: 5 failedContinue: false deniedTypes: afterUserRegister: enable: true timeout: 5 | Setting | Description | | | | | url | Base receiver URL. OpenIM appends the callbackCommand . | | enable | Enables the callback. | | timeout | Receiver timeout in seconds. | | failedContinue | Whether a before event operation continues after receiver failure or timeout. | | attentionIds | User or group IDs observed by an after event callback. | | allowedTypes | Message content types allowed to trigger the callback. | | deniedTypes | Message content types excluded from the callback. | | insecureSkipVerify Enterprise | Skips HTTPS certificate verification. Use only in controlled tests. | | signature.algorithm Enterprise | HMAC SHA1 , HMAC SHA256 , HMAC SHA512 , RSA SHA256 , or ECDSA SHA256 . | | signature.signatureHeader Enterprise | Header carrying the signature. | | signature.nonceHeader Enterprise | Header carrying the signed nonce. | | signature.secret Enterprise | HMAC secret or asymmetric private key. | The current Enterprise signature covers the nonce header, not the full body. Always use HTTPS and validate signature, nonce freshness, and replay state. Request and response protocol OpenIM sends JSON with POST to WEBHOOK ADDRESS / callbackCommand and supplies operationID as a request header. Dispatch by callbackCommand , not arrival order, and make handlers idempotent using the event's business key, message ID, or operationID . Before event responses use: \"actionCode\":0,\"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"nextCode\":0 CallbackAction | Value | Name | Description | | | | | | 0 | ActionAllow | Use nextCode to continue or stop. This is the value required by the current common response parser. | | 1 | ActionForbidden | Reserved. To reject, return actionCode: 0 , nextCode: 1 , and a business error. | CallbackNextCode | Value | Name | Description | | | | | | 0 | Continue | Continue the OpenIM operation. | | 1 | Stop | Stop the operation using errCode , errMsg , and errDlt . | Callback coverage Users: registration and profile updates. Relationships: friend requests, acceptance, deletion, remarks, blacklist changes, and imports. Groups: creation, joining, leaving, dismissal, ownership, and group/member profile updates. Messages: one to one and group sends, final message modification, read status, and revocation. Push and presence: online/offline push targeting and user online, offline, or forced logout state. Conversations: creation callbacks are available in OpenIM Enterprise. Integration guidance Host receivers on a stable backend, never on a client. Define strict before event timeouts and an explicit failedContinue policy. Acknowledge after event callbacks quickly, then enqueue expensive work. Restrict source addresses, rate, and body size at the gateway, and use HTTPS." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", - "title": "设置会话备注", - "description": "设置会话备注。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-remark", - "content": "调用 setConversation 设置当前账号的会话备注。 await OpenIMSDK.setConversation conversationID, remark: '项目讨论', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | remark | string | 否 | 会话备注。传入空字符串可清除已有备注。 | 显示会话名称时,可根据产品规则优先使用 remark ,没有备注时使用会话原有的 showName 。会话备注不会更新用户资料或群组名称。 返回结果 调用完成后,会话的 remark 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/user/before-user-register", + "title": "Before user registration", + "description": "Validate or adjust user profiles before registration.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user before-user-register", + "content": "Validate, reject, or adjust user profiles before OpenIM registers them. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeUserRegisterCommand . | | users | UserInfo | Users about to be registered. See UserInfo /platform api/user/overview userinfo . | Response Return the common before event response. An optional users array replaces the profiles OpenIM will process. Use nextCode: 1 with a business error to reject registration. Processing rules Configuration key: beforeUserRegister . OpenIM waits synchronously; failure behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", - "title": "设置会话扩展字段", - "description": "设置会话扩展字段。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-extension", - "content": "使用 setConversation 设置会话的扩展字段 ex 。 await OpenIMSDK.setConversation conversationID, ex: JSON.stringify category: 'work', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | ex | string | 否 | 会话扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 | 如果业务需要保留已有扩展内容,应先读取当前 ex ,再按业务规则更新后写回。 返回结果 调用完成后,会话的 ex 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/user/after-user-register", + "title": "After user registration", + "description": "Synchronize user profiles after registration completes.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user after-user-register", + "content": "Synchronize user profiles after OpenIM registration completes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserRegisterCommand . | | users | UserInfo | Registered users. See UserInfo /platform api/user/overview userinfo . | Response Return an HTTP success response promptly. The registration is already complete and cannot be changed by this response. Processing rules Configuration key: afterUserRegister . Process idempotently by user ID or operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", - "title": "设置会话草稿", - "description": "设置会话草稿。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-draft", - "content": "使用 setConversationDraft 保存会话草稿。用户离开聊天页面、切换会话或准备退出时,可以提交当前编辑内容。 await OpenIMSDK.setConversationDraft conversationID, draftText: editorValue, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要保存草稿的会话 ID。 | | draftText | string | 是 | 草稿内容。传入空字符串可清除草稿。 | 输入过程中建议由业务侧维护编辑器状态并合并保存,离开页面前再提交最新内容。 返回结果 调用完成后,草稿已保存。会话列表中的 draftText 和 draftTextTime 变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。切换账号或退出登录时,同时清理业务侧的编辑器状态。" + "path": "/platform-api/webhooks/user/before-update-user-info", + "title": "Before updating user information", + "description": "Validate or adjust nickname, avatar, and extension data before a user profile update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user before-update-user-info", + "content": "Validate or adjust profile fields before OpenIM updates a user. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoCommand Request body | Property | Required | Type | Description | | | | | | | callbackCommand | Yes | string | callbackBeforeUpdateUserInfoCommand . | | userID | Yes | string | User being updated. | | nickName | No | string | Proposed nickname. | | faceURL | No | string | Proposed avatar URL. | | ex | No | string | Proposed extension data. | Response Return the common before event response and optional nickName , faceURL , or ex replacements. Only returned business fields override the pending update. Processing rules Configuration key: beforeUpdateUserInfo . Use nextCode: 1 to reject the update." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", - "title": "设置会话消息接收方式", - "description": "设置会话消息接收方式。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-receive-option", - "content": "调用 setConversationRecvMessageOpt 设置单个会话的消息接收方式。 await OpenIMSDK.setConversationRecvMessageOpt conversationID, opt: MessageReceiveOptType.NotNotify, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | opt | MessageReceiveOptType | 是 | 会话消息接收方式。 | MessageReceiveOptType 常用值如下: | 枚举值 | 数值 | 说明 | | | | | | MessageReceiveOptType.Normal | 0 | 正常接收消息并允许提醒。 | | MessageReceiveOptType.NotReceive | 1 | 不接收该会话的消息。 | | MessageReceiveOptType.NotNotify | 2 | 接收消息但不提醒。 | 返回结果 调用完成后,会话的 recvMsgOpt 已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。账号级默认接收策略请参考用户资料中的 设置全局消息接收方式 /sdk/react native/user/profile/set global message reception 。" + "path": "/platform-api/webhooks/user/after-update-user-info", + "title": "After updating user information", + "description": "Synchronize nickname, avatar, and extension changes after a profile update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user after-update-user-info", + "content": "Synchronize a completed user profile update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoCommand Request body Includes callbackCommand , userID , nickName , faceURL , and ex with the resulting profile values. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfo . Process idempotently by user ID and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", - "title": "重置群聊 @ 状态", - "description": "重置群聊 @ 状态。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-group-mentions", - "content": "用户处理群聊中的提及消息后,调用 resetConversationGroupAtType 重置会话的群组提醒状态。 await OpenIMSDK.resetConversationGroupAtType conversationID ; 参数说明 conversationID 为要重置提醒状态的群聊会话 ID。 该方法将会话的 groupAtType 恢复为普通状态,不用于主动设置“有人提及我”或“提及所有人”等状态。重置群组提醒和 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 是两个独立操作。 返回结果 调用完成后,会话的群组提醒状态已重置。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/user/before-update-user-info-ex", + "title": "Before updating selected user fields", + "description": "Validate or adjust optional user profile fields before an update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user before-update-user-info-ex", + "content": "Validate or adjust only the optional profile fields included in a selected field update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoExCommand Request body Includes callbackCommand , required userID , and optional nickName , faceURL , and ex values. Response Return the common before event response plus only the replacement fields that OpenIM should apply. Processing rules Configuration key: beforeUpdateUserInfoEx . Omitted fields remain untouched; nextCode: 1 rejects the update." }, { - "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", - "title": "标记会话已读", - "description": "标记会话已读。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation-read", - "content": "用户打开会话并阅读当前消息后,调用 markConversationMessageAsRead 标记会话已读。 await OpenIMSDK.markConversationMessageAsRead conversationID ; 参数说明 conversationID 为要标记已读的会话 ID。 返回结果 调用完成后,当前账号在该会话中的未读状态已更新。会话列表中的未读数变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。群聊中该方法只处理当前账号的会话未读状态。" + "path": "/platform-api/webhooks/user/after-update-user-info-ex", + "title": "After updating selected user fields", + "description": "Synchronize optional user profile fields after an update completes.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user after-update-user-info-ex", + "content": "Synchronize the fields changed by a completed selected field user update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoExCommand Request body Includes callbackCommand , userID , and the optional nickName , faceURL , and ex fields that changed. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfoEx . Process idempotently by user ID and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", - "title": "获取消息总未读数", - "description": "获取消息总未读数。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations get-total-unread-count", - "content": "调用 getTotalUnreadMsgCount 获取当前账号所有会话的总未读数。不要尝试通过累加已加载会话分页中的 unreadCount 来计算会话总未读数,这样会遗漏未加载的会话的未读数。 const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount ; 返回结果 调用完成后返回 number 类型的总未读数。 事件监听 应用处于前台时,可通过 OnTotalUnreadMessageCountChanged 监听总未读数变化: function handleTotalUnreadChanged totalUnread: number // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/webhooks/relation/before-add-friend", + "title": "Before adding a friend", + "description": "Validate a friend request before it is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-add-friend", + "content": "Validate a friend request before it is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | | ex | string | Extension data | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriend . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", - "title": "开启或关闭阅后即焚", - "description": "开启或关闭阅后即焚。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-private-chat", - "content": "调用 setConversationPrivateChat 开启或关闭会话的阅后即焚模式。阅后即焚的持续时长通过 setConversationBurnDuration 单独设置,详见 设置阅后即焚时长 /sdk/react native/conversation/managing conversations/set burn duration 。 await OpenIMSDK.setConversationPrivateChat conversationID, isPrivate: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isPrivate | boolean | 是 | true 开启, false 关闭。 | 返回结果 调用完成后,会话的阅后即焚状态已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/relation/after-add-friend", + "title": "After adding a friend", + "description": "Synchronize a newly created friend request.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-add-friend", + "content": "Synchronize a newly created friend request. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriend . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", - "title": "设置阅后即焚时长", - "description": "设置阅后即焚时长。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-burn-duration", - "content": "调用 setConversationBurnDuration 设置会话的阅后即焚时长,单位为秒。该方法只设置持续时长,是否启用阅后即焚由 开启或关闭阅后即焚 /sdk/react native/conversation/managing conversations/set private chat 控制。不要将 burnDuration 与服务端消息定期删除的 msgDestructTime 混淆。 await OpenIMSDK.setConversationBurnDuration conversationID, burnDuration: 30, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | burnDuration | number | 是 | 阅后即焚持续时长,单位为秒。 | 返回结果 调用完成后,会话的阅后即焚时长已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/relation/before-add-friend-agree", + "title": "Before accepting a friend request", + "description": "Validate a friend-request acceptance.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-add-friend-agree", + "content": "Validate a friend request acceptance. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriendAgree . OpenIM waits synchronously; timeout behavior follows failedContinue . The protocol retains the historical field names blackUserID , HandleResult , and HandleMsg ; parse them exactly as shown." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", - "title": "定期删除服务端消息", - "description": "定期删除服务端消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-destruct", - "content": "调用 setConversation 设置会话的服务端消息定期删除策略。 await OpenIMSDK.setConversation conversationID, isMsgDestruct: true, msgDestructTime: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要设置的会话 ID。 | | isMsgDestruct | boolean | 否 | 是否开启服务端消息定期删除。 | | msgDestructTime | number | 否 | 消息删除周期,单位为秒。 | 启用策略时同时传入 isMsgDestruct: true 和 msgDestructTime 。传入 isMsgDestruct: false 可关闭策略。注意该策略与阅后即焚的区别,阅后即焚使用 isPrivateChat 和 burnDuration 。 服务端消息定期删除只影响服务端保存的消息。已经同步到设备的本地消息不会被主动删除;在清理本地数据或更换设备后,已从服务端删除的消息无法再次获取。 返回结果 调用完成后,服务端消息定期删除策略已更新。会话列表中的变化通过 OnConversationChanged 事件返回,事件监听方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/relation/after-add-friend-agree", + "title": "After accepting a friend request", + "description": "Synchronize a newly established friendship.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-add-friend-agree", + "content": "Synchronize a newly established friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriendAgree . Process idempotently using the relationship key and operationID . The protocol retains these historical field names." }, { - "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", - "title": "隐藏会话", - "description": "隐藏会话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-a-conversation", - "content": "调用 hideConversation 隐藏当前账号会话列表中的一个会话。新消息到达或会话状态再次同步后,该会话可能重新出现在会话列表中。 await OpenIMSDK.hideConversation conversationID ; 参数说明 conversationID 为要隐藏的会话 ID。 返回结果 调用完成后,可以先从当前会话列表中移除对应的 conversationID 的会话。如果后续收到 OnConversationChanged ,按 conversationID 更新列表;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/relation/after-delete-friend", + "title": "After deleting a friend", + "description": "Synchronize a deleted friendship.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-delete-friend", + "content": "Synchronize a deleted friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterDeleteFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDeleteFriendCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Deleted friend | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterDeleteFriend . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", - "title": "隐藏全部会话", - "description": "隐藏全部会话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-all-conversations", - "content": "调用 hideAllConversations 隐藏当前账号的全部会话。 await OpenIMSDK.hideAllConversations ; 调用完成后,重新查询 会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 和 获取消息总未读数 /sdk/react native/conversation/managing conversations/get total unread count ,刷新界面数据。新消息到达或会话状态再次同步后,会话可能重新出现在列表中。" + "path": "/platform-api/webhooks/relation/before-set-friend-remark", + "title": "Before setting a friend remark", + "description": "Validate or replace a friend remark.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-set-friend-remark", + "content": "Validate or replace a friend remark. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Proposed remark | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeSetFriendRemark . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return remark to replace the pending value." }, { - "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", - "title": "删除会话及消息", - "description": "删除会话及消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations delete-conversation-with-messages", - "content": "调用 deleteConversationAndDeleteAllMsg 删除会话记录和当前账号下的会话消息。 await OpenIMSDK.deleteConversationAndDeleteAllMsg conversationID ; 参数说明 conversationID 为要删除的会话 ID。 返回结果 调用完成后,可以清除当前页面的消息列表和会话列表项。后续如收到 OnConversationChanged ,按 conversationID 更新列表;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/relation/after-set-friend-remark", + "title": "After setting a friend remark", + "description": "Synchronize an updated friend remark.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-set-friend-remark", + "content": "Synchronize an updated friend remark. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Resulting remark | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetFriendRemark . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", - "title": "清空会话消息", - "description": "清空会话消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-conversation-messages", - "content": "调用 clearConversationAndDeleteAllMsg 清除当前账号的会话消息,不会删除会话。 await OpenIMSDK.clearConversationAndDeleteAllMsg conversationID ; 参数说明 conversationID 为要清空消息的会话 ID。 返回结果 调用完成后,清空当前页面的消息列表。会话的最新消息、摘要和未读状态如有变化,可通过 OnConversationChanged 事件或重新查询会话列表获取最新数据;完整监听和清理方式见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list 。" + "path": "/platform-api/webhooks/relation/before-add-black", + "title": "Before adding to the blacklist", + "description": "Validate a blacklist addition.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-add-black", + "content": "Validate a blacklist addition. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User being blocked | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddBlack . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", - "title": "会话分组概览", - "description": "会话分组概览。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups overview-conversation-groups", - "content": "会话分组用于将当前账号的会话列表按业务场景分类,例如工作、待处理或自定义类别。 分组类型 ConversationGroupType 包含以下类型: | 枚举值 | 数值 | 说明 | | | | | | ConversationGroupType.ConversationGroupTypeNormal | 0 | 普通自定义分组。 | | ConversationGroupType.ConversationGroupTypeFilter | 1 | 按规则筛选的分组。 | | ConversationGroupType.ConversationGroupTypeAll | 2 | 查询全部类型的分组。 | 分组字段 ConversationGroup 通过 conversationGroupID 作为分组标识: | 字段 | 类型 | 说明 | | | | | | conversationGroupID | string | 会话分组 ID。 | | name | string | 分组名称。 | | serial | number | 分组排序值。 | | version | number | 分组数据版本。 | | conversationGroupType | ConversationGroupType | 分组类型。 | | hidden | boolean | 分组是否隐藏。 | | unreadCount | number | 分组内会话的未读总数。 | | conversationIDs | string | 当前属于该分组的会话 ID。 | | ex | string (可选) | 业务扩展字符串。 | 监听分组变化 分组操作完成后,相关事件会返回新增、更新或删除的分组;分组成员变化事件会返回分组、会话 ID 和会话详情。事件回调参数直接传递实体,不包含 data 字段。应用应按 conversationGroupID 更新分组,按事件中的 conversationIDs 更新成员关系。 const handleGroupAdded = groups: ConversationGroup = // ... ; const handleGroupChanged = groups: ConversationGroup = // ... ; const handleGroupDeleted = groups: ConversationGroup = // ... ; const handleGroupMemberAdded = payload: ConversationGroupMemberChangedCallbackData = // ... ; const handleGroupMemberDeleted = payload: ConversationGroupMemberChangedCallbackData = // ... ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.on OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.off OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/webhooks/relation/after-remove-black", + "title": "After removing from the blacklist", + "description": "Synchronize a blacklist removal.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-remove-black", + "content": "Synchronize a blacklist removal. HTTP request POST WEBHOOK ADDRESS /callbackAfterRemoveBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterRemoveBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User removed from the blacklist | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRemoveBlack . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", - "title": "创建会话分组", - "description": "创建会话分组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups create-conversation-group", - "content": "调用 createConversationGroup 为当前账号创建会话分组。创建普通分组时至少传入 name ,也可以同时将一个会话加入新分组。 const group = await OpenIMSDK.createConversationGroup name: '工作', order: 100, conversationID, conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 分组名称。 | | order | number | 否 | 分组排序值。 | | ex | string | 否 | 分组扩展字符串。 | | conversationID | string | 否 | 创建后立即加入分组的会话 ID。 | | conversationGroupType | ConversationGroupType | 否 | 分组类型,普通自定义分组使用 ConversationGroupTypeNormal 。 | 返回结果 调用完成后返回新建的 ConversationGroupResp ,其中包含 conversationGroupID 、 name 、 order 和 conversationIDs 等分组信息。分组变化会通过 OnConversationGroupAdded 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/relation/before-import-friends", + "title": "Before importing friends", + "description": "Validate or filter a batch of friend IDs before import.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-import-friends", + "content": "Validate or filter a batch of friend IDs before import. HTTP request POST WEBHOOK ADDRESS /callbackBeforeImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Friend IDs to import | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeImportFriends . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return friendUserIDs to replace the import set." + }, + { + "path": "/platform-api/webhooks/relation/after-import-friends", + "title": "After importing friends", + "description": "Synchronize the result of a friend import.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-import-friends", + "content": "Synchronize the result of a friend import. HTTP request POST WEBHOOK ADDRESS /callbackAfterImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Imported friend IDs | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterImportFriends . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", - "title": "查询会话分组列表", - "description": "查询会话分组列表。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-groups", - "content": "调用 getConversationGroups 按分组类型获取当前账号的会话分组。 const groups = await OpenIMSDK.getConversationGroups ConversationGroupType.ConversationGroupTypeNormal, ; 参数说明 参数为 ConversationGroupType :普通自定义分组使用 ConversationGroupTypeNormal ,查询全部类型使用 ConversationGroupTypeAll 。 返回结果 调用完成后返回匹配的 ConversationGroup 。字段说明见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。分组只保存会话 ID;需要同时读取会话详情时,使用 查询分组内会话 /sdk/react native/conversation/managing conversation groups/get conversation group info with conversations 。" + "path": "/platform-api/webhooks/group/before-create-group", + "title": "Before creating a group", + "description": "Validate or adjust group information and initial members before a group is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-create-group", + "content": "Validate or adjust group information and initial members before a group is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | introduction | string | Group introduction. | | faceURL | string | Group avatar URL. | | ownerUserID | string | Group owner user ID. | | createTime | int | Group creation time in milliseconds. | | memberCount | int | Initial member count. | | ex | string | Extension data. | | status | int | Group status. | | creatorUserID | string | Group creator user ID. | | groupType | int | Group type. | | needVerification | int | Join verification policy. | | lookMemberInfo | int | Whether ordinary members can view member profiles. | | applyMemberFriend | int | Whether ordinary members can add other members as friends. | | notificationUpdateTime | int | Announcement update time in milliseconds. | | notificationUserID | string | User who last updated the announcement. | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | | initMemberList | object | Initial members, each containing userID and roleLevel . | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may also return the mutable group fields shown above to replace the values OpenIM is about to process. Processing rules Configuration key: beforeCreateGroup . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", - "title": "查询分组内会话", - "description": "查询分组内会话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-info-with-conversations", - "content": "调用 getConversationGroupInfoWithConversations 获取一个会话分组的信息以及该分组的分页会话列表。 const result = await OpenIMSDK.getConversationGroupInfoWithConversations conversationGroupID, pagination: pageNumber: 1, showNumber: 20, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要查询的会话分组 ID。 | | pagination.pageNumber | number | 是 | 页码,从 1 开始。 | | pagination.showNumber | number | 是 | 每页返回的会话数量。 | 返回结果 调用完成后返回包含以下字段的对象: | 字段 | 类型 | 说明 | | | | | | group | ConversationGroup | 当前分组信息。 | | conversationTotal | number | 分组中的会话总数。 | | conversationElems | ConversationItem | 当前页的会话详情。 | 当已加载会话数量达到 conversationTotal 时,可以停止继续请求。会话字段说明见 获取会话列表 /sdk/react native/conversation/retrieving conversations/retrieve conversation list ,分组字段说明见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/group/after-create-group", + "title": "After creating a group", + "description": "Synchronize group information and initial members after a group is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-create-group", + "content": "Synchronize group information and initial members after a group is created. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupCommand and the complete group snapshot described by GroupInfo /platform api/group/overview groupinfo . It also includes initMemberList , announcement metadata, and these Enterprise fields: | Property | Type | Description | | | | | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | Response Return HTTP success promptly. Group creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroup . Process idempotently using groupID or operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", - "title": "查询会话所属分组", - "description": "查询会话所属分组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-ids-by-conversation-id", - "content": "一个会话可以属于多个会话分组。调用 getConversationGroupByConversationID 获取该会话所属的分组。需要查询所有分组或按类型筛选时,使用 查询会话分组列表 /sdk/react native/conversation/managing conversation groups/get conversation groups 。 const groups = await OpenIMSDK.getConversationGroupByConversationID conversationID ; 参数说明 conversationID 为 OpenIM 会话 ID,不是聊天群组 ID。 返回结果 调用完成后返回 ConversationGroup ,每个元素都是一个完整的分组对象。" + "path": "/platform-api/webhooks/group/before-member-join-group", + "title": "Before members join a group", + "description": "Validate or adjust member profiles before users become group members.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-member-join-group", + "content": "Validate or adjust member profiles before users become group members. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMembersJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeMembersJoinGroupCommand . | | groupID | string | Group ID. | | memberList | object | Members about to join, including userID and ex . | | groupEx | string | Group extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . memberCallbackList may contain adjusted profiles for the members OpenIM is about to add. Processing rules Configuration key: beforeMemberJoinGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the operation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", - "title": "更新会话分组", - "description": "更新会话分组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups update-conversation-group", - "content": "调用 updateConversationGroup 修改已有会话分组。只传入需要更新的字段。 const group = await OpenIMSDK.updateConversationGroup conversationGroupID, name: '重点工作', hidden: false, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要更新的会话分组 ID。 | | name | string | 否 | 新的分组名称。 | | ex | string | 否 | 新的分组扩展字符串。 | | hidden | boolean | 否 | 是否隐藏分组。 | 返回结果 调用完成后返回更新后的 ConversationGroupResp 。分组变化会通过 OnConversationGroupChanged 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/group/before-invite-user-to-group", + "title": "Before inviting users to a group", + "description": "Validate a group invitation and optionally refuse individual invitees.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-invite-user-to-group", + "content": "Validate a group invitation and optionally refuse individual invitees. HTTP request POST WEBHOOK ADDRESS /callbackBeforeInviteJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeInviteJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reason | string | Invitation reason. | | invitedUserIDs | string | User IDs to invite. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . Set refusedMembersAccount to the user IDs that must not be added. Processing rules Configuration key: beforeInviteUserToGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the entire invitation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", - "title": "调整会话分组顺序", - "description": "调整会话分组顺序。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups set-conversation-group-order", - "content": "调用 setConversationGroupOrder 批量调整会话分组的排序值。 await OpenIMSDK.setConversationGroupOrder conversationGroupID: firstGroupID, order: 100 , conversationGroupID: secondGroupID, order: 200 , ; 参数说明 方法接收数组,每个元素包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要调整顺序的分组 ID。 | | order | number | 是 | 新的排序值,产品侧应统一排序方向。 | 返回结果 调用完成后不返回分组数据。界面可以按提交的排序值更新,也可以通过 OnConversationGroupChanged 事件或重新查询分组获取最新信息;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/group/before-apply-join-group", + "title": "Before applying to join a group", + "description": "Run authorization or risk checks before a group join application is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-apply-join-group", + "content": "Run authorization or risk checks before a group join application is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeJoinGroupCommand . | | groupID | string | Group ID. | | groupType | string | Group type. | | applyID | string | Applicant user ID. | | reqMessage | string | Application message. | | ex | string | Extension data. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the application. Processing rules Configuration key: beforeApplyJoinGroup . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", - "title": "添加会话到分组", - "description": "添加会话到分组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups add-conversations-to-groups", - "content": "调用 addConversationsToGroups 将一个或多个会话添加到一个或多个会话分组。 await OpenIMSDK.addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要添加的会话 ID。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID。 | 返回结果 调用完成后,分组与会话的关联请求已完成。关联变化会通过 OnConversationGroupMemberAdded 事件通知,事件参数包含分组、会话 ID 和会话详情;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/group/after-join-group", + "title": "After joining a group", + "description": "Synchronize membership changes after a user joins a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-join-group", + "content": "Synchronize membership changes after a user joins a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reqMessage | string | Join application or invitation message. | | joinSource | int | Source of the membership change. | | inviterUserID | string | Inviter user ID, when applicable. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterJoinGroup . Process idempotently using the group and user identifiers or operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", - "title": "从分组移除会话", - "description": "从分组移除会话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups remove-conversations-from-groups", - "content": "调用 removeConversationsFromGroups 将一个或多个会话从指定会话分组中移除。 await OpenIMSDK.removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要移除的会话 ID。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID。 | 返回结果 调用完成后,分组与会话的关联移除请求已完成。关联变化会通过 OnConversationGroupMemberDeleted 事件通知,事件参数包含分组和会话 ID;完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/group/after-quit-group", + "title": "After leaving a group", + "description": "Synchronize membership changes after a user leaves a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-quit-group", + "content": "Synchronize membership changes after a user voluntarily leaves a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterQuitGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterQuitGroupCommand . | | groupID | string | Group ID. | | userID | string | User who left the group. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterQuitGroup . Process idempotently using groupID:userID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", - "title": "删除会话分组", - "description": "删除会话分组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", - "content": "调用 deleteConversationGroup 删除会话分组及其会话关联。 await OpenIMSDK.deleteConversationGroup conversationGroupID ; 参数 conversationGroupID 为会话分组 ID。 返回结果 调用完成后,分组删除请求已完成。该操作不会删除会话或消息。分组变化会通过 OnConversationGroupDeleted 事件通知,完整监听方式见 会话分组概览 /sdk/react native/conversation/managing conversation groups/overview conversation groups 。" + "path": "/platform-api/webhooks/group/after-kick-group-member", + "title": "After removing group members", + "description": "Synchronize membership changes after members are removed from a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-kick-group-member", + "content": "Synchronize membership changes after members are removed from a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterKickGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterKickGroupCommand . | | groupID | string | Group ID. | | kickedUserIDs | string | Removed user IDs. | | reason | string | Removal reason. | Response Return HTTP success promptly. The membership changes are already complete and cannot be changed by this response. Processing rules Configuration key: afterKickGroupMember . Process each member idempotently using groupID:userID ." }, { - "path": "/sdk/react-native/group/overview-group", - "title": "群组概览", - "description": "了解 React Native SDK 中的群组资料、成员、入群申请和群组事件。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group overview-group", - "content": "OpenIM 的多人聊天由群组承载。在群组相关 API 中,使用 groupID 标识目标群组,例如查询群资料、管理群成员和处理入群申请。创建群组后,可从返回的群组信息中获取 groupID 。群聊会话使用 conversationID 标识,用于会话设置、消息历史和未读状态等操作。 conversationID 与 groupID 分别表示会话和群组,调用时不要混淆。 核心数据类型 | 类型 | 用途 | | | | | GroupItem | 群名称、头像、公告、群主、入群验证方式、成员数和扩展字段。 | | GroupMemberItem | 用户在指定群内的昵称、角色、禁言状态和入群信息。 | 群成员角色由 GroupMemberRole 表示: Normal 为普通成员, Admin 为管理员, Owner 为群主。 GroupItem 常用字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 群组 ID。 | | groupName | string | 群组名称。 | | notification | string | 群组公告。 | | friendUserIDs | string | 群组好友用户 ID 信息。 | | remark | string | 当前账号设置的群组备注。 | GroupMemberItem 常用字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 成员所属的群组 ID。 | | userID | string | 成员用户 ID。 | | nickname | string | 用户在当前群内的昵称。 | | faceURL | string | 用户在当前群内的头像地址。 | | roleLevel | GroupMemberRole | 成员角色。 | | muteEndTime | number | 禁言结束时间。 | | joinTime | number | 加入群组的时间。 | | joinSource | GroupJoinSource | 入群来源。 | | inviterUserID | string | 邀请该成员入群的用户 ID。 | | operatorUserID | string | 最近操作该成员资料的用户 ID。 | | ex | string | 群成员扩展字符串。 | nickname 、 faceURL 和 roleLevel 均属于当前群组中的成员资料;同一用户在其他群组中可能不同。 按任务查找页面 | 任务 | 页面 | | | | | 创建和维护群资料 | 创建群组 /sdk/react native/group/create group 、 更新群名称、简介和头像 /sdk/react native/group/update group profile 、 发布或更新群公告 /sdk/react native/group/set group announcement 、 设置群组扩展字段 /sdk/react native/group/set group extension | | 设置入群和成员权限 | 设置入群验证方式 /sdk/react native/group/set group join verification 、 设置成员资料查看权限 /sdk/react native/group/set group member profile access 、 设置群内添加好友权限 /sdk/react native/group/set group member friend permission | | 加入、退出或解散群组 | 申请加入群组 /sdk/react native/group/join group 、 退出群组 /sdk/react native/group/quit group 、 解散群组 /sdk/react native/group/dismiss group | | 查询群组 | 查询指定群组资料 /sdk/react native/group/retrieving groups/get specified groups info 、 分页获取已加入群组 /sdk/react native/group/retrieving groups/get joined group list page 、 搜索群组 /sdk/react native/group/retrieving groups/search groups | | 查询和处理入群申请 | 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 、 获取发出的入群申请 /sdk/react native/group/group applications/get group application list as applicant | | 查询和管理群成员 | 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 、 邀请用户加入群组 /sdk/react native/group/managing group members/invite user to group 、 移除群成员 /sdk/react native/group/managing group members/kick group member 、 设置管理员 /sdk/react native/group/managing group members/set group member role level 、 转让群主 /sdk/react native/group/managing group members/transfer group owner | | 管理群聊发言权限 | 设置群组全员禁言 /sdk/react native/group/change group mute 、 设置群成员禁言 /sdk/react native/group/managing group members/change group member mute | 监听群组变化 当前账号加入或退出群组、群资料变化以及群组解散时,分别触发 OnJoinedGroupAdded 、 OnJoinedGroupDeleted 、 OnGroupInfoChanged 和 OnGroupDismissed 。这些事件回调直接接收 GroupItem : const handleJoinedGroupAdded = group: GroupItem = // 将 group 添加到已加入群组列表 ; const handleJoinedGroupDeleted = group: GroupItem = // 根据 group.groupID 从已加入群组列表删除群组 ; const handleGroupInfoChanged = group: GroupItem = // 根据 group.groupID 更新群组资料 ; const handleGroupDismissed = group: GroupItem = // 根据 group.groupID 关闭或移除已解散的群组 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.on OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.off OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; 退出登录、切换账号或销毁群组相关状态时,取消这些监听。群成员变化的监听见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list ,入群申请变化的监听见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + "path": "/platform-api/webhooks/group/after-dismiss-group", + "title": "After dismissing a group", + "description": "Synchronize group state after a group is dismissed.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-dismiss-group", + "content": "Synchronize group state after a group is dismissed. HTTP request POST WEBHOOK ADDRESS /callbackAfterDisMissGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDisMissGroupCommand . The historical capitalization is part of the protocol. | | groupID | string | Group ID. | | ownerID | string | Group owner user ID. | | groupType | string | Group type. | | membersID | string | IDs of members affected by dismissal. | Response Return HTTP success promptly. Group dismissal is already complete and cannot be changed by this response. Processing rules Configuration key: afterDismissGroup . Process idempotently using groupID ." }, { - "path": "/sdk/react-native/group/create-group", - "title": "创建群组", - "description": "OpenIM React Native SDK 创建群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group create-group", - "content": "调用 createGroup 创建群组,并设置初始成员、管理员和群主。 const group = await OpenIMSDK.createGroup memberUserIDs: 'user 003', 'user 004' , adminUserIDs: 'user 002' , ownerUserID: currentUserID, groupInfo: groupName: '项目讨论组', groupType: GroupType.WorkingGroup, faceURL: 'https://example.com/group.png', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | memberUserIDs | string | 是 | 初始普通成员的用户 ID。 | | adminUserIDs | string | 否 | 初始管理员的用户 ID。 | | ownerUserID | string | 否 | 群主用户 ID;不传时使用当前用户。 | | groupInfo | Partial | 是 | 初始群资料。常用字段包括 groupName 、 groupType 和 faceURL 。 | 普通成员、管理员和群主不能重复。 groupInfo.groupType 使用 GroupType.WorkingGroup 创建普通群组。 返回结果 调用完成后返回新建群组的 GroupItem 。可以使用返回对象中的 groupID 打开群资料或群聊页面。当前账号加入群组后,会通过 OnJoinedGroupAdded 返回群组信息,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/after-transfer-group-owner", + "title": "After transferring group ownership", + "description": "Synchronize the owner change after group ownership is transferred.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-transfer-group-owner", + "content": "Synchronize the owner change after group ownership is transferred. HTTP request POST WEBHOOK ADDRESS /callbackAfterTransferGroupOwnerCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterTransferGroupOwnerCommand . | | groupID | string | Group ID. | | oldOwnerUserID | string | Previous owner user ID. | | newOwnerUserID | string | New owner user ID. | Response Return HTTP success promptly. The ownership transfer is already complete and cannot be changed by this response. Processing rules Configuration key: afterTransferGroupOwner . Process idempotently using groupID and newOwnerUserID ." }, { - "path": "/sdk/react-native/group/update-group-profile", - "title": "更新群名称、简介和头像", - "description": "OpenIM React Native SDK 更新群组资料。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group update-group-profile", - "content": "调用 setGroupInfo 更新群名称、群简介或群头像。只传入本次需要修改的字段。 await OpenIMSDK.setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string | 否 | 新群名称。 | | introduction | string | 否 | 新群简介。 | | faceURL | string | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个需要修改的群资料字段,未传入的字段保持原值。 返回结果 调用完成后,群组资料已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/before-set-group-member-info", + "title": "Before updating group member information", + "description": "Validate or adjust fields before a group member profile is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-set-group-member-info", + "content": "Validate or adjust fields before a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Group nickname, when changed. | | faceURL | string | Avatar URL, when changed. | | roleLevel | int | Group role level, when changed. | | ex | string | Extension data, when changed. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return nickName , faceURL , roleLevel , and ex to replace the pending values. Processing rules Configuration key: beforeSetGroupMemberInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/set-group-announcement", - "title": "发布或更新群公告", - "description": "OpenIM React Native SDK 发布群公告。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-announcement", - "content": "调用 setGroupInfo 设置或更新群公告。 await OpenIMSDK.setGroupInfo groupID, notification: announcement, ; groupID 为目标群组 ID, notification 为公告内容。传入空字符串可以清空群公告;群公告与群简介 introduction 是两个独立字段。 返回结果 调用完成后,群公告已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/after-set-group-member-info", + "title": "After updating group member information", + "description": "Synchronize changes after a group member profile is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-set-group-member-info", + "content": "Synchronize changes after a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Updated group nickname, when present. | | faceURL | string | Updated avatar URL, when present. | | roleLevel | int | Updated group role level, when present. | | ex | string | Updated extension data, when present. | Response Return HTTP success promptly. The member profile update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupMemberInfo . Process idempotently using groupID:userID ." }, { - "path": "/sdk/react-native/group/set-group-extension", - "title": "设置群组扩展字段", - "description": "OpenIM React Native SDK 设置群组扩展字段。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-extension", - "content": "调用 setGroupInfo 设置群组的 ex 扩展字段。 await OpenIMSDK.setGroupInfo groupID, ex: JSON.stringify projectID: 'project 42', , ; groupID 为目标群组 ID, ex 是字符串类型,可按业务需要传递 JSON 字符串或其他格式的扩展信息。 返回结果 调用完成后,群组扩展字段已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/before-set-group-info", + "title": "Before updating group information", + "description": "Validate or adjust group fields before group information is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-set-group-info", + "content": "Validate or adjust group fields before group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoCommand , operationID , groupID , and the pending groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return the pending group fields to replace the values OpenIM is about to store. Processing rules Configuration key: beforeSetGroupInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/set-group-join-verification", - "title": "设置入群验证方式", - "description": "OpenIM React Native SDK 设置进群验证。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-join-verification", - "content": "调用 setGroupInfo 设置申请和邀请用户加入群组时的验证方式。 await OpenIMSDK.setGroupInfo groupID, needVerification: GroupVerificationType.AllNeed, ; 参数说明 groupID 为目标群组 ID, needVerification 使用 GroupVerificationType : | 枚举值 | 数值 | 说明 | | | | | | GroupVerificationType.ApplyNeedInviteNot | 0 | 用户申请需要审核,群成员邀请可直接入群。 | | GroupVerificationType.AllNeed | 1 | 用户申请和普通成员邀请都需要审核;群主或管理员邀请除外。 | | GroupVerificationType.AllNot | 2 | 用户申请和邀请都可直接入群。 | 返回结果 调用完成后,群组入群验证方式已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/after-set-group-info", + "title": "After updating group information", + "description": "Synchronize changes after group information is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-set-group-info", + "content": "Synchronize changes after group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoCommand , operationID , groupID , and the updated groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return HTTP success promptly. The group update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfo . Process idempotently using groupID or operationID ." }, { - "path": "/sdk/react-native/group/set-group-member-profile-access", - "title": "设置成员资料查看权限", - "description": "OpenIM React Native SDK 设置群成员资料权限。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-member-profile-access", - "content": "调用 setGroupInfo 设置群成员资料查看权限。该设置只控制群成员资料查看权限,与 设置群内添加好友权限 /sdk/react native/group/set group member friend permission 相互独立。 await OpenIMSDK.setGroupInfo groupID, lookMemberInfo: AllowType.NotAllowed, ; 参数说明 groupID 为目标群组 ID, lookMemberInfo 使用 AllowType : | 枚举值 | 数值 | 说明 | | | | | | AllowType.Allowed | 0 | 允许成员查看其他成员资料。 | | AllowType.NotAllowed | 1 | 不允许成员查看其他成员资料。 | 返回结果 调用完成后,群成员资料查看权限已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/before-set-group-info-ex", + "title": "Before updating selected group fields", + "description": "Validate or adjust the selected fields before a partial group update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-set-group-info-ex", + "content": "Validate or adjust the selected fields before a partial group update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoExCommand , operationID , groupID , and only the group fields selected for update: groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , or applyMemberFriend . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return selected group fields to replace the pending values. Processing rules Configuration key: beforeSetGroupInfoEx . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/set-group-member-friend-permission", - "title": "设置群内添加好友权限", - "description": "OpenIM React Native SDK 设置群成员好友申请权限。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-member-friend-permission", - "content": "调用 setGroupInfo 设置是否允许群成员通过群组关系向其他成员发送好友申请。该设置只控制从群成员关系发起好友申请的入口,与 设置成员资料查看权限 /sdk/react native/group/set group member profile access 相互独立。 await OpenIMSDK.setGroupInfo groupID, applyMemberFriend: AllowType.NotAllowed, ; 参数说明 groupID 为目标群组 ID, applyMemberFriend 使用 AllowType : | 枚举值 | 数值 | 说明 | | | | | | AllowType.Allowed | 0 | 允许通过群成员关系发起好友申请。 | | AllowType.NotAllowed | 1 | 不允许通过群成员关系发起好友申请。 | 返回结果 调用完成后,群内添加好友权限已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/group/after-set-group-info-ex", + "title": "After updating selected group fields", + "description": "Synchronize changes after a partial group information update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-set-group-info-ex", + "content": "Synchronize changes after selected group fields are updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoExCommand , operationID , groupID , and the updated values among groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend . Response Return HTTP success promptly. The partial update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfoEx . Process idempotently using groupID or operationID ." }, { - "path": "/sdk/react-native/group/change-group-mute", - "title": "设置群组全员禁言", - "description": "OpenIM React Native SDK 修改群组禁言状态。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group change-group-mute", - "content": "调用 changeGroupMute 开启或关闭群组全员禁言。 await OpenIMSDK.changeGroupMute groupID, isMute: true, muteBypassUserIDs: serviceAccountUserID , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | isMute | boolean | 是 | true 开启群组禁言, false 关闭群组禁言。 | | muteBypassUserIDs 商业版 | string | 否 | 群组禁言期间仍允许发言的用户 ID。 | 不要把全部成员传入 muteBypassUserIDs 。群主和管理员是否可以发言由服务端权限控制。 返回结果 调用完成后,群组全员禁言设置已更新。群资料变化会通过 OnGroupInfoChanged 返回,事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/message/before-send-single-message", + "title": "Before sending a one-to-one message", + "description": "Review, reject, or inspect fields before a one-to-one message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message before-send-single-message", + "content": "Use this callback for content moderation, policy enforcement, or field validation before a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendSingleMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSendSingleMsgCommand . | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID. | | serverMsgID | string | OpenIM server message ID. | | clientMsgID | string | Client message ID. | | operationID | string | OpenIM operation trace ID. | | senderPlatformID | int | Sender platform ID. | | senderNickname | string | Sender nickname. | | sessionType | int | Conversation type. | | msgFrom | int | Message source. | | contentType | int | Message content type /platform api/message/message content types . | | status | int | Message status. | | sendTime | int | Send time in milliseconds. | | createTime | int | Creation time in milliseconds. | | content | string | JSON string for the selected message content type. | | seq | int | Message sequence number. | | atUserList | string | Mentioned user IDs. | | faceURL | string | Sender avatar URL. | | ex | string | Extension data. | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendSingleMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/join-group", - "title": "申请加入群组", - "description": "OpenIM React Native SDK 申请加入群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group join-group", - "content": "调用 joinGroup 使用群组 ID、申请说明和加入途径发起入群请求。 await OpenIMSDK.joinGroup groupID, reqMsg: '申请加入项目讨论组', joinSource: GroupJoinSource.Search, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reqMsg | string | 是 | 入群申请说明;没有说明时传空字符串。 | | joinSource | GroupJoinSource | 是 | 发起入群的途径。 | | ex | string | 否 | 业务扩展字符串。 | joinSource 常用值如下: | 枚举值 | 数值 | 说明 | | | | | | GroupJoinSource.Invitation | 2 | 通过邀请加入。 | | GroupJoinSource.Search | 3 | 通过搜索加入。 | | GroupJoinSource.QrCode | 4 | 通过二维码加入。 | joinSource 只记录加入途径,不决定是否需要审核。 返回结果 调用完成后,入群请求已提交。当前账号成功加入群组后,会通过 OnJoinedGroupAdded 返回群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/message/after-send-single-message", + "title": "After sending a one-to-one message", + "description": "Synchronize a message event after a one-to-one message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-send-single-message", + "content": "Synchronize a message event after a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendSingleMsgCommand Request body The payload contains callbackCommand: callbackAfterSendSingleMsgCommand and the complete message snapshot described on Before sending a one to one message /platform api/webhooks/message/before send single message , including serverMsgID , clientMsgID , seq , sender and recipient IDs, content, timestamps, and keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendSingleMsg . Process idempotently using clientMsgID , optionally scoped by the conversation ID." }, { - "path": "/sdk/react-native/group/quit-group", - "title": "退出群组", - "description": "OpenIM React Native SDK 退出群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group quit-group", - "content": "调用 quitGroup 退出当前账号已加入的群组。 await OpenIMSDK.quitGroup groupID ; groupID 为要退出的群组 ID。群主如果要退出群组,需要先转让群主身份。 返回结果 调用完成后,当前账号已退出目标群组。当前账号成功退出群组后,会触发 OnJoinedGroupDeleted ,回调参数为对应的群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/message/before-send-group-message", + "title": "Before sending a group message", + "description": "Review, reject, or inspect fields before a group message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message before-send-group-message", + "content": "Use this callback for content moderation, policy enforcement, or field validation before a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendGroupMsgCommand Request body The payload contains callbackCommand: callbackBeforeSendGroupMsgCommand , groupID , and the common message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message , except recvID ; group callbacks use groupID instead to identify the destination. Group messages also expose this field: | Property | Type | Description | | | | | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendGroupMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/dismiss-group", - "title": "解散群组", - "description": "OpenIM React Native SDK 解散群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group dismiss-group", - "content": "调用 dismissGroup 解散群组。 await OpenIMSDK.dismissGroup groupID ; groupID 为要解散的群组 ID。解散群组会影响所有成员,调用权限由服务端校验。 返回结果 调用完成后,群组已解散。群组解散后,相关客户端会触发 OnGroupDismissed ,回调参数为已解散的群组信息;事件监听方式见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/message/after-send-group-message", + "title": "After sending a group message", + "description": "Synchronize a message event after a group message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-send-group-message", + "content": "Synchronize a message event after a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendGroupMsgCommand Request body The payload contains callbackCommand: callbackAfterSendGroupMsgCommand , groupID , and the complete message snapshot described on Before sending a group message /platform api/webhooks/message/before send group message . It also includes keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendGroupMsg . Process idempotently using clientMsgID , scoped by groupID when necessary." }, { - "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", - "title": "查询指定群组资料", - "description": "按群组 ID 批量查询群组资料。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-specified-groups-info", - "content": "调用 getSpecifiedGroupsInfo ,根据群组 ID 查询指定群组的资料。 const groups = await OpenIMSDK.getSpecifiedGroupsInfo 'group 001', 'group 002', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组。 | 返回结果 调用完成后返回匹配的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/message/before-message-modify", + "title": "Before writing a message", + "description": "Adjust permitted message fields before the message is written.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message before-message-modify", + "content": "Adjust permitted message fields before the message is written to OpenIM storage. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMsgModifyCommand Request body The payload contains callbackCommand: callbackBeforeMsgModifyCommand and the message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message . recvID and keyVersion are Enterprise extensions for this callback. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace content , recipient or group identifiers, message IDs, sender profile, conversation and content types, status, sending options, offline push data, mention data, attachments, and extension data. Processing rules Configuration key: beforeMsgModify . OpenIM waits synchronously. Use nextCode: 1 to reject writing the message; timeout behavior follows failedContinue . Return only fields that should replace the values OpenIM is about to write." }, { - "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", - "title": "获取已加入群组", - "description": "查询当前账号已加入的全部群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list", - "content": "调用 getJoinedGroupList 获取当前账号已加入的全部群组。 const groups = await OpenIMSDK.getJoinedGroupList ; 返回结果 调用完成后返回 GroupItem 。群组数量较多时,可使用 分页获取已加入群组 /sdk/react native/group/retrieving groups/get joined group list page 分批读取。" + "path": "/platform-api/webhooks/message/after-single-message-read", + "title": "After one-to-one messages are read", + "description": "Synchronize read-state changes for one-to-one messages.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-single-message-read", + "content": "Synchronize read state changes after one to one messages are marked as read. HTTP request POST WEBHOOK ADDRESS /callbackAfterSingleMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSingleMsgReadCommand . | | conversationID | string | Conversation ID. | | userID | string | User whose read state changed. | | Seqs | int | Message sequence numbers marked as read. The capitalization is part of the protocol. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterSingleMsgRead . Process idempotently using conversationID , userID , and the sequence numbers." }, { - "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", - "title": "分页获取已加入群组", - "description": "分页查询当前账号已加入的群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list-page", - "content": "调用 getJoinedGroupListPage 分页获取当前账号已加入的群组。 const groups = await OpenIMSDK.getJoinedGroupListPage offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的群组数量。 | 继续读取下一页时,将 offset 设置为已读取的群组数量。 返回结果 调用完成后返回当前页的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/message/after-group-message-read", + "title": "After group messages are read", + "description": "Synchronize read-state changes for group messages.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-group-message-read", + "content": "Synchronize a read event after group message read state is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterGroupMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterGroupMsgReadCommand . | | sendID | string | Message sender user ID. | | receiveID | string | Message recipient user ID. | | unreadMsgNum | int | Current unread message count. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterGroupMsgRead . Process duplicate callbacks idempotently." }, { - "path": "/sdk/react-native/group/retrieving-groups/is-join-group", - "title": "检查是否已加入群组", - "description": "检查当前账号是否已加入指定群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups is-join-group", - "content": "调用 isJoinGroup 检查当前账号是否已加入指定群组。 const isJoined = await OpenIMSDK.isJoinGroup 'group 001' ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要检查的群组 ID。 | 返回结果 调用完成后返回 boolean : true 表示当前账号已加入群组, false 表示尚未加入。" + "path": "/platform-api/webhooks/message/after-revoke-message", + "title": "After revoking a message", + "description": "Synchronize a revoke event after a message is revoked.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-revoke-message", + "content": "Synchronize a revoke event after a message is revoked. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAfterMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAfterMsgCommand . | | conversationID | string | Conversation ID. | | seq | int | Sequence number of the revoked message. | | userID | string | User who initiated the revoke operation. | Response Return HTTP success promptly. The revoke operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRevokeMsg . Process idempotently using conversationID:seq ." }, { - "path": "/sdk/react-native/group/retrieving-groups/search-groups", - "title": "搜索群组", - "description": "搜索当前账号可查询的群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups search-groups", - "content": "调用 searchGroups ,按群组 ID 或群名称搜索群组。 const groups = await OpenIMSDK.searchGroups keywordList: '项目' , isSearchGroupID: false, isSearchGroupName: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词列表。 | | isSearchGroupID | boolean | 是 | 是否匹配群组 ID。 | | isSearchGroupName | boolean | 是 | 是否匹配群组名称。 | 返回结果 调用完成后返回匹配的 GroupItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/push/before-online-push", + "title": "Before one-to-one online push", + "description": "Adjust target users or push policy before an online one-to-one push.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push before-online-push", + "content": "Adjust target users or push policy before an online one to one push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | userIDList | string | Target user IDs. | | title | string | Push title. | | desc | string | Push summary. | | ex | string | Extension data. | | iOSPushSound | string | iOS notification sound. | | iOSBadgeCount | boolean | Whether to update the iOS badge. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID when present. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", - "title": "获取收到的入群申请", - "description": "查询当前账号收到的入群申请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-recipient", - "content": "群主或管理员可以调用 getGroupApplicationListAsRecipient 查询收到的入群申请。 const applications = await OpenIMSDK.getGroupApplicationListAsRecipient groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | | handleResults | number | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的申请数量。 | ApplicationHandleResult 的常用值如下: | 枚举值 | 数值 | 含义 | | | | | | ApplicationHandleResult.Unprocessed | 0 | 待处理。 | | ApplicationHandleResult.Agree | 1 | 已同意。 | | ApplicationHandleResult.Reject | 1 | 已拒绝。 | 返回结果 调用完成后返回当前账号有权处理的 GroupApplicationItem 。 入群申请字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 申请加入的群组 ID。 | | userID | string | 申请人的用户 ID。 | | nickname | string | 申请记录中的申请人昵称。 | | userFaceURL | string | 申请记录中的申请人头像地址。 | | reqMsg | string | 入群申请附言。 | | reqTime | number | 申请时间。 | | joinSource | GroupJoinSource | 入群申请来源。 | | handleResult | ApplicationHandleResult | 当前处理结果。 | | handleUserID | string | 处理申请的用户 ID。 | | handledMsg | string | 处理申请时填写的说明。 | | handledTime | number | 处理时间。 | | groupName | string | 申请记录中的群组名称。 | | groupFaceURL | string | 申请记录中的群组头像地址。 | | groupType | GroupType | 群组类型。 | | ownerUserID | string | 群主用户 ID。 | | creatorUserID | string | 群组创建者用户 ID。 | | introduction | string | 申请记录中的群组简介。 | | notification | string | 申请记录中的群组公告。 | | memberCount | number | 申请记录中的群成员数量。 | | status | GroupStatus | 申请记录中的群组状态。 | | createTime | number | 申请记录创建时间,Unix 毫秒时间戳。 | | ex | string | 申请记录扩展字符串。 | 申请记录中的昵称、头像和群组资料以记录创建时的内容为准。需要展示最新资料时,分别查询当前用户资料或群组资料。 监听入群申请变化 新增、处理或删除入群申请时,分别触发 OnGroupApplicationAdded 、 OnGroupApplicationAccepted 、 OnGroupApplicationRejected 或 OnGroupApplicationDeleted 。事件回调直接接收 GroupApplicationItem : const handleApplicationChanged = application: GroupApplicationItem = // 按 groupID 和 userID 更新申请记录 ; const handleApplicationDeleted = application: GroupApplicationItem = // 按 groupID 和 userID 删除申请记录 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; 退出登录、切换账号或销毁申请列表状态时,取消这些监听。" + "path": "/platform-api/webhooks/push/before-group-online-push", + "title": "Before group online push", + "description": "Adjust target users or push policy before an online group push.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push before-group-online-push", + "content": "Adjust target users or push policy before an online group push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeGroupOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeGroupOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | | seq | int | Message sequence number. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the online recipients and offlinePushInfo may replace fallback push metadata. Processing rules Configuration key: beforeGroupOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", - "title": "获取发出的入群申请", - "description": "查询当前账号发出的入群申请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-applicant", - "content": "调用 getGroupApplicationListAsApplicant 查询当前账号发出的入群申请。 const applications = await OpenIMSDK.getGroupApplicationListAsApplicant groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed, ApplicationHandleResult.Agree, ApplicationHandleResult.Reject, , offset: 0, count: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupIDs | string | 是 | 要查询的群组 ID 数组;传空数组表示不按群组筛选。 | | handleResults | number | 是 | 要查询的申请处理结果;传空数组表示不按处理结果筛选。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的申请数量。 | ApplicationHandleResult 的取值见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。 返回结果 调用完成后返回当前账号发出的 GroupApplicationItem 。申请字段说明和申请变化事件监听见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + "path": "/platform-api/webhooks/push/before-offline-push", + "title": "Before offline push", + "description": "Adjust recipients and notification metadata before an offline push.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push before-offline-push", + "content": "Adjust the actual recipients and notification metadata before an offline push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOfflinePushCommand Request body The payload contains callbackCommand: callbackBeforeOfflinePushCommand and the recipient, platform, notification, message, conversation, mention, and content fields described on Before one to one online push /platform api/webhooks/push/before online push . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOfflinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", - "title": "获取未处理入群申请数", - "description": "查询指定时间点之后未处理的入群申请数量。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-unhandled-count", - "content": "调用 getGroupApplicationUnhandledCount 查询指定时间点之后仍未处理的入群申请数量。 const count = await OpenIMSDK.getGroupApplicationUnhandledCount time: 0, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | time | number | 是 | 统计起点的 Unix 毫秒时间戳;传 0 表示统计全部待处理申请。 | 返回结果 调用完成后返回 number ,表示指定时间点之后待处理的入群申请数量。" + "path": "/platform-api/webhooks/push/after-user-online", + "title": "After a user comes online", + "description": "Synchronize presence after a user establishes an online connection.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push after-user-online", + "content": "Synchronize presence after a user establishes an online connection. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOnlineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOnlineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | isAppBackground | boolean | Whether the client application is in the background. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already online and cannot be changed by this response. Processing rules Configuration key: afterUserOnline . Process idempotently using userID , platformID , and connID ." }, { - "path": "/sdk/react-native/group/group-applications/accept-group-application", - "title": "接受入群申请", - "description": "同意指定用户的入群申请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications accept-group-application", - "content": "调用 acceptGroupApplication 同意指定用户的入群申请。 await OpenIMSDK.acceptGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: '同意加入', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请对应的群组 ID。 | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | handleMsg | string | 是 | 处理说明;没有说明时传空字符串。 | 调用完成后,入群申请已被同意。申请状态变化时会触发 OnGroupApplicationAccepted ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + "path": "/platform-api/webhooks/push/after-user-offline", + "title": "After a user goes offline", + "description": "Synchronize presence after a user connection closes.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push after-user-offline", + "content": "Synchronize presence after a user connection closes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOfflineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOfflineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already offline and cannot be changed by this response. Processing rules Configuration key: afterUserOffline . Process idempotently using userID , platformID , and connID ." }, { - "path": "/sdk/react-native/group/group-applications/refuse-group-application", - "title": "拒绝入群申请", - "description": "拒绝指定用户的入群申请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications refuse-group-application", - "content": "调用 refuseGroupApplication 拒绝指定用户的入群申请。 await OpenIMSDK.refuseGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: '暂不接受该申请', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请对应的群组 ID。 | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | handleMsg | string | 是 | 拒绝原因;没有说明时传空字符串。 | 调用完成后,入群申请已被拒绝。申请状态变化时会触发 OnGroupApplicationRejected ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + "path": "/platform-api/webhooks/push/after-user-kick-off", + "title": "After a user is forced offline", + "description": "Synchronize connection state after a user is forced offline.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push after-user-kick-off", + "content": "Synchronize connection state after a user is forced offline. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserKickOffCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserKickOffCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | Response Return HTTP success promptly. The user has already been forced offline and this response cannot reverse the operation. Processing rules Configuration key: afterUserKickOff . Process idempotently using the user, platform, and operation identifiers." }, { - "path": "/sdk/react-native/group/group-applications/delete-group-requests", - "title": "删除入群申请", - "description": "批量删除指定的入群申请记录。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications delete-group-requests", - "content": "调用 deleteGroupRequests 批量删除指定的入群申请记录。 await OpenIMSDK.deleteGroupRequests fromUserID: application.userID, groupID: application.groupID, , ; 参数说明 数组中的每一项包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | fromUserID | string | 是 | 申请人的用户 ID,对应申请记录的 userID 。 | | groupID | string | 是 | 申请对应的群组 ID。 | 删除申请记录不会处理待处理申请。如需同意或拒绝申请,分别使用 接受入群申请 /sdk/react native/group/group applications/accept group application 和 拒绝入群申请 /sdk/react native/group/group applications/refuse group application 。 调用完成后表示删除请求已完成。申请记录删除时会触发 OnGroupApplicationDeleted ,完整监听方式见 获取收到的入群申请 /sdk/react native/group/group applications/get group application list as recipient 。" + "path": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", + "title": "Before creating one-to-one conversations", + "description": "Adjust default conversation properties before one-to-one conversations are first created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation before-create-single-chat-conversations", + "content": "Adjust default properties before one to one conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateSingleChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateSingleChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | user id | string | Other participant user ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateSingleChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", - "title": "分页查询群成员", - "description": "分页查询指定群组的成员。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-group-member-list", - "content": "调用 getGroupMemberList 分页查询指定群组的成员,并按成员角色筛选。 const members = await OpenIMSDK.getGroupMemberList groupID: 'group 001', filter: GroupMemberFilter.All, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | filter | GroupMemberFilter | 是 | 成员角色筛选条件。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的成员数量。 | GroupMemberFilter 的取值如下: | 枚举值 | 数值 | 说明 | | | | | | GroupMemberFilter.All | 0 | 全部成员。 | | GroupMemberFilter.Owner | 1 | 仅群主。 | | GroupMemberFilter.Admin | 2 | 仅管理员。 | | GroupMemberFilter.Normal | 3 | 仅普通成员。 | | GroupMemberFilter.AdminAndNormal | 4 | 管理员和普通成员。 | | GroupMemberFilter.AdminAndOwner | 5 | 管理员和群主。 | 继续读取下一页时,将 offset 设置为已读取的成员数量。 返回结果 调用完成后返回当前页的 GroupMemberItem 。字段说明见 群组概览 /sdk/react native/group/overview group 。 监听群成员变化 成员加入、退出或资料变化时,分别触发 OnGroupMemberAdded 、 OnGroupMemberDeleted 和 OnGroupMemberInfoChanged 。事件回调直接接收 GroupMemberItem : const handleMemberAdded = member: GroupMemberItem = // 将 member 添加到对应群组的成员列表 ; const handleMemberDeleted = member: GroupMemberItem = // 根据 member.groupID 和 member.userID 删除成员 ; const handleMemberChanged = member: GroupMemberItem = // 根据 member.groupID 和 member.userID 更新成员资料 ; // 设置监听 OpenIMSDK.on OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.on OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.off OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; 退出登录、切换账号或销毁成员列表状态时,取消这些监听。" + "path": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", + "title": "After creating one-to-one conversations", + "description": "Synchronize complete conversation properties after one-to-one conversations are created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation after-create-single-chat-conversations", + "content": "Synchronize complete properties after one to one conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateSingleChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateSingleChatConversationsCommand and the complete property set described on Before creating one to one conversations /platform api/webhooks/conversation/before create single chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateSingleChatConversations . Process idempotently using owner user id:conversation id ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", - "title": "查询指定群成员资料", - "description": "查询指定用户在目标群组中的成员资料。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-specified-group-members-info", - "content": "调用 getSpecifiedGroupMembersInfo 查询指定用户在一个群组中的成员资料。 const members = await OpenIMSDK.getSpecifiedGroupMembersInfo groupID: 'group 001', userIDList: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要查询的成员用户 ID 数组。 | 返回结果 调用完成后返回匹配的 GroupMemberItem ,字段说明见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", + "title": "Before creating group conversations", + "description": "Adjust default conversation properties before group conversations are first created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation before-create-group-chat-conversations", + "content": "Adjust default properties before group conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | group id | string | Group ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateGroupChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", - "title": "查询用户入群状态", - "description": "查询一组用户中哪些用户属于指定群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-users-in-group", - "content": "调用 getUsersInGroup 查询指定用户中已加入目标群组的用户 ID。 const userIDs = await OpenIMSDK.getUsersInGroup groupID: 'group 001', userIDList: 'user 001', 'user 002', 'user 003' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要检查的用户 ID 数组。 | 返回结果 调用完成后返回 string ,其中包含已加入目标群组的用户 ID。" + "path": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", + "title": "After creating group conversations", + "description": "Synchronize complete conversation properties after group conversations are created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation after-create-group-chat-conversations", + "content": "Synchronize complete properties after group conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupChatConversationsCommand and the complete property set described on Before creating group conversations /platform api/webhooks/conversation/before create group chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroupChatConversations . Process idempotently using owner user id:conversation id ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", - "title": "搜索群成员", - "description": "在指定群组中搜索成员。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members search-group-members", - "content": "调用 searchGroupMembers ,按用户 ID 或群内昵称搜索指定群组中的成员。 const members = await OpenIMSDK.searchGroupMembers groupID: 'group 001', keywordList: '张' , isSearchUserID: false, isSearchMemberNickname: true, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | keywordList | string | 是 | 搜索关键词列表。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchMemberNickname | boolean | 是 | 是否匹配群内昵称。 | | offset | number | 是 | 分页偏移量,第一页传 0 。 | | count | number | 是 | 本次读取的成员数量。 | 返回结果 调用完成后返回当前页匹配的 GroupMemberItem ,字段说明见 群组概览 /sdk/react native/group/overview group 。" + "path": "/platform-api/timer/overview", + "title": "Overview", + "description": "Overview of the OpenIM Enterprise timer-task service.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer overview", + "content": "The timer module lets a backend register delayed tasks that call a configured business handler at the scheduled time. It is suitable for message reminders, scheduled operations, and business compensation, but it is not a high frequency real time scheduler. Capabilities Create a timer task /platform api/timer/managing tasks/create timer task Update a timer task /platform api/timer/managing tasks/update timer task Delete a timer task /platform api/timer/managing tasks/delete timer task Get a timer task /platform api/timer/managing tasks/get timer task List timer tasks /platform api/timer/managing tasks/list timer tasks Resource representations TimerTaskCallbackConfig | Property | Type | Description | | | | | | callbackMethod | string | Callback strategy. See TimerTaskCallbackMethod timertaskcallbackmethod . | | callbackPayload | string | Business payload passed to the callback handler. | TimerTask | Property | Type | Description | | | | | | taskID | string | Timer task ID. | | taskName | string | Display name. | | taskCategory | string | Business defined task category. | | srcUserID | string | User associated with the task. | | executeAt | int | Scheduled execution time as a Unix timestamp in milliseconds. | | executeBefore | int | Latest permitted execution time as a Unix timestamp in milliseconds. | | maxRetry | int | Maximum retries after execution failure. | | callbackConfig | TimerTaskCallbackConfig | Callback method and payload. | | createdAt | int | Creation time in Unix milliseconds. | | updatedAt | int | Last update time in Unix milliseconds. | | dedupKey | string | Business idempotency key used to prevent duplicate creation. | Enumerations TimerTaskStatus | Value | Name | Description | | | | | | 0 | Pending | Waiting for execution. | | 1 | Processing | Currently executing. | TimerTaskCallbackMethod | Value | Description | | | | | openim message | Invoke an OpenIM message operation. | | openim http | Invoke a configured HTTP handler. | | openim rpc | Invoke a preconfigured RPC handler. | | preset | Invoke a server side preset handler. | Integration guidance Call timer endpoints from an authorized business backend. Validate the target user, callback destination, and tenant boundary before creating or changing a task. Use a stable dedupKey for retryable task creation." }, { - "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", - "title": "邀请用户加入群组", - "description": "邀请一个或多个用户加入指定群组。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members invite-user-to-group", - "content": "调用 inviteUserToGroup 邀请一个或多个用户加入群组。 await OpenIMSDK.inviteUserToGroup groupID: 'group 001', reason: '邀请加入项目讨论组', userIDList: 'user 002', 'user 003' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 邀请说明;没有说明时传空字符串。 | | userIDList | string | 是 | 要邀请的用户 ID 数组。 | 调用完成后,邀请请求已提交。当用户实际加入群组时,会触发 OnGroupMemberAdded ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/meeting/overview", + "title": "Overview", + "description": "Overview of OpenIM Enterprise meetings, real-time calls, meeting chat, and recordings.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting overview", + "content": "The meeting module provides scheduled and immediate meetings, participant controls, recurring meetings, meeting chat, recording queries, and real time call recovery. All endpoints in this module are available only in OpenIM Enterprise and must be called through an authorized business backend. Capabilities Meeting management Schedule a meeting /platform api/meeting/meeting management/book meeting Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Join a meeting /platform api/meeting/meeting management/join meeting Get a meeting token /platform api/meeting/meeting management/get meeting token Update a meeting /platform api/meeting/meeting management/update meeting Get a meeting /platform api/meeting/meeting management/get meeting List a user's meetings /platform api/meeting/meeting management/list meetings Invite users to a meeting /platform api/meeting/meeting management/invite meeting users Leave a meeting /platform api/meeting/meeting management/leave meeting End or cancel a meeting /platform api/meeting/meeting management/end meeting Meeting controls and records Set personal meeting preferences /platform api/meeting/meeting settings/set personal setting Control participant media streams /platform api/meeting/meeting settings/operate all streams Remove meeting participants /platform api/meeting/meeting settings/remove participants Create a recurring meeting /platform api/meeting/recurring meetings/create repeat meeting Get meeting recordings /platform api/meeting/meeting records/get meeting records Get meeting attendance /platform api/meeting/meeting records/get meeting attendance Real time calls and meeting chat Get a call room by group ID /platform api/meeting/meeting signaling/get room by group id Get a startup call invitation /platform api/meeting/meeting signaling/get startup invitation Send a meeting chat message /platform api/meeting/meeting chat/send meeting chat Pull meeting chat messages /platform api/meeting/meeting chat/pull meeting chat Resource representations LiveKit | Property | Type | Description | | | | | | token | string | Participant access token. | | url | string | Real time service URL. | SystemGeneratedMeetingInfo | Property | Type | Description | | | | | | creatorUserID | string | Creator user ID. | | creatorNickname | string | Creator display name. | | status | string | Meeting status. | | startTime | int | Start time in Unix milliseconds. | | meetingID | string | Meeting ID. | CreatorDefinedMeetingInfo | Property | Type | Description | | | | | | title | string | Meeting title. | | scheduledTime | int | Scheduled start in Unix milliseconds. | | meetingDuration | int | Duration in seconds. | | password | string | Password, or empty when not required. | | timeZone | string | Creator selected time zone. | | hostUserID | string | Primary host user ID. | | coHostUSerID | string | Co host user IDs. The protocol uses this exact capitalization. | | inviteeUserIDs | string | Invitee user IDs. | MeetingInfo | Property | Type | Description | | | | | | systemGenerated | SystemGeneratedMeetingInfo | Server generated identity and status. | | creatorDefinedMeeting | CreatorDefinedMeetingInfo | Creator defined meeting information. | MeetingSetting | Property | Type | Description | | | | | | canParticipantsEnableCamera | bool | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | bool | Whether participants may unmute microphones. | | canParticipantsShareScreen | bool | Whether participants may share screens. | | disableCameraOnJoin | bool | Whether cameras start disabled. | | disableMicrophoneOnJoin | bool | Whether microphones start muted. | | canParticipantJoinMeetingEarly | bool | Whether participants may join early. | | lockMeeting | bool | Whether new participants are prevented from joining. | | audioEncouragement | bool | Whether active speaker highlighting is enabled. | | videoMirroring | bool | Whether video mirroring is enabled. | | recordOn | bool | Whether server side recording is enabled by policy. | MeetingInfoSetting | Property | Type | Description | | | | | | info | MeetingInfo | Meeting identity and creator defined information. | | setting | MeetingSetting | Meeting level settings. | | repeatInfo | MeetingRepeatInfo | Recurrence information for this instance. | MeetingRepeatInfoReq | Property | Type | Description | | | | | | endDate | int | Recurrence end in Unix milliseconds. | | repeatTimes | int | Planned number of instances. | | repeatType | RepeatType | Recurrence frequency. | | interval | int | Interval between occurrences. | | repeatDaysOfWeek | DayOfWeek | Weekdays included by the rule. | MeetingRepeatInfo Includes every MeetingRepeatInfoReq property plus repeatMeetingID and repeatSequence . RepeatMeetingData | Property | Type | Description | | | | | | repeatMeetingID | string | Recurring meeting ID. | | creatorUserID | string | Creator user ID. | | creatorDefinedMeetingInfo | CreatorDefinedMeetingInfo | Shared meeting information. | | setting | MeetingSetting | Shared settings. | | repeatInfo | MeetingRepeatInfo | Recurrence rule and identity. | | generatedCount | int | Number of generated instances. | | nextScheduleTime | int | Next scheduled generation time. | | status | RepeatStatus | Recurrence status. | PersonalMeetingSetting | Property | Type | Description | | | | | | cameraOnEntry | bool | Whether the camera is enabled on entry. | | microphoneOnEntry | bool | Whether the microphone is enabled on entry. | MeetingUser | Property | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Display name. | FileRecord | Property | Type | Description | | | | | | size | string | File size in the format returned by the service. | | fileURL | string | Recording file URL. | MeetingRecord | Property | Type | Description | | | | | | roomID | string | Meeting or call room ID. | | meetingName | string | Meeting name. | | ex | string | Business extension data. | | hostUserID | string | Host user ID. | | hostUserNickname | string | Host display name. | | createTime | int | Creation time in Unix milliseconds. | | startTime | int | Start time in Unix milliseconds. | | endTime | int | End time in Unix milliseconds. | | joinedUsers | MeetingUser | Participants recorded for the meeting. | | status | int | Meeting record status. | | fileRecords | FileRecord | Recording files. | | egressID | string | Recording job ID. | | downloadUrl | string | Recording download URL. | | egressUploading | bool | Whether a recording is still uploading. | | recordStatus | int | See RecordStatus recordstatus . | | videoFileSize | int | Video size in bytes. | | videoCoverUrl | string | Video cover URL. | | videoName | string | Video filename. | UserMeetingHistory Contains roomID , meetingName , hostUserID , hostUserNickname , startTime , endTime , status , and ex for a meeting attended by a user. HostedMeeting Contains roomID , meetingName , status , startTime , endTime , and ex for a meeting hosted by a user. MeetingChatMessage | Property | Type | Description | | | | | | seq | int | Meeting chat Seq. | | sendID | string | Sender user ID. | | contentType | int | Content type. See Message content types /platform api/message/message content types . | | content | string | Message content. | | createTimeMs | int | Creation time in Unix milliseconds. | | dstUserIDs | string | Target users; empty means room broadcast. | | nickname | string | Sender display name. | | faceURL | string | Sender avatar URL. | InviteeInfo | Property | Type | Description | | | | | | inviteeUserIDs | string | Replacement invitee list used by meeting updates. | InvitationInfo | Property | Type | Description | | | | | | inviterUserID | string | Invitation sender. | | inviteeUserIDList | string | Invitees. | | customData | string | Business extension data. | | groupID | string | Related group ID. | | roomID | string | Call room ID. | | timeout | int | Invitation timeout. | | mediaType | string | Call media type. | | platformID | int | Originating platform. See PlatformID /platform api/user/overview platformid . | | sessionType | int | Call session type. See ConversationType /platform api/conversation/overview conversationtype . | | initiateTime | int | Invitation initiation time. | | busyLineUserIDList | string | Users whose lines are busy. | Enumerations RepeatType | Value | Name | Description | | | | | | 0 | REPEAT TYPE NONE | Does not repeat. | | 1 | REPEAT TYPE DAILY | Daily. | | 2 | REPEAT TYPE WEEKLY | Weekly. | | 3 | REPEAT TYPE WEEKDAY | Weekdays. | | 4 | REPEAT TYPE MONTHLY | Monthly. | | 5 | REPEAT TYPE YEARLY | Yearly. | | 6 | REPEAT TYPE HOURLY | Hourly. | DayOfWeek | Value | Name | | | | | 0 | SUNDAY | | 1 | MONDAY | | 2 | TUESDAY | | 3 | WEDNESDAY | | 4 | THURSDAY | | 5 | FRIDAY | | 6 | SATURDAY | RepeatStatus | Value | Name | Description | | | | | | 0 | REPEAT STATUS UNKNOWN | Unknown. | | 1 | REPEAT STATUS ACTIVE | Active. | | 2 | REPEAT STATUS COMPLETED | Completed. | RecordStatus | Value | Name | Description | | | | | | 0 | NotStarted | Not started. | | 1 | Completed | Completed. | | 2 | Failed | Failed. | | 3 | Processing | Processing. | Integration guidance Authenticate users and validate meeting, room, recording, and tenant permissions in the business backend. Treat real time connection tokens and recording URLs as sensitive resources. Use the meeting chat Seq and creation marker together when incrementally restoring meeting chat." }, { - "path": "/sdk/react-native/group/managing-group-members/kick-group-member", - "title": "移除群成员", - "description": "从指定群组移除一个或多个成员。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members kick-group-member", - "content": "调用 kickGroupMember 从群组中移除一个或多个成员。 await OpenIMSDK.kickGroupMember groupID: 'group 001', reason: '已离开项目', userIDList: 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 移除原因;没有说明时传空字符串。 | | userIDList | string | 是 | 要移除的成员用户 ID 数组。 | 调用完成后,指定成员已被移出群组。成员移除时会触发 OnGroupMemberDeleted ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/user/account-governance/ban-user", + "title": "Ban users", + "description": "OpenIM Enterprise Platform API: ban specified users from continuing to use the service.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance ban-user", + "content": "Ban one or more users from continuing to use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/ban user Request example curl request POST \"$ API ADDRESS /user/ban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to ban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", - "title": "修改群内昵称", - "description": "修改指定成员在一个群组中的昵称。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-nickname", - "content": "调用 setGroupMemberInfo 修改指定成员的群内昵称。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', nickname: '项目负责人', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要修改昵称的成员用户 ID。 | | nickname | string | 是 | 成员在该群组中的新昵称。 | 群内昵称只作用于指定群组,不会修改用户的账号昵称。 调用完成后,群内昵称已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/user/account-governance/unban-user", + "title": "Unban users", + "description": "OpenIM Enterprise Platform API: remove the ban from specified users.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance unban-user", + "content": "Remove the ban from one or more OpenIM users. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unban user Request example curl request POST \"$ API ADDRESS /user/unban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", - "title": "设置管理员", - "description": "设置或取消指定成员的管理员身份。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-role-level", - "content": "调用 setGroupMemberInfo 设置指定成员为管理员,或取消其管理员身份。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', roleLevel: GroupMemberRole.Admin, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置角色的成员用户 ID。 | | roleLevel | GroupMemberRole | 是 | 要设置的成员角色。 | | 枚举值 | 数值 | 说明 | | | | | | GroupMemberRole.Normal | 20 | 普通成员;传入该值可取消管理员身份。 | | GroupMemberRole.Admin | 60 | 管理员。 | | GroupMemberRole.Owner | 100 | 群主角色,仅用于识别当前角色。 | 不能通过设置 GroupMemberRole.Owner 转让群主,应使用 转让群主 /sdk/react native/group/managing group members/transfer group owner 。 调用完成后,成员角色已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/user/account-governance/unregister-user", + "title": "Unregister users", + "description": "OpenIM Enterprise Platform API: unregister user accounts that no longer use the service.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance unregister-user", + "content": "Unregister one or more user accounts that no longer use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unregister user Request example curl request POST \"$ API ADDRESS /user/unregister user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unregister. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", - "title": "更新群成员头像", - "description": "更新指定成员在一个群组中的头像。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-avatar", - "content": "调用 setGroupMemberInfo 更新指定成员的群内头像。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', faceURL: 'https://example.com/avatar.png', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要更新头像的成员用户 ID。 | | faceURL | string | 是 | 成员在该群组中的头像地址。 | 群内头像只作用于指定群组。需要修改账号头像时,使用 更新当前用户资料 /sdk/react native/user/profile/set self info 。 调用完成后,群内头像已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/user/account-governance/list-disabled-users", + "title": "List disabled users", + "description": "OpenIM Enterprise Platform API: list disabled accounts by user, status, and pagination criteria.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance list-disabled-users", + "content": "List disabled accounts by user ID, status, and pagination criteria. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/page find disable users Request example curl request POST \"$ API ADDRESS /user/page find disable users\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to query. | | status | No | int | Account status filter. | | pagination | Yes | RequestPagination | Pagination settings. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"users\": \"userID\": \"user 001\", \"nickname\": \"Example user\", \"faceURL\": \"https://example.com/avatar.png\", \"ex\": \" \", \"createTime\": 1719800000000, \"appMangerLevel\": 0, \"globalRecvMsgOpt\": 0, \"status\": 1, \"addFriendPermission\": 0, \"category\": \"default\" , \"total\": 1 Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | | data.users | UserInfo | User records. See UserInfo /platform api/user/overview userinfo . | | data.total | int | Total number of matching records. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Pagination and request array limits follow the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", - "title": "设置群成员扩展字段", - "description": "设置指定群成员的扩展字符串。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-extension", - "content": "调用 setGroupMemberInfo 设置指定成员的 ex 扩展字段。 await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', ex: JSON.stringify title: 'maintainer', , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置扩展字段的成员用户 ID。 | | ex | string | 是 | 群成员扩展字符串,可按业务需要传递 JSON 字符串或其他格式的字符串。 | 调用完成后,成员扩展字段已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", + "title": "Delete sent friend requests", + "description": "OpenIM Enterprise Platform API: delete friend requests sent by a specified user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-sent-friend-requests", + "content": "Delete selected friend request records sent by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests from user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"fromUserID\":\"user 001\",\"toUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | fromUserID | Yes | string | User ID of the request sender. | | toUserIDs | Yes | string | User IDs of the request recipients whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request sender. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List sent friend requests /platform api/relation/managing friend requests/list sent friend requests" }, { - "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", - "title": "转让群主", - "description": "将群主身份转让给另一名群成员。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members transfer-group-owner", - "content": "调用 transferGroupOwner 将群主身份转让给另一名群成员。 await OpenIMSDK.transferGroupOwner groupID: 'group 001', newOwnerUserID: 'user 002', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | newOwnerUserID | string | 是 | 新群主的用户 ID,必须是该群组的成员。 | 调用完成后,群主身份已转让。原群主和新群主的成员角色变化会通过 OnGroupMemberInfoChanged 通知;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", + "title": "Delete received friend requests", + "description": "OpenIM Enterprise Platform API: delete friend requests received by a specified user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-received-friend-requests", + "content": "Delete selected friend request records received by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests to user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests to user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"toUserID\":\"user 001\",\"fromUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | toUserID | Yes | string | User ID of the request recipient. | | fromUserIDs | Yes | string | User IDs of the request senders whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request recipient. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List received friend requests /platform api/relation/managing friend requests/list received friend requests" + }, + { + "path": "/platform-api/group/group-applications/get-group-application-badge-count", + "title": "Get the group application badge count", + "description": "OpenIM Enterprise Platform API: get the pending group-application badge count for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications get-group-application-badge-count", + "content": "Get the group application badge count currently displayed for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/get group application badge count Request example curl request POST \"$ API ADDRESS /group/get group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"data\": \"count\":1 Response properties | Property | Type | Description | | | | | | data.count | int | Current group application badge count. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to read the user's application state. Related pages Group overview /platform api/group/overview Clear the group application badge count /platform api/group/group applications/clear group application badge count" }, { - "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", - "title": "设置群成员禁言", - "description": "设置或解除指定群成员的禁言状态。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", - "content": "调用 changeGroupMemberMute 设置指定成员的禁言时长;传入 0 可解除禁言。 await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 要设置禁言的成员用户 ID。 | | mutedSeconds | number | 是 | 禁言时长,单位为秒;传 0 解除禁言。 | 调用完成后,成员禁言状态已更新。成员资料变化时会触发 OnGroupMemberInfoChanged ,可读取事件参数的 muteEndTime 获取禁言结束时间;监听方式见 分页查询群成员 /sdk/react native/group/retrieving group members/get group member list 。" + "path": "/platform-api/group/group-applications/clear-group-application-badge-count", + "title": "Clear the group application badge count", + "description": "OpenIM Enterprise Platform API: clear the current group-application badge count for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications clear-group-application-badge-count", + "content": "Clear the group application badge count currently stored for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/clear group application badge count Request example curl request POST \"$ API ADDRESS /group/clear group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response The API returns the common response envelope. errCode is 0 when the count was cleared successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to update the user's application state. Related pages Group overview /platform api/group/overview Get the group application badge count /platform api/group/group applications/get group application badge count" }, { - "path": "/sdk/react-native/message/overview-message", - "title": "消息概览", - "description": "OpenIM React Native SDK 消息概览。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message overview-message", - "content": "OpenIM React Native SDK 使用 MessageItem 表示一条消息。创建消息仅生成待发送的 MessageItem ;要将消息发送给单聊用户或群组,还需要调用发送 API。接收、查询以及删除、撤回、修改等状态变化则通过各自的 API 或事件处理。 消息列表使用 clientMsgID 识别、去重和更新单条消息。 MessageItem 不包含 conversationID ,消息所属会话应从当前会话、历史查询参数或事件上下文中获取。 消息处理流程 | 阶段 | 相关能力 | 说明 | | | | | | 创建 | create Message | 创建待发送的 MessageItem 。 | | 发送 | sendMessage 、 sendMessageNotOss | 将消息发送到单聊或群聊。 | | 接收 | 新消息事件 | 接收实时消息、离线消息和仅在线消息。 | | 查询 | 历史消息、按 ID 查找和搜索 | 按会话读取或定位已保存的消息。 | | 状态变化 | 撤回、删除、修改和已读回执 | 根据调用结果和对应事件更新消息列表。 | MessageItem 类型 创建、发送、接收和查询消息时,得到的消息对象都是 MessageItem 。常用公共字段如下: | 字段 | 类型 | 说明 | | | | | | clientMsgID | string | 客户端消息 ID,用于消息去重、更新和定位。 | | serverMsgID | string | 服务端消息 ID。 | | sessionType | SessionType | 会话类型,用于区分单聊和群聊。 | | sendID | string | 发送者用户 ID。 | | recvID | string | 单聊消息的接收方用户 ID。 | | groupID | string | 群聊消息所属的群组 ID。 | | contentType | MessageType | 消息内容类型,决定使用哪个内容字段渲染。 | | createTime | number | 消息对象创建时间。 | | sendTime | number | 消息发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | Platform | 发送消息的客户端平台。 | | status | MessageStatus | 消息发送状态。 | | isRead | boolean | 已读状态。 | | senderNickname | string | 发送者昵称。 | | senderFaceUrl | string | 发送者头像 URL。 | | offlinePush | OfflinePush | 离线推送配置。 | | content | string | SDK 序列化的消息内容。渲染时应读取与 contentType 对应的内容字段。 | | ex | string | 消息扩展字段。 | | localEx | string | 仅当前设备使用的消息扩展字段。 | 消息内容保存在 MessageItem 中与 contentType 对应的字段内: | 内容 | 字段 | | | | | 文本、富文本和 Markdown | textElem 、 advancedTextElem 、 markdownTextElem | | 图片、音频、视频和文件 | pictureElem 、 soundElem 、 videoElem 、 fileElem | | @ 消息 | atTextElem | | 回复消息 | quoteElem | | 合并转发 | mergeElem | | 名片、位置和表情 | cardElem 、 locationElem 、 faceElem | | 自定义消息 | customElem | | 通知、输入状态和附加状态 | notificationElem 、 typingElem 、 attachedInfoElem | 内容字段均为可选字段。一条消息通常只使用与其 contentType 对应的内容字段;渲染前应先判断 contentType ,再读取相应字段。 创建并发送消息 先调用对应的创建 API 得到 MessageItem ,再调用发送 API。由 SDK 上传本地媒体文件时使用 发送消息 /sdk/react native/message/sending messages/send message ;媒体文件已经有远端 URL 时使用 发送不经 OSS 的消息 /sdk/react native/message/sending messages/send message not oss 。 | 内容 | 页面 | | | | | 文本和富文本 | 创建文本消息 /sdk/react native/message/creating messages/create text message 、 创建富文本消息 /sdk/react native/message/creating messages/create advanced text message | | @ 消息 | 创建 @ 消息 /sdk/react native/message/creating messages/create text at message | | 图片、音频、视频和文件 | 创建图片消息 /sdk/react native/message/creating messages/create image message by file 、 创建音频消息 /sdk/react native/message/creating messages/create sound message by file 、 创建视频消息 /sdk/react native/message/creating messages/create video message by file 、 创建文件消息 /sdk/react native/message/creating messages/create file message by file | | 名片、位置和表情 | 创建名片消息 /sdk/react native/message/creating messages/create card message 、 创建位置消息 /sdk/react native/message/creating messages/create location message 、 创建表情消息 /sdk/react native/message/creating messages/create face message | | 回复、转发和合并转发 | 创建回复消息 /sdk/react native/message/creating messages/create quote message 、 创建转发消息 /sdk/react native/message/creating messages/create forward message 、 创建合并转发消息 /sdk/react native/message/creating messages/create merger message | | 自定义消息 | 创建自定义消息 /sdk/react native/message/creating messages/create custom message | 按任务查看能力 | 任务 | 页面 | | | | | 接收实时、离线和仅在线消息 | 接收消息 /sdk/react native/message/receiving messages/receive messages | | 接收自定义业务消息 | 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages | | 加载历史消息或消息上下文 | 加载历史消息 /sdk/react native/message/retrieving messages/load older messages 、 读取消息上下文 /sdk/react native/message/retrieving messages/load message context | | 按 ID 查找或搜索消息 | 按 ID 查找消息 /sdk/react native/message/retrieving messages/find messages by id 、 搜索消息 /sdk/react native/message/searching messages/search messages | | 删除、撤回或修改消息 | 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 、 撤回消息 /sdk/react native/message/managing messages/revoke a message 、 修改消息 /sdk/react native/message/managing messages/modify a message | | 管理仅当前设备使用的消息数据 | 删除本地消息 /sdk/react native/message/managing messages/delete local message 、 设置消息本地扩展 /sdk/react native/message/managing messages/set message local ex | | 上报或查询群消息已读 | 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts 、 查询群消息已读成员 /sdk/react native/message/managing read status/get group message readers | | 上报或查询输入状态 | 上报输入状态 /sdk/react native/message/composing messages/update typing status 、 查询输入状态 /sdk/react native/message/composing messages/get typing status | | 识别音频文字 | 检查语音识别能力 /sdk/react native/message/composing messages/check speech to text 、 识别音频文字 /sdk/react native/message/composing messages/transcribe audio | 事件处理 消息相关事件的完整监听代码分别位于以下页面: 新消息、离线消息和仅在线消息: OnRecvNewMessage 、 OnRecvOfflineNewMessage 、 OnRecvOnlineOnlyMessage ,见 接收消息 /sdk/react native/message/receiving messages/receive messages 。 自定义业务消息: OnRecvCustomBusinessMessage ,见 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 。 消息删除: OnMsgDeleted ,见 批量删除消息 /sdk/react native/message/managing messages/delete saved messages 。 消息撤回: OnNewRecvMessageRevoked ,见 撤回消息 /sdk/react native/message/managing messages/revoke a message 。 消息修改: OnMessageModified ,见 修改消息 /sdk/react native/message/managing messages/modify a message 。 群消息已读状态: OnRecvGroupReadReceipt ,见 上报群消息已读 /sdk/react native/message/managing read status/send group read receipts 。 输入状态变化: OnInputStatusChanged ,见 更新输入状态 /sdk/react native/message/composing messages/change input states 。" + "path": "/platform-api/group/group-applications/delete-user-group-requests", + "title": "Delete applications sent by a user", + "description": "OpenIM Enterprise Platform API: delete a user's applications to selected groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications delete-user-group-requests", + "content": "Delete join application records sent by a user to selected groups. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests from user Request example curl request POST \"$ API ADDRESS /group/delete group requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\",\"groupIDs\": \"group 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User who sent the applications. | | groupIDs | Yes | string | Groups whose application records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target user. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List applications sent by a user /platform api/group/group applications/list user requested group applications" }, { - "path": "/sdk/react-native/message/creating-messages/create-text-message", - "title": "创建文本消息", - "description": "OpenIM React Native SDK 创建文本消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-message", - "content": "调用 createTextMessage 创建一条待发送的文本消息。 const message = await OpenIMSDK.createTextMessage '你好,欢迎加入讨论。' ; 参数为文本内容。调用后返回 MessageItem ,将它传给 发送消息 /sdk/react native/message/sending messages/send message 的 message 字段即可发送。" + "path": "/platform-api/group/group-applications/delete-group-received-requests", + "title": "Delete applications received by a group", + "description": "OpenIM Enterprise Platform API: delete selected applications received by a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications delete-group-received-requests", + "content": "Delete selected join application records received by a group. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests to group Request example curl request POST \"$ API ADDRESS /group/delete group requests to group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"groupID\":\"group 001\",\"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | Group that received the applications. | | userIDs | Yes | string | Applicants whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target group. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List group applications /platform api/group/group applications/list received group applications" }, { - "path": "/sdk/react-native/message/creating-messages/create-text-at-message", - "title": "创建 @ 消息", - "description": "OpenIM React Native SDK 创建 @ 消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-at-message", - "content": "使用 createTextAtMessage 创建群聊中的 @ 消息。 text 中的 @ 文本与 atUserIDList 应对应。 const message = await OpenIMSDK.createTextAtMessage text: '@user 001 请确认发布内容。', atUserIDList: 'user 001' , atUsersInfo: atUserID: 'user 001', groupNickname: '小李', , , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | @ 消息的正文。 | | atUserIDList | string | 是 | 被提及的用户 ID 列表。 | | atUsersInfo | AtUsersInfoItem | 否 | 被提及用户在群内的展示名。 | | message | MessageItem | 否 | 附带的消息对象。 | 调用后返回待发送的 MessageItem 。将它传给 发送消息 /sdk/react native/message/sending messages/send message 的 message 字段即可发送。" + "path": "/platform-api/message/content-processing/translate-text", + "title": "Translate text", + "description": "OpenIM Enterprise Platform API: translate text and return the detected source language.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message content-processing translate-text", + "content": "Translate text into a target language and return the detected source language. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /third/translate text Request example curl request POST \"$ API ADDRESS /third/translate text\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"content\":\"Hello\",\"sourceLanguageCode\":\"en\",\"targetLanguageCode\":\"zh CN\" ' Request body | Parameter | Required | Type | Description | | | | | | | content | Yes | string | Text to translate. | | sourceLanguageCode | Yes | string | Source BCP 47 language tag. Leave empty to enable detection. | | targetLanguageCode | Yes | string | Target BCP 47 language tag. | Response data.translatedText contains the translation and data.detectedLanguageCode contains the detected source BCP 47 tag. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Input size and language availability limits depend on the delivered translation service. Related pages Message overview /platform api/message/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-custom-message", - "title": "创建自定义消息", - "description": "OpenIM React Native SDK 创建自定义消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-custom-message", - "content": "使用 createCustomMessage 创建自定义业务消息。业务双方需要约定 data 、 extension 的数据格式。 const message = await OpenIMSDK.createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify version: 1 , description: '任务卡片', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | data | string | 是 | 业务数据字符串,可传 JSON 字符串。 | | extension | string | 是 | 业务扩展信息字符串。 | | description | string | 是 | 消息说明,也可作为不支持该消息类型时的降级展示文本。 | 调用后返回待发送的 MessageItem 。接收端应校验业务数据的格式和版本;服务端业务通知的监听方式见 接收自定义业务消息 /sdk/react native/message/receiving messages/receive custom business messages 。" + "path": "/platform-api/message/streaming-messages/append-stream-message", + "title": "Append stream-message packets", + "description": "OpenIM Enterprise Platform API: append indexed text packets to a stream message.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message streaming-messages append-stream-message", + "content": "Append a batch of indexed text packets to an existing stream message and optionally mark the stream complete. HTTP request POST API ADDRESS /msg/append stream msg Request example curl request POST \"$ API ADDRESS /msg/append stream msg\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"clientMsgID\":\"client msg 001\",\"startIndex\":0,\"packets\": \"Hello\", \" world\" ,\"end\":true ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | Conversation containing the stream message. | | clientMsgID | Yes | string | Client message ID of the stream message. | | startIndex | Yes | int | Index assigned to the first packet in this batch. | | packets | Yes | string | Ordered stream message packets. | | end | Yes | bool | Whether this batch completes the stream. | Response The common response has errCode: 0 when the batch was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Preserve packet indexes when retrying; do not blindly append duplicate content. Related pages Upload stream message content /platform api/message/streaming messages/put stream message" }, { - "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", - "title": "使用文件创建图片消息", - "description": "OpenIM React Native SDK 使用文件创建图片消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-file", - "content": "使用 createImageMessageFromFullPath 根据本地图片完整路径创建消息。 const message = await OpenIMSDK.createImageMessageFromFullPath imagePath ; imagePath 是图片在设备上的完整路径。调用后返回待发送的 MessageItem ;使用 发送消息 /sdk/react native/message/sending messages/send message 发送时,SDK 会处理本地资源上传。" + "path": "/platform-api/message/streaming-messages/put-stream-message", + "title": "Upload stream-message content", + "description": "OpenIM Enterprise Platform API: continuously upload UTF-8 content to a stream message over HTTP PUT.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message streaming-messages put-stream-message", + "content": "Continuously write UTF 8 output from a model or business service to the same stream message. HTTP request PUT API ADDRESS /msg/append stream msg?conversationID= CONVERSATION ID &clientMsgID= CLIENT MSG ID &operationID= OPERATION ID Request example curl request PUT \"$ API ADDRESS /msg/append stream msg?conversationID=si user 001 user 002&clientMsgID=client msg 001&operationID=$ OPERATION ID \" \\ header \"Content Type: text/plain; charset=utf 8\" header \"token: $ TOKEN \" \\ data binary 'Generated response content' Request parameters | Parameter | Location | Required | Type | Description | | | | | | | | conversationID | Query or header | Yes | string | Conversation containing the stream message. | | clientMsgID | Query or header | Yes | string | Client message ID of the stream message. | | operationID | Query or header | Yes | string | Unique trace ID for this request. | | token | Header | Yes | string | Valid user or administrator token. | | body | Body | Yes | bytes | UTF 8 stream message content. | Response The server returns write results as a stream. Handle interrupted connections and partial writes; do not retry a chunk until its state is known. Permissions and limits Available only in OpenIM Enterprise. The body must be valid UTF 8. conversationID and clientMsgID must identify the same appendable stream message. Related pages Append stream message packets /platform api/message/streaming messages/append stream message" }, { - "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", - "title": "使用 URL 创建图片消息", - "description": "OpenIM React Native SDK 使用 URL 创建图片消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-url", - "content": "使用 createImageMessageByURL 根据已上传图片的资源信息创建消息。原图、大图和缩略图可共用同一资源信息,也可按业务需要分别传入不同尺寸或质量的资源。 const picture = uuid: 'image 001', type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: 'https://www.example.com/picture.png', ; const message = await OpenIMSDK.createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourcePicture | PicBaseInfo | 是 | 原图资源信息。 | | bigPicture | PicBaseInfo | 是 | 大图资源信息。 | | snapshotPicture | PicBaseInfo | 是 | 缩略图资源信息。 | | sourcePath | string | 是 | 图片本地路径;只有远端资源时传空字符串。 | 每个 PicBaseInfo 包含 uuid 、 type 、 size 、 width 、 height 和 url ,分别表示资源标识、类型、字节大小、像素尺寸和远端地址。调用后返回待发送的 MessageItem ,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + "path": "/platform-api/message/read-status/mark-conversation-read", + "title": "Mark a conversation read through a Seq", + "description": "OpenIM Enterprise Platform API: advance a user's read position in a conversation to a message Seq.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message read-status mark-conversation-read", + "content": "Advance a user's read position in a conversation to the specified message Seq. Use this for read state migration or correction when the exact read boundary is known. HTTP request POST API ADDRESS /msg/mark conversation read Request example curl request POST \"$ API ADDRESS /msg/mark conversation read\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"userID\":\"user 001\",\"seq\":125 ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | userID | Yes | string | User whose read position is updated. | | seq | Yes | int | Last message Seq treated as read. | Response The common response has errCode: 0 when the read position was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the Seq belongs to the specified conversation before changing imported state. Related pages Set a conversation unread count /platform api/message/unread count/reset conversation unread" }, { - "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", - "title": "使用文件创建音频消息", - "description": "OpenIM React Native SDK 使用文件创建音频消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-file", - "content": "使用 createSoundMessageFromFullPath 根据设备上的音频文件创建消息。 const message = await OpenIMSDK.createSoundMessageFromFullPath soundPath, duration: 18, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | soundPath | string | 是 | 音频文件的完整路径。 | | duration | number | 是 | 音频时长,单位为秒。 | 调用后返回待发送的 MessageItem 。使用 发送消息 /sdk/react native/message/sending messages/send message 时,SDK 会处理本地音频资源上传。" + "path": "/platform-api/message/managing-messages/modify-message", + "title": "Modify a message", + "description": "Modify message content by conversation ID and Seq with the OpenIM Enterprise Platform API.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message managing-messages modify-message", + "content": "Modify the content of a message identified by conversation ID and Seq. The response reports the modification time and count. This endpoint is available in OpenIM Enterprise. HTTP request POST API ADDRESS /msg/modify message Request example curl request POST \"$ API ADDRESS /msg/modify message\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"seq\":1,\"newContent\":\"updated content\",\"oldContent\":\"original content\" ' Enterprise: this endpoint requires the corresponding Enterprise service. Availability and authorization depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | seq | Yes | int | Message Seq. | | newContent | Yes | string | New message content. | | oldContent | Yes | string | Previous message content used for concurrency validation. | Response \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"modifiedTime\": 1719800000000, \"modifiedCount\": 1 | Field | Type | Description | | | | | | data.modifiedTime | int | Modification time as a Unix timestamp in milliseconds. | | data.modifiedCount | int | Number of modifications recorded for the message. | Authorize the operator and target resource in your business backend. Relevant clients can receive the synchronized message change according to the delivered Enterprise version. Related pages Message overview /platform api/message/overview Revoke a message /platform api/message/managing messages/revoke msg Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", - "title": "使用 URL 创建音频消息", - "description": "OpenIM React Native SDK 使用 URL 创建音频消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-url", - "content": "使用 createSoundMessageByURL 根据已上传音频的资源信息创建消息。 const message = await OpenIMSDK.createSoundMessageByURL uuid: 'audio 001', soundPath: '', sourceUrl: 'https://www.example.com/sound.mp3', dataSize: 54000, duration: 18, soundType: 'audio/mpeg', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | uuid | string | 是 | 音频资源标识。 | | soundPath | string | 是 | 本地音频路径;只有远端资源时传空字符串。 | | sourceUrl | string | 是 | 已上传音频的地址。 | | dataSize | number | 是 | 音频大小,单位为字节。 | | duration | number | 是 | 音频时长,单位为秒。 | | soundType | string | 否 | 音频类型。 | 调用后返回待发送的 MessageItem 。资源信息应以实际上传结果为准,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + "path": "/platform-api/message/unread-count/get-conversations-unread-count", + "title": "Get conversation unread counts", + "description": "OpenIM Enterprise Platform API: get a user's unread counts for selected conversations.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message unread-count get-conversations-unread-count", + "content": "Get a user's unread message counts for selected conversations. HTTP request POST API ADDRESS /msg/get conversations unread count Request example curl request POST \"$ API ADDRESS /msg/get conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is queried. | | conversationIDs | Yes | string | Conversations to query. | Response data.unreadCount maps each conversation ID to its unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Message overview /platform api/message/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", - "title": "使用文件创建视频消息", - "description": "OpenIM React Native SDK 使用文件创建视频消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-file", - "content": "使用 createVideoMessageFromFullPath 根据设备上的视频文件和封面图创建消息。 const message = await OpenIMSDK.createVideoMessageFromFullPath videoPath, videoType: 'video/mp4', duration: 36, snapshotPath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | videoPath | string | 是 | 视频文件的完整路径。 | | videoType | string | 是 | 视频类型。 | | duration | number | 是 | 视频时长,单位为秒。 | | snapshotPath | string | 是 | 视频封面图的完整路径。 | 调用后返回待发送的 MessageItem 。发送时使用 发送消息 /sdk/react native/message/sending messages/send message 处理本地视频和封面图资源。" + "path": "/platform-api/message/unread-count/clear-conversations-unread-count", + "title": "Clear conversation unread counts", + "description": "OpenIM Enterprise Platform API: clear a user's unread counts in selected conversations.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message unread-count clear-conversations-unread-count", + "content": "Clear a user's unread counts in selected conversations. HTTP request POST API ADDRESS /msg/clear conversations unread count Request example curl request POST \"$ API ADDRESS /msg/clear conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is cleared. | | conversationIDs | Yes | string | Conversations to clear. | Response data.unreadCount maps each requested conversation ID to its resulting unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Clearing unread counts changes user state; validate the target user and conversations. Related pages Get conversation unread counts /platform api/message/unread count/get conversations unread count" }, { - "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", - "title": "使用 URL 创建视频消息", - "description": "OpenIM React Native SDK 使用 URL 创建视频消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-url", - "content": "使用 createVideoMessageByURL 根据已上传的视频及封面图资源创建消息。 const message = await OpenIMSDK.createVideoMessageByURL videoPath: '', duration: 36, videoType: 'video/mp4', videoUUID: 'video 001', videoUrl: 'https://www.example.com/video.mp4', videoSize: 820000, snapshotPath: '', snapshotUUID: 'cover 001', snapshotSize: 42000, snapshotUrl: 'https://www.example.com/snapshot.png', snapshotWidth: 1280, snapshotHeight: 720, snapShotType: 'image/jpeg', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | videoPath | string | 是 | 本地视频路径;只有远端资源时传空字符串。 | | duration | number | 是 | 视频时长,单位为秒。 | | videoType | string | 是 | 视频类型。 | | videoUUID 、 videoUrl 、 videoSize | string 、 string 、 number | 是 | 视频资源标识、远端地址和字节大小。 | | snapshotPath | string | 是 | 本地封面图路径;只有远端资源时传空字符串。 | | snapshotUUID 、 snapshotUrl 、 snapshotSize | string 、 string 、 number | 是 | 封面图资源标识、远端地址和字节大小。 | | snapshotWidth 、 snapshotHeight | number | 是 | 封面图宽高,单位为像素。 | | snapShotType | string | 否 | 封面图类型。 | 调用后返回待发送的 MessageItem ,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + "path": "/platform-api/message/unread-count/reset-conversation-unread", + "title": "Set a conversation unread count", + "description": "OpenIM Enterprise Platform API: set a target unread count for migration or state correction.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message unread-count reset-conversation-unread", + "content": "Set a target unread count for a user in selected conversations. This operation is intended for data migration or state correction; it is distinct from setting an exact read Seq. HTTP request POST API ADDRESS /msg/reset conversation unread Request example curl request POST \"$ API ADDRESS /msg/reset conversation unread\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"num\":3 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is changed. | | conversationIDs | Yes | string | Conversations to update. | | num | Yes | int | Target unread count. | Response The common response has errCode: 0 when the target state was applied. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. For an exact imported read boundary, use Mark a conversation read through a Seq /platform api/message/read status/mark conversation read . Related pages Migrate to OpenIM /platform api/migration to openim" }, { - "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", - "title": "使用文件创建文件消息", - "description": "OpenIM React Native SDK 使用文件创建文件消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-file", - "content": "使用 createFileMessageFromFullPath 根据设备上的文件创建消息。 const message = await OpenIMSDK.createFileMessageFromFullPath filePath, fileName: '产品说明.pdf', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filePath | string | 是 | 文件的完整路径。 | | fileName | string | 是 | 对外展示的文件名。 | 调用后返回待发送的 MessageItem 。使用 发送消息 /sdk/react native/message/sending messages/send message 时,SDK 会处理本地文件上传。" + "path": "/platform-api/conversation/conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "OpenIM Enterprise Platform API: create a conversation group for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups create-conversation-group", + "content": "Create a conversation group for a user and optionally add one conversation to it. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/create conversation group Request example curl request POST \"$ API ADDRESS /conversation/create conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"order\":1,\"ex\":\" \",\"conversationID\":\"si user 001 user 002\",\"conversationGroupType\":1 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the group. | | name | Yes | string | Display name. | | order | Yes | int | Display order. | | ex | No | string | Business extension data. | | conversationID | No | string | Conversation to add when creating the group. | | conversationGroupType | Yes | ConversationGroupType | 0 : normal group; 1 : filter group. | Response data.group contains the created ConversationGroup /platform api/conversation/overview conversationgroup , including its ID, conversations, type, order, version, and creation time. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over ownerUserID and the optional conversation. Related pages Conversation overview /platform api/conversation/overview List conversation groups /platform api/conversation/conversation groups/list conversation groups" }, { - "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", - "title": "使用 URL 创建文件消息", - "description": "OpenIM React Native SDK 使用 URL 创建文件消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-url", - "content": "使用 createFileMessageByURL 根据已上传文件的资源信息创建消息。 const message = await OpenIMSDK.createFileMessageByURL filePath: '', fileName: '产品说明.pdf', uuid: 'file 001', sourceUrl: 'https://www.example.com/产品说明.pdf', fileSize: 256000, fileType: 'application/pdf', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filePath | string | 是 | 本地文件路径;只有远端资源时传空字符串。 | | fileName | string | 是 | 对外展示的文件名。 | | uuid | string | 是 | 文件资源标识。 | | sourceUrl | string | 是 | 已上传文件的地址。 | | fileSize | number | 是 | 文件大小,单位为字节。 | | fileType | string | 否 | 文件类型。 | 调用后返回待发送的 MessageItem 。资源信息应以实际上传结果为准,发送时使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。" + "path": "/platform-api/conversation/conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "OpenIM Enterprise Platform API: update a conversation group's name, extension data, or hidden state.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups update-conversation-group", + "content": "Update a conversation group's display name, extension data, or hidden state. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/update conversation group Request example curl request POST \"$ API ADDRESS /conversation/update conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"ex\":\" \",\"Hidden\":false ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | | name | No | StringValue | New display name. | | ex | No | StringValue | New business extension data. | | Hidden | No | BoolValue | Whether the group is hidden. The request field uses this exact capitalization. | Response data.group contains the updated ConversationGroup /platform api/conversation/overview conversationgroup . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit optional wrapper fields that should remain unchanged. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-card-message", - "title": "创建名片消息", - "description": "OpenIM React Native SDK 创建名片消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-card-message", - "content": "使用 createCardMessage 创建用户名片消息。 const message = await OpenIMSDK.createCardMessage userID: 'user 002', nickname: '小王', faceURL: 'https://example.com/avatar.png', ex: '', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userID | string | 是 | 名片对应的用户 ID。 | | nickname | string | 是 | 名片展示的昵称。 | | faceURL | string | 是 | 名片展示的头像地址。 | | ex | string | 是 | 名片扩展信息,没有内容时传空字符串。 | 调用后返回待发送的 MessageItem 。 messageItem.cardElem 保存的是创建时传入的名片资料。" + "path": "/platform-api/conversation/conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "OpenIM Enterprise Platform API: delete a conversation group owned by a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups delete-conversation-group", + "content": "Delete a conversation group owned by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/delete conversation group Request example curl request POST \"$ API ADDRESS /conversation/delete conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | Response The common response has errCode: 0 when the group was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Deleting a group does not delete the conversations it contained. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-location-message", - "title": "创建位置消息", - "description": "OpenIM React Native SDK 创建位置消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-location-message", - "content": "使用 createLocationMessage 创建位置消息。 const message = await OpenIMSDK.createLocationMessage description: '上海市浦东新区', longitude: 121.4737, latitude: 31.2304, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | description | string | 是 | 位置名称或地址描述。 | | longitude | number | 是 | 经度。 | | latitude | number | 是 | 纬度。 | 调用后返回待发送的 MessageItem 。" + "path": "/platform-api/conversation/conversation-groups/list-conversation-groups", + "title": "List conversation groups", + "description": "OpenIM Enterprise Platform API: get a user's conversation groups and synchronization version.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups list-conversation-groups", + "content": "Get a user's conversation groups and their synchronization version. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/get conversation groups Request example curl request POST \"$ API ADDRESS /conversation/get conversation groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"maxVersion\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | maxVersion | No | Int64Value | Highest group version already known by the caller. | Response | Property | Type | Description | | | | | | data.groups | ConversationGroup | Group records. See ConversationGroup /platform api/conversation/overview conversationgroup . | | data.maxVersion | int | Highest version represented by this result. | | data.full | bool | Whether the result is a full snapshot. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Treat full and maxVersion as synchronization metadata; do not infer a full snapshot from an empty array alone. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-face-message", - "title": "创建表情消息", - "description": "OpenIM React Native SDK 创建表情消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-face-message", - "content": "使用 createFaceMessage 创建应用内约定的表情消息。 const message = await OpenIMSDK.createFaceMessage index: 12, data: JSON.stringify url: 'https://www.example.com/emoji.png', , ; index 是双方约定的表情索引, data 是由发送端和接收端共同约定的自定义格式字符串,用于传递表情的识别或渲染信息,例如图片 URL、固定键或其他业务数据。调用后返回待发送的 MessageItem 。" + "path": "/platform-api/conversation/conversation-groups/set-conversation-group-order", + "title": "Set conversation group order", + "description": "OpenIM Enterprise Platform API: set the display order of a user's conversation groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups set-conversation-group-order", + "content": "Set the display order of multiple conversation groups for a user. HTTP request POST API ADDRESS /conversation/set conversation group order Request example curl request POST \"$ API ADDRESS /conversation/set conversation group order\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"orders\": \"conversationGroupID\":\"conversation group 001\",\"order\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | orders | Yes | ConversationGroupOrder | Group IDs and their target order values. See ConversationGroupOrder /platform api/conversation/overview conversationgrouporder . | Response The common response has errCode: 0 when the order was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Supply each target group at most once. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-quote-message", - "title": "创建回复消息", - "description": "OpenIM React Native SDK 创建回复消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-quote-message", - "content": "使用 createQuoteMessage 创建回复消息,并传入完整的原消息对象。 const message = await OpenIMSDK.createQuoteMessage text: '同意这个方案。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的文本内容。 | | message | MessageItem | 是 | 被回复的原消息。 | 调用后返回新的待发送 MessageItem 。接收端展示回复消息时,应注意处理原消息已删除或无法展示的情况。" + "path": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "OpenIM Enterprise Platform API: add conversations to one or more conversation groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups add-conversations-to-groups", + "content": "Add selected conversations to one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/add conversations to groups Request example curl request POST \"$ API ADDRESS /conversation/add conversations to groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to add. | | conversationGroupIDs | Yes | string | Destination group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-markdown-message", - "title": "创建 Markdown 消息", - "description": "OpenIM React Native SDK 创建 Markdown 消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-markdown-message", - "content": "使用 createMarkdownMessage 创建 Markdown 消息。 const message = await OpenIMSDK.createMarkdownMessage ' 发布完成\\n\\n Android\\n iOS', ; 参数是完整的 Markdown 文本。调用后返回待发送的 MessageItem ;接收端展示不可信 Markdown 文本时,应使用支持安全策略的 Markdown 渲染器。" + "path": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "OpenIM Enterprise Platform API: remove conversations from one or more conversation groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups remove-conversations-from-groups", + "content": "Remove selected conversations from one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/remove conversations from groups Request example curl request POST \"$ API ADDRESS /conversation/remove conversations from groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to remove. | | conversationGroupIDs | Yes | string | Source group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Removing a conversation from a group does not delete the conversation. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-forward-message", - "title": "创建转发消息", - "description": "OpenIM React Native SDK 创建转发消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-forward-message", - "content": "使用 createForwardMessage 根据已有消息创建一条转发消息。 const message = await OpenIMSDK.createForwardMessage sourceMessage ; 参数 sourceMessage 为完整的 MessageItem 。调用后返回新的待发送 MessageItem ,可发送到单聊或群聊。" + "path": "/platform-api/timer/managing-tasks/create-timer-task", + "title": "Create a timer task", + "description": "OpenIM Enterprise Platform API: schedule a task that invokes a business callback.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks create-timer-task", + "content": "Schedule a task that invokes a configured business handler at the specified time. HTTP request POST API ADDRESS /timer/create timer task Request example curl request POST \"$ API ADDRESS /timer/create timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskName\":\"Reminder\",\"taskCategory\":\"reminder\",\"executeAt\":1719800000000,\"executeBefore\":1719800060000,\"maxRetry\":1,\"callbackConfig\": \"callbackMethod\":\"openim http\",\"callbackPayload\":\" \\\"event\\\":\\\"reminder\\\" \" ,\"userID\":\"user 001\",\"dedupKey\":\"reminder 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskName | Yes | string | Task name. | | taskCategory | Yes | string | Business defined category. | | executeAt | Yes | int | Scheduled Unix time in milliseconds. | | executeBefore | Yes | int | Latest permitted execution time in milliseconds. | | maxRetry | Yes | int | Maximum retry count. | | callbackConfig | Yes | TimerTaskCallbackConfig | See TimerTaskCallbackConfig /platform api/timer/overview timertaskcallbackconfig . | | userID | Yes | string | Associated OpenIM user ID. | | dedupKey | Yes | string | Stable business idempotency key. | Response data.task contains the created TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Reuse dedupKey when retrying the same logical creation request. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-merger-message", - "title": "创建合并消息", - "description": "OpenIM React Native SDK 创建合并消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-merger-message", - "content": "使用 createMergerMessage 创建包含多条消息的合并转发消息。 const message = await OpenIMSDK.createMergerMessage messageList: selectedMessages, title: '项目讨论记录', summaryList: '小王:发布计划已确认', '小李:我会跟进测试' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | messageList | MessageItem | 是 | 要合并的消息列表。 | | title | string | 是 | 合并消息的标题。 | | summaryList | string | 是 | 合并消息展示的摘要列表。 | 调用后返回待发送的 MessageItem 。摘要内容应符合当前会话的展示与隐私规则。" + "path": "/platform-api/timer/managing-tasks/update-timer-task", + "title": "Update a timer task", + "description": "OpenIM Enterprise Platform API: update timer execution, retry, category, and callback settings.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks update-timer-task", + "content": "Update a timer task's schedule, category, retry policy, or callback configuration. HTTP request POST API ADDRESS /timer/update timer task Request example curl request POST \"$ API ADDRESS /timer/update timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"taskName\":\"Updated reminder\",\"executeAt\":1719900000000,\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | | taskName | No | string | New name. | | taskCategory | No | string | New business category. | | executeAt | No | int | New execution time in Unix milliseconds. | | executeBefore | No | int | New latest execution time in Unix milliseconds. | | maxRetry | No | int | New maximum retry count. | | callbackConfig | No | TimerTaskCallbackConfig | New callback configuration. | Response The common response has errCode: 0 when the task was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit fields that should remain unchanged. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", - "title": "创建富文本消息", - "description": "OpenIM React Native SDK 创建富文本消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-text-message", - "content": "使用 createAdvancedTextMessage 创建带消息实体的富文本消息。 const message = await OpenIMSDK.createAdvancedTextMessage text: '请查看 https://openim.io', messageEntityList: type: 'url', offset: 4, length: 17, url: 'https://openim.io', , , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 富文本的原始文本。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | 每项 MessageEntity 包含 type 、 offset 、 length ,并可选传入 url 和 info 。调用后返回待发送的 MessageItem ,使用 发送消息 /sdk/react native/message/sending messages/send message 发送。" + "path": "/platform-api/timer/managing-tasks/delete-timer-task", + "title": "Delete a timer task", + "description": "OpenIM Enterprise Platform API: delete a specified timer task owned by a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks delete-timer-task", + "content": "Delete a specified timer task owned by a user. HTTP request POST API ADDRESS /timer/delete timer task Request example curl request POST \"$ API ADDRESS /timer/delete timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response The common response has errCode: 0 when the task was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Do not assume deletion cancels a callback that has already started executing. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", - "title": "创建富文本回复消息", - "description": "OpenIM React Native SDK 创建富文本回复消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", - "content": "使用 createAdvancedQuoteMessage 创建包含原消息引用和文本实体的富文本回复消息。 const message = await OpenIMSDK.createAdvancedQuoteMessage text: '我已查看相关链接。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的原始文本。 | | message | MessageItem | 是 | 被回复的原消息。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | MessageEntity 使用 type 、 offset 、 length 描述实体,并可按需要传入 url 或 info 。调用后返回待发送的 MessageItem 。" + "path": "/platform-api/timer/managing-tasks/get-timer-task", + "title": "Get a timer task", + "description": "OpenIM Enterprise Platform API: get a timer task by task and user ID.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks get-timer-task", + "content": "Get the complete configuration of a timer task. HTTP request POST API ADDRESS /timer/get timer task Request example curl request POST \"$ API ADDRESS /timer/get timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response data.task contains the requested TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may access the target user's task. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "创建定向群消息", - "description": "OpenIM React Native SDK 创建定向群消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", - "content": "使用 createTargetedGroupMessage 创建仅定向投递给指定群成员的消息对象。 const textMessage = await OpenIMSDK.createTextMessage '请相关成员查看。' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要定向发送的消息对象。 | | dstUserIDs | string | 是 | 接收该消息的群成员用户 ID 列表。 | 调用后返回待发送的 MessageItem 。发送时在 groupID 中指定目标群组,并通过 发送消息 /sdk/react native/message/sending messages/send message 投递。" + "path": "/platform-api/timer/managing-tasks/list-timer-tasks", + "title": "List timer tasks", + "description": "OpenIM Enterprise Platform API: list a user's timer tasks by category with pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks list-timer-tasks", + "content": "List a user's timer tasks, optionally restricted to selected business categories. HTTP request POST API ADDRESS /timer/list timer task Request example curl request POST \"$ API ADDRESS /timer/list timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"pageCount\":1,\"pageSize\":20,\"userID\":\"user 001\",\"categories\": \"reminder\" ' Request body | Parameter | Required | Type | Description | | | | | | | pageCount | Yes | int | Page number starting at 1 . | | pageSize | Yes | int | Number of records per page. | | userID | Yes | string | User whose tasks are queried. | | categories | Yes | string | Business category filters. | Response data.tasks contains an array of TimerTask /platform api/timer/overview timertask records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Page size limits follow the delivered server version. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/sending-messages/send-message", - "title": "发送消息", - "description": "OpenIM React Native SDK 发送消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message", - "content": "调用 sendMessage 发送由消息创建 API 返回的 MessageItem 。单聊填写 recvID ,群聊填写 groupID 。 使用本地路径创建的图片、音频、视频和文件消息时,SDK 会在发送过程中自动上传资源。对于已通过 URL 创建、已有远端资源的媒体消息,请使用 发送已上传的媒体消息 /sdk/react native/message/sending messages/send message not oss 。 const sentMessage = await OpenIMSDK.sendMessage recvID: receiverUserID, groupID: '', message, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | | message | MessageItem | 是 | 待发送消息。 | | offlinePushInfo | OfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递。 | 调用后返回发送完成的 MessageItem 。 发送过程有进度时会触发 SendMessageProgress ,回调参数包含 progress 和 message : function handleSendMessageProgress info // ... // 设置监听 OpenIMSDK.on OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; // 取消监听 OpenIMSDK.off OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-management/book-meeting", + "title": "Schedule a meeting", + "description": "OpenIM Enterprise Platform API: schedule a meeting for a future start time.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management book-meeting", + "content": "Schedule a meeting for a future start time. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /rtc meeting/book meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/book meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Weekly sync\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": \"user 002\" ,\"inviteeUserIDs\": \"user 003\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ,\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence rule. Use a non recurring rule when scheduling a single meeting. | Response data.detail contains the created MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Scheduling does not return a real time connection token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate creator, host, co host, invitee, and tenant boundaries on your backend. All meeting times are Unix timestamps in milliseconds; meetingDuration is in seconds. Related pages Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", - "title": "发送已上传的媒体消息", - "description": "OpenIM React Native SDK 发送已上传的媒体消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message-not-oss", - "content": "sendMessageNotOss 用于发送已经包含远端资源 URL 的图片、音频、视频或文件消息,不再走 SDK 的资源上传流程。 const sentMessage = await OpenIMSDK.sendMessageNotOss recvID: receiverUserID, groupID: '', message: uploadedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 | | message | MessageItem | 是 | 通过 URL 型消息创建 API 创建的待发送消息。 | | offlinePushInfo | OfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递。 | 调用后返回发送完成的 MessageItem 。 message 中的资源地址、大小、类型和尺寸应来自实际上传结果;本地路径型媒体消息请使用 发送消息 /sdk/react native/message/sending messages/send message 。" + "path": "/platform-api/meeting/meeting-management/create-immediate-meeting", + "title": "Create an immediate meeting", + "description": "OpenIM Enterprise Platform API: create a meeting immediately and return real-time connection details.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management create-immediate-meeting", + "content": "Create a meeting immediately and return the real time audio and video connection details for the creator. HTTP request POST API ADDRESS /rtc meeting/create immediate meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/create immediate meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Support call\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": ,\"inviteeUserIDs\": \"user 002\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":true,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule metadata, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | Response | Property | Type | Description | | | | | | data.detail | MeetingInfoSetting | Created meeting details and settings. | | data.liveKit | LiveKit | Real time service URL and access token for the creator. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Return data.liveKit only to the authenticated participant for whom it was issued. Related pages Join a meeting /platform api/meeting/meeting management/join meeting Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/receiving-messages/receive-messages", - "title": "接收消息", - "description": "OpenIM React Native SDK 接收消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-messages", - "content": "新消息到达时会触发 OnRecvNewMessage ,回调参数为一条 MessageItem 。离线消息和只在线投递的消息分别通过 OnRecvOfflineNewMessage 、 OnRecvOnlineOnlyMessage 接收,三个事件的回调参数均为 MessageItem 。 function handleNewMessage message // ... function handleOfflineNewMessage message // ... function handleOnlineOnlyMessage message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; 使用 clientMsgID 识别消息。组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-management/join-meeting", + "title": "Join a meeting", + "description": "OpenIM Enterprise Platform API: validate a participant and meeting password, then issue connection details.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management join-meeting", + "content": "Validate the meeting and password, admit a participant, and issue real time connection details. HTTP request POST API ADDRESS /rtc meeting/join meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/join meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\",\"password\":\"123456\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | password | Yes | string | Meeting password; use an empty string for a meeting without a password. | Response data.liveKit contains the LiveKit /platform api/meeting/overview livekit service URL and participant access token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Issue connection details only after authenticating userID in your business system. Do not share or persist the returned participant token outside the meeting session. Related pages Get a meeting token /platform api/meeting/meeting management/get meeting token Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", - "title": "接收自定义业务消息", - "description": "OpenIM React Native SDK 接收自定义业务消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-custom-business-messages", - "content": "服务端下发自定义业务通知时会触发 OnRecvCustomBusinessMessage 。该事件的回调参数为业务数据,不是 MessageItem ;普通聊天自定义消息仍通过 接收消息 /sdk/react native/message/receiving messages/receive messages 中的新消息事件接收。 function handleCustomBusinessMessage data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; 业务侧应先校验收到的数据格式,再按自身协议处理。组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-management/get-meeting-token", + "title": "Get a meeting token", + "description": "OpenIM Enterprise Platform API: issue real-time meeting connection details for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting-token", + "content": "Issue real time audio and video connection details for a specified meeting participant. HTTP request POST API ADDRESS /rtc meeting/get meeting token Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting token\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant for whom the token is issued. | Response data.meetingID identifies the meeting and data.liveKit contains the LiveKit /platform api/meeting/overview livekit URL and participant token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Authenticate the participant before issuing the token and return it only to that participant. Related pages Join a meeting /platform api/meeting/meeting management/join meeting" }, { - "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", - "title": "加载历史消息", - "description": "OpenIM React Native SDK 加载历史消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-older-messages", - "content": "使用 getAdvancedHistoryMessageList 分页加载会话中较早的历史消息。第一页的 startClientMsgID 传空字符串,继续加载时传入当前最早消息的 clientMsgID 。 const page = await OpenIMSDK.getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, viewType: ViewType.History, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | viewType | ViewType | 是 | 浏览历史消息时传 ViewType.History 。 | 返回结果 调用后返回 AdvancedGetMessageResult : | 字段 | 类型 | 说明 | | | | | | messageList | MessageItem | 当前页消息。 | | isEnd | boolean | 是否已到达较早一端的边界。 | | errCode | number | 本次历史读取的状态码。 | | errMsg | string | 与 errCode 对应的说明。 | 将 messageList 加入列表前,按 clientMsgID 去重。" + "path": "/platform-api/meeting/meeting-management/update-meeting", + "title": "Update a meeting", + "description": "OpenIM Enterprise Platform API: update selected meeting information, settings, and invitees.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management update-meeting", + "content": "Update selected meeting information, recurrence settings, participant permissions, and invitees. HTTP request POST API ADDRESS /rtc meeting/update meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/update meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"updatingUserID\":\"user 001\",\"title\":\"Updated weekly sync\",\"scheduledTime\":1719900000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ,\"repeatMeetingID\":\"repeat meeting 001\",\"repeatSequence\":1 ,\"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"inviteeInfo\": \"inviteeUserIDs\": \"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | updatingUserID | Yes | string | User performing the update. | | title | No | StringValue | New title. | | scheduledTime | No | Int64Value | New start time in Unix milliseconds. | | meetingDuration | No | Int64Value | New duration in seconds. | | password | No | StringValue | New password, including an empty value to remove it. | | timeZone | No | StringValue | New creator selected time zone. | | repeatInfo | Yes | MeetingRepeatInfo | Recurrence information associated with this meeting. | | canParticipantsEnableCamera | No | BoolValue | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | No | BoolValue | Whether participants may unmute microphones. | | canParticipantsShareScreen | No | BoolValue | Whether participants may share screens. | | disableCameraOnJoin | No | BoolValue | Whether cameras start disabled. | | disableMicrophoneOnJoin | No | BoolValue | Whether microphones start muted. | | canParticipantJoinMeetingEarly | No | BoolValue | Whether participants may join early. | | lockMeeting | No | BoolValue | Whether new participants are blocked from joining. | | audioEncouragement | No | BoolValue | Whether active speaker highlighting is enabled. | | videoMirroring | No | BoolValue | Whether video mirroring is enabled. | | inviteeInfo | Yes | InviteeInfo | Updated invitee user IDs. | Response The common response has errCode: 0 when the update was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Use wrapper fields to distinguish omitted values from explicit zero, empty, or false values. Related pages Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", - "title": "反向加载历史消息", - "description": "OpenIM React Native SDK 反向加载历史消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-newer-messages", - "content": "使用 getAdvancedHistoryMessageListReverse 从消息锚点向较新的方向读取历史消息,适合定位消息后继续加载其后的记录。 const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse conversationID, startClientMsgID: anchorMessage.clientMsgID, count: 30, viewType: ViewType.History, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取消息的会话 ID。 | | startClientMsgID | string | 是 | 向较新方向读取时使用的锚点消息 ID。 | | count | number | 是 | 本次读取的消息数量。 | | viewType | ViewType | 是 | 浏览历史消息时传 ViewType.History 。 | 调用后返回 AdvancedGetMessageResult ,其中 messageList 是本页消息, isEnd 表示是否已到达较新一端的边界。其余返回字段见 加载历史消息 /sdk/react native/message/retrieving messages/load older messages 。" + "path": "/platform-api/meeting/meeting-management/get-meeting", + "title": "Get a meeting", + "description": "OpenIM Enterprise Platform API: get a meeting's details, settings, and recurrence information.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting", + "content": "Get a meeting's system and creator defined information, meeting settings, and recurrence information. HTTP request POST API ADDRESS /rtc meeting/get meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"meetingID\":\"meeting 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the meeting. | | meetingID | Yes | string | Meeting ID. | Response data.meetingDetail contains a MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the requesting user may view the target meeting. Related pages Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", - "title": "按 ID 查找消息", - "description": "OpenIM React Native SDK 按 ID 查找消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages find-messages-by-id", - "content": "使用 findMessageList 根据会话 ID 和消息 ID 查找消息。适合从搜索结果、引用或通知跳转到一条已知消息时使用。 const result = await OpenIMSDK.findMessageList conversationID, clientMsgIDList: clientMsgID , , ; const targetMessage = result.findResultItems?. 0 ?.messageList 0 ; 参数说明 findMessageList 接收查询条件数组,每项包含以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标消息所属的会话 ID。 | | clientMsgIDList | string | 是 | 要查找的消息 ID 列表。 | 返回结果 调用后返回 SearchMessageResult ,按 ID 查找的结果位于 findResultItems 。每个结果项包含 conversationID 和 messageList ;找不到消息时,结果项或其消息列表可能为空。完整结果结构见 搜索消息 /sdk/react native/message/searching messages/search messages 。" + "path": "/platform-api/meeting/meeting-management/list-meetings", + "title": "List a user's meetings", + "description": "OpenIM Enterprise Platform API: list meetings created or attended by a user, filtered by status.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management list-meetings", + "content": "List meetings created or attended by a user, restricted to selected meeting statuses. HTTP request POST API ADDRESS /rtc meeting/get meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose meetings are queried. | | status | Yes | string | Meeting status filters. | Response data.meetingDetails contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Status values must match those supported by the delivered meeting service. Related pages Get user related meetings /platform api/meeting/meeting management/get user related meetings" }, { - "path": "/sdk/react-native/message/retrieving-messages/load-message-context", - "title": "读取消息上下文", - "description": "OpenIM React Native SDK 读取消息上下文。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-message-context", - "content": "使用 fetchSurroundingMessages 读取一条已知消息前后的上下文,适合从搜索结果或回复消息进入聊天记录。 const messageList = await OpenIMSDK.fetchSurroundingMessages startMessage: targetMessage, viewType: ViewType.Search, before: 20, after: 20, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | startMessage | MessageItem | 是 | 已取得的锚点消息。 | | viewType | ViewType | 是 | 上下文查看类型;从搜索结果进入时可传 ViewType.Search 。 | | before | number | 是 | 锚点之前最多读取的消息数量。 | | after | number | 是 | 锚点之后最多读取的消息数量。 | 调用后返回 messageList ,其中 messageList 是锚点前后取得的 MessageItem 。返回数量可能少于 before + after ,例如锚点靠近记录边界或部分消息已删除。" + "path": "/platform-api/meeting/meeting-management/invite-meeting-users", + "title": "Invite users to a meeting", + "description": "OpenIM Enterprise Platform API: invite users to an existing meeting and return per-user results.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management invite-meeting-users", + "content": "Invite multiple users to an existing meeting and return per user processing results. HTTP request POST API ADDRESS /rtc meeting/invite meeting invitees Request example curl request POST \"$ API ADDRESS /rtc meeting/invite meeting invitees\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"inviterUserID\":\"user 001\",\"inviteeUserIDs\": \"user 002\",\"user 003\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | inviterUserID | Yes | string | User initiating the invitation. | | inviteeUserIDs | Yes | string | Users to invite. | Response | Property | Type | Description | | | | | | data.successUserIDList | string | Users successfully added to the invitation state. | | data.failedUserIDList | string | Users whose invitations failed. | | data.meetingDetail | MeetingInfoSetting | Updated meeting details. | An overall errCode: 0 does not imply that every invitee succeeded; inspect both user ID lists. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that inviterUserID has permission to invite participants. Related pages Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/searching-messages/search-messages", - "title": "搜索消息", - "description": "OpenIM React Native SDK 搜索消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message searching-messages search-messages", - "content": "使用 searchLocalMessages 搜索当前账号已同步到本地的消息。 const result = await OpenIMSDK.searchLocalMessages conversationID, keywordList: '发布' , messageTypeList: MessageType.TextMessage , pageIndex: 1, count: 20, ; 参数说明 keywordList 可传入一个或多个关键词。单个搜索框通常传入一个去除首尾空格且非空的关键词。 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要搜索的会话 ID。 | | keywordList | string | 是 | 关键词列表;单个搜索框通常传入一个清理后的关键词。 | | keywordListMatchType | number | 否 | 多关键词匹配方式: 0 表示命中任意关键词(OR), 1 表示同时命中全部关键词(AND);省略时按 0 处理。 | | senderUserIDList | string | 否 | 仅搜索这些用户发送的消息。 | | messageTypeList | MessageType | 否 | 仅搜索指定类型的消息,例如文本消息和 @ 文本消息;省略时按 SDK 默认范围搜索。 | | searchTimePosition | number | 否 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 否 | 从 searchTimePosition 向前搜索的时间范围,单位为秒。 | | pageIndex | number | 否 | 搜索结果页码,从 1 开始。 | | count | number | 否 | 每页返回的消息数量。 | 返回结果 调用后返回 SearchMessageResult : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下的匹配消息总数。 | | searchResultItems | SearchMessageResultItem | 按会话组织的搜索结果。 | 每个 SearchMessageResultItem 包含会话信息和 messageList 。修改关键词或筛选条件时,从第一页重新搜索,避免混合不同条件的结果。需要定位命中消息前后的记录时见 读取消息上下文 /sdk/react native/message/retrieving messages/load message context 。" + "path": "/platform-api/meeting/meeting-management/leave-meeting", + "title": "Leave a meeting", + "description": "OpenIM Enterprise Platform API: remove a specified user's active participation in a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management leave-meeting", + "content": "Make a specified participant leave the current meeting without ending the meeting for everyone else. HTTP request POST API ADDRESS /rtc meeting/leave meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/leave meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant leaving the meeting. | Response The common response has errCode: 0 when the participant state was updated. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. This operation does not end or cancel the meeting. Related pages End a meeting /platform api/meeting/meeting management/end meeting" }, { - "path": "/sdk/react-native/message/composing-messages/update-typing-status", - "title": "上报输入状态", - "description": "OpenIM React Native SDK 上报输入状态。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages update-typing-status", - "content": "使用 typingStatusUpdate 向单聊对方上报输入状态提示内容。 await OpenIMSDK.typingStatusUpdate recvID: receiverUserID, msgTip: '正在输入…', ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 是 | 接收输入提示的用户 ID。 | | msgTip | string | 是 | 要上报的输入提示文本。 | 调用完成后,输入提示已上报。需要根据会话焦点更新当前账号的输入状态时,使用 更新输入状态 /sdk/react native/message/composing messages/change input states 。" + "path": "/platform-api/meeting/meeting-management/end-meeting", + "title": "End or cancel a meeting", + "description": "OpenIM Enterprise Platform API: cancel a scheduled meeting or end an active meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management end-meeting", + "content": "Cancel a scheduled meeting or end an active meeting for all participants. HTTP request POST API ADDRESS /rtc meeting/end meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/end meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\",\"endType\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | endType | Yes | MeetingEndType | 0 CancelType cancels a scheduled meeting; 1 EndType ends an active meeting. | Response The common response has errCode: 0 when the requested state transition completed. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent business permission before ending a meeting for all participants. Related pages Leave a meeting /platform api/meeting/meeting management/leave meeting" }, { - "path": "/sdk/react-native/message/composing-messages/get-typing-status", - "title": "查询输入状态", - "description": "OpenIM React Native SDK 查询输入状态。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages get-typing-status", - "content": "使用 getInputStates 查询指定用户在会话中的当前输入状态。 const platformIDs = await OpenIMSDK.getInputStates conversationID, userID, ; const isTyping = platformIDs.length 0; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标会话 ID。 | | userID | string | 是 | 要查询输入状态的用户 ID。 | 调用后返回处于输入状态的平台 ID 数组;空数组表示该用户当前没有平台处于输入状态。持续显示输入状态时,处理 更新输入状态 /sdk/react native/message/composing messages/change input states 中的 OnInputStatusChanged 事件。" + "path": "/platform-api/meeting/meeting-management/get-user-related-meetings", + "title": "Get user-related meetings", + "description": "OpenIM Enterprise Platform API: list meetings related to a user by status and time range.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management get-user-related-meetings", + "content": "List meetings related to a user by meeting status and optional time range. HTTP request POST API ADDRESS /rtc meeting/get user related meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get user related meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ,\"startTime\":1719800000000,\"endTime\":1722400000000 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose related meetings are queried. | | status | Yes | string | Meeting status filters. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | Response data.meetings contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records matching both the status and time constraints. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Ensure endTime is not earlier than startTime . Related pages List a user's meetings /platform api/meeting/meeting management/list meetings" }, { - "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", - "title": "检查语音识别能力", - "description": "OpenIM React Native SDK 检查语音识别能力。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages check-speech-to-text", - "content": "speechToTextCapabilities 仅用于查询当前语音识别支持的音频格式、采样率、录音时长和文件大小等信息。实际执行语音识别的是 识别音频文字 /sdk/react native/message/composing messages/transcribe audio 。 const capabilities = await OpenIMSDK.speechToTextCapabilities ; 返回结果 调用后返回 SpeechToTextCapabilities : | 字段 | 类型 | 说明 | | | | | | format | string | 支持的音频格式。 | | sampleRateHz | number | 要求的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number | 最大录音时长,单位为毫秒。 | | maxFileSize | number | 最大文件大小,单位为字节。 | | provider | string | 当前语音识别服务提供方。 |" + "path": "/platform-api/meeting/meeting-settings/set-personal-setting", + "title": "Set personal meeting preferences", + "description": "Set a user's camera and microphone preferences for joining a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings set-personal-setting", + "content": "Set a user's camera and microphone preferences for joining a meeting. HTTP request POST API ADDRESS /rtc meeting/set personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | cameraOnEntry | No | BoolValue | Whether the camera is enabled on entry. | | microphoneOnEntry | No | BoolValue | Whether the microphone is enabled on entry. | Response errCode: 0 means the preference update succeeded. Permissions and limits Available only in OpenIM Enterprise. Omit wrapper values that should remain unchanged; explicit false disables the preference." }, { - "path": "/sdk/react-native/message/composing-messages/transcribe-audio", - "title": "识别音频文字", - "description": "OpenIM React Native SDK 识别音频文字。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages transcribe-audio", - "content": "使用 speechToText 将设备上 SDK 可读取的本地音频文件识别为文字。传入本地路径,不传远端 URL、Base64 数据或上传后的文件名。 const text = await OpenIMSDK.speechToText filename ; 参数 filename 是本地音频文件路径。调用后返回 text ,其中 text 为识别结果。调用前先 检查语音识别能力 /sdk/react native/message/composing messages/check speech to text ;需要把结果保存在当前设备的语音消息中时见 保存本地转写结果 /sdk/react native/message/composing messages/save local transcript 。" + "path": "/platform-api/meeting/meeting-settings/get-personal-setting", + "title": "Get personal meeting preferences", + "description": "Get a user's camera and microphone preferences for a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings get-personal-setting", + "content": "Get a user's personal audio and video preferences for a meeting. HTTP request POST API ADDRESS /rtc meeting/get personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | Response data.setting contains a PersonalMeetingSetting /platform api/meeting/overview personalmeetingsetting with cameraOnEntry and microphoneOnEntry . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may read the participant's meeting preferences." }, { - "path": "/sdk/react-native/message/composing-messages/save-local-transcript", - "title": "保存本地转写结果", - "description": "OpenIM React Native SDK 保存本地转写结果。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages save-local-transcript", - "content": "使用 setMessageLocalContent 将转写文字写入当前设备的语音消息。传入完整的消息对象,并保留原有消息字段。 const updatedMessage = ...message, soundElem: ...message.soundElem, text: text: transcript, translate: message.soundElem?.text?.translate ?? , , , ; await OpenIMSDK.setMessageLocalContent conversationID, message: updatedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | MessageItem | 是 | 写入转写结果后的完整消息对象。 | 调用完成后,转写结果保存在当前设备的消息内容中。" + "path": "/platform-api/meeting/meeting-settings/operate-all-streams", + "title": "Control participant media streams", + "description": "Control camera and microphone state across meeting participants.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings operate-all-streams", + "content": "Apply camera or microphone state changes across meeting participants. HTTP request POST API ADDRESS /rtc meeting/operate meeting all stream Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | operatorUserID | Yes | string | User performing the operation. | | cameraOnEntry | No | BoolValue | Target camera state. | | microphoneOnEntry | No | BoolValue | Target microphone state. | Response data.streamNotExistUserIDList identifies participants without a matching media stream. data.failedUserIDList identifies other failed operations. Inspect both lists even when errCode is 0 . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." }, { - "path": "/sdk/react-native/message/composing-messages/change-input-states", - "title": "更新输入状态", - "description": "OpenIM React Native SDK 更新输入状态。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages change-input-states", - "content": "使用 changeInputStates 更新当前账号在会话中的输入状态。开始输入时传 focus: true ,发送消息、失焦或离开会话时传 false 。 await OpenIMSDK.changeInputStates conversationID, focus: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要更新输入状态的会话 ID。 | | focus | boolean | 是 | true 表示正在输入, false 表示停止输入。 | 避免在每个键盘事件中重复上报相同状态。输入状态变化时会触发 OnInputStatusChanged ,回调携带 conversationID 、 userID 和 platformIDs 。 function handleInputStatusChanged inputStatus // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-settings/modify-participant-name", + "title": "Modify a participant name", + "description": "Change a participant's display name within a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings modify-participant-name", + "content": "Change a participant's display name within a meeting without changing the user's global profile. HTTP request POST API ADDRESS /rtc meeting/modify meeting participant name Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserID | Yes | string | Target participant. | | nickname | Yes | string | New in meeting display name. | Response errCode: 0 means the in meeting name was updated. Permissions and limits Available only in OpenIM Enterprise. This operation does not update UserInfo.nickname ." }, { - "path": "/sdk/react-native/message/managing-messages/delete-local-message", - "title": "删除本地消息", - "description": "OpenIM React Native SDK 删除本地消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-local-message", - "content": "使用 deleteMessageFromLocalStorage 删除当前设备中指定会话的一条消息。 await OpenIMSDK.deleteMessageFromLocalStorage conversationID, clientMsgID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 要删除的消息 ID。 | 调用完成后,当前设备上的目标消息已删除。" + "path": "/platform-api/meeting/meeting-settings/remove-participants", + "title": "Remove meeting participants", + "description": "Remove selected participants from a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings remove-participants", + "content": "Remove selected participants from an active meeting. HTTP request POST API ADDRESS /rtc meeting/remove participants Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserIDs | Yes | string | Participants to remove. | Response Inspect data.successUserIDList and data.failedUserIDList ; a successful envelope can still contain per user failures. Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." }, { - "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", - "title": "批量删除消息", - "description": "OpenIM React Native SDK 批量删除消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-saved-messages", - "content": "使用 deleteMessages 批量删除同一会话中的消息。 await OpenIMSDK.deleteMessages conversationID, clientMsgIDs, isSync: true, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要删除消息所属的会话 ID。 | | clientMsgIDs | string | 是 | 要删除的消息 ID 列表;列表中的消息应属于同一会话。 | | isSync | boolean | 是 | 是否将删除操作同步给会话另一方。为 true 时,会话双方都会删除对应消息;为 false 时,仅当前账号删除。 | 调用完成后,删除请求已完成。 isSync 为 true 时,会话另一方也会删除对应消息;为 false 时,仅当前账号删除,无论取值如何,当前账号的删除都会同步到该账号的其他设备。 监听消息删除 消息删除时会触发 OnMsgDeleted ,回调携带被删除的 MessageItem 。根据 clientMsgID 更新对应会话的消息列表。 function handleMessageDeleted message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-settings/set-meeting-host", + "title": "Set meeting hosts", + "description": "Set the host and co-hosts of a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings set-meeting-host", + "content": "Set the primary host and co host list of a meeting. HTTP request POST API ADDRESS /rtc meeting/set meeting host info Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | hostUserID | No | StringValue | New primary host. | | coHostUserIDs | Yes | string | Complete co host user ID list. | Response errCode: 0 means host information was updated. Permissions and limits Available only in OpenIM Enterprise. Validate role transfer authority before changing the primary host." }, { - "path": "/sdk/react-native/message/managing-messages/delete-user-messages", - "title": "删除群聊中指定用户的全部消息", - "description": "OpenIM React Native SDK 删除群聊中指定用户的全部消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-user-messages", - "content": "使用 deleteUserAllMessagesInConv 删除指定用户在群聊会话中的全部消息。 await OpenIMSDK.deleteUserAllMessagesInConv conversationID, userID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标群聊的会话 ID。 | | userID | string | 是 | 要删除其消息的用户 ID。 | 这是群聊管理操作,调用完成后删除请求已完成,具体权限由服务端校验。 监听指定用户消息删除 删除完成后会触发 OnDeleteUserAllMsgsInConv ,回调携带 conversationID 和 userID ,可据此移除目标会话中该用户的消息。 function handleUserMessagesDeleted data // ... OpenIMSDK.on OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; OpenIMSDK.off OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-settings/clean-previous-meetings", + "title": "Clean previous meeting state", + "description": "Clear stale meeting connection state retained before a user logs in.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings clean-previous-meetings", + "content": "Clear stale meeting connection state retained before a user starts a new login session. HTTP request POST API ADDRESS /rtc meeting/clean previous meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose stale state is cleared. | | reasonCode | Yes | int | Business reason code. | | reason | Yes | string | Human readable cleanup reason. | Response errCode: 0 means stale meeting state was cleared. Permissions and limits Available only in OpenIM Enterprise. Use this for stale connection recovery, not as a general meeting history deletion API." }, { - "path": "/sdk/react-native/message/managing-messages/revoke-a-message", - "title": "撤回消息", - "description": "OpenIM React Native SDK 撤回消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages revoke-a-message", - "content": "使用 revokeMessage 撤回已发送的消息。撤回后,会话成员可看到消息撤回状态。 await OpenIMSDK.revokeMessage conversationID, clientMsgID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 要撤回的消息 ID。 | 调用完成后,撤回请求已完成。允许撤回的消息、发送者和时间范围由服务端校验。 监听消息撤回 消息撤回时会触发 OnNewRecvMessageRevoked ,回调携带 RevokedInfo 。使用其中的 clientMsgID 更新对应消息的撤回状态。 function handleMessageRevoked revokedInfo // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; 组件销毁、退出登录或切换账号时,取消监听。仅从当前设备移除消息时,使用 删除本地消息 /sdk/react native/message/managing messages/delete local message 。" + "path": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", + "title": "Create a recurring meeting", + "description": "Create a recurrence rule and generate its first meeting instance.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings create-repeat-meeting", + "content": "Create a recurrence definition and generate its first meeting instance. HTTP request POST API ADDRESS /rtc meeting/create repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting series creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Shared title, schedule, host, and invitees. | | setting | Yes | MeetingSetting | Shared meeting settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence end, count, type, interval, and weekdays. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . data.generatedMeeting contains the first MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instance. Permissions and limits Available only in OpenIM Enterprise. Validate recurrence boundaries and the creator's authority over all invitees." + }, + { + "path": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", + "title": "Update a recurring meeting", + "description": "Update a recurrence definition and its future meeting instances.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings update-repeat-meeting", + "content": "Update a recurrence definition and the future instances generated from it. HTTP request POST API ADDRESS /rtc meeting/update repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | updatingUserID | Yes | string | User performing the update. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Updated shared meeting information. | | setting | Yes | MeetingSetting | Updated shared settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Updated recurrence rule. | Response Returns updated data.repeatMeeting and the affected data.generatedMeeting . Permissions and limits Available only in OpenIM Enterprise. Do not assume completed or historical instances are rewritten." }, { - "path": "/sdk/react-native/message/managing-messages/modify-a-message", - "title": "修改消息", - "description": "OpenIM React Native SDK 修改消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages modify-a-message", - "content": "使用 modifyMessage 修改会话中已有消息的内容。 const updatedMessage = ...message, textElem: ...message.textElem, content: editedText, , ; const modifiedMessage = await OpenIMSDK.modifyMessage conversationID, message: updatedMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | MessageItem | 是 | 修改后的完整消息对象,需保留原消息的 clientMsgID 及其他必要字段。 | 返回结果 调用后返回服务端确认的 MessageItem ,可使用返回消息替换列表中相同 clientMsgID 的消息。允许修改的消息类型、发送者和时间范围由服务端校验。 监听消息修改 消息修改时会触发 OnMessageModified ,回调直接携带修改后的 MessageItem 。 function handleMessageModified message // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnMessageModified, handleMessageModified ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnMessageModified, handleMessageModified ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", + "title": "Delete a recurring meeting", + "description": "Delete a recurring meeting definition.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings delete-repeat-meeting", + "content": "Delete a recurring meeting definition. HTTP request POST API ADDRESS /rtc meeting/delete repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | operatorUserID | Yes | string | User performing the deletion. | Response errCode: 0 means the recurrence definition was deleted. Permissions and limits Available only in OpenIM Enterprise. This response does not state that historical meeting instances or recordings were deleted." }, { - "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", - "title": "插入本地单聊消息", - "description": "OpenIM React Native SDK 插入本地单聊消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-single-message", - "content": "使用 insertSingleMessageToLocalStorage 将一条消息写入当前设备的单聊记录。 await OpenIMSDK.insertSingleMessageToLocalStorage message, recvID, sendID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要写入的完整消息对象。 | | recvID | string | 是 | 单聊接收方的用户 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | 调用完成后,消息已写入当前设备的单聊记录。需要向对方发送消息时,使用 发送消息 /sdk/react native/message/sending messages/send message 。" + "path": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", + "title": "Get a recurring meeting", + "description": "Get a recurring meeting definition and generation state.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings get-repeat-meeting", + "content": "Get a recurrence definition, generation progress, next schedule time, and status. HTTP request POST API ADDRESS /rtc meeting/get repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may view the series." }, { - "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", - "title": "插入本地群聊消息", - "description": "OpenIM React Native SDK 插入本地群聊消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-group-message", - "content": "使用 insertGroupMessageToLocalStorage 将一条消息写入当前设备的群聊记录。 await OpenIMSDK.insertGroupMessageToLocalStorage message, groupID, sendID, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要写入的完整消息对象。 | | groupID | string | 是 | 目标群组 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | 调用完成后,消息已写入当前设备的群聊记录。需要向群成员发送消息时,使用 发送消息 /sdk/react native/message/sending messages/send message 。" + "path": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", + "title": "List recurring meetings", + "description": "List recurring meeting definitions created by a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meetings", + "content": "List recurring meeting definitions created by a user. HTTP request POST API ADDRESS /rtc meeting/list repeat meetings Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Series creator. | Response data.repeatMeetings contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata records. These are recurrence definitions, not individual instances. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", - "title": "清理全部本地消息", - "description": "OpenIM React Native SDK 清理全部本地消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-local-messages", - "content": "使用 deleteAllMsgFromLocal 清理当前登录账号在本设备上的全部消息。 await OpenIMSDK.deleteAllMsgFromLocal ; 这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本设备上的全部消息已清理;服务端仍保留历史记录。" + "path": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", + "title": "List recurring meeting instances", + "description": "List meeting instances generated for a recurring meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meeting-instances", + "content": "List individual meeting instances already generated for a recurring meeting. HTTP request POST API ADDRESS /rtc meeting/list repeat meeting instances Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.meetings contains generated MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instances. Permissions and limits Available only in OpenIM Enterprise. Future instances not yet generated are not represented in this array." }, { - "path": "/sdk/react-native/message/managing-messages/clear-all-messages", - "title": "清理本地与服务端消息", - "description": "OpenIM React Native SDK 清理本地与服务端消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-messages", - "content": "使用 deleteAllMsgFromLocalAndSvr 清理当前登录账号在本地和服务端保存的全部消息。 await OpenIMSDK.deleteAllMsgFromLocalAndSvr ; 这是不可撤销的账号级操作,执行前应向用户明确说明影响范围并二次确认。调用完成后,本地和服务端的清理请求已完成;其他会话成员已保存的消息副本不受影响。" + "path": "/platform-api/meeting/meeting-records/get-user-meeting-histories", + "title": "Get a user's meeting history", + "description": "List a user's meeting attendance history by time, status, and pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-user-meeting-histories", + "content": "List a user's meeting attendance history. HTTP request POST API ADDRESS /rtc meeting/get user meeting histories Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Participant user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | | status | Yes | string | Meeting status filters. | Response data.total is the matching count. data.meetingHistories contains UserMeetingHistory /platform api/meeting/overview usermeetinghistory records. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", - "title": "设置消息本地扩展", - "description": "OpenIM React Native SDK 设置消息本地扩展。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages set-message-local-ex", - "content": "使用 setMessageLocalEx 为当前设备中的指定消息保存本地扩展数据。 await OpenIMSDK.setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify expanded: true , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | clientMsgID | string | 是 | 目标消息 ID。 | | localEx | string | 是 | 本地扩展字符串,可按业务需要传递 JSON 字符串或其他格式的扩展数据。 | 调用完成后,本地扩展数据已保存到当前设备的消息中。" + "path": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", + "title": "Get meetings hosted by a user", + "description": "List meetings hosted by a user by time range and pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-user-hosted-meetings", + "content": "List meetings hosted by a user. HTTP request POST API ADDRESS /rtc meeting/get user hosted meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Host user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | Response data.total is the matching count. data.hostedMeetings contains HostedMeeting /platform api/meeting/overview hostedmeeting records. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", - "title": "上报群消息已读", - "description": "OpenIM React Native SDK 上报群消息已读。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-read-status send-group-read-receipts", - "content": "使用 sendGroupMessageReadReceipt 上报群聊中已读的消息。 await OpenIMSDK.sendGroupMessageReadReceipt conversationID, clientMsgIDs, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgIDs | string | 是 | 已读消息 ID 列表;列表中的消息应属于该群聊会话。 | 调用完成后,已读回执已上报。会话未读数的更新见 标记会话已读 /sdk/react native/conversation/managing conversations/mark conversation read 。 监听群消息已读变化 群消息的已读状态变化时会触发 OnRecvGroupReadReceipt ,回调携带 GroupMessageReceiptInfo ,其中包含 conversationID 和各消息的已读人数、未读人数及已读成员。 function handleGroupReadReceipt payload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; 组件销毁、退出登录或切换账号时,取消监听。" + "path": "/platform-api/meeting/meeting-records/get-meeting-records", + "title": "Get meeting recordings", + "description": "List meeting recordings by host, participant, time range, and pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-records", + "content": "List recordings for meetings hosted or attended by selected users. HTTP request POST API ADDRESS /rtc meeting/get meeting records Request body | Parameter | Required | Type | Description | | | | | | | hostUserID | Yes | string | Host filter. | | joinedUserID | Yes | string | Participant filter. | | startTime | Yes | int | Range start in Unix milliseconds. | | endTime | Yes | int | Range end in Unix milliseconds. | | pagination | Yes | RequestPagination | Page settings. | Response data.total is the matching count. data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries, including files and recording status. Permissions and limits Available only in OpenIM Enterprise. Treat URLs as protected recording resources and apply business authorization before returning them." }, { - "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", - "title": "查询群消息已读成员", - "description": "OpenIM React Native SDK 查询群消息已读成员。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", - "content": "使用 getGroupMessageReaderList 分页查询一条群消息的已读或未读成员。 const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgID | string | 是 | 要查询已读情况的消息 ID。 | | filter | GroupMessageReaderFilter | 是 | 成员筛选条件。 Read 查询已读成员, Unread 查询未读成员。 | | offset | number | 是 | 分页偏移量;首页传 0 。 | | count | number | 是 | 本次查询的成员数量。 | 返回结果 调用后返回当前页的 GroupMemberItem 。成员字段见 群组概览 /sdk/react native/group/overview group ;继续查询时递增 offset 。" + "path": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", + "title": "Get recordings by meeting IDs", + "description": "Get recording records for selected meeting IDs.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-records-by-meeting-ids", + "content": "Get recording records for selected meetings. HTTP request POST API ADDRESS /rtc meeting/get meeting records by meeting ids Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the recordings. | | meetingIDs | Yes | string | Meeting IDs to query. | Response data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every meeting ID." }, { - "path": "/sdk/react-native/file-uploads/upload-file", - "title": "上传文件", - "description": "使用 OpenIM React Native SDK 独立上传文件并获取远端资源 URL。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", - "content": "uploadFile 用于独立上传本地文件,可用于头像、群头像、资料附件或其他业务文件。 const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 上传使用的文件名。 | | contentType | string | 是 | 文件的 MIME 类型。 | | uuid | string | 是 | 本次上传的业务标识。 | | cause | string | 否 | 业务约定的上传原因。 | | filepath | string | 是 | 应用可读取的本地文件路径。 | 调用完成后返回远端资源地址 url 。可将该地址用于更新头像、保存业务附件,或创建 URL 类型的媒体消息后再发送。 监听上传状态 上传过程中触发 UploadOnProgress 事件,回调参数包含当前已上传量 current 和文件总量 size 。上传完成时触发 UploadComplete 事件,回调参数的 data 包含 fileSize 、 streamSize 和 storageSize 。 function handleUploadProgress current, size // ... function handleUploadComplete data // ... // 设置监听 OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // 取消监听 OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; 组件销毁、退出登录或切换账号时,应取消监听。" + "path": "/platform-api/meeting/meeting-records/get-meeting-attendance", + "title": "Get meeting attendance", + "description": "Get the users who attended or were absent from a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-attendance", + "content": "Get attendance results for a meeting. HTTP request POST API ADDRESS /rtc meeting/get meeting attendance Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | Response data.joinedUserIDs lists attendees and data.absentUserIDs lists invitees recorded as absent. Permissions and limits Available only in OpenIM Enterprise. Attendance reflects meeting service records, not arbitrary business attendance rules." }, { - "path": "/sdk/react-native/calling/overview-calling", - "title": "音视频通话概览", - "description": "OpenIM React Native SDK 音视频通话概览。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling overview-calling", - "content": "OpenIM React Native SDK 提供音视频通话的信令 API,用于发起和处理通话邀请、查询房间信息及同步通话状态。它只处理通话业务信令,不负责音视频采集与播放、媒体房间连接或通话界面渲染。 发起或接受通话后,SDK 返回 roomID 、 token 和 liveURL 等房间凭据。应用需要将这些凭据交给实时音视频媒体引擎加入通话房间,并自行处理设备权限、媒体轨道、弱网策略和界面状态。 通话流程 1. 调用 signalingInvite 发起单聊通话,或调用 signalingInviteInGroup 发起群聊通话。 2. 被邀请用户通过 OnReceiveNewInvitation 收到通话邀请,选择接受或拒绝。 3. 接受邀请后调用 signalingAccept ,使用返回的房间凭据加入通话房间。 4. 通话期间根据邀请状态、参与者状态、媒体流状态和自定义信令更新通话界面。 5. 发起方可取消尚未接通的邀请;通话参与者可挂断已建立的通话。 核心数据 | 数据 | 说明 | | | | | RtcInvite | 通话邀请,包含邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 | | RtcInviteResults | 发起、接受通话或查询房间凭据后返回的 roomID 、 token 和 liveURL 。 | | CallingRoomData | 按群组查询得到的房间 ID、邀请信息和参与者资料。 | | OnReceiveNewInvitationPayload | 收到通话邀请时的事件参数,包含 invitation 、可选的 offlinePushInfo 和参与者资料。 | customData 和自定义信令均为业务自定义字符串,可按业务协议传递 JSON 或其他格式的数据。 通话状态 调用发起、接受、拒绝、取消或挂断 API 后,可根据对应调用结果更新当前操作的界面。其他用户或设备的通话状态通过事件接收。使用 roomID 区分通话;参与者状态同时使用 roomID 和 userID 区分。 邀请生命周期、参与者进出房间和媒体流变化的监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。自定义信令的监听方式见 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal 。 按任务查找页面 | 任务 | 页面 | | | | | 发起单聊或群聊通话 | 发起单聊通话 /sdk/react native/calling/managing calls/start single call 、 发起群聊通话 /sdk/react native/calling/managing calls/start group call | | 接受或拒绝邀请 | 接受通话 /sdk/react native/calling/managing calls/accept call 、 拒绝通话 /sdk/react native/calling/managing calls/reject call | | 取消邀请或挂断通话 | 取消通话邀请 /sdk/react native/calling/managing calls/cancel call 、 挂断通话 /sdk/react native/calling/managing calls/hang up call | | 查询房间或恢复待处理邀请 | 查询群组通话房间 /sdk/react native/calling/retrieving call information/get room by group id 、 获取通话房间 Token /sdk/react native/calling/retrieving call information/get token by room id 、 恢复待处理的通话邀请 /sdk/react native/calling/retrieving call information/restore pending invitation | | 处理事件和自定义信令 | 处理通话事件 /sdk/react native/calling/managing calls/handle call events 、 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal |" + "path": "/platform-api/meeting/meeting-records/delete-meeting-records", + "title": "Delete meeting recordings", + "description": "Delete recording records by meeting or real-time room ID.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records delete-meeting-records", + "content": "Delete recording records for selected meeting or real time room IDs. HTTP request POST API ADDRESS /rtc meeting/delete meeting records Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time room IDs. | Response errCode: 0 means the requested recording records were deleted. Permissions and limits Available only in OpenIM Enterprise. This is destructive. Validate recording ownership and retention policy before calling it." }, { - "path": "/sdk/react-native/calling/managing-calls/start-single-call", - "title": "发起单聊通话", - "description": "使用 OpenIM React Native SDK 发起单聊音视频通话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-single-call", - "content": "调用 signalingInvite 发起单聊音视频通话。调用完成后返回房间凭据,应用可使用其中的 roomID 、 token 和 liveURL 接入实时音视频媒体引擎。 const roomCredentials = await OpenIMSDK.signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , groupID: '', roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Single, platformID: currentPlatform, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | RtcInvite | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起通话的当前用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户 ID 列表;单聊时传入对方用户 ID。 | | invitation.groupID | string | 是 | 单聊传空字符串。 | | invitation.roomID | string | 是 | 本次通话的房间 ID,后续通话操作和状态处理使用该值识别通话。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,例如 audio 或 video 。 | | invitation.sessionType | SessionType | 是 | 单聊传入 SessionType.Single 。 | | invitation.platformID | Platform | 是 | 发起端平台;传入当前客户端对应的 Platform 枚举值。 | | invitation.customData | string | 否 | 随邀请传递的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表。发起新邀请时通常不填写。 | | offlinePushInfo | OfflinePush | 否 | 被邀请用户离线时使用的推送内容。 | | offlinePushInfo.title | string | 条件必填 | 提供 offlinePushInfo 时填写推送标题。 | | offlinePushInfo.desc | string | 条件必填 | 提供 offlinePushInfo 时填写推送正文。 | | offlinePushInfo.ex | string | 条件必填 | 提供 offlinePushInfo 时填写扩展字符串;没有内容时传空字符串。 | | offlinePushInfo.iOSPushSound | string | 条件必填 | 提供 offlinePushInfo 时填写 iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 条件必填 | 提供 offlinePushInfo 时说明是否更新 iOS 角标。 | 返回结果 调用完成后返回 RtcInviteResults : | 字段 | 类型 | 说明 | | | | | | roomID | string | 通话房间 ID。 | | token | string | 加入通话房间使用的凭据。 | | liveURL | string | 通话服务返回的房间地址。 | | busyLineUserIDList | string | 处于忙线状态的被邀请用户 ID 列表。 | 被邀请用户会通过 OnReceiveNewInvitation 收到 OnReceiveNewInvitationPayload 。接受、拒绝、取消和挂断等状态变化见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + "path": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", + "title": "Get a call room by group ID", + "description": "Get the active real-time call room and participants associated with a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-room-by-group-id", + "content": "Get the active real time call room associated with a group. HTTP request POST API ADDRESS /rtc meeting/signal get room by group id Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | OpenIM group ID. | Response Returns data.invitation , participant metadata, and data.roomID . Participant metadata combines group, group member, and user information for the active room. Permissions and limits Available only in OpenIM Enterprise. Validate access to the group before returning live room state." }, { - "path": "/sdk/react-native/calling/managing-calls/start-group-call", - "title": "发起群聊通话", - "description": "使用 OpenIM React Native SDK 发起群聊音视频通话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-group-call", - "content": "调用 signalingInviteInGroup 发起群聊音视频通话。 groupID 用于标识发起通话的群组。 inviteeUserIDList 指定本次邀请的群成员,不会自动邀请群内全部成员。 const roomCredentials = await OpenIMSDK.signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: memberUserIDs, groupID, roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Group, platformID: currentPlatform, , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | RtcInvite | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起通话的当前用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 本次邀请的群成员用户 ID 列表。 | | invitation.groupID | string | 是 | 目标群组 ID。 | | invitation.roomID | string | 是 | 本次群聊通话的房间 ID。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,例如 audio 或 video 。 | | invitation.sessionType | SessionType | 是 | 群聊传入 SessionType.Group 。 | | invitation.platformID | Platform | 是 | 发起端平台;传入当前客户端对应的 Platform 枚举值。 | | invitation.customData | string | 否 | 随邀请传递的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,Unix 毫秒时间戳。通常由通话流程维护,无需手动填写。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表。发起新邀请时通常不填写。 | | offlinePushInfo | OfflinePush | 否 | 被邀请用户离线时使用的推送内容。 | | offlinePushInfo.title | string | 条件必填 | 提供 offlinePushInfo 时填写推送标题。 | | offlinePushInfo.desc | string | 条件必填 | 提供 offlinePushInfo 时填写推送正文。 | | offlinePushInfo.ex | string | 条件必填 | 提供 offlinePushInfo 时填写扩展字符串;没有内容时传空字符串。 | | offlinePushInfo.iOSPushSound | string | 条件必填 | 提供 offlinePushInfo 时填写 iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 条件必填 | 提供 offlinePushInfo 时说明是否更新 iOS 角标。 | 调用完成后返回 RtcInviteResults ,其中包含 roomID 、 token 、 liveURL 和可选的 busyLineUserIDList 。字段说明见 发起单聊通话 /sdk/react native/calling/managing calls/start single call 。 被邀请成员会通过 OnReceiveNewInvitation 收到 OnReceiveNewInvitationPayload 。成员的接受、拒绝和离开状态见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + "path": "/platform-api/meeting/meeting-signaling/get-signal-rooms", + "title": "Get call rooms", + "description": "Get multiple real-time call rooms by room ID.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-rooms", + "content": "Get multiple real time call rooms and their current invitation and participant state. HTTP request POST API ADDRESS /rtc meeting/signal get rooms Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time call room IDs. | Response data.roomList contains room records with invitation metadata, participant metadata, and room IDs. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every room ID." }, { - "path": "/sdk/react-native/calling/managing-calls/accept-call", - "title": "接受通话", - "description": "使用 OpenIM React Native SDK 接受通话邀请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls accept-call", - "content": "收到 OnReceiveNewInvitation 事件后,调用 signalingAccept 接受通话邀请。 const roomCredentials = await OpenIMSDK.signalingAccept opUserID: currentUserID, invitation, ; opUserID 是当前接受邀请的用户 ID。 invitation 应使用 OnReceiveNewInvitation 事件回调提供的完整 invitation 对象。 调用完成后返回 RtcInviteResults ,包含通话房间的 roomID 、 token 和 liveURL 。其他参与者会通过 OnInviteeAccepted 事件收到接受结果,事件回调中的 invitation.roomID 用于识别本次通话。事件监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + "path": "/platform-api/meeting/meeting-signaling/get-signal-invitation", + "title": "Get a call invitation", + "description": "Get real-time call invitation and offline-push information for a room.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-invitation", + "content": "Get the real time call invitation and associated offline push information for a room. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | Response data.invitationInfo contains InvitationInfo /platform api/meeting/overview invitationinfo . data.offlinePushInfo contains the invitation's offline push configuration. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/calling/managing-calls/reject-call", - "title": "拒绝通话", - "description": "使用 OpenIM React Native SDK 拒绝通话邀请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls reject-call", - "content": "收到通话邀请后,如不接受,调用 signalingReject 拒绝邀请。 await OpenIMSDK.signalingReject opUserID: currentUserID, invitation, ; opUserID 是当前拒绝邀请的用户 ID。 invitation 使用 OnReceiveNewInvitation 事件回调提供的完整 invitation 对象。 调用完成后,拒绝请求已完成。发起方会通过 OnInviteeRejected 事件收到拒绝结果,事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + "path": "/platform-api/meeting/meeting-signaling/get-startup-invitation", + "title": "Get a startup call invitation", + "description": "Get a call invitation that a user must restore when the application starts.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-startup-invitation", + "content": "Get a still relevant real time call invitation that should be restored when a user's application starts. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info start app Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose invitation state is restored. | Response Returns data.invitation and data.offlinePushInfo when a recoverable invitation exists. Permissions and limits Available only in OpenIM Enterprise. Revalidate timeout and room state before presenting the restored invitation." }, { - "path": "/sdk/react-native/calling/managing-calls/cancel-call", - "title": "取消通话邀请", - "description": "使用 OpenIM React Native SDK 取消通话邀请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls cancel-call", - "content": "发起方在通话尚未接通时,调用 signalingCancel 取消邀请。 await OpenIMSDK.signalingCancel opUserID: currentUserID, invitation, ; opUserID 是当前发起取消操作的用户 ID。 invitation 使用发起通话时保存的完整 RtcInvite 对象。 调用完成后,取消邀请请求已完成。被邀请用户会通过 OnInvitationCancelled 事件收到取消结果,事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + "path": "/platform-api/meeting/meeting-chat/send-meeting-chat", + "title": "Send a meeting chat message", + "description": "Send a broadcast or targeted message within a meeting room.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-chat send-meeting-chat", + "content": "Send a meeting room chat message to all participants or selected users. Meeting chat uses its own message model and is separate from the standard OpenIM message APIs. HTTP request POST API ADDRESS /rtc meeting/send meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | Sender user ID. | | type | Yes | int | Meeting chat business content type. | | payload | Yes | string | Message payload. | | dstUserIDs | Yes | string | Target users; an empty array broadcasts to the room. | | nickname | Yes | string | Sender display name. | | faceURL | Yes | string | Sender avatar URL. | Response data.message contains the created MeetingChatMessage /platform api/meeting/overview meetingchatmessage , including its Seq. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/calling/managing-calls/hang-up-call", - "title": "挂断通话", - "description": "使用 OpenIM React Native SDK 挂断通话。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls hang-up-call", - "content": "通话建立后,调用 signalingHungUp 挂断通话。 await OpenIMSDK.signalingHungUp opUserID: currentUserID, invitation, ; opUserID 是当前挂断通话的用户 ID。 invitation 使用本次通话的完整 RtcInvite 对象,其中的 roomID 应与当前通话房间一致。 调用完成后,挂断请求已完成。其他参与者会通过 OnHangUp 事件收到通话结束信息;事件回调中的 invitation.roomID 用于识别本次通话。事件参数和监听方式见 处理通话事件 /sdk/react native/calling/managing calls/handle call events 。" + "path": "/platform-api/meeting/meeting-chat/pull-meeting-chat", + "title": "Pull meeting chat messages", + "description": "Incrementally pull meeting chat messages by creation time and Seq.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-chat pull-meeting-chat", + "content": "Incrementally pull meeting chat messages using the meeting creation time and the last received Seq. HTTP request POST API ADDRESS /rtc meeting/pull meeting chat Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | createTime | Yes | int | Meeting/chat creation time in Unix milliseconds. | | currentSeq | Yes | int | Last meeting chat Seq already received. | | srcUserID | Yes | string | User performing the pull. | Response data.createTime is the returned stream's creation marker. data.messages contains ordered MeetingChatMessage /platform api/meeting/overview meetingchatmessage records. Permissions and limits Available only in OpenIM Enterprise. Persist the highest processed Seq and keep creation time paired with the same meeting." }, { - "path": "/sdk/react-native/calling/managing-calls/handle-call-events", - "title": "处理通话事件", - "description": "使用 OpenIM React Native SDK 监听通话事件。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls handle-call-events", - "content": "通话相关事件用于接收邀请状态、参与者状态和媒体流状态。邀请类事件从回调参数的 invitation 读取房间信息;媒体流变化直接提供 roomID 。发送和接收自定义信令见 发送自定义信令 /sdk/react native/calling/sending custom signals/send a custom signal 。 事件参数 | 事件 | 回调参数类型 | 常用字段 | | | | | | OnReceiveNewInvitation | OnReceiveNewInvitationPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInviteeAccepted | OnInviteeAcceptedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInviteeRejected | OnInviteeRejectedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInvitationCancelled | OnInvitationCancelledPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInvitationTimeout | OnReceiveNewInvitationPayload | invitation 、 userID 、 participant 、 offlinePushInfo 。 | | OnInviteeAcceptedByOtherDevice | OnInviteeAcceptedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnInviteeRejectedByOtherDevice | OnInviteeRejectedPayload | invitation 、 userID 、 participant 、 opUserPlatformID 。 | | OnHangUp | OnHangUpPayload | invitation 、 userID 、 offlinePushInfo 。 | | OnRoomParticipantConnected | OnRoomParticipantConnectedPayload | invitation 、 groupID 、 participant 。 | | OnRoomParticipantDisconnected | OnRoomParticipantDisconnectedPayload | invitation 、 groupID 、 participant 。 | | OnStreamChange | OnStreamChangePayload | roomID 、 streamType 、 mute 。 | 使用 invitation.roomID 或 roomID 区分通话;参与者信息中使用 participant.userInfo.userID 区分用户。 function handleReceiveNewInvitation payload: OnReceiveNewInvitationPayload // ... function handleInviteeAccepted payload: OnInviteeAcceptedPayload // ... function handleInviteeRejected payload: OnInviteeRejectedPayload // ... function handleInvitationCancelled payload: OnInvitationCancelledPayload // ... function handleInvitationTimeout payload: OnReceiveNewInvitationPayload // ... function handleInviteeAcceptedByOtherDevice payload: OnInviteeAcceptedPayload // ... function handleInviteeRejectedByOtherDevice payload: OnInviteeRejectedPayload // ... function handleHangUp payload: OnHangUpPayload // ... function handleRoomParticipantConnected payload: OnRoomParticipantConnectedPayload // ... function handleRoomParticipantDisconnected payload: OnRoomParticipantDisconnectedPayload // ... function handleStreamChange payload: OnStreamChangePayload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.on OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.on OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.on OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.on OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.on OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice ; OpenIMSDK.on OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice ; OpenIMSDK.on OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected ; OpenIMSDK.on OpenIMEvent.OnStreamChange, handleStreamChange ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.off OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.off OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.off OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.off OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.off OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice ; OpenIMSDK.off OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice ; OpenIMSDK.off OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected ; OpenIMSDK.off OpenIMEvent.OnStreamChange, handleStreamChange ; 组件销毁、退出登录或切换账号时,应取消监听。" + "path": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", + "title": "Revoke a meeting chat message", + "description": "Revoke a meeting chat message by room and Seq.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-chat revoke-meeting-chat", + "content": "Revoke a meeting chat message by room ID and Seq. HTTP request POST API ADDRESS /rtc meeting/revoke meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | User performing the revocation. | | seq | Yes | int | Meeting chat message Seq. | | ex | Yes | string | Business extension data. | | sourceMessageSendTime | Yes | int | Original message send time. | | sourceMessageSendID | Yes | string | Original sender ID. | | sourceMessageSenderNickname | Yes | string | Original sender display name. | Response data.message contains the resulting MeetingChatMessage /platform api/meeting/overview meetingchatmessage . Permissions and limits Available only in OpenIM Enterprise. Enforce sender, host, or moderator revocation policy in the business backend." }, { - "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", - "title": "恢复待处理的通话邀请", - "description": "恢复待处理的通话邀请。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information restore-pending-invitation", - "content": "应用启动或恢复到前台时,调用 getSignalingInvitationInfoStartApp 获取仍待处理的通话邀请。 const invitation, offlinePushInfo = await OpenIMSDK.getSignalingInvitationInfoStartApp ; 返回结果 | 字段 | 类型 | 说明 | | | | | | invitation | RtcInvite 或 null | 待处理的通话邀请;没有待处理邀请时为 null 。 | | offlinePushInfo | OfflinePush | 邀请携带的离线推送内容。 | 当 invitation 不为 null 时,可使用其中的邀请信息恢复来电展示。后续取消、超时、接受和挂断等状态通过 处理通话事件 /sdk/react native/calling/managing calls/handle call events 接收。" + "path": "/sdk/error-codes", + "title": "客户端 SDK 错误码", + "description": "识别 OpenIMClientSDK 通用错误码、区分错误来源,并按网络、登录、消息和群组场景处理。", + "context": "SDKs · Common reference · v4", + "keywords": "sdk v4 sdk error-codes", + "content": "适用范围 本页汇总 OpenIMClientSDK 的通用客户端错误码。iOS、Android、Flutter、WASM、Electron 等客户端虽然通过不同语言的失败回调、异常或 Promise 暴露错误,但由 OpenIM SDK Core 返回的错误码语义保持一致。平台封装层、操作系统或运行时仍可能补充本页未列出的错误,处理时应同时保留错误信息和客户端 SDK 版本。 客户端调用还可能直接返回 OpenIMServer 的业务错误。此时不要只按客户端错误码表判断,应结合错误码来源处理。 判断错误来源 | 错误码 | 来源 | 处理方式 | | | | | | 0 | 通用成功码 | 表示业务处理成功,继续读取当前 API 的返回数据。 | | 1~9999 | OpenIMServer | 按 服务端 Platform API 错误码 /platform api/error codes 排查参数、权限、Token、群组或消息状态。 | | 本页列出的 10000~10401 | OpenIMClientSDK | 按客户端网络、生命周期、本地数据和操作条件排查。错误码并不连续,不要根据范围推断未定义值。 | | 20001~29999 | 业务服务端或 Webhook | 由接入方业务系统定义,应在业务后端维护含义和用户提示。 | 通用与登录状态 | 错误码 | 含义 | 处理建议 | | | | | | 10000 | 网络请求失败 | 检查设备网络、API 地址、WebSocket 地址、TLS 证书和代理配置。网络恢复后再重试。 | | 10001 | 网络请求超时 | 检查网络质量和服务状态。对于会改变状态的操作,先查询实际结果,再决定是否重试。 | | 10002 | 参数无效 | 对照当前 API 页面检查必填字段、数据类型、枚举值和互斥参数。 | | 10003 | 调用上下文已超时或取消 | 检查调用方超时设置、页面或任务生命周期,以及登录状态是否在调用期间发生变化。 | | 10004 | 资源初始化尚未完成 | 该错误可能出现在仍使用此定义的客户端版本中。等待 SDK 初始化和登录完成后再调用依赖本地资源的 API。 | | 10005 | 未识别的错误 | 保留错误信息、SDK 版本和触发 API;确认可复现步骤后再升级或提交诊断信息。 | | 10006 | SDK 内部错误 | 收集客户端日志和最小复现步骤,检查 SDK 版本兼容性;不要把内部错误信息直接展示给最终用户。 | | 10007 | 没有可应用的更新 | 当前同步或更新操作没有产生新数据。通常可继续使用现有状态,并按具体 API 的结果决定是否刷新。 | | 10008 | SDK 尚未初始化 | 先完成当前平台的 SDK 初始化流程,并等待初始化成功后再调用其他 API。 | | 10009 | SDK 尚未完成登录 | 等待登录成功事件或回调后再调用登录态 API,避免并发或重复发起登录。 | | 10100 | 用户 ID 不存在或尚未注册 | 确认用户已由可信业务后端注册到 OpenIMServer,并检查客户端使用的 userID 。 | | 10101 | 用户已经退出登录 | 停止调用登录态 API,清理当前会话状态;需要继续使用时重新获取 Token 并登录。 | | 10102 | 重复登录 | 不要在前一次登录尚未结束时再次登录。复用当前 SDK 实例,或先完成退出再切换账号。 | 消息相关错误 | 错误码 | 含义 | 处理建议 | | | | | | 10200 | 文件不存在 | 检查本地文件路径、临时文件有效期和读取权限,再重新创建或上传文件消息。 | | 10201 | 消息解压失败 | 检查客户端与服务端版本兼容性并重新同步消息;持续出现时保留日志排查消息数据。 | | 10202 | WebSocket 二进制消息解码失败 | 检查客户端与服务端协议版本是否匹配,并排查代理是否修改了 WebSocket 数据。 | | 10203 | 不支持的消息或二进制协议类型 | 使用当前 SDK 支持的消息类型,并确认客户端与服务端版本兼容。 | | 10204 | 当前消息不允许重复发送 | 只有发送失败的原消息可以重发;发送成功的消息如需再次发送,应重新创建消息对象。 | | 10205 | 不支持的消息内容类型 | 改用已支持的消息类型,或在客户端和服务端都完成对应自定义消息的兼容处理。 | | 10206 | 消息没有服务端序列号 | 该消息尚未具备依赖 seq 的操作条件。等待发送或同步完成,并以最新消息对象重试。 | | 10207 | 消息已经删除 | 从界面和本地业务状态移除该消息,不要继续对旧消息对象执行修改、撤回或查询操作。 | 会话与群组错误 | 错误码 | 含义 | 处理建议 | | | | | | 10301 | 当前会话或群类型不支持该操作 | 检查 API 的适用会话和群类型,不要对不支持的群组执行该操作。 | | 10302 | 当前操作只支持指定群类型 | 确认目标群的 groupType ,并改用与该群类型匹配的 API。 | | 10303 | 当前未读数已经为 0 | 以最新会话状态刷新界面,不要继续递减或重复清理未读数。 | | 10400 | 群组 ID 不存在 | 检查 groupID ,重新查询群资料,并确认群组尚未解散。 | | 10401 | 群组类型无效 | 使用当前 SDK 和 OpenIMServer 支持的群类型,并检查创建或查询结果中的 groupType 。 | 版本兼容 错误码定义会随客户端 SDK 版本演进。 10004 存在于部分已发布版本中;当前 OpenIM SDK Core 已将初始化与登录准备状态进一步区分为 10008 和 10009 。维护兼容旧版本的应用时可以继续识别 10004 ,新逻辑应优先分别处理未初始化和未登录状态。 不要把未出现在本页的整数自动归类为某个客户端错误。遇到未知错误时,应先确认错误来自客户端、OpenIMServer 还是业务 Webhook,再结合当前 SDK 版本的错误信息和发布说明处理。 处理建议 1. 先记录错误码、错误信息、调用的 API、客户端 SDK 版本和必要的业务目标标识;Token、完整消息内容等敏感信息必须脱敏。 2. 参数、登录状态和不支持的操作应先修正调用条件,不要自动重试。 3. 网络失败和超时可以采用退避重试;发送消息或其他状态变更操作重试前,应先查询或同步实际状态,避免重复执行。 4. 将技术错误映射为稳定的产品提示,不要直接把内部错误信息展示给最终用户。 5. 10005 、 10006 或解码类错误持续出现时,保留完整日志并使用对应平台的 WASM 日志 /sdk/wasm/logger 、 iOS 日志 /sdk/ios/logger 、 Flutter 日志 /sdk/flutter/logger 或 Electron 日志上传 /sdk/electron/logger/upload logs 说明进行诊断。 本页根据 旧版客户端错误码说明 https://github.com/openimsdk/docs/blob/a177b296f1abe53ba2cf7d897acf86467a45e7c6/docs/sdks/errcode.md 迁移,并与 OpenIM SDK Core 当前错误码定义 https://github.com/openimsdk/openim sdk core/blob/9267a252faab02bbc8ffab6223e6ae2341a0f7c9/pkg/sdkerrs/code.go 及 兼容版本定义 https://github.com/openimsdk/openim sdk core/blob/514c760dfae502c651e88646c9a7754b2767534d/pkg/sdkerrs/code.go 核对。" }, { - "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", - "title": "查询群组通话房间", - "description": "按群组 ID 查询通话房间。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-room-by-group-id", - "content": "调用 signalingGetRoomByGroupID 按群组 ID 获取群聊通话房间信息; groupID 是目标群组 ID。 const room = await OpenIMSDK.signalingGetRoomByGroupID groupID ; 返回结果 调用完成后返回 CallingRoomData : | 字段 | 类型 | 说明 | | | | | | roomID | string | 通话房间 ID。 | | invitation | RtcInvite (可选) | 房间对应的通话邀请信息。 | | participant | ParticipantInfo (可选) | 当前房间的参与者资料。 | participant 中的 userInfo 是用户资料;群聊场景还可能包含 groupMemberInfo 和 groupInfo 。调用后可使用 roomID 查询房间凭据或处理对应的通话状态。" + "path": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", + "title": "搜索会话", + "description": "使用 WASM SDK 按会话名称搜索本地会话。", + "context": "SDKs · WASM · v4", + "keywords": "sdk wasm v4 sdk wasm conversation retrieving-conversations search-conversations", + "content": "searchConversation 在 SDK 本地会话数据中按 showName 模糊匹配,适合实现会话列表内搜索。搜索词不能为空;该方法不会向服务端查询尚未同步到本地的会话。 const data: conversations = await openimsdk.searchConversation searchKeyword.trim ; renderConversationResults conversations ; Promise 成功返回匹配的 ConversationItem ,按 latestMsgSendTime 从新到旧排列。结果只反映调用时保存在本地的会话数据,查询本身不会触发事件。搜索结果需要实时更新时,监听 获取会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 中说明的会话事件,并使用 conversationID 更新对应结果。" }, { - "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", - "title": "获取通话房间 Token", - "description": "按房间 ID 获取通话凭据。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-token-by-room-id", - "content": "已知通话房间 ID、需要获取房间凭据时,调用 signalingGetTokenByRoomID ; roomID 是目标通话房间 ID。 const roomCredentials = await OpenIMSDK.signalingGetTokenByRoomID roomID ; 返回结果 调用完成后返回 RtcInviteResults ,包含 roomID 、 token 、 liveURL 和可选的 busyLineUserIDList 。将返回的房间凭据交给实时音视频媒体引擎加入通话房间。" + "path": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", + "title": "将全部会话标为已读", + "description": "使用 WASM SDK 清零当前所有未读会话的未读数。", + "context": "SDKs · WASM · v4", + "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations mark-all-conversations-read", + "content": "当用户明确执行“全部已读”时,调用 markAllConversationMessageAsRead 处理当前本地记录中的所有未读会话: await openimsdk.markAllConversationMessageAsRead ; Promise 成功表示 SDK 已完成本次找到的全部未读会话处理。它不等同于相关会话事件已经到达,也不保证其他客户端的界面已同步完成。 界面仍应在收到 OnConversationChanged 后,使用 conversationID 更新对应会话,并通过 OnTotalUnreadMessageCountChanged 更新总未读数;完整监听分别见 获取会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 和 获取会话总未读数 /sdk/wasm/conversation/managing conversations/get total unread count 。必要时重新查询会话列表和总未读数,并以最新结果为准。" }, { - "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", - "title": "发送自定义信令", - "description": "在通话房间中发送自定义信令。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling sending-custom-signals send-a-custom-signal", - "content": "调用 signalingSendCustomSignal 向通话房间发送业务自定义信令,例如举手或切换布局。 customInfo 是字符串;需要传递结构化数据时,可传入 JSON 字符串。 await OpenIMSDK.signalingSendCustomSignal roomID, customInfo: JSON.stringify type: 'hand raised', , ; 参数说明 | 参数 | 类型 | 说明 | | | | | | roomID | string | 目标通话房间 ID。 | | customInfo | string | 业务自定义信令内容。 | 调用完成后,自定义信令发送请求已完成。 接收自定义信令 其他参与者发送自定义信令时触发 OnReceiveCustomSignal 事件,回调参数类型为 OnReceiveCustomSignalPayload ,包含 roomID 和 customInfo 。 function handleCustomSignal payload: OnReceiveCustomSignalPayload // ... // 设置监听 OpenIMSDK.on OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; // 取消监听 OpenIMSDK.off OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; 组件销毁、退出登录或切换账号时,应取消监听。接收 customInfo 后,按业务协议解析并处理其中的数据。" + "path": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", + "title": "隐藏全部会话", + "description": "使用 WASM SDK 从当前设备的会话列表隐藏全部会话。", + "context": "SDKs · WASM · v4", + "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations hide-all-conversations", + "content": "hideAllConversations 会重置当前设备上全部会话的列表状态、未读数、最新消息摘要和草稿,使这些会话不再出现在分页会话列表中: await openimsdk.hideAllConversations ; Promise 成功只表示本地会话状态已经完成重置。该操作不会删除本地消息记录或服务端消息,也不会删除群组、好友关系或其他客户端上的会话。后续收到新消息或重新建立有效会话状态时,相应会话仍可再次出现在列表中。 批量隐藏后应重新查询 会话列表 /sdk/wasm/conversation/retrieving conversations/retrieve conversation list 和 会话总未读数 /sdk/wasm/conversation/managing conversations/get total unread count ,并用最新结果更新界面。不要把 Promise 成功当成远端状态事件。" } ] diff --git a/src/generated/search-index.json b/src/generated/search-index.json index e88b9488dd..8b5fec31a6 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -5653,2262 +5653,2310 @@ "description": "OpenIM React Native SDK entry point for mobile applications.", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native overview", - "content": "Overview Use the React Native SDK when your chat experience is built with React Native and needs mobile runtime behavior for connectivity, local cache, media selection, file upload, and push notification handoff. Integration model The SDK should be initialized after your application has a backend issued token for the current userID . Register connection and message events before login, then keep conversation state in your application store so native lifecycle changes can restore the UI predictably. Mobile considerations Validate login, reconnect, and message receipt after app foreground and background transitions. Test file messages with the media picker and upload permissions required by each platform. Route push notification registration through your trusted backend and platform notification services. When diagnosing mobile only failures, record the time, user ID, action, errCode , and errMsg , but never record tokens or message content. Related SDKs iOS SDK /sdk/ios/overview Android SDK /sdk/android/overview Flutter SDK /sdk/flutter/overview" + "content": "" }, { - "path": "/sdk/electron/getting-started/authenticate-and-init", - "title": "Authenticate and initialize", - "description": "Use the Electron FFI initSDK, login, and unInitSDK methods to establish a session, and understand how their parameters differ from WASM login.", - "context": "SDKs · Electron · v4", - "keywords": "sdk electron v4 sdk electron getting-started authenticate-and-init", - "content": "The Electron FFI SDK separates SDK initialization from user authentication. First call initSDK to configure the OpenIMServer addresses and local runtime directory, then call login with the userID and token. This differs from WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session , where a single InitAndLoginConfig is passed to login . This page covers only the Electron FFI lifecycle APIs. Use the WASM authentication page as a reference for the handling boundaries around connection success, token expiration, and forced sign out. When registering Electron FFI listeners, use the event enum exported by the current Electron SDK rather than copying the WASM SdkEvent type directly. Differences from WASM | Step | Electron FFI | WASM | | | | | | Configure server addresses and runtime | initSDK InitConfig | Included in login InitAndLoginConfig | | Submit user credentials | login userID, token | Included in the same login call | | Release the native SDK | unInitSDK | No equivalent public unload API; use logout to end the session | If the Electron renderer uses the WASM package, follow the WASM authentication page directly and do not call the initSDK described here. Initialize the SDK At initialization, InitConfig supplies server addresses, platform information, a local data directory, and logging options. Parameters | Field | Type | Required | Description | | | | | | | apiAddr | string | Yes | OpenIMServer HTTP API address. | | wsAddr | string | Yes | OpenIMServer WebSocket address. | | platformID | number | Yes | Current client platform value. It must conform to the OpenIMServer multi device login policy. | | dataDir | string | Yes | Writable absolute path for the native SDK's local data. | | systemType | string | Yes | System type identifier required by the Electron FFI SDK. | | logLevel | LogLevel | No | Logging level. | | logFilePath | string | No | Log file path. | | isLogStandardOutput | boolean | No | Whether to write logs to standard output. | await openimsdk.initSDK apiAddr, wsAddr, platformID, dataDir: '/absolute/path/to/openim data', systemType: 'electron', logLevel: LogLevel.Warn, isLogStandardOutput: false, ; When the initSDK Promise succeeds, the native SDK has initialized and can proceed to login. It has not established a user session, and a connection event has not necessarily arrived. Log in the current user Call login after initialization succeeds. FFI login accepts only the user's credentials. Parameters | Field | Type | Required | Description | | | | | | | userID | string | Yes | Current OpenIMSDK user ID. It must match the token. | | token | string | Yes | OpenIMSDK token issued by a trusted backend. | await openimsdk.login userID, token, ; When the login Promise succeeds, the login request has completed. Use connection events such as OnConnectSuccess to decide when business APIs that require a connection are available. See the WASM authentication page /sdk/wasm/getting started/authenticate and manage session for event registration. Log out and uninitialize When the user signs out or switches accounts, first call the shared logout method to end the session. Call unInitSDK afterward when the native resources must be released. await openimsdk.logout ; await openimsdk.unInitSDK ; unInitSDK takes no business parameters. When switching accounts, finish signing out the old account and clear its state before calling initSDK and login again when necessary. Do not initialize two native instances concurrently. Next steps Electron SDK overview /sdk/electron/overview WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session Create media messages from full paths /sdk/electron/message/create media from full path" + "path": "/sdk/react-native/getting-started/before-you-start", + "title": "Before you start", + "description": "Prepare OpenIMServer, user credentials, and a React Native project before initializing and signing in.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started before-you-start", + "content": "Before integrating the OpenIM SDK into a React Native application, prepare an accessible OpenIMServer, a trusted user authentication flow, and a React Native project that can compile the native module. Prepare OpenIMServer If you do not have an OpenIMServer instance, follow the Docker deployment guide /docs/guides/quick deployment/docker to deploy one. Confirm that the target device can reach these addresses: | Field | Description | | | | | apiAddr | OpenIMServer HTTP API address for login, synchronization, and resource requests. | | wsAddr | OpenIMServer WebSocket address for the long lived connection and realtime events. | Do not verify connectivity only from the development computer. Android emulators, iOS simulators, and physical devices can use different network paths. In production, also check DNS, TLS certificates, firewalls, reverse proxies, and WebSocket upgrades. Prepare users and tokens userID identifies an OpenIM user, and token authenticates that user. A trusted backend should create or bind users, issue tokens, and validate application permissions. A React Native application must not store administrator tokens, secrets, or other server credentials. Before integrating the OpenIMServer REST API in your backend, read Prepare to use the Platform API /platform api/prepare to use api and Issue a session token /platform api/user/managing session tokens/issue a session token . After authenticating its own accounts, your backend should return only the following SDK login data to the client: | Data | Description | | | | | userID | OpenIM user ID for the account being signed in. | | token | Login token issued for that user. | | apiAddr | OpenIMServer HTTP API address. | | wsAddr | OpenIMServer WebSocket address. | The userID must match the user encoded by the token. Prepare the React Native project Before integration, confirm that: The project has completed native configuration for either React Native CLI or an Expo custom development client. The Android and iOS projects can each build and run. Android and iOS network configuration is available, and the target device can reach apiAddr and wsAddr . The React Native SDK runs through native modules and is not available in Expo Go. An Expo project must use expo prebuild to generate or update the Android and iOS projects that include the SDK native module, then build a custom development client. See React Native environment integration /sdk/react native/getting started/environment specific implementation for the installation steps. Continue integration After completing these preparations, first follow React Native environment integration /sdk/react native/getting started/environment specific implementation to install dependencies and configure the native projects. Then follow Authenticate and manage a session /sdk/react native/getting started/authenticate and manage session to initialize the SDK and sign in, and finally try Send your first message /sdk/react native/getting started/send first message ." }, { - "path": "/sdk/electron/message/create-media-from-full-path", - "title": "Create media messages from full paths", - "description": "Use the Electron FFI *FromFullPath APIs to create image, video, audio, and file messages from absolute local paths.", - "context": "SDKs · Electron · v4", - "keywords": "sdk electron v4 sdk electron message create-media-from-full-path", - "content": "Electron FFI provides a set of APIs for creating media messages from complete local file paths . They are intended for desktop applications that already have an absolute disk path, such as one returned by a system file picker. Browser applications and Electron applications using WASM should use the corresponding ByFile or ByURL methods. For images, see Create an image message from a file /sdk/wasm/message/creating messages/create image message by file and Create an image message from a URL /sdk/wasm/message/creating messages/create image message by url . For independent file uploads, see Upload a file /sdk/wasm/file uploads/upload file . After creating a MessageItem , send it with sendMessage just like any message that uses the shared message model. See Send a message /sdk/wasm/message/sending messages/send message for sending parameters and events. Supported methods | Method | Purpose | | | | | createImageMessageFromFullPath imagePath | Create an image message from an absolute local image path. | | createSoundMessageFromFullPath params | Create an audio message from an absolute local audio path. | | createVideoMessageFromFullPath params | Create a video message from absolute video and snapshot paths. | | createFileMessageFromFullPath params | Create a regular file message from an absolute local path. | These methods create message objects only. They do not send a message automatically or trigger a new message event. Image messages createImageMessageFromFullPath accepts the image's absolute file path directly. const data: message = await openimsdk.createImageMessageFromFullPath '/absolute/path/to/photo.jpg', ; await openimsdk.sendMessage recvID, groupID: '', message, ; Audio messages Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Absolute path to the audio file. | | duration | number | Yes | Audio duration. Pass an integer rather than a decimal value. | const data: message = await openimsdk.createSoundMessageFromFullPath soundPath: '/absolute/path/to/voice.m4a', duration: 3200, ; Video messages Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Absolute path to the video file. | | videoType | string | Yes | Video type, such as mp4 . | | duration | number | Yes | Video duration. Pass an integer rather than a decimal value. | | snapshotPath | string | Yes | Absolute path to the video cover snapshot. | const data: message = await openimsdk.createVideoMessageFromFullPath videoPath: '/absolute/path/to/clip.mp4', videoType: 'mp4', duration: 12000, snapshotPath: '/absolute/path/to/cover.jpg', ; File messages Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Absolute path to the file. | | fileName | string | Yes | File name displayed to conversation members. | const data: message = await openimsdk.createFileMessageFromFullPath filePath: '/absolute/path/to/report.pdf', fileName: 'report.pdf', ; Results When any of the four FromFullPath Promises succeeds, its data is a MessageItem ready to send. A subsequent successful sendMessage Promise means only that the send request completed. The recipient confirms delivery through its new message event. Related pages Electron SDK overview /sdk/electron/overview Send a message /sdk/wasm/message/sending messages/send message Upload a file /sdk/wasm/file uploads/upload file" + "path": "/sdk/react-native/getting-started/environment-specific-implementation", + "title": "Environment-specific implementation", + "description": "Install the OpenIM React Native SDK in a React Native CLI project or an Expo custom development client.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started environment-specific-implementation", + "content": "This page covers the dependency and native project configuration required by a React Native application. Add the dependency Install in a React Native CLI project Install the OpenIM React Native SDK from the project root: npm install @openim/rn client sdk cd ios && pod install && cd .. You can use equivalent commands with your project's package manager. After installation, build both the Android and iOS projects to confirm that the native module is linked correctly. Install in an Expo project The OpenIM React Native SDK contains Android and iOS native modules, which are not included in Expo Go. Install the SDK, use expo prebuild clean to generate or update the native projects from the Expo configuration, and then build a custom development client: npm install @openim/rn client sdk npx expo prebuild clean npx expo run:android npx expo run:ios After changing the Expo configuration or adding a dependency that requires native support, run expo prebuild clean again and rebuild the development client. You can install expo dev client for an Expo oriented development client experience, but the runtime still uses a custom development client rather than Expo Go. Verify the native environment After installing the dependency and configuring the native projects, build the Android and iOS applications and confirm that the SDK native module compiles and loads. Next step Authenticate and manage a session /sdk/react native/getting started/authenticate and manage session" }, { - "path": "/sdk/electron/logger/upload-logs", - "title": "Upload logs", - "description": "Use the Electron FFI uploadLogs method to upload client diagnostic logs.", - "context": "SDKs · Electron · v4", - "keywords": "sdk electron v4 sdk electron logger upload-logs", - "content": "Electron FFI provides uploadLogs to upload diagnostic logs already written by the native SDK to the log collection service configured for the current OpenIMServer. See WASM logging /sdk/wasm/logger for browser side log configuration. The WASM package does not provide an equivalent uploadLogs method. Upload logs only when troubleshooting, when a user explicitly submits diagnostics, or when operations staff request them. Before uploading, confirm that logs do not contain tokens, message content, or other sensitive fields. If business context is required, use ex for a non sensitive diagnostic label; never put credentials in it. Upload logs Parameters | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines or line range configuration to read for the upload, as required by Electron FFI. | | cancelID | string | No | Cancellation identifier. When omitted, the SDK uses its default value. | | ex | string | No | Additional description attached to the upload. Omit it or pass an empty string when not needed. | await openimsdk.uploadLogs line: 2000, ex: 'desktop diag session', ; Result When the uploadLogs Promise succeeds, the current upload request has completed. It does not change conversations, messages, or user profiles, and it does not trigger business domain events. If the upload fails, record errCode , errMsg , and the current user ID to correlate the failure with OpenIMServer logs. Do not repeat the complete log content in the failure log. Related pages Electron SDK overview /sdk/electron/overview WASM logging /sdk/wasm/logger Authenticate and initialize /sdk/electron/getting started/authenticate and init" + "path": "/sdk/react-native/getting-started/authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "description": "Initialize the OpenIM React Native SDK, sign in, check login status, and log out the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", + "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level: Debug , Info , Warn , Error , Fatal , or Panic . | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" }, { - "path": "/platform-api/webhooks/overview", - "title": "Overview", - "description": "OpenIM Webhooks overview, including delivery behavior, configuration, protocol, and callback coverage.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks overview", - "content": "Webhooks let OpenIM notify a business backend over HTTP or HTTPS before or after an operation. Before event callbacks can validate, reject, or adjust an operation. After event callbacks synchronize completed user, relationship, group, message, presence, and conversation changes. Delivery model | Type | Invocation | Typical use | Effect on OpenIM | | | | | | | Before event | Synchronous | Moderation, authorization, field changes, risk controls | OpenIM waits for the response and uses failedContinue , actionCode , and nextCode to continue or stop. | | After event | Asynchronous | Synchronization, auditing, analytics, notifications | The operation has completed; the response cannot change its result. | Before event handlers are on the OpenIM request path and must remain low latency and highly available. After event delivery can still be affected by network, process, or queue failures, so it must not be the only persistence mechanism for financial or similarly critical events. Configure Webhooks Configure a common URL and enable callbacks in config/webhooks.yml : url: https://api.example.com/openim/webhooks beforeSendSingleMsg: enable: true timeout: 5 failedContinue: false deniedTypes: afterUserRegister: enable: true timeout: 5 | Setting | Description | | | | | url | Base receiver URL. OpenIM appends the callbackCommand . | | enable | Enables the callback. | | timeout | Receiver timeout in seconds. | | failedContinue | Whether a before event operation continues after receiver failure or timeout. | | attentionIds | User or group IDs observed by an after event callback. | | allowedTypes | Message content types allowed to trigger the callback. | | deniedTypes | Message content types excluded from the callback. | | insecureSkipVerify Enterprise | Skips HTTPS certificate verification. Use only in controlled tests. | | signature.algorithm Enterprise | HMAC SHA1 , HMAC SHA256 , HMAC SHA512 , RSA SHA256 , or ECDSA SHA256 . | | signature.signatureHeader Enterprise | Header carrying the signature. | | signature.nonceHeader Enterprise | Header carrying the signed nonce. | | signature.secret Enterprise | HMAC secret or asymmetric private key. | The current Enterprise signature covers the nonce header, not the full body. Always use HTTPS and validate signature, nonce freshness, and replay state. Request and response protocol OpenIM sends JSON with POST to WEBHOOK ADDRESS / callbackCommand and supplies operationID as a request header. Dispatch by callbackCommand , not arrival order, and make handlers idempotent using the event's business key, message ID, or operationID . Before event responses use: \"actionCode\":0,\"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"nextCode\":0 CallbackAction | Value | Name | Description | | | | | | 0 | ActionAllow | Use nextCode to continue or stop. This is the value required by the current common response parser. | | 1 | ActionForbidden | Reserved. To reject, return actionCode: 0 , nextCode: 1 , and a business error. | CallbackNextCode | Value | Name | Description | | | | | | 0 | Continue | Continue the OpenIM operation. | | 1 | Stop | Stop the operation using errCode , errMsg , and errDlt . | Callback coverage Users: registration and profile updates. Relationships: friend requests, acceptance, deletion, remarks, blacklist changes, and imports. Groups: creation, joining, leaving, dismissal, ownership, and group/member profile updates. Messages: one to one and group sends, final message modification, read status, and revocation. Push and presence: online/offline push targeting and user online, offline, or forced logout state. Conversations: creation callbacks are available in OpenIM Enterprise. Integration guidance Host receivers on a stable backend, never on a client. Define strict before event timeouts and an explicit failedContinue policy. Acknowledge after event callbacks quickly, then enqueue expensive work. Restrict source addresses, rate, and body size at the gateway, and use HTTPS." + "path": "/sdk/react-native/getting-started/send-first-message", + "title": "Send your first message", + "description": "Send and receive the first one-to-one text message in a React Native application.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native getting-started send-first-message", + "content": "This page verifies the OpenIM React Native SDK with one one to one text message. Before starting, complete Authenticate and manage a session /sdk/react native/getting started/authenticate and manage session and prepare two user accounts: one sender and one receiver. Both accounts must be signed in. Create and send a text message The sender calls createTextMessage to create a MessageItem , then calls sendMessage to send it to the receiver. Replace user b in the example with the receiver's actual user ID. For a one to one message, fill in recvID and pass an empty string for groupID . const message = await OpenIMSDK.createTextMessage 'Hello, OpenIMSDK' ; await OpenIMSDK.sendMessage recvID: 'user b', groupID: '', message, ; Receive the message The receiver should set the onRecvNewMessage listener before the sender sends the message. After the sender sends it, the listener receives the corresponding MessageItem : function handleNewMessage message: MessageItem console.log \"onRecvNewMessage\", message // Set listener OpenIMSDK.on 'onRecvNewMessage', handleNewMessage ; For complete message event and status handling, see Receive messages /sdk/react native/message/receiving messages/receive messages ." }, { - "path": "/platform-api/webhooks/user/before-user-register", - "title": "Before user registration", - "description": "Validate or adjust user profiles before registration.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user before-user-register", - "content": "Validate, reject, or adjust user profiles before OpenIM registers them. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeUserRegisterCommand . | | users | UserInfo | Users about to be registered. See UserInfo /platform api/user/overview userinfo . | Response Return the common before event response. An optional users array replaces the profiles OpenIM will process. Use nextCode: 1 with a business error to reject registration. Processing rules Configuration key: beforeUserRegister . OpenIM waits synchronously; failure behavior follows failedContinue ." + "path": "/sdk/react-native/user/overview-user", + "title": "User overview", + "description": "Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-user", + "content": "The OpenIM React Native SDK identifies users by userID . User APIs read and update the signed in account's profile, retrieve public user profiles, and subscribe to user online status. Friends, friend requests, and the blocklist belong to relationships between users. See Relationships overview /sdk/react native/user/overview relationships . User types The React Native SDK returns different user objects for different scenarios: | Type | Use case | Main APIs | | | | | | SelfUserInfo | The signed in user's profile, avatar, nickname, and account level message reception setting | getSelfUserInfo , setSelfInfo | | PublicUserItem | Looking up users and displaying public profile cards | getUsersInfo | | UserOnlineState | A user's online status and online platform list | subscribeUsersStatus , getSubscribeUsersStatus , unsubscribeUsersStatus | SelfUserInfo represents the signed in user, while PublicUserItem represents public information available for lookup. Friend profiles, blocklist relationships, and group member profiles use objects from the relationships or group capabilities. Feature entry points | Need | Recommended page | | | | | Look up a public profile by userID for a profile card | Get user profiles /sdk/react native/user/profile/get users info | | Read or update the current user's nickname, avatar, and extension data | Get your profile /sdk/react native/user/profile/get self user info , Update your profile /sdk/react native/user/profile/set self info | | Set the account level message reception option | Set global message reception /sdk/react native/user/profile/set global message reception | | Set how requests to add the current account are handled | Set friend request permissions /sdk/react native/user/profile/set friend add permission | | Subscribe to, read, and cancel online status subscriptions | Subscribe to online status /sdk/react native/user/online status/subscribe users status , Get subscribed user status /sdk/react native/user/online status/get subscribe users status , Unsubscribe from online status /sdk/react native/user/online status/unsubscribe users status | | Manage friends, friend requests, or the blocklist | Relationships overview /sdk/react native/user/overview relationships | Event listeners User state changes emit events. See the following pages for listener examples: Current user profile changes: Update your profile /sdk/react native/user/profile/set self info . User online status changes: Subscribe to online status /sdk/react native/user/online status/subscribe users status . Friend, friend request, and blocklist changes: Relationships overview /sdk/react native/user/overview relationships ." }, { - "path": "/platform-api/webhooks/user/after-user-register", - "title": "After user registration", - "description": "Synchronize user profiles after registration completes.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user after-user-register", - "content": "Synchronize user profiles after OpenIM registration completes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserRegisterCommand . | | users | UserInfo | Registered users. See UserInfo /platform api/user/overview userinfo . | Response Return an HTTP success response promptly. The registration is already complete and cannot be changed by this response. Processing rules Configuration key: afterUserRegister . Process idempotently by user ID or operationID ." + "path": "/sdk/react-native/user/profile/get-users-info", + "title": "Get user profiles", + "description": "Get public user profiles with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-users-info", + "content": "Call getUsersInfo to retrieve public user information for a batch of user IDs. This is useful for friend candidates and stranger profile cards. If your product needs to search by nickname, phone number, organization, email, or another business field, have your backend perform the search and authorization checks first, then pass the returned user IDs to getUsersInfo . const userIDList = Array.from new Set 'user a', 'user b' ; const users = await OpenIMSDK.getUsersInfo userIDList ; Parameter description userIDList is the array of user IDs to retrieve. Deduplicate the IDs before calling the API and keep the number of IDs in a single request within a reasonable limit. Return result The method returns the matching PublicUserItem : | Field | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Public account nickname. | | faceURL | string | Public account avatar URL. | | ex | string | Account extension field whose format is defined by your business. | The returned array is not guaranteed to follow the order of the input IDs. To retrieve the signed in user's information, see Get your profile /sdk/react native/user/profile/get self user info and Update your profile /sdk/react native/user/profile/set self info ." }, { - "path": "/platform-api/webhooks/user/before-update-user-info", - "title": "Before updating user information", - "description": "Validate or adjust nickname, avatar, and extension data before a user profile update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user before-update-user-info", - "content": "Validate or adjust profile fields before OpenIM updates a user. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoCommand Request body | Property | Required | Type | Description | | | | | | | callbackCommand | Yes | string | callbackBeforeUpdateUserInfoCommand . | | userID | Yes | string | User being updated. | | nickName | No | string | Proposed nickname. | | faceURL | No | string | Proposed avatar URL. | | ex | No | string | Proposed extension data. | Response Return the common before event response and optional nickName , faceURL , or ex replacements. Only returned business fields override the pending update. Processing rules Configuration key: beforeUpdateUserInfo . Use nextCode: 1 to reject the update." + "path": "/sdk/react-native/user/profile/get-self-user-info", + "title": "Get your profile", + "description": "Get the current user profile with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile get-self-user-info", + "content": "Call getSelfUserInfo to get the signed in account's user information. const currentUser = await OpenIMSDK.getSelfUserInfo ; Return result The method returns the current account's SelfUserInfo : | Field | Type | Description | | | | | | userID | string | The OpenIM user ID of the signed in user. | | nickname | string | Account nickname. | | faceURL | string | Account avatar URL. | | createTime | number | Time when the user record was created. | | globalRecvMsgOpt | MessageReceiveOptType | The account's global message reception option. | | ex | string | An account extension string defined by your business. | Call this method after initialization and login to display the current account's avatar, nickname, and global message reception setting. Clear the stored current user information when switching accounts." }, { - "path": "/platform-api/webhooks/user/after-update-user-info", - "title": "After updating user information", - "description": "Synchronize nickname, avatar, and extension changes after a profile update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user after-update-user-info", - "content": "Synchronize a completed user profile update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoCommand Request body Includes callbackCommand , userID , nickName , faceURL , and ex with the resulting profile values. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfo . Process idempotently by user ID and operationID ." + "path": "/sdk/react-native/user/profile/set-self-info", + "title": "Update your profile", + "description": "Update the current user profile with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-self-info", + "content": "Call setSelfInfo to update the signed in account's basic display profile. Pass only the nickname , faceURL , or ex fields that should change in this request. await OpenIMSDK.setSelfInfo nickname: nickname.trim , faceURL, ex: mergedExtra, ; Parameter description | Parameter | Type | Required | Description | | | | | | | nickname | string | No | New nickname. | | faceURL | string | No | New avatar URL. | | ex | string | No | Extended user information. | Pass at least one profile field that should be updated. ex is a string. You can pass a JSON string or another business defined format for extended user information. After the profile is updated, the OnSelfInfoUpdated event carries the updated user information. Listen for current user profile changes When the user's profile changes, OnSelfInfoUpdated is emitted with the updated SelfUserInfo : function handleSelfInfoUpdated selfUserInfo: SelfUserInfo // ... // Add the listener OpenIMSDK.on OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; Remove the listener when the user logs out, switches accounts, or the user state is torn down." }, { - "path": "/platform-api/webhooks/user/before-update-user-info-ex", - "title": "Before updating selected user fields", - "description": "Validate or adjust optional user profile fields before an update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user before-update-user-info-ex", - "content": "Validate or adjust only the optional profile fields included in a selected field update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoExCommand Request body Includes callbackCommand , required userID , and optional nickName , faceURL , and ex values. Response Return the common before event response plus only the replacement fields that OpenIM should apply. Processing rules Configuration key: beforeUpdateUserInfoEx . Omitted fields remain untouched; nextCode: 1 rejects the update." + "path": "/sdk/react-native/user/profile/set-global-message-reception", + "title": "Set global message reception", + "description": "Set the global message reception option with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-global-message-reception", + "content": "globalRecvMsgOpt controls the current account's global message reception option. Use setSelfInfo to update the field: await OpenIMSDK.setSelfInfo globalRecvMsgOpt: MessageReceiveOptType.NotNotify, ; Parameter description | Enum value | Numeric value | Description | | | | | | MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. | | MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. | After the setting is updated, the current user information is delivered through OnSelfInfoUpdated . See Update your profile /sdk/react native/user/profile/set self info for the listener example. The global message reception option applies to the account. A conversation can also have its own message reception setting." }, { - "path": "/platform-api/webhooks/user/after-update-user-info-ex", - "title": "After updating selected user fields", - "description": "Synchronize optional user profile fields after an update completes.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks user after-update-user-info-ex", - "content": "Synchronize the fields changed by a completed selected field user update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoExCommand Request body Includes callbackCommand , userID , and the optional nickName , faceURL , and ex fields that changed. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfoEx . Process idempotently by user ID and operationID ." + "path": "/sdk/react-native/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "description": "Set friend request permissions with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user profile set-friend-add-permission", + "content": "addFriendPermission controls whether users who add the current account must wait for the current user to review the request. Use setSelfInfo to update this account level setting: await OpenIMSDK.setSelfInfo addFriendPermission: AddFriendPermission.AddFriendAllowed, ; Parameter description | Enum value | Numeric value | Description | | | | | | AddFriendPermission.AddFriendAllowed | 0 | Allow requests, but require the current user to review them. | | AddFriendPermission.AddFriendAllowedNoReview | 1 | Allow requests and establish the friendship without review. | | AddFriendPermission.AddFriendDenied | 2 | Do not allow other users to add the current account. | This setting applies to future add friend actions. It does not remove existing friends or automatically process pending requests. After the setting is updated, the current user information is delivered through OnSelfInfoUpdated ; see Update your profile /sdk/react native/user/profile/set self info for the listener example." }, { - "path": "/platform-api/webhooks/relation/before-add-friend", - "title": "Before adding a friend", - "description": "Validate a friend request before it is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-add-friend", - "content": "Validate a friend request before it is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | | ex | string | Extension data | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriend . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "description": "Subscribe to user online status with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status subscribe-users-status", + "content": "Call subscribeUsersStatus to subscribe to the online status of specific users. Subscribe only to users whose status the current screen needs to display. const userIDs = ...new Set visibleUserIDs.filter Boolean ; const states = await OpenIMSDK.subscribeUsersStatus userIDs ; The method returns the current UserOnlineState for these users: | Field | Type | Description | | | | | | userID | string | ID of the user whose status is reported. | | status | OnlineState | OnlineState.Online means online; OnlineState.Offline means offline. | | platformIDs | Platform optional | Platforms on which the user is currently online. | Online status indicates whether the user is connected to OpenIMServer. It does not indicate whether the user is viewing the app or a conversation. Listen for online status changes When a subscribed user's status changes, OnUserStatusChanged is emitted: const handleStatusChanged = state: UserOnlineState = // Update the status for state.userID ; // Add the listener OpenIMSDK.on OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; Cancel subscriptions and remove the listener when logging out, switching accounts, or when those users no longer need to be displayed." }, { - "path": "/platform-api/webhooks/relation/after-add-friend", - "title": "After adding a friend", - "description": "Synchronize a newly created friend request.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-add-friend", - "content": "Synchronize a newly created friend request. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriend . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "description": "Get the status of subscribed users with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status get-subscribe-users-status", + "content": "Call getSubscribeUsersStatus to get the online status of users subscribed by the current account. const states = await OpenIMSDK.getSubscribeUsersStatus ; The method returns UserOnlineState for the subscribed users. Subscribe to a target user first with Subscribe to online status /sdk/react native/user/online status/subscribe users status ." }, { - "path": "/platform-api/webhooks/relation/before-add-friend-agree", - "title": "Before accepting a friend request", - "description": "Validate a friend-request acceptance.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-add-friend-agree", - "content": "Validate a friend request acceptance. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriendAgree . OpenIM waits synchronously; timeout behavior follows failedContinue . The protocol retains the historical field names blackUserID , HandleResult , and HandleMsg ; parse them exactly as shown." + "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "description": "Cancel user online-status subscriptions with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user online-status unsubscribe-users-status", + "content": "Call unsubscribeUsersStatus to cancel online status subscriptions for specific users. await OpenIMSDK.unsubscribeUsersStatus userIDs ; Cancel the corresponding subscriptions when a page changes, search results change, the user logs out, or those users no longer need to be displayed." }, { - "path": "/platform-api/webhooks/relation/after-add-friend-agree", - "title": "After accepting a friend request", - "description": "Synchronize a newly established friendship.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-add-friend-agree", - "content": "Synchronize a newly established friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriendAgree . Process idempotently using the relationship key and operationID . The protocol retains these historical field names." + "path": "/sdk/react-native/user/overview-relationships", + "title": "Relationships overview", + "description": "Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user overview-relationships", + "content": "Relationships record the current user's friendships, friend requests, and blocklist relationships with other users. User profiles, account settings, and online status are covered by the User overview /sdk/react native/user/overview user . Relationship objects The React Native SDK returns different objects for different relationship scenarios: | Type | Use case | Main APIs | | | | | | PublicUserItem | Looking up public profiles and displaying friend candidates or stranger profile cards | getUsersInfo | | FriendUserItem | Friend lists, friend remarks, pinned friends, and relationship extension data | getFriendListPage , getSpecifiedFriendsInfo | | FriendshipInfo | Checking the friendship between the current user and target users | checkFriend | | FriendApplicationItem | Received or sent friend requests and their handling status | getFriendApplicationListAsRecipient , getFriendApplicationListAsApplicant | | BlackUserItem | Blocklist relationships maintained by the current account | getBlackList , addBlack , removeBlack | Feature entry points | Need | Recommended page | | | | | Look up public user profiles | Get user profiles /sdk/react native/user/profile/get users info | | Page through, search, or look up friends by ID | Get the friend list /sdk/react native/user/friends/get friend list page , Search friends /sdk/react native/user/friends/search friends , Get friend profiles /sdk/react native/user/friends/get specified friends info | | Check a friendship | Check friendship /sdk/react native/user/friends/check friend | | Update or delete a friendship | Update friend information /sdk/react native/user/friends/update friends , Delete a friend /sdk/react native/user/friends/delete friend | | Send or handle a friend request | Send a friend request /sdk/react native/user/friend applications/add friend , Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient , Accept a friend request /sdk/react native/user/friend applications/accept friend application , Reject a friend request /sdk/react native/user/friend applications/refuse friend application | | View and maintain the blocklist | Get the blocklist /sdk/react native/user/blacklist/get black list , Block a user /sdk/react native/user/blacklist/add black , Unblock a user /sdk/react native/user/blacklist/remove black | Event listeners Relationship changes emit events. Listener examples are documented on the following pages: Friend request changes: Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient . Friend and friend profile changes: Get the friend list /sdk/react native/user/friends/get friend list page . Blocklist changes: Get the blocklist /sdk/react native/user/blacklist/get black list ." }, { - "path": "/platform-api/webhooks/relation/after-delete-friend", - "title": "After deleting a friend", - "description": "Synchronize a deleted friendship.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-delete-friend", - "content": "Synchronize a deleted friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterDeleteFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDeleteFriendCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Deleted friend | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterDeleteFriend . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friends/get-friend-list-page", + "title": "Get the friend list", + "description": "Get the friend list with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-friend-list-page", + "content": "Call getFriendListPage to retrieve the current user's friends page by page. const friends = await OpenIMSDK.getFriendListPage offset: 0, count: 50, filterBlack: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of friends to request. | | filterBlack | boolean | No | Whether to filter out blocked users. | The method returns the current page as FriendUserItem . Increase offset by the number of returned items to load the next page. Query the list again after friends are added or deleted. Friend fields FriendUserItem contains the following fields: | Field | Type | Description | | | | | | userID | string | Friend user ID. | | nickname | string | Friend nickname. | | faceURL | string | Friend avatar URL. | | remark | string | Remark set for the friend by the current user. | | isPinned | boolean | Whether the friend is pinned. | | ownerUserID | string | User ID that owns the friendship. | | operatorUserID | string | User ID that most recently changed the relationship. | | addSource | number | Source from which the friendship was added. | | createTime | number | Time when the friendship was created. | | ex | string | Friendship extension field. | | attachedInfo | string | Information attached by the SDK. | remark , isPinned , and ex belong to the friendship and are not account level user information. Listen for friend changes When a friendship changes, OnFriendAdded , OnFriendInfoChanged , or OnFriendDeleted is emitted with the corresponding friend information: const handleFriendAdd = friend: FriendUserItem = // Add the friend ; const handleFriendChanged = friend: FriendUserItem = // Update the friend by friend.userID ; const handleFriendDeleted = friend: FriendUserItem = // Remove the friend by friend.userID ; // Add listeners OpenIMSDK.on OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.on OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.on OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; // Remove listeners OpenIMSDK.off OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.off OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.off OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; Remove these listeners when logging out, switching accounts, or tearing down the friend list state." }, { - "path": "/platform-api/webhooks/relation/before-set-friend-remark", - "title": "Before setting a friend remark", - "description": "Validate or replace a friend remark.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-set-friend-remark", - "content": "Validate or replace a friend remark. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Proposed remark | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeSetFriendRemark . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return remark to replace the pending value." + "path": "/sdk/react-native/user/friends/search-friends", + "title": "Search friends", + "description": "Search the current user's friends with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends search-friends", + "content": "Call searchFriends to search the current user's friends. Trim leading and trailing whitespace before submitting a search. The current request uses the first non empty value in keywordList . const friends = await OpenIMSDK.searchFriends keywordList: keyword.trim , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | keywordList | string | Yes | Search keywords. The current request uses the first non empty keyword. | | isSearchUserID | boolean | Yes | Whether to match user IDs. | | isSearchNickname | boolean | Yes | Whether to match friend nicknames. | | isSearchRemark | boolean | Yes | Whether to match friend remarks. | The method returns SearchedFriendsInfo . Each item contains friend fields and relationship : 0 indicates a blocklist relationship and 1 indicates a friendship." }, { - "path": "/platform-api/webhooks/relation/after-set-friend-remark", - "title": "After setting a friend remark", - "description": "Synchronize an updated friend remark.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-set-friend-remark", - "content": "Synchronize an updated friend remark. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Resulting remark | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetFriendRemark . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "description": "Get specified friend profiles with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends get-specified-friends-info", + "content": "Call getSpecifiedFriendsInfo to retrieve relationship information for specified user IDs. const friends = await OpenIMSDK.getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | userIDList | string | Yes | User IDs to retrieve. | | filterBlack | boolean | No | Whether to filter out blocked users. | The method returns matching FriendUserItem ; the array is not guaranteed to follow the order of the input IDs. See Get the friend list /sdk/react native/user/friends/get friend list page for field descriptions. For public information about users who are not your friends, use Get user profiles /sdk/react native/user/profile/get users info ." }, { - "path": "/platform-api/webhooks/relation/before-add-black", - "title": "Before adding to the blacklist", - "description": "Validate a blacklist addition.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-add-black", - "content": "Validate a blacklist addition. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User being blocked | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddBlack . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friends/check-friend", + "title": "Check friendship status", + "description": "Check friendships with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends check-friend", + "content": "Call checkFriend to check the friendship between the current user and multiple target users. const checks = await OpenIMSDK.checkFriend 'user a', 'user b' ; The returned FriendshipInfo corresponds to the input IDs by userID : | Field | Type | Description | | | | | | userID | string | ID of the user being checked. | | result | number | 1 means the users are friends; 0 means they are not. | To determine a blocklist relationship, call Get the blocklist /sdk/react native/user/blacklist/get black list separately." }, { - "path": "/platform-api/webhooks/relation/after-remove-black", - "title": "After removing from the blacklist", - "description": "Synchronize a blacklist removal.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-remove-black", - "content": "Synchronize a blacklist removal. HTTP request POST WEBHOOK ADDRESS /callbackAfterRemoveBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterRemoveBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User removed from the blacklist | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRemoveBlack . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friends/update-friends", + "title": "Update friend information", + "description": "Update friend information with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends update-friends", + "content": "Call updateFriends to update every friend in friendUserIDs . await OpenIMSDK.updateFriends friendUserIDs: friendUserID , remark: remark, isPinned: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | friendUserIDs | string | Yes | Friend user IDs to update. | | remark | string | No | New remark. | | isPinned | boolean | No | Whether to pin the friend. | | ex | string | No | New extension string. | Pass at least one field to update in addition to friendUserIDs . Call the method separately when different friends need different values. After friend information changes, OnFriendInfoChanged is emitted; see Get the friend list /sdk/react native/user/friends/get friend list page for the listener example." }, { - "path": "/platform-api/webhooks/relation/before-import-friends", - "title": "Before importing friends", - "description": "Validate or filter a batch of friend IDs before import.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation before-import-friends", - "content": "Validate or filter a batch of friend IDs before import. HTTP request POST WEBHOOK ADDRESS /callbackBeforeImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Friend IDs to import | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeImportFriends . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return friendUserIDs to replace the import set." + "path": "/sdk/react-native/user/friends/delete-friend", + "title": "Delete a friend", + "description": "Delete a friend with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friends delete-friend", + "content": "Call deleteFriend to delete the friendship between the current user and a specified user. await OpenIMSDK.deleteFriend friendUserID ; friendUserID is the user ID of the friend to delete. After the friend is deleted, OnFriendDeleted is emitted with the deleted friend's information. See Get the friend list /sdk/react native/user/friends/get friend list page for the listener example." }, { - "path": "/platform-api/webhooks/relation/after-import-friends", - "title": "After importing friends", - "description": "Synchronize the result of a friend import.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks relation after-import-friends", - "content": "Synchronize the result of a friend import. HTTP request POST WEBHOOK ADDRESS /callbackAfterImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Imported friend IDs | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterImportFriends . Process idempotently using the relationship key and operationID ." + "path": "/sdk/react-native/user/friend-applications/add-friend", + "title": "Send a friend application", + "description": "Send a friend request with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications add-friend", + "content": "Call addFriend to send a friend request to a specified user. await OpenIMSDK.addFriend toUserID, reqMsg, ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID to add. | | reqMsg | string | Yes | Message attached to the request. Pass an empty string when there is no message. | A successful call means that the friend request was submitted; it does not mean that the recipient has accepted it. For request status changes, see the listener examples in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." }, { - "path": "/platform-api/webhooks/group/before-create-group", - "title": "Before creating a group", - "description": "Validate or adjust group information and initial members before a group is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-create-group", - "content": "Validate or adjust group information and initial members before a group is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | introduction | string | Group introduction. | | faceURL | string | Group avatar URL. | | ownerUserID | string | Group owner user ID. | | createTime | int | Group creation time in milliseconds. | | memberCount | int | Initial member count. | | ex | string | Extension data. | | status | int | Group status. | | creatorUserID | string | Group creator user ID. | | groupType | int | Group type. | | needVerification | int | Join verification policy. | | lookMemberInfo | int | Whether ordinary members can view member profiles. | | applyMemberFriend | int | Whether ordinary members can add other members as friends. | | notificationUpdateTime | int | Announcement update time in milliseconds. | | notificationUserID | string | User who last updated the announcement. | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | | initMemberList | object | Initial members, each containing userID and roleLevel . | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may also return the mutable group fields shown above to replace the values OpenIM is about to process. Processing rules Configuration key: beforeCreateGroup . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "description": "Get received friend requests with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-recipient", + "content": "Call getFriendApplicationListAsRecipient to page through friend requests received by the current user. const applications = await OpenIMSDK.getFriendApplicationListAsRecipient handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; Parameter description | Parameter | Type | Required | Description | | | | | | | handleResults | number | Yes | Request handling results to retrieve. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of requests to retrieve. | | Enum value | Numeric value | Meaning | | | | | | ApplicationHandleResult.Unprocessed | 0 | Pending. | | ApplicationHandleResult.Agree | 1 | Accepted. | | ApplicationHandleResult.Reject | 1 | Rejected. | The method returns the current page as FriendApplicationItem . Friend request fields FriendApplicationItem contains the following fields: | Field | Type | Description | | | | | | fromUserID | string | Applicant's user ID. | | fromNickname | string | Applicant's nickname. | | fromFaceURL | string | Applicant's avatar URL. | | toUserID | string | Recipient's user ID. | | toNickname | string | Recipient's nickname. | | toFaceURL | string | Recipient's avatar URL. | | reqMsg | string | Message attached to the request. | | handleResult | ApplicationHandleResult | Current handling result. | | handlerUserID | string | User ID that handled the request. | | handleMsg | string | Message entered when handling the request. | | handleTime | number | Time when the request was handled. | | createTime | number | Time when the request record was created. | | ex | string | Request record extension string. | Listen for friend request changes When a friend request changes, OnFriendApplicationAdded , OnFriendApplicationAccepted , OnFriendApplicationRejected , or OnFriendApplicationDeleted is emitted with a FriendApplicationItem : const handleApplicationChanged = application: FriendApplicationItem = // Update the request by fromUserID and toUserID ; const handleApplicationDeleted = application: FriendApplicationItem = // Remove the request by fromUserID and toUserID ; // Add listeners OpenIMSDK.on OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; // Remove listeners OpenIMSDK.off OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; Identify a request with both fromUserID and toUserID . Remove these listeners when logging out, switching accounts, or tearing down the request list state." }, { - "path": "/platform-api/webhooks/group/after-create-group", - "title": "After creating a group", - "description": "Synchronize group information and initial members after a group is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-create-group", - "content": "Synchronize group information and initial members after a group is created. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupCommand and the complete group snapshot described by GroupInfo /platform api/group/overview groupinfo . It also includes initMemberList , announcement metadata, and these Enterprise fields: | Property | Type | Description | | | | | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | Response Return HTTP success promptly. Group creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroup . Process idempotently using groupID or operationID ." - }, + "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "description": "Get sent friend requests with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-applicant", + "content": "Call getFriendApplicationListAsApplicant to page through friend requests sent by the current user. const applications = await OpenIMSDK.getFriendApplicationListAsApplicant offset: 0, count: 20, ; Parameter description | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of requests to retrieve. | The method returns the current page as FriendApplicationItem . See Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient for request fields." + }, { - "path": "/platform-api/webhooks/group/before-member-join-group", - "title": "Before members join a group", - "description": "Validate or adjust member profiles before users become group members.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-member-join-group", - "content": "Validate or adjust member profiles before users become group members. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMembersJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeMembersJoinGroupCommand . | | groupID | string | Group ID. | | memberList | object | Members about to join, including userID and ex . | | groupEx | string | Group extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . memberCallbackList may contain adjusted profiles for the members OpenIM is about to add. Processing rules Configuration key: beforeMemberJoinGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the operation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get pending application count", + "description": "Get the unhandled friend-request count with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-unhandled-count", + "content": "Call getFriendApplicationUnhandledCount to get the number of unhandled friend requests after a specified time. const count = await OpenIMSDK.getFriendApplicationUnhandledCount time, ; Parameter description | Parameter | Type | Required | Description | | | | | | | time | number | Yes | Start time for the query, normally the last time the request list was viewed. | The method returns the number of unhandled friend requests after the specified time." }, { - "path": "/platform-api/webhooks/group/before-invite-user-to-group", - "title": "Before inviting users to a group", - "description": "Validate a group invitation and optionally refuse individual invitees.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-invite-user-to-group", - "content": "Validate a group invitation and optionally refuse individual invitees. HTTP request POST WEBHOOK ADDRESS /callbackBeforeInviteJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeInviteJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reason | string | Invitation reason. | | invitedUserIDs | string | User IDs to invite. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . Set refusedMembersAccount to the user IDs that must not be added. Processing rules Configuration key: beforeInviteUserToGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the entire invitation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/accept-friend-application", + "title": "Accept a friend application", + "description": "Accept a friend request with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications accept-friend-application", + "content": "Call acceptFriendApplication to accept a friend request. await OpenIMSDK.acceptFriendApplication toUserID: applicantUserID, handleMsg: '', ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID of the applicant. | | handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. | Accepting the request establishes a friendship and emits friend request status changes and OnFriendAdded . See Get the friend list /sdk/react native/user/friends/get friend list page for the friend list listener." }, { - "path": "/platform-api/webhooks/group/before-apply-join-group", - "title": "Before applying to join a group", - "description": "Run authorization or risk checks before a group join application is created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-apply-join-group", - "content": "Run authorization or risk checks before a group join application is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeJoinGroupCommand . | | groupID | string | Group ID. | | groupType | string | Group type. | | applyID | string | Applicant user ID. | | reqMessage | string | Application message. | | ex | string | Extension data. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the application. Processing rules Configuration key: beforeApplyJoinGroup . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", + "title": "Reject a friend application", + "description": "Reject a friend request with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications refuse-friend-application", + "content": "Call refuseFriendApplication to reject a friend request. await OpenIMSDK.refuseFriendApplication toUserID: applicantUserID, handleMsg: '', ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID of the applicant. | | handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. | For request status changes, see the listener examples in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." }, { - "path": "/platform-api/webhooks/group/after-join-group", - "title": "After joining a group", - "description": "Synchronize membership changes after a user joins a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-join-group", - "content": "Synchronize membership changes after a user joins a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reqMessage | string | Join application or invitation message. | | joinSource | int | Source of the membership change. | | inviterUserID | string | Inviter user ID, when applicable. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterJoinGroup . Process idempotently using the group and user identifiers or operationID ." + "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", + "title": "Delete friend applications", + "description": "Delete friend-request records with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user friend-applications delete-friend-requests", + "content": "Call deleteFriendRequests to delete multiple friend request records. Parameter description Each item in the array contains the following fields: | Parameter | Type | Required | Description | | | | | | | fromUserID | string | Yes | Applicant's user ID. | | toUserID | string | Yes | Recipient's user ID. | await OpenIMSDK.deleteFriendRequests fromUserID, toUserID , ; Deleting a record is not the same as rejecting the request, and it does not delete an established friendship. For request record changes, see OnFriendApplicationDeleted in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." }, { - "path": "/platform-api/webhooks/group/after-quit-group", - "title": "After leaving a group", - "description": "Synchronize membership changes after a user leaves a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-quit-group", - "content": "Synchronize membership changes after a user voluntarily leaves a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterQuitGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterQuitGroupCommand . | | groupID | string | Group ID. | | userID | string | User who left the group. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterQuitGroup . Process idempotently using groupID:userID ." + "path": "/sdk/react-native/user/blacklist/get-black-list", + "title": "Get the blacklist", + "description": "Get the blocklist with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist get-black-list", + "content": "Call getBlackList to get the current account's blocklist. const blockedUsers = await OpenIMSDK.getBlackList ; The method returns BlackUserItem : | Field | Type | Description | | | | | | userID | string | ID of the blocked user. | | nickname | string | Nickname of the blocked user. | | faceURL | string | Avatar URL of the blocked user. | | ownerUserID | string | User ID that owns the blocklist relationship. | | operatorUserID | string | User ID that performed the block operation. | | createTime | number | Time when the blocklist record was created. | | addSource | number | Source from which the user was blocked. | | ex | string | Blocklist extension field. | Use userID when checking a blocklist relationship in a profile card or contact list. Blocklist management is separate from group management; use group APIs for muting or removing group members. Listen for blocklist changes When the blocklist changes, OnBlackAdded or OnBlackDeleted is emitted with the corresponding blocked user information: const handleBlackAdded = blackUser: BlackUserItem = // Add or update the record by blackUser.userID ; const handleBlackDeleted = blackUser: BlackUserItem = // Remove the record by blackUser.userID ; OpenIMSDK.on OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.on OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; OpenIMSDK.off OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.off OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; Remove these listeners when logging out, switching accounts, or tearing down the blocklist state." }, { - "path": "/platform-api/webhooks/group/after-kick-group-member", - "title": "After removing group members", - "description": "Synchronize membership changes after members are removed from a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-kick-group-member", - "content": "Synchronize membership changes after members are removed from a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterKickGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterKickGroupCommand . | | groupID | string | Group ID. | | kickedUserIDs | string | Removed user IDs. | | reason | string | Removal reason. | Response Return HTTP success promptly. The membership changes are already complete and cannot be changed by this response. Processing rules Configuration key: afterKickGroupMember . Process each member idempotently using groupID:userID ." + "path": "/sdk/react-native/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "description": "Block a user with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist add-black", + "content": "Call addBlack to add a specified user to the current account's blocklist. await OpenIMSDK.addBlack toUserID, ex, ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID to block. | | ex | string | No | Blocklist relationship extension information. | After the user is blocked, OnBlackAdded is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the blocklist and listener example." }, { - "path": "/platform-api/webhooks/group/after-dismiss-group", - "title": "After dismissing a group", - "description": "Synchronize group state after a group is dismissed.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-dismiss-group", - "content": "Synchronize group state after a group is dismissed. HTTP request POST WEBHOOK ADDRESS /callbackAfterDisMissGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDisMissGroupCommand . The historical capitalization is part of the protocol. | | groupID | string | Group ID. | | ownerID | string | Group owner user ID. | | groupType | string | Group type. | | membersID | string | IDs of members affected by dismissal. | Response Return HTTP success promptly. Group dismissal is already complete and cannot be changed by this response. Processing rules Configuration key: afterDismissGroup . Process idempotently using groupID ." + "path": "/sdk/react-native/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "description": "Unblock a user with the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", + "content": "Call removeBlack to remove a specified user from the current account's blocklist. await OpenIMSDK.removeBlack blackUserID ; blackUserID is the user ID to unblock. After the user is removed, OnBlackDeleted is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the listener example." }, { - "path": "/platform-api/webhooks/group/after-transfer-group-owner", - "title": "After transferring group ownership", - "description": "Synchronize the owner change after group ownership is transferred.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-transfer-group-owner", - "content": "Synchronize the owner change after group ownership is transferred. HTTP request POST WEBHOOK ADDRESS /callbackAfterTransferGroupOwnerCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterTransferGroupOwnerCommand . | | groupID | string | Group ID. | | oldOwnerUserID | string | Previous owner user ID. | | newOwnerUserID | string | New owner user ID. | Response Return HTTP success promptly. The ownership transfer is already complete and cannot be changed by this response. Processing rules Configuration key: afterTransferGroupOwner . Process idempotently using groupID and newOwnerUserID ." + "path": "/sdk/react-native/conversation/overview-conversation", + "title": "Conversation overview", + "description": "Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation overview-conversation", + "content": "In the OpenIM React Native SDK, a conversation is a chat state maintained by the current account. Both one to one and group chats correspond to a ConversationItem , which contains list presentation data, unread state, drafts, and message reception settings. Conversation records and chat targets use different identifiers. conversationID identifies the current account's conversation record, while a one to one target uses the other user's userID and a group target uses groupID . Group profiles, members, and permissions are managed through group APIs. Conversation identifiers | Identifier | Meaning | | | | | conversationID | Conversation record ID for the current account. | | userID | The other user's ID in a one to one conversation. | | groupID | Group ID for a group conversation. | | sourceID | Chat target used when querying by type: pass userID for one to one conversations or groupID for group conversations. | To generate a conversationID from a chat target, call Resolve a conversation ID /sdk/react native/conversation/retrieving conversations/get conversation id with sourceID and sessionType . Conversation data ConversationItem contains list presentation data and settings for the current account: | Category | Fields | Description | | | | | | Identity and type | conversationID , conversationType | Identify the conversation record and distinguish one to one and group conversations. | | List presentation | showName , faceURL , latestMsg , latestMsgSendTime | Display the conversation name, avatar, and latest message. | | Unread and mentions | unreadCount , groupAtType | Display unread counts and group mention status. | | List organization | isPinned , isMarked , draftText , remark | Manage pinning, marking, drafts, and the current account's remark. | | Message policies | recvMsgOpt , isPrivateChat , burnDuration , isMsgDestruct , msgDestructTime | Configure message reception, burn after reading, and server side deletion. | | Other state and extensions | isNotInGroup , attachedInfo , ex | Indicate group membership state, SDK attached information, and application extensions. | Find a page by task | Task | Related page | | | | | Get one or more conversations | Open a conversation /sdk/react native/conversation/retrieving conversations/get conversation by target , Get conversations by ID /sdk/react native/conversation/retrieving conversations/get conversations by id , Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list | | Organize the conversation list | Pin or unpin a conversation /sdk/react native/conversation/managing conversations/pin conversation , Mark or unmark a conversation /sdk/react native/conversation/managing conversations/mark conversation , Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups | | Manage drafts, remarks, and extensions | Set a conversation draft /sdk/react native/conversation/managing conversations/set conversation draft , Set a conversation remark /sdk/react native/conversation/managing conversations/set conversation remark , Set conversation extra data /sdk/react native/conversation/managing conversations/set conversation extension | | Configure message reception and retention | Set conversation message reception /sdk/react native/conversation/managing conversations/set message receive option , Enable or disable burn after reading /sdk/react native/conversation/managing conversations/set private chat , Schedule server message deletion /sdk/react native/conversation/managing conversations/set message destruct | | Handle unread counts and group mentions | Mark a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read , Track the total unread count /sdk/react native/conversation/managing conversations/get total unread count , Reset group mention status /sdk/react native/conversation/managing conversations/clear group mentions | Hide, delete, and clear These operations have different scopes: | Operation | Effect | | | | | Hide a conversation /sdk/react native/conversation/managing conversations/hide a conversation | Hide one conversation from the current account's list; it may reappear when a new message arrives. | | Delete a conversation and its messages /sdk/react native/conversation/managing conversations/delete conversation with messages | Delete the conversation record and the current account's messages in it. | | Clear messages in a conversation /sdk/react native/conversation/managing conversations/clear conversation messages | Keep the conversation record and clear only the current account's messages. | Events Conversation state changes are delivered through events: Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list covers new conversations and conversation field changes. Track the total unread count /sdk/react native/conversation/managing conversations/get total unread count covers total unread count changes. Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups covers conversation group and membership changes." }, { - "path": "/platform-api/webhooks/group/before-set-group-member-info", - "title": "Before updating group member information", - "description": "Validate or adjust fields before a group member profile is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-set-group-member-info", - "content": "Validate or adjust fields before a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Group nickname, when changed. | | faceURL | string | Avatar URL, when changed. | | roleLevel | int | Group role level, when changed. | | ex | string | Extension data, when changed. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return nickName , faceURL , roleLevel , and ex to replace the pending values. Processing rules Configuration key: beforeSetGroupMemberInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "description": "Query a conversation by its chat target and session type.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-by-target", + "content": "Call getOneConversation to query a conversation by its chat target and session type. const conversation = await OpenIMSDK.getOneConversation sourceID: targetUserID, sessionType: SessionType.Single, ; Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Pass the other user's ID for a one to one conversation or the group ID for a group conversation. | | sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one to one conversations and SessionType.Group for group conversations. | Return result The call returns a ConversationItem . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields." }, { - "path": "/platform-api/webhooks/group/after-set-group-member-info", - "title": "After updating group member information", - "description": "Synchronize changes after a group member profile is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-set-group-member-info", - "content": "Synchronize changes after a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Updated group nickname, when present. | | faceURL | string | Updated avatar URL, when present. | | roleLevel | int | Updated group role level, when present. | | ex | string | Updated extension data, when present. | Response Return HTTP success promptly. The member profile update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupMemberInfo . Process idempotently using groupID:userID ." + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "description": "Generate a conversation ID from a chat target and session type.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-id", + "content": "Call getConversationIDBySessionType to generate a conversation ID from a chat target and session type. const conversationID = await OpenIMSDK.getConversationIDBySessionType sourceID: targetUserID, sessionType: SessionType.Single, ; Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Pass the other user's ID for a one to one conversation or the group ID for a group conversation. | | sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one to one conversations and SessionType.Group for group conversations. | Return result The call returns the conversation ID as a string ." }, { - "path": "/platform-api/webhooks/group/before-set-group-info", - "title": "Before updating group information", - "description": "Validate or adjust group fields before group information is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-set-group-info", - "content": "Validate or adjust group fields before group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoCommand , operationID , groupID , and the pending groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return the pending group fields to replace the values OpenIM is about to store. Processing rules Configuration key: beforeSetGroupInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "description": "Retrieve multiple conversations by their conversation IDs.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversations-by-id", + "content": "When you already have a set of conversation IDs, call getMultipleConversation to retrieve their conversation information. const conversations = await OpenIMSDK.getMultipleConversation conversationIDList ; Parameters conversationIDList is the array of conversation IDs to query. Return result The call returns ConversationItem . The result may contain fewer items than the input IDs; an ID that is not returned was not found by the SDK. See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields." }, { - "path": "/platform-api/webhooks/group/after-set-group-info", - "title": "After updating group information", - "description": "Synchronize changes after group information is updated.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-set-group-info", - "content": "Synchronize changes after group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoCommand , operationID , groupID , and the updated groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return HTTP success promptly. The group update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfo . Process idempotently using groupID or operationID ." + "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Retrieve the conversation list", + "description": "Retrieve the current user's conversation list with pagination.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations retrieve-conversation-list", + "content": "Use getConversationListSplit to retrieve the conversation list page by page. const conversations = await OpenIMSDK.getConversationListSplit offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page and increase it by the number of items already requested. | | count | number | Yes | Number of conversations to request. | Return result The call returns the current page as ConversationItem . When fewer than count items are returned, the current list has reached its end. Conversation fields ConversationItem contains the chat target, list presentation data, and settings for the current account: | Field | Type | Description | | | | | | conversationID | string | Conversation ID. | | conversationType | SessionType | Conversation type, such as one to one or group. | | userID | string | The other user's ID in a one to one conversation; usually empty for group conversations. | | groupID | string | Group ID for a group conversation; usually empty for one to one conversations. | | showName | string | Display name of the conversation. | | faceURL | string | Display avatar URL of the conversation. | | recvMsgOpt | MessageReceiveOptType | Message reception setting for the conversation. | | unreadCount | number | Number of unread messages in the conversation. | | groupAtType | GroupAtType | Mention status for a group conversation; not used for one to one conversations. | | latestMsg | string | JSON serialized content of the latest message. | | latestMsgSendTime | number | Time when the latest message was sent. | | draftText | string | Draft saved on the current device. | | draftTextTime | number | Time when the draft was updated. | | isPrivateChat | boolean | Whether burn after reading is enabled for the one to one conversation. | | burnDuration | number | Burn after reading duration for the one to one conversation. | | isMsgDestruct | boolean | Whether scheduled server side message deletion is enabled. | | msgDestructTime | number | Server side message deletion period. | | isPinned | boolean | Whether the conversation is pinned. | | isMarked Enterprise | boolean | Whether the conversation is marked. | | isNotInGroup | boolean | Whether the current account is no longer in the group. | | attachedInfo | string | Additional information attached by the SDK. | | ex | string optional | Conversation extension string. | | remark Enterprise | string optional | Conversation remark. | When loading multiple pages, deduplicate them by conversationID . Start again from offset: 0 when refreshing the list. Listen for conversation changes OnNewConversation is emitted when a conversation is created. OnConversationChanged is emitted when an existing conversation changes. Both callbacks receive ConversationItem . function handleNewConversation conversations: ConversationItem // ... function handleConversationChanged conversations: ConversationItem // ... OpenIMSDK.on OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleConversationChanged ; OpenIMSDK.off OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleConversationChanged ; Remove the listeners when logging out, switching accounts, or tearing down the conversation list state." }, { - "path": "/platform-api/webhooks/group/before-set-group-info-ex", - "title": "Before updating selected group fields", - "description": "Validate or adjust the selected fields before a partial group update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group before-set-group-info-ex", - "content": "Validate or adjust the selected fields before a partial group update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoExCommand , operationID , groupID , and only the group fields selected for update: groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , or applyMemberFriend . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return selected group fields to replace the pending values. Processing rules Configuration key: beforeSetGroupInfoEx . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "description": "Pin or unpin a conversation for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations pin-conversation", + "content": "Call pinConversation to set whether a conversation is pinned. await OpenIMSDK.pinConversation conversationID, isPinned: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isPinned | boolean | Yes | Set true to pin or false to unpin. | Return result After the call completes, the conversation's isPinned state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." }, { - "path": "/platform-api/webhooks/group/after-set-group-info-ex", - "title": "After updating selected group fields", - "description": "Synchronize changes after a partial group information update.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks group after-set-group-info-ex", - "content": "Synchronize changes after selected group fields are updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoExCommand , operationID , groupID , and the updated values among groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend . Response Return HTTP success promptly. The partial update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfoEx . Process idempotently using groupID or operationID ." + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "description": "Mark or unmark a conversation for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation", + "content": "Call setConversation to set the marked state of a conversation. await OpenIMSDK.setConversation conversationID, isMarked: true, ; Set isMarked to false to unmark the conversation. The marked state belongs to the current account, and marked conversations appear in the built in marked conversation group. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for group management. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isMarked | boolean | No | Set true to mark or false to unmark. | Return result After the call completes, the conversation's isMarked state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." }, { - "path": "/platform-api/webhooks/message/before-send-single-message", - "title": "Before sending a one-to-one message", - "description": "Review, reject, or inspect fields before a one-to-one message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message before-send-single-message", - "content": "Use this callback for content moderation, policy enforcement, or field validation before a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendSingleMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSendSingleMsgCommand . | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID. | | serverMsgID | string | OpenIM server message ID. | | clientMsgID | string | Client message ID. | | operationID | string | OpenIM operation trace ID. | | senderPlatformID | int | Sender platform ID. | | senderNickname | string | Sender nickname. | | sessionType | int | Conversation type. | | msgFrom | int | Message source. | | contentType | int | Message content type /platform api/message/message content types . | | status | int | Message status. | | sendTime | int | Send time in milliseconds. | | createTime | int | Creation time in milliseconds. | | content | string | JSON string for the selected message content type. | | seq | int | Message sequence number. | | atUserList | string | Mentioned user IDs. | | faceURL | string | Sender avatar URL. | | ex | string | Extension data. | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendSingleMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "description": "Set a remark for a conversation for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-remark", + "content": "Call setConversation to set a conversation remark for the current account. await OpenIMSDK.setConversation conversationID, remark: 'Project discussion', ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | remark | string | No | Conversation remark. Pass an empty string to clear the existing remark. | When displaying a conversation name, the application can prefer remark and fall back to showName when no remark is set. A conversation remark does not update the user's profile or the group name. Return result After the call completes, the conversation's remark is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." }, { - "path": "/platform-api/webhooks/message/after-send-single-message", - "title": "After sending a one-to-one message", - "description": "Synchronize a message event after a one-to-one message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-send-single-message", - "content": "Synchronize a message event after a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendSingleMsgCommand Request body The payload contains callbackCommand: callbackAfterSendSingleMsgCommand and the complete message snapshot described on Before sending a one to one message /platform api/webhooks/message/before send single message , including serverMsgID , clientMsgID , seq , sender and recipient IDs, content, timestamps, and keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendSingleMsg . Process idempotently using clientMsgID , optionally scoped by the conversation ID." + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "description": "Set the conversation extension string.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-extension", + "content": "Use setConversation to set the conversation extension field ex . await OpenIMSDK.setConversation conversationID, ex: JSON.stringify category: 'work', , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | ex | string | No | Conversation extension string. Pass a JSON string or another format of extension data as needed by the application. | If existing extension data must be preserved, read the current ex , update it according to the application's rules, and write the complete value back. Return result After the call completes, the conversation's ex is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." }, { - "path": "/platform-api/webhooks/message/before-send-group-message", - "title": "Before sending a group message", - "description": "Review, reject, or inspect fields before a group message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message before-send-group-message", - "content": "Use this callback for content moderation, policy enforcement, or field validation before a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendGroupMsgCommand Request body The payload contains callbackCommand: callbackBeforeSendGroupMsgCommand , groupID , and the common message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message , except recvID ; group callbacks use groupID instead to identify the destination. Group messages also expose this field: | Property | Type | Description | | | | | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendGroupMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "description": "Save a draft for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-draft", + "content": "Use setConversationDraft to save a conversation draft. Submit the current editor content when the user leaves the chat screen, switches conversations, or is about to log out. await OpenIMSDK.setConversationDraft conversationID, draftText: editorValue, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID for the draft. | | draftText | string | Yes | Draft content. Pass an empty string to clear the draft. | Keep the editor state in the application while the user is typing, then save the latest value before leaving the screen. Return result After the call completes, the draft is saved. Changes to draftText and draftTextTime in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . Clear the application's editor state when the account changes or the user logs out." }, { - "path": "/platform-api/webhooks/message/after-send-group-message", - "title": "After sending a group message", - "description": "Synchronize a message event after a group message is sent.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-send-group-message", - "content": "Synchronize a message event after a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendGroupMsgCommand Request body The payload contains callbackCommand: callbackAfterSendGroupMsgCommand , groupID , and the complete message snapshot described on Before sending a group message /platform api/webhooks/message/before send group message . It also includes keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendGroupMsg . Process idempotently using clientMsgID , scoped by groupID when necessary." + "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "description": "Set the message reception option for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-receive-option", + "content": "Call setConversationRecvMessageOpt to set the message reception option for one conversation. await OpenIMSDK.setConversationRecvMessageOpt conversationID, opt: MessageReceiveOptType.NotNotify, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | opt | MessageReceiveOptType | Yes | Message reception option for the conversation. | Common MessageReceiveOptType values are: | Enum value | Numeric value | Description | | | | | | MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. | | MessageReceiveOptType.NotReceive | 1 | Do not receive messages from this conversation. | | MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. | Return result After the call completes, the conversation's recvMsgOpt is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . For the account level default, see Set global message reception /sdk/react native/user/profile/set global message reception ." }, { - "path": "/platform-api/webhooks/message/before-message-modify", - "title": "Before writing a message", - "description": "Adjust permitted message fields before the message is written.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message before-message-modify", - "content": "Adjust permitted message fields before the message is written to OpenIM storage. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMsgModifyCommand Request body The payload contains callbackCommand: callbackBeforeMsgModifyCommand and the message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message . recvID and keyVersion are Enterprise extensions for this callback. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace content , recipient or group identifiers, message IDs, sender profile, conversation and content types, status, sending options, offline push data, mention data, attachments, and extension data. Processing rules Configuration key: beforeMsgModify . OpenIM waits synchronously. Use nextCode: 1 to reject writing the message; timeout behavior follows failedContinue . Return only fields that should replace the values OpenIM is about to write." + "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "description": "Reset the mention status of a group conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-group-mentions", + "content": "After the user handles mention messages in a group conversation, call resetConversationGroupAtType to reset the conversation's group mention status. await OpenIMSDK.resetConversationGroupAtType conversationID ; Parameters conversationID is the ID of the group conversation whose mention status should be reset. The method restores groupAtType to its normal state. It does not set states such as “mentioned me” or “mentioned everyone”. Resetting the group mention status and marking a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read are separate operations. Return result After the call completes, the conversation's group mention status is reset. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." }, { - "path": "/platform-api/webhooks/message/after-single-message-read", - "title": "After one-to-one messages are read", - "description": "Synchronize read-state changes for one-to-one messages.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-single-message-read", - "content": "Synchronize read state changes after one to one messages are marked as read. HTTP request POST WEBHOOK ADDRESS /callbackAfterSingleMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSingleMsgReadCommand . | | conversationID | string | Conversation ID. | | userID | string | User whose read state changed. | | Seqs | int | Message sequence numbers marked as read. The capitalization is part of the protocol. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterSingleMsgRead . Process idempotently using conversationID , userID , and the sequence numbers." + "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "description": "Mark a conversation as read for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation-read", + "content": "After the user opens a conversation and reads its messages, call markConversationMessageAsRead to mark it as read. await OpenIMSDK.markConversationMessageAsRead conversationID ; Parameters conversationID is the ID of the conversation to mark as read. Return result After the call completes, the current account's unread state for the conversation is updated. Unread count changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . For group conversations, this method changes only the current account's conversation unread state." }, { - "path": "/platform-api/webhooks/message/after-group-message-read", - "title": "After group messages are read", - "description": "Synchronize read-state changes for group messages.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-group-message-read", - "content": "Synchronize a read event after group message read state is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterGroupMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterGroupMsgReadCommand . | | sendID | string | Message sender user ID. | | receiveID | string | Message recipient user ID. | | unreadMsgNum | int | Current unread message count. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterGroupMsgRead . Process duplicate callbacks idempotently." + "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "description": "Get the total unread message count across the current account's conversations.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations get-total-unread-count", + "content": "Call getTotalUnreadMsgCount to get the total unread count across all conversations for the current account. Do not calculate it by adding unreadCount from loaded pages, because unloaded conversations would be omitted. const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount ; Return result The call returns the total unread count as a number . Listen for changes When the app is in the foreground, use OnTotalUnreadMessageCountChanged to listen for changes: function handleTotalUnreadChanged totalUnread: number // ... OpenIMSDK.on OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; OpenIMSDK.off OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; Remove the listener when the component is destroyed, the user logs out, or the account changes." }, { - "path": "/platform-api/webhooks/message/after-revoke-message", - "title": "After revoking a message", - "description": "Synchronize a revoke event after a message is revoked.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks message after-revoke-message", - "content": "Synchronize a revoke event after a message is revoked. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAfterMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAfterMsgCommand . | | conversationID | string | Conversation ID. | | seq | int | Sequence number of the revoked message. | | userID | string | User who initiated the revoke operation. | Response Return HTTP success promptly. The revoke operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRevokeMsg . Process idempotently using conversationID:seq ." + "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "description": "Enable or disable burn after reading for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-private-chat", + "content": "Call setConversationPrivateChat to enable or disable burn after reading for a conversation. Set the duration separately with setConversationBurnDuration ; see Set the burn duration /sdk/react native/conversation/managing conversations/set burn duration . await OpenIMSDK.setConversationPrivateChat conversationID, isPrivate: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isPrivate | boolean | Yes | Set true to enable or false to disable. | Return result After the call completes, the conversation's burn after reading state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "description": "Set the burn-after-reading duration for a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-burn-duration", + "content": "Call setConversationBurnDuration to set the burn after reading duration in seconds. This method sets only the duration; use Enable or disable burn after reading /sdk/react native/conversation/managing conversations/set private chat to enable the mode. Do not confuse burnDuration with the server side deletion period msgDestructTime . await OpenIMSDK.setConversationBurnDuration conversationID, burnDuration: 30, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | burnDuration | number | Yes | Burn after reading duration in seconds. | Return result After the call completes, the conversation's burn after reading duration is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + }, + { + "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "description": "Configure scheduled deletion of messages stored on the server.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-destruct", + "content": "Call setConversation to configure scheduled server side message deletion for a conversation. await OpenIMSDK.setConversation conversationID, isMsgDestruct: true, msgDestructTime: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isMsgDestruct | boolean | No | Whether scheduled server side message deletion is enabled. | | msgDestructTime | number | No | Message deletion period in seconds. | Pass isMsgDestruct: true together with msgDestructTime to enable the policy. Pass isMsgDestruct: false to disable it. This policy is different from burn after reading, which uses isPrivateChat and burnDuration . Scheduled deletion affects messages stored on the server. Messages already synchronized to a device are not actively removed; after local data is cleared or the device changes, messages deleted from the server cannot be retrieved again. Return result After the call completes, the scheduled server side message deletion policy is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." }, { - "path": "/platform-api/webhooks/push/before-online-push", - "title": "Before one-to-one online push", - "description": "Adjust target users or push policy before an online one-to-one push.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push before-online-push", - "content": "Adjust target users or push policy before an online one to one push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | userIDList | string | Target user IDs. | | title | string | Push title. | | desc | string | Push summary. | | ex | string | Extension data. | | iOSPushSound | string | iOS notification sound. | | iOSBadgeCount | boolean | Whether to update the iOS badge. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID when present. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "description": "Hide a conversation from the current account's conversation list.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-a-conversation", + "content": "Call hideConversation to hide a conversation from the current account's conversation list. A new message or later conversation synchronization may make it appear again. await OpenIMSDK.hideConversation conversationID ; Parameters conversationID is the ID of the conversation to hide. Return result After the call completes, remove the conversation with the matching conversationID from the current list. If OnConversationChanged is received later, update the list by conversationID . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." }, { - "path": "/platform-api/webhooks/push/before-group-online-push", - "title": "Before group online push", - "description": "Adjust target users or push policy before an online group push.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push before-group-online-push", - "content": "Adjust target users or push policy before an online group push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeGroupOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeGroupOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | | seq | int | Message sequence number. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the online recipients and offlinePushInfo may replace fallback push metadata. Processing rules Configuration key: beforeGroupOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "Hide all conversations for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-all-conversations", + "content": "Call hideAllConversations to hide all conversations for the current account. await OpenIMSDK.hideAllConversations ; After the call completes, query the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list and the total unread count /sdk/react native/conversation/managing conversations/get total unread count to refresh the UI. A conversation may reappear when a new message arrives or its state is synchronized again." }, { - "path": "/platform-api/webhooks/push/before-offline-push", - "title": "Before offline push", - "description": "Adjust recipients and notification metadata before an offline push.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push before-offline-push", - "content": "Adjust the actual recipients and notification metadata before an offline push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOfflinePushCommand Request body The payload contains callbackCommand: callbackBeforeOfflinePushCommand and the recipient, platform, notification, message, conversation, mention, and content fields described on Before one to one online push /platform api/webhooks/push/before online push . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOfflinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "description": "Delete a conversation and the current account's messages in it.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations delete-conversation-with-messages", + "content": "Call deleteConversationAndDeleteAllMsg to delete the conversation record and the current account's messages in it. await OpenIMSDK.deleteConversationAndDeleteAllMsg conversationID ; Parameters conversationID is the ID of the conversation to delete. Return result After the call completes, remove the conversation and its messages from the current screen. If OnConversationChanged is received later, update the list by conversationID . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." }, { - "path": "/platform-api/webhooks/push/after-user-online", - "title": "After a user comes online", - "description": "Synchronize presence after a user establishes an online connection.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push after-user-online", - "content": "Synchronize presence after a user establishes an online connection. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOnlineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOnlineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | isAppBackground | boolean | Whether the client application is in the background. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already online and cannot be changed by this response. Processing rules Configuration key: afterUserOnline . Process idempotently using userID , platformID , and connID ." + "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "description": "Clear the current account's messages in a conversation without deleting the conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-conversation-messages", + "content": "Call clearConversationAndDeleteAllMsg to clear the current account's messages in a conversation without deleting the conversation. await OpenIMSDK.clearConversationAndDeleteAllMsg conversationID ; Parameters conversationID is the ID of the conversation whose messages should be cleared. Return result After the call completes, clear the message list shown on the current screen. If the latest message, summary, or unread state changes, read the updated conversation from OnConversationChanged or query the conversation list again. See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener cleanup." }, { - "path": "/platform-api/webhooks/push/after-user-offline", - "title": "After a user goes offline", - "description": "Synchronize presence after a user connection closes.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push after-user-offline", - "content": "Synchronize presence after a user connection closes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOfflineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOfflineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already offline and cannot be changed by this response. Processing rules Configuration key: afterUserOffline . Process idempotently using userID , platformID , and connID ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "description": "Learn about conversation groups in the OpenIM React Native SDK.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups overview-conversation-groups", + "content": "Conversation groups classify the current account's conversation list by business scenario, such as work, pending tasks, or custom categories. Group types ConversationGroupType contains these values: | Enum value | Numeric value | Description | | | | | | ConversationGroupType.ConversationGroupTypeNormal | 0 | Normal custom group. | | ConversationGroupType.ConversationGroupTypeFilter | 1 | Group filtered by rules. | | ConversationGroupType.ConversationGroupTypeAll | 2 | Query all group types. | Group fields ConversationGroup uses conversationGroupID as its identifier: | Field | Type | Description | | | | | | conversationGroupID | string | Conversation group ID. | | name | string | Group name. | | serial | number | Group sort value. | | version | number | Group data version. | | conversationGroupType | ConversationGroupType | Group type. | | hidden | boolean | Whether the group is hidden. | | unreadCount | number | Total unread count in the group. | | conversationIDs | string | Conversation IDs currently in the group. | | ex | string optional | Application extension string. | Listen for group changes Group operations emit events for added, updated, or deleted groups. Membership events include the group, conversation IDs, and conversation details. Event callbacks receive the entities directly, without a data field. Update groups by conversationGroupID and membership by the event's conversationIDs . const handleGroupAdded = groups: ConversationGroup = // ... ; const handleGroupChanged = groups: ConversationGroup = // ... ; const handleGroupDeleted = groups: ConversationGroup = // ... ; const handleGroupMemberAdded = payload: ConversationGroupMemberChangedCallbackData = // ... ; const handleGroupMemberDeleted = payload: ConversationGroupMemberChangedCallbackData = // ... ; OpenIMSDK.on OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.on OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.off OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; Remove the listeners when the component is destroyed, the user logs out, or the account changes." }, { - "path": "/platform-api/webhooks/push/after-user-kick-off", - "title": "After a user is forced offline", - "description": "Synchronize connection state after a user is forced offline.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks push after-user-kick-off", - "content": "Synchronize connection state after a user is forced offline. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserKickOffCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserKickOffCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | Response Return HTTP success promptly. The user has already been forced offline and this response cannot reverse the operation. Processing rules Configuration key: afterUserKickOff . Process idempotently using the user, platform, and operation identifiers." + "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "Create a conversation group for the current account.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups create-conversation-group", + "content": "Call createConversationGroup to create a conversation group for the current account. A normal group requires at least name ; you can also add a conversation when creating it. const group = await OpenIMSDK.createConversationGroup name: 'Work', order: 100, conversationID, conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | Group name. | | order | number | No | Group sort value. | | ex | string | No | Group extension string. | | conversationID | string | No | Conversation ID to add immediately after creation. | | conversationGroupType | ConversationGroupType | No | Group type. Use ConversationGroupTypeNormal for a normal custom group. | Return result The call returns the new ConversationGroupResp , including fields such as conversationGroupID , name , order , and conversationIDs . Group creation is delivered through OnConversationGroupAdded ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." }, { - "path": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", - "title": "Before creating one-to-one conversations", - "description": "Adjust default conversation properties before one-to-one conversations are first created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation before-create-single-chat-conversations", - "content": "Adjust default properties before one to one conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateSingleChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateSingleChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | user id | string | Other participant user ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateSingleChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "description": "Query the current account's conversation groups by type.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-groups", + "content": "Call getConversationGroups to get the current account's conversation groups by type. const groups = await OpenIMSDK.getConversationGroups ConversationGroupType.ConversationGroupTypeNormal, ; Parameters The parameter is a ConversationGroupType : use ConversationGroupTypeNormal for normal custom groups or ConversationGroupTypeAll to query all group types. Return result The call returns the matching ConversationGroup . See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for fields. Groups store conversation IDs; use Get conversations in a group /sdk/react native/conversation/managing conversation groups/get conversation group info with conversations when conversation details are also needed." }, { - "path": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", - "title": "After creating one-to-one conversations", - "description": "Synchronize complete conversation properties after one-to-one conversations are created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation after-create-single-chat-conversations", - "content": "Synchronize complete properties after one to one conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateSingleChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateSingleChatConversationsCommand and the complete property set described on Before creating one to one conversations /platform api/webhooks/conversation/before create single chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateSingleChatConversations . Process idempotently using owner user id:conversation id ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "description": "Query a conversation group and its paginated conversations.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-info-with-conversations", + "content": "Call getConversationGroupInfoWithConversations to get a conversation group and its paginated conversation list. const result = await OpenIMSDK.getConversationGroupInfoWithConversations conversationGroupID, pagination: pageNumber: 1, showNumber: 20, , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Conversation group ID to query. | | pagination.pageNumber | number | Yes | Page number, starting at 1 . | | pagination.showNumber | number | Yes | Number of conversations per page. | Return result The call returns an object with these fields: | Field | Type | Description | | | | | | group | ConversationGroup | Current group information. | | conversationTotal | number | Total number of conversations in the group. | | conversationElems | ConversationItem | Conversation details for the current page. | Stop requesting pages after the number of loaded conversations reaches conversationTotal . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields and Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for group fields." }, { - "path": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", - "title": "Before creating group conversations", - "description": "Adjust default conversation properties before group conversations are first created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation before-create-group-chat-conversations", - "content": "Adjust default properties before group conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | group id | string | Group ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateGroupChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", + "title": "Get groups for a conversation", + "description": "Query the conversation groups that contain a conversation.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-ids-by-conversation-id", + "content": "A conversation can belong to multiple conversation groups. Call getConversationGroupByConversationID to get the groups that contain it. To query all groups or filter by type, use Get conversation groups /sdk/react native/conversation/managing conversation groups/get conversation groups . const groups = await OpenIMSDK.getConversationGroupByConversationID conversationID ; Parameters conversationID is an OpenIM conversation ID, not a chat group ID. Return result The call returns ConversationGroup ; each item is a complete group object." }, { - "path": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", - "title": "After creating group conversations", - "description": "Synchronize complete conversation properties after group conversations are created.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api webhooks conversation after-create-group-chat-conversations", - "content": "Synchronize complete properties after group conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupChatConversationsCommand and the complete property set described on Before creating group conversations /platform api/webhooks/conversation/before create group chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroupChatConversations . Process idempotently using owner user id:conversation id ." + "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "Update an existing conversation group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups update-conversation-group", + "content": "Call updateConversationGroup to update an existing conversation group. Pass only the fields that need to change. const group = await OpenIMSDK.updateConversationGroup conversationGroupID, name: 'Priority work', hidden: false, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Conversation group ID to update. | | name | string | No | New group name. | | ex | string | No | New group extension string. | | hidden | boolean | No | Whether the group is hidden. | Return result The call returns the updated ConversationGroupResp . Group changes are delivered through OnConversationGroupChanged ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." }, { - "path": "/platform-api/timer/overview", - "title": "Overview", - "description": "Overview of the OpenIM Enterprise timer-task service.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer overview", - "content": "The timer module lets a backend register delayed tasks that call a configured business handler at the scheduled time. It is suitable for message reminders, scheduled operations, and business compensation, but it is not a high frequency real time scheduler. Capabilities Create a timer task /platform api/timer/managing tasks/create timer task Update a timer task /platform api/timer/managing tasks/update timer task Delete a timer task /platform api/timer/managing tasks/delete timer task Get a timer task /platform api/timer/managing tasks/get timer task List timer tasks /platform api/timer/managing tasks/list timer tasks Resource representations TimerTaskCallbackConfig | Property | Type | Description | | | | | | callbackMethod | string | Callback strategy. See TimerTaskCallbackMethod timertaskcallbackmethod . | | callbackPayload | string | Business payload passed to the callback handler. | TimerTask | Property | Type | Description | | | | | | taskID | string | Timer task ID. | | taskName | string | Display name. | | taskCategory | string | Business defined task category. | | srcUserID | string | User associated with the task. | | executeAt | int | Scheduled execution time as a Unix timestamp in milliseconds. | | executeBefore | int | Latest permitted execution time as a Unix timestamp in milliseconds. | | maxRetry | int | Maximum retries after execution failure. | | callbackConfig | TimerTaskCallbackConfig | Callback method and payload. | | createdAt | int | Creation time in Unix milliseconds. | | updatedAt | int | Last update time in Unix milliseconds. | | dedupKey | string | Business idempotency key used to prevent duplicate creation. | Enumerations TimerTaskStatus | Value | Name | Description | | | | | | 0 | Pending | Waiting for execution. | | 1 | Processing | Currently executing. | TimerTaskCallbackMethod | Value | Description | | | | | openim message | Invoke an OpenIM message operation. | | openim http | Invoke a configured HTTP handler. | | openim rpc | Invoke a preconfigured RPC handler. | | preset | Invoke a server side preset handler. | Integration guidance Call timer endpoints from an authorized business backend. Validate the target user, callback destination, and tenant boundary before creating or changing a task. Use a stable dedupKey for retryable task creation." + "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "description": "Batch-update the sort values of conversation groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups set-conversation-group-order", + "content": "Call setConversationGroupOrder to batch update the sort values of conversation groups. await OpenIMSDK.setConversationGroupOrder conversationGroupID: firstGroupID, order: 100 , conversationGroupID: secondGroupID, order: 200 , ; Parameters The method receives an array. Each item contains: | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Group ID whose order should be updated. | | order | number | Yes | New sort value. The application should use one consistent sort direction. | Return result The call does not return group data. The UI can use the submitted values or obtain the latest groups from OnConversationGroupChanged or a new query. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." }, { - "path": "/platform-api/meeting/overview", - "title": "Overview", - "description": "Overview of OpenIM Enterprise meetings, real-time calls, meeting chat, and recordings.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting overview", - "content": "The meeting module provides scheduled and immediate meetings, participant controls, recurring meetings, meeting chat, recording queries, and real time call recovery. All endpoints in this module are available only in OpenIM Enterprise and must be called through an authorized business backend. Capabilities Meeting management Schedule a meeting /platform api/meeting/meeting management/book meeting Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Join a meeting /platform api/meeting/meeting management/join meeting Get a meeting token /platform api/meeting/meeting management/get meeting token Update a meeting /platform api/meeting/meeting management/update meeting Get a meeting /platform api/meeting/meeting management/get meeting List a user's meetings /platform api/meeting/meeting management/list meetings Invite users to a meeting /platform api/meeting/meeting management/invite meeting users Leave a meeting /platform api/meeting/meeting management/leave meeting End or cancel a meeting /platform api/meeting/meeting management/end meeting Meeting controls and records Set personal meeting preferences /platform api/meeting/meeting settings/set personal setting Control participant media streams /platform api/meeting/meeting settings/operate all streams Remove meeting participants /platform api/meeting/meeting settings/remove participants Create a recurring meeting /platform api/meeting/recurring meetings/create repeat meeting Get meeting recordings /platform api/meeting/meeting records/get meeting records Get meeting attendance /platform api/meeting/meeting records/get meeting attendance Real time calls and meeting chat Get a call room by group ID /platform api/meeting/meeting signaling/get room by group id Get a startup call invitation /platform api/meeting/meeting signaling/get startup invitation Send a meeting chat message /platform api/meeting/meeting chat/send meeting chat Pull meeting chat messages /platform api/meeting/meeting chat/pull meeting chat Resource representations LiveKit | Property | Type | Description | | | | | | token | string | Participant access token. | | url | string | Real time service URL. | SystemGeneratedMeetingInfo | Property | Type | Description | | | | | | creatorUserID | string | Creator user ID. | | creatorNickname | string | Creator display name. | | status | string | Meeting status. | | startTime | int | Start time in Unix milliseconds. | | meetingID | string | Meeting ID. | CreatorDefinedMeetingInfo | Property | Type | Description | | | | | | title | string | Meeting title. | | scheduledTime | int | Scheduled start in Unix milliseconds. | | meetingDuration | int | Duration in seconds. | | password | string | Password, or empty when not required. | | timeZone | string | Creator selected time zone. | | hostUserID | string | Primary host user ID. | | coHostUSerID | string | Co host user IDs. The protocol uses this exact capitalization. | | inviteeUserIDs | string | Invitee user IDs. | MeetingInfo | Property | Type | Description | | | | | | systemGenerated | SystemGeneratedMeetingInfo | Server generated identity and status. | | creatorDefinedMeeting | CreatorDefinedMeetingInfo | Creator defined meeting information. | MeetingSetting | Property | Type | Description | | | | | | canParticipantsEnableCamera | bool | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | bool | Whether participants may unmute microphones. | | canParticipantsShareScreen | bool | Whether participants may share screens. | | disableCameraOnJoin | bool | Whether cameras start disabled. | | disableMicrophoneOnJoin | bool | Whether microphones start muted. | | canParticipantJoinMeetingEarly | bool | Whether participants may join early. | | lockMeeting | bool | Whether new participants are prevented from joining. | | audioEncouragement | bool | Whether active speaker highlighting is enabled. | | videoMirroring | bool | Whether video mirroring is enabled. | | recordOn | bool | Whether server side recording is enabled by policy. | MeetingInfoSetting | Property | Type | Description | | | | | | info | MeetingInfo | Meeting identity and creator defined information. | | setting | MeetingSetting | Meeting level settings. | | repeatInfo | MeetingRepeatInfo | Recurrence information for this instance. | MeetingRepeatInfoReq | Property | Type | Description | | | | | | endDate | int | Recurrence end in Unix milliseconds. | | repeatTimes | int | Planned number of instances. | | repeatType | RepeatType | Recurrence frequency. | | interval | int | Interval between occurrences. | | repeatDaysOfWeek | DayOfWeek | Weekdays included by the rule. | MeetingRepeatInfo Includes every MeetingRepeatInfoReq property plus repeatMeetingID and repeatSequence . RepeatMeetingData | Property | Type | Description | | | | | | repeatMeetingID | string | Recurring meeting ID. | | creatorUserID | string | Creator user ID. | | creatorDefinedMeetingInfo | CreatorDefinedMeetingInfo | Shared meeting information. | | setting | MeetingSetting | Shared settings. | | repeatInfo | MeetingRepeatInfo | Recurrence rule and identity. | | generatedCount | int | Number of generated instances. | | nextScheduleTime | int | Next scheduled generation time. | | status | RepeatStatus | Recurrence status. | PersonalMeetingSetting | Property | Type | Description | | | | | | cameraOnEntry | bool | Whether the camera is enabled on entry. | | microphoneOnEntry | bool | Whether the microphone is enabled on entry. | MeetingUser | Property | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Display name. | FileRecord | Property | Type | Description | | | | | | size | string | File size in the format returned by the service. | | fileURL | string | Recording file URL. | MeetingRecord | Property | Type | Description | | | | | | roomID | string | Meeting or call room ID. | | meetingName | string | Meeting name. | | ex | string | Business extension data. | | hostUserID | string | Host user ID. | | hostUserNickname | string | Host display name. | | createTime | int | Creation time in Unix milliseconds. | | startTime | int | Start time in Unix milliseconds. | | endTime | int | End time in Unix milliseconds. | | joinedUsers | MeetingUser | Participants recorded for the meeting. | | status | int | Meeting record status. | | fileRecords | FileRecord | Recording files. | | egressID | string | Recording job ID. | | downloadUrl | string | Recording download URL. | | egressUploading | bool | Whether a recording is still uploading. | | recordStatus | int | See RecordStatus recordstatus . | | videoFileSize | int | Video size in bytes. | | videoCoverUrl | string | Video cover URL. | | videoName | string | Video filename. | UserMeetingHistory Contains roomID , meetingName , hostUserID , hostUserNickname , startTime , endTime , status , and ex for a meeting attended by a user. HostedMeeting Contains roomID , meetingName , status , startTime , endTime , and ex for a meeting hosted by a user. MeetingChatMessage | Property | Type | Description | | | | | | seq | int | Meeting chat Seq. | | sendID | string | Sender user ID. | | contentType | int | Content type. See Message content types /platform api/message/message content types . | | content | string | Message content. | | createTimeMs | int | Creation time in Unix milliseconds. | | dstUserIDs | string | Target users; empty means room broadcast. | | nickname | string | Sender display name. | | faceURL | string | Sender avatar URL. | InviteeInfo | Property | Type | Description | | | | | | inviteeUserIDs | string | Replacement invitee list used by meeting updates. | InvitationInfo | Property | Type | Description | | | | | | inviterUserID | string | Invitation sender. | | inviteeUserIDList | string | Invitees. | | customData | string | Business extension data. | | groupID | string | Related group ID. | | roomID | string | Call room ID. | | timeout | int | Invitation timeout. | | mediaType | string | Call media type. | | platformID | int | Originating platform. See PlatformID /platform api/user/overview platformid . | | sessionType | int | Call session type. See ConversationType /platform api/conversation/overview conversationtype . | | initiateTime | int | Invitation initiation time. | | busyLineUserIDList | string | Users whose lines are busy. | Enumerations RepeatType | Value | Name | Description | | | | | | 0 | REPEAT TYPE NONE | Does not repeat. | | 1 | REPEAT TYPE DAILY | Daily. | | 2 | REPEAT TYPE WEEKLY | Weekly. | | 3 | REPEAT TYPE WEEKDAY | Weekdays. | | 4 | REPEAT TYPE MONTHLY | Monthly. | | 5 | REPEAT TYPE YEARLY | Yearly. | | 6 | REPEAT TYPE HOURLY | Hourly. | DayOfWeek | Value | Name | | | | | 0 | SUNDAY | | 1 | MONDAY | | 2 | TUESDAY | | 3 | WEDNESDAY | | 4 | THURSDAY | | 5 | FRIDAY | | 6 | SATURDAY | RepeatStatus | Value | Name | Description | | | | | | 0 | REPEAT STATUS UNKNOWN | Unknown. | | 1 | REPEAT STATUS ACTIVE | Active. | | 2 | REPEAT STATUS COMPLETED | Completed. | RecordStatus | Value | Name | Description | | | | | | 0 | NotStarted | Not started. | | 1 | Completed | Completed. | | 2 | Failed | Failed. | | 3 | Processing | Processing. | Integration guidance Authenticate users and validate meeting, room, recording, and tenant permissions in the business backend. Treat real time connection tokens and recording URLs as sensitive resources. Use the meeting chat Seq and creation marker together when incrementally restoring meeting chat." + "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "Add one or more conversations to conversation groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups add-conversations-to-groups", + "content": "Call addConversationsToGroups to add one or more conversations to one or more conversation groups. await OpenIMSDK.addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversation IDs to add. | | conversationGroupIDs | string | Yes | Target conversation group IDs. | Return result After the call completes, the conversation group membership request is complete. Membership changes are delivered through OnConversationGroupMemberAdded ; the callback includes the group, conversation IDs, and conversation details. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for the listener." }, { - "path": "/platform-api/user/account-governance/ban-user", - "title": "Ban users", - "description": "OpenIM Enterprise Platform API: ban specified users from continuing to use the service.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance ban-user", - "content": "Ban one or more users from continuing to use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/ban user Request example curl request POST \"$ API ADDRESS /user/ban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to ban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "Remove one or more conversations from conversation groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups remove-conversations-from-groups", + "content": "Call removeConversationsFromGroups to remove one or more conversations from the specified groups. await OpenIMSDK.removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversation IDs to remove. | | conversationGroupIDs | string | Yes | Target conversation group IDs. | Return result After the call completes, the membership removal request is complete. Membership changes are delivered through OnConversationGroupMemberDeleted ; the callback includes the group and conversation IDs. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." }, { - "path": "/platform-api/user/account-governance/unban-user", - "title": "Unban users", - "description": "OpenIM Enterprise Platform API: remove the ban from specified users.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance unban-user", - "content": "Remove the ban from one or more OpenIM users. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unban user Request example curl request POST \"$ API ADDRESS /user/unban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "Delete a conversation group and its conversation membership.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", + "content": "Call deleteConversationGroup to delete a conversation group and its conversation membership. await OpenIMSDK.deleteConversationGroup conversationGroupID ; conversationGroupID is the ID of the conversation group. Return result After the call completes, the group deletion request is complete. The operation does not delete conversations or messages. Group changes are delivered through OnConversationGroupDeleted ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." }, { - "path": "/platform-api/user/account-governance/unregister-user", - "title": "Unregister users", - "description": "OpenIM Enterprise Platform API: unregister user accounts that no longer use the service.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance unregister-user", - "content": "Unregister one or more user accounts that no longer use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unregister user Request example curl request POST \"$ API ADDRESS /user/unregister user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unregister. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/group/overview-group", + "title": "Group overview", + "description": "OpenIM React Native SDK guide for group overview.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group overview-group", + "content": "In OpenIM, group chats are organized as groups. In group APIs, use groupID to identify the target group, for example when querying group profiles, managing members, or handling group applications. After you create a group, obtain its groupID from the returned group information. A group chat session uses conversationID for conversation settings, message history, and unread status. conversationID identifies a conversation, whereas groupID identifies a group; do not confuse them when supplying API parameters. Core data types | Type | Purpose | | | | | GroupItem | A group's name, avatar, announcement, owner, join verification setting, member count, and extension data. | | GroupMemberItem | A user's nickname, role, mute state, and join information in a specific group. | Member roles use GroupMemberRole : Normal is a regular member, Admin is an administrator, and Owner is the group owner. Common GroupItem fields | Field | Type | Description | | | | | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | friendUserIDs | string | Group friend user ID information. | | remark | string | Group remark set by the current account. | Common GroupMemberItem fields | Field | Type | Description | | | | | | groupID | string | ID of the group that the member belongs to. | | userID | string | Member user ID. | | nickname | string | The user's nickname in the current group. | | faceURL | string | The user's avatar URL in the current group. | | roleLevel | GroupMemberRole | Member role. | | muteEndTime | number | Time when the mute ends. | | joinTime | number | Time when the member joined the group. | | joinSource | GroupJoinSource | How the member joined the group. | | inviterUserID | string | User ID of the member who invited this user. | | operatorUserID | string | User ID of the user who last updated this member profile. | | ex | string | Group member extension string. | nickname , faceURL , and roleLevel belong to the member profile in the current group. They can differ for the same user in another group. Find a page by task | Task | Pages | | | | | Create and maintain group profiles | Create a group /sdk/react native/group/create group , Update group profile /sdk/react native/group/update group profile , Publish a group announcement /sdk/react native/group/set group announcement , Set group extra data /sdk/react native/group/set group extension | | Configure join and member permissions | Set group join verification /sdk/react native/group/set group join verification , Set member profile access /sdk/react native/group/set group member profile access , Set group member friend request permissions /sdk/react native/group/set group member friend permission | | Join, leave, or dismiss groups | Apply to join a group /sdk/react native/group/join group , Leave a group /sdk/react native/group/quit group , Dismiss a group /sdk/react native/group/dismiss group | | Retrieve groups | Get group information /sdk/react native/group/retrieving groups/get specified groups info , Get joined groups by page /sdk/react native/group/retrieving groups/get joined group list page , Search groups /sdk/react native/group/retrieving groups/search groups | | Retrieve and handle group applications | Get received group applications /sdk/react native/group/group applications/get group application list as recipient , Get sent group applications /sdk/react native/group/group applications/get group application list as applicant | | Retrieve and manage group members | Get group members /sdk/react native/group/retrieving group members/get group member list , Invite users to a group /sdk/react native/group/managing group members/invite user to group , Remove group members /sdk/react native/group/managing group members/kick group member , Manage group administrators /sdk/react native/group/managing group members/set group member role level , Transfer group ownership /sdk/react native/group/managing group members/transfer group owner | | Manage group chat messaging permissions | Change group mute status /sdk/react native/group/change group mute , Mute or unmute a group member /sdk/react native/group/managing group members/change group member mute | Listen for group changes When the current account joins or leaves a group, when group profile information changes, or when a group is dismissed, OnJoinedGroupAdded , OnJoinedGroupDeleted , OnGroupInfoChanged , and OnGroupDismissed are triggered respectively. Each callback receives a GroupItem directly: const handleJoinedGroupAdded = group: GroupItem = // Add group to the joined group list ; const handleJoinedGroupDeleted = group: GroupItem = // Remove the group from the joined group list by group.groupID ; const handleGroupInfoChanged = group: GroupItem = // Update the group profile by group.groupID ; const handleGroupDismissed = group: GroupItem = // Close or remove the dismissed group by group.groupID ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.on OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.off OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; Remove these listeners when signing out, switching accounts, or discarding group related state. For member change listeners, see Get group members /sdk/react native/group/retrieving group members/get group member list . For group application change listeners, see Get received group applications /sdk/react native/group/group applications/get group application list as recipient ." }, { - "path": "/platform-api/user/account-governance/list-disabled-users", - "title": "List disabled users", - "description": "OpenIM Enterprise Platform API: list disabled accounts by user, status, and pagination criteria.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api user account-governance list-disabled-users", - "content": "List disabled accounts by user ID, status, and pagination criteria. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/page find disable users Request example curl request POST \"$ API ADDRESS /user/page find disable users\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to query. | | status | No | int | Account status filter. | | pagination | Yes | RequestPagination | Pagination settings. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"users\": \"userID\": \"user 001\", \"nickname\": \"Example user\", \"faceURL\": \"https://example.com/avatar.png\", \"ex\": \" \", \"createTime\": 1719800000000, \"appMangerLevel\": 0, \"globalRecvMsgOpt\": 0, \"status\": 1, \"addFriendPermission\": 0, \"category\": \"default\" , \"total\": 1 Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | | data.users | UserInfo | User records. See UserInfo /platform api/user/overview userinfo . | | data.total | int | Total number of matching records. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Pagination and request array limits follow the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" + "path": "/sdk/react-native/group/create-group", + "title": "Create a group", + "description": "OpenIM React Native SDK guide for create a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group create-group", + "content": "Call createGroup to create a group and set its initial members, administrators, and owner. const group = await OpenIMSDK.createGroup memberUserIDs: 'user 003', 'user 004' , adminUserIDs: 'user 002' , ownerUserID: currentUserID, groupInfo: groupName: 'Project discussion group', groupType: GroupType.WorkingGroup, faceURL: 'https://example.com/group.png', , ; Parameters | Parameter | Type | Required | Description | | | | | | memberUserIDs | string | Yes | User IDs of the initial regular members. | | adminUserIDs | string | No | User IDs of the initial administrators. | | ownerUserID | string | No | User ID of the group owner. The current user is used when omitted. | | groupInfo | Partial | Yes | Initial group profile. Common fields include groupName , groupType , and faceURL . | A regular member, administrator, and owner cannot be the same user. Use GroupType.WorkingGroup for groupInfo.groupType to create a regular group. Return value When the call completes, it returns the newly created GroupItem . Use the returned groupID to open the group profile or group chat. When the current account joins the group, OnJoinedGroupAdded returns the group information; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", - "title": "Delete sent friend requests", - "description": "OpenIM Enterprise Platform API: delete friend requests sent by a specified user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-sent-friend-requests", - "content": "Delete selected friend request records sent by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests from user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"fromUserID\":\"user 001\",\"toUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | fromUserID | Yes | string | User ID of the request sender. | | toUserIDs | Yes | string | User IDs of the request recipients whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request sender. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List sent friend requests /platform api/relation/managing friend requests/list sent friend requests" + "path": "/sdk/react-native/group/update-group-profile", + "title": "Update group profile", + "description": "OpenIM React Native SDK guide for update group profile.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group update-group-profile", + "content": "Call setGroupInfo to update a group name, description, or avatar. Provide only the fields that need to change. await OpenIMSDK.setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group to update. | | groupName | string | No | New group name. | | introduction | string | No | New group description. | | faceURL | string | No | URL of the new group avatar. | In addition to groupID , provide at least one group profile field to update. Fields that are not provided keep their current values. Return value When the call completes, the group profile is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", - "title": "Delete received friend requests", - "description": "OpenIM Enterprise Platform API: delete friend requests received by a specified user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-received-friend-requests", - "content": "Delete selected friend request records received by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests to user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests to user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"toUserID\":\"user 001\",\"fromUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | toUserID | Yes | string | User ID of the request recipient. | | fromUserIDs | Yes | string | User IDs of the request senders whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request recipient. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List received friend requests /platform api/relation/managing friend requests/list received friend requests" + "path": "/sdk/react-native/group/set-group-announcement", + "title": "Publish a group announcement", + "description": "OpenIM React Native SDK guide for publish a group announcement.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-announcement", + "content": "Call setGroupInfo to set or update a group announcement. await OpenIMSDK.setGroupInfo groupID, notification: announcement, ; groupID is the target group ID and notification is the announcement content. Pass an empty string to clear the announcement. The announcement and the group description, introduction , are separate fields. Return value When the call completes, the group announcement is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/group/group-applications/get-group-application-badge-count", - "title": "Get the group application badge count", - "description": "OpenIM Enterprise Platform API: get the pending group-application badge count for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications get-group-application-badge-count", - "content": "Get the group application badge count currently displayed for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/get group application badge count Request example curl request POST \"$ API ADDRESS /group/get group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"data\": \"count\":1 Response properties | Property | Type | Description | | | | | | data.count | int | Current group application badge count. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to read the user's application state. Related pages Group overview /platform api/group/overview Clear the group application badge count /platform api/group/group applications/clear group application badge count" + "path": "/sdk/react-native/group/set-group-extension", + "title": "Set group extra data", + "description": "OpenIM React Native SDK guide for set group extra data.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-extension", + "content": "Call setGroupInfo to set the group's ex extension field. await OpenIMSDK.setGroupInfo groupID, ex: JSON.stringify projectID: 'project 42', , ; groupID is the target group ID. ex is a string and can contain JSON or another string format for business specific data. Return value When the call completes, the group extension field is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/group/group-applications/clear-group-application-badge-count", - "title": "Clear the group application badge count", - "description": "OpenIM Enterprise Platform API: clear the current group-application badge count for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications clear-group-application-badge-count", - "content": "Clear the group application badge count currently stored for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/clear group application badge count Request example curl request POST \"$ API ADDRESS /group/clear group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response The API returns the common response envelope. errCode is 0 when the count was cleared successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to update the user's application state. Related pages Group overview /platform api/group/overview Get the group application badge count /platform api/group/group applications/get group application badge count" + "path": "/sdk/react-native/group/set-group-join-verification", + "title": "Set group join verification", + "description": "OpenIM React Native SDK guide for set group join verification.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-join-verification", + "content": "Call setGroupInfo to configure verification for group applications and invitations. await OpenIMSDK.setGroupInfo groupID, needVerification: GroupVerificationType.AllNeed, ; Parameters groupID is the target group ID. needVerification uses GroupVerificationType : | Enum value | Value | Description | | | | | | GroupVerificationType.ApplyNeedInviteNot | 0 | Applications require approval, while member invitations let users join directly. | | GroupVerificationType.AllNeed | 1 | Applications and regular member invitations require approval. Invitations from the owner or an administrator are excluded. | | GroupVerificationType.AllNot | 2 | Applications and invitations let users join directly. | Return value When the call completes, the group join verification setting is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/group/group-applications/delete-user-group-requests", - "title": "Delete applications sent by a user", - "description": "OpenIM Enterprise Platform API: delete a user's applications to selected groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications delete-user-group-requests", - "content": "Delete join application records sent by a user to selected groups. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests from user Request example curl request POST \"$ API ADDRESS /group/delete group requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\",\"groupIDs\": \"group 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User who sent the applications. | | groupIDs | Yes | string | Groups whose application records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target user. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List applications sent by a user /platform api/group/group applications/list user requested group applications" + "path": "/sdk/react-native/group/set-group-member-profile-access", + "title": "Set member profile access", + "description": "OpenIM React Native SDK guide for set member profile access.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-profile-access", + "content": "Call setGroupInfo to configure whether group members can view other members' profiles. This setting controls only member profile visibility and is independent of setting group member friend request permissions /sdk/react native/group/set group member friend permission . await OpenIMSDK.setGroupInfo groupID, lookMemberInfo: AllowType.NotAllowed, ; Parameters groupID is the target group ID. lookMemberInfo uses AllowType : | Enum value | Value | Description | | | | | | AllowType.Allowed | 0 | Members can view other members' profiles. | | AllowType.NotAllowed | 1 | Members cannot view other members' profiles. | Return value When the call completes, member profile visibility is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/group/group-applications/delete-group-received-requests", - "title": "Delete applications received by a group", - "description": "OpenIM Enterprise Platform API: delete selected applications received by a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api group group-applications delete-group-received-requests", - "content": "Delete selected join application records received by a group. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests to group Request example curl request POST \"$ API ADDRESS /group/delete group requests to group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"groupID\":\"group 001\",\"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | Group that received the applications. | | userIDs | Yes | string | Applicants whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target group. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List group applications /platform api/group/group applications/list received group applications" + "path": "/sdk/react-native/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "description": "OpenIM React Native SDK guide for set member friend request permission.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group set-group-member-friend-permission", + "content": "Call setGroupInfo to configure whether members can send friend requests to other members through the group. This setting controls only friend requests initiated from the member relationship and is independent of setting member profile visibility /sdk/react native/group/set group member profile access . await OpenIMSDK.setGroupInfo groupID, applyMemberFriend: AllowType.NotAllowed, ; Parameters groupID is the target group ID. applyMemberFriend uses AllowType : | Enum value | Value | Description | | | | | | AllowType.Allowed | 0 | Members can send friend requests through the group member relationship. | | AllowType.NotAllowed | 1 | Members cannot send friend requests through the group member relationship. | Return value When the call completes, group member friend request permissions are updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/message/content-processing/translate-text", - "title": "Translate text", - "description": "OpenIM Enterprise Platform API: translate text and return the detected source language.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message content-processing translate-text", - "content": "Translate text into a target language and return the detected source language. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /third/translate text Request example curl request POST \"$ API ADDRESS /third/translate text\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"content\":\"Hello\",\"sourceLanguageCode\":\"en\",\"targetLanguageCode\":\"zh CN\" ' Request body | Parameter | Required | Type | Description | | | | | | | content | Yes | string | Text to translate. | | sourceLanguageCode | Yes | string | Source BCP 47 language tag. Leave empty to enable detection. | | targetLanguageCode | Yes | string | Target BCP 47 language tag. | Response data.translatedText contains the translation and data.detectedLanguageCode contains the detected source BCP 47 tag. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Input size and language availability limits depend on the delivered translation service. Related pages Message overview /platform api/message/overview" + "path": "/sdk/react-native/group/change-group-mute", + "title": "Change group mute status", + "description": "OpenIM React Native SDK guide for change group mute status.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group change-group-mute", + "content": "Call changeGroupMute to enable or disable group wide muting. await OpenIMSDK.changeGroupMute groupID, isMute: true, muteBypassUserIDs: serviceAccountUserID , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | isMute | boolean | Yes | Use true to enable group wide muting or false to disable it. | | muteBypassUserIDs Enterprise | string | No | User IDs that can still send messages while the group is muted. | Do not add every member to muteBypassUserIDs . The server controls whether the group owner and administrators can send messages. Return value When the call completes, the group wide mute setting is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/message/streaming-messages/append-stream-message", - "title": "Append stream-message packets", - "description": "OpenIM Enterprise Platform API: append indexed text packets to a stream message.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message streaming-messages append-stream-message", - "content": "Append a batch of indexed text packets to an existing stream message and optionally mark the stream complete. HTTP request POST API ADDRESS /msg/append stream msg Request example curl request POST \"$ API ADDRESS /msg/append stream msg\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"clientMsgID\":\"client msg 001\",\"startIndex\":0,\"packets\": \"Hello\", \" world\" ,\"end\":true ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | Conversation containing the stream message. | | clientMsgID | Yes | string | Client message ID of the stream message. | | startIndex | Yes | int | Index assigned to the first packet in this batch. | | packets | Yes | string | Ordered stream message packets. | | end | Yes | bool | Whether this batch completes the stream. | Response The common response has errCode: 0 when the batch was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Preserve packet indexes when retrying; do not blindly append duplicate content. Related pages Upload stream message content /platform api/message/streaming messages/put stream message" + "path": "/sdk/react-native/group/join-group", + "title": "Apply to join a group", + "description": "OpenIM React Native SDK guide for apply to join a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group join-group", + "content": "Call joinGroup with a group ID, application message, and join source to apply to join a group. await OpenIMSDK.joinGroup groupID, reqMsg: 'Request to join the project discussion group', joinSource: GroupJoinSource.Search, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reqMsg | string | Yes | Application message. Pass an empty string when no message is needed. | | joinSource | GroupJoinSource | Yes | How the user initiated joining the group. | | ex | string | No | Business specific extension string. | Common joinSource values are: | Enum value | Value | Description | | | | | | GroupJoinSource.Invitation | 2 | Joined through an invitation. | | GroupJoinSource.Search | 3 | Joined through search. | | GroupJoinSource.QrCode | 4 | Joined through a QR code. | joinSource records how the user joined; it does not determine whether approval is required. Return value When the call completes, the join request is submitted. After the current account joins the group successfully, OnJoinedGroupAdded returns the group information; see Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/message/streaming-messages/put-stream-message", - "title": "Upload stream-message content", - "description": "OpenIM Enterprise Platform API: continuously upload UTF-8 content to a stream message over HTTP PUT.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message streaming-messages put-stream-message", - "content": "Continuously write UTF 8 output from a model or business service to the same stream message. HTTP request PUT API ADDRESS /msg/append stream msg?conversationID= CONVERSATION ID &clientMsgID= CLIENT MSG ID &operationID= OPERATION ID Request example curl request PUT \"$ API ADDRESS /msg/append stream msg?conversationID=si user 001 user 002&clientMsgID=client msg 001&operationID=$ OPERATION ID \" \\ header \"Content Type: text/plain; charset=utf 8\" header \"token: $ TOKEN \" \\ data binary 'Generated response content' Request parameters | Parameter | Location | Required | Type | Description | | | | | | | | conversationID | Query or header | Yes | string | Conversation containing the stream message. | | clientMsgID | Query or header | Yes | string | Client message ID of the stream message. | | operationID | Query or header | Yes | string | Unique trace ID for this request. | | token | Header | Yes | string | Valid user or administrator token. | | body | Body | Yes | bytes | UTF 8 stream message content. | Response The server returns write results as a stream. Handle interrupted connections and partial writes; do not retry a chunk until its state is known. Permissions and limits Available only in OpenIM Enterprise. The body must be valid UTF 8. conversationID and clientMsgID must identify the same appendable stream message. Related pages Append stream message packets /platform api/message/streaming messages/append stream message" + "path": "/sdk/react-native/group/quit-group", + "title": "Leave a group", + "description": "OpenIM React Native SDK guide for leave a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group quit-group", + "content": "Call quitGroup to leave a group that the current account has joined. await OpenIMSDK.quitGroup groupID ; groupID is the ID of the group to leave. A group owner must transfer ownership before leaving the group. Return value When the call completes, the current account has left the target group. After the current account leaves successfully, OnJoinedGroupDeleted is triggered and its callback receives the corresponding group information. See Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/message/read-status/mark-conversation-read", - "title": "Mark a conversation read through a Seq", - "description": "OpenIM Enterprise Platform API: advance a user's read position in a conversation to a message Seq.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message read-status mark-conversation-read", - "content": "Advance a user's read position in a conversation to the specified message Seq. Use this for read state migration or correction when the exact read boundary is known. HTTP request POST API ADDRESS /msg/mark conversation read Request example curl request POST \"$ API ADDRESS /msg/mark conversation read\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"userID\":\"user 001\",\"seq\":125 ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | userID | Yes | string | User whose read position is updated. | | seq | Yes | int | Last message Seq treated as read. | Response The common response has errCode: 0 when the read position was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the Seq belongs to the specified conversation before changing imported state. Related pages Set a conversation unread count /platform api/message/unread count/reset conversation unread" + "path": "/sdk/react-native/group/dismiss-group", + "title": "Dismiss a group", + "description": "OpenIM React Native SDK guide for dismiss a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group dismiss-group", + "content": "Call dismissGroup to dismiss a group. await OpenIMSDK.dismissGroup groupID ; groupID is the ID of the group to dismiss. Dismissing a group affects every member, and the server validates whether the caller has permission. Return value When the call completes, the group is dismissed. After a group is dismissed, relevant clients receive OnGroupDismissed ; its callback receives the dismissed group information. See Group overview /sdk/react native/group/overview group for event handling." }, { - "path": "/platform-api/message/managing-messages/modify-message", - "title": "Modify a message", - "description": "Modify message content by conversation ID and Seq with the OpenIM Enterprise Platform API.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message managing-messages modify-message", - "content": "Modify the content of a message identified by conversation ID and Seq. The response reports the modification time and count. This endpoint is available in OpenIM Enterprise. HTTP request POST API ADDRESS /msg/modify message Request example curl request POST \"$ API ADDRESS /msg/modify message\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"seq\":1,\"newContent\":\"updated content\",\"oldContent\":\"original content\" ' Enterprise: this endpoint requires the corresponding Enterprise service. Availability and authorization depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | seq | Yes | int | Message Seq. | | newContent | Yes | string | New message content. | | oldContent | Yes | string | Previous message content used for concurrency validation. | Response \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"modifiedTime\": 1719800000000, \"modifiedCount\": 1 | Field | Type | Description | | | | | | data.modifiedTime | int | Modification time as a Unix timestamp in milliseconds. | | data.modifiedCount | int | Number of modifications recorded for the message. | Authorize the operator and target resource in your business backend. Relevant clients can receive the synchronized message change according to the delivered Enterprise version. Related pages Message overview /platform api/message/overview Revoke a message /platform api/message/managing messages/revoke msg Error codes /platform api/error codes" + "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "description": "OpenIM React Native SDK guide for get group information.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-specified-groups-info", + "content": "Call getSpecifiedGroupsInfo to retrieve information for specific groups by group ID. const groups = await OpenIMSDK.getSpecifiedGroupsInfo 'group 001', 'group 002', ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | IDs of the groups to retrieve. | Return value When the call completes, it returns matching GroupItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." }, { - "path": "/platform-api/message/unread-count/get-conversations-unread-count", - "title": "Get conversation unread counts", - "description": "OpenIM Enterprise Platform API: get a user's unread counts for selected conversations.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message unread-count get-conversations-unread-count", - "content": "Get a user's unread message counts for selected conversations. HTTP request POST API ADDRESS /msg/get conversations unread count Request example curl request POST \"$ API ADDRESS /msg/get conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is queried. | | conversationIDs | Yes | string | Conversations to query. | Response data.unreadCount maps each conversation ID to its unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Message overview /platform api/message/overview" + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "description": "OpenIM React Native SDK guide for get joined groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list", + "content": "Call getJoinedGroupList to retrieve every group that the current account has joined. const groups = await OpenIMSDK.getJoinedGroupList ; Return value When the call completes, it returns GroupItem . For many groups, use Get joined groups by page /sdk/react native/group/retrieving groups/get joined group list page to retrieve them in batches." }, { - "path": "/platform-api/message/unread-count/clear-conversations-unread-count", - "title": "Clear conversation unread counts", - "description": "OpenIM Enterprise Platform API: clear a user's unread counts in selected conversations.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message unread-count clear-conversations-unread-count", - "content": "Clear a user's unread counts in selected conversations. HTTP request POST API ADDRESS /msg/clear conversations unread count Request example curl request POST \"$ API ADDRESS /msg/clear conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is cleared. | | conversationIDs | Yes | string | Conversations to clear. | Response data.unreadCount maps each requested conversation ID to its resulting unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Clearing unread counts changes user state; validate the target user and conversations. Related pages Get conversation unread counts /platform api/message/unread count/get conversations unread count" + "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "description": "OpenIM React Native SDK guide for get joined groups by page.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list-page", + "content": "Call getJoinedGroupListPage to retrieve groups joined by the current account in pages. const groups = await OpenIMSDK.getJoinedGroupListPage offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of groups to retrieve. | To retrieve the next page, set offset to the number of groups already retrieved. Return value When the call completes, it returns GroupItem for the current page. See Group overview /sdk/react native/group/overview group for field descriptions." }, { - "path": "/platform-api/message/unread-count/reset-conversation-unread", - "title": "Set a conversation unread count", - "description": "OpenIM Enterprise Platform API: set a target unread count for migration or state correction.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api message unread-count reset-conversation-unread", - "content": "Set a target unread count for a user in selected conversations. This operation is intended for data migration or state correction; it is distinct from setting an exact read Seq. HTTP request POST API ADDRESS /msg/reset conversation unread Request example curl request POST \"$ API ADDRESS /msg/reset conversation unread\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"num\":3 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is changed. | | conversationIDs | Yes | string | Conversations to update. | | num | Yes | int | Target unread count. | Response The common response has errCode: 0 when the target state was applied. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. For an exact imported read boundary, use Mark a conversation read through a Seq /platform api/message/read status/mark conversation read . Related pages Migrate to OpenIM /platform api/migration to openim" + "path": "/sdk/react-native/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "description": "OpenIM React Native SDK guide for check group membership.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups is-join-group", + "content": "Call isJoinGroup to check whether the current account has joined a group. const isJoined = await OpenIMSDK.isJoinGroup 'group 001' ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group to check. | Return value When the call completes, it returns a boolean : true if the current account has joined the group, or false otherwise." }, { - "path": "/platform-api/conversation/conversation-groups/create-conversation-group", - "title": "Create a conversation group", - "description": "OpenIM Enterprise Platform API: create a conversation group for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups create-conversation-group", - "content": "Create a conversation group for a user and optionally add one conversation to it. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/create conversation group Request example curl request POST \"$ API ADDRESS /conversation/create conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"order\":1,\"ex\":\" \",\"conversationID\":\"si user 001 user 002\",\"conversationGroupType\":1 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the group. | | name | Yes | string | Display name. | | order | Yes | int | Display order. | | ex | No | string | Business extension data. | | conversationID | No | string | Conversation to add when creating the group. | | conversationGroupType | Yes | ConversationGroupType | 0 : normal group; 1 : filter group. | Response data.group contains the created ConversationGroup /platform api/conversation/overview conversationgroup , including its ID, conversations, type, order, version, and creation time. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over ownerUserID and the optional conversation. Related pages Conversation overview /platform api/conversation/overview List conversation groups /platform api/conversation/conversation groups/list conversation groups" + "path": "/sdk/react-native/group/retrieving-groups/search-groups", + "title": "Search groups", + "description": "OpenIM React Native SDK guide for search groups.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-groups search-groups", + "content": "Call searchGroups to search groups by group ID or group name. const groups = await OpenIMSDK.searchGroups keywordList: 'project' , isSearchGroupID: false, isSearchGroupName: true, ; Parameters | Parameter | Type | Required | Description | | | | | | keywordList | string | Yes | Search keywords. | | isSearchGroupID | boolean | Yes | Whether to match group IDs. | | isSearchGroupName | boolean | Yes | Whether to match group names. | Return value When the call completes, it returns matching GroupItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." }, { - "path": "/platform-api/conversation/conversation-groups/update-conversation-group", - "title": "Update a conversation group", - "description": "OpenIM Enterprise Platform API: update a conversation group's name, extension data, or hidden state.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups update-conversation-group", - "content": "Update a conversation group's display name, extension data, or hidden state. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/update conversation group Request example curl request POST \"$ API ADDRESS /conversation/update conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"ex\":\" \",\"Hidden\":false ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | | name | No | StringValue | New display name. | | ex | No | StringValue | New business extension data. | | Hidden | No | BoolValue | Whether the group is hidden. The request field uses this exact capitalization. | Response data.group contains the updated ConversationGroup /platform api/conversation/overview conversationgroup . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit optional wrapper fields that should remain unchanged. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "description": "OpenIM React Native SDK guide for get received group applications.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-recipient", + "content": "Group owners and administrators can call getGroupApplicationListAsRecipient to retrieve received group applications. const applications = await OpenIMSDK.getGroupApplicationListAsRecipient groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | | handleResults | number | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of applications to retrieve. | Common ApplicationHandleResult values are: | Enum value | Value | Meaning | | | | | | ApplicationHandleResult.Unprocessed | 0 | Pending. | | ApplicationHandleResult.Agree | 1 | Accepted. | | ApplicationHandleResult.Reject | 1 | Rejected. | Return value When the call completes, it returns GroupApplicationItem that the current account can handle. Group application fields | Field | Type | Description | | | | | | groupID | string | ID of the group that the user applied to join. | | userID | string | User ID of the applicant. | | nickname | string | Applicant nickname recorded in the application. | | userFaceURL | string | Applicant avatar URL recorded in the application. | | reqMsg | string | Application message. | | reqTime | number | Application time. | | joinSource | GroupJoinSource | Source of the group application. | | handleResult | ApplicationHandleResult | Current handling result. | | handleUserID | string | User ID of the person who handled the application. | | handledMsg | string | Message entered while handling the application. | | handledTime | number | Time when the application was handled. | | groupName | string | Group name recorded in the application. | | groupFaceURL | string | Group avatar URL recorded in the application. | | groupType | GroupType | Group type. | | ownerUserID | string | Group owner user ID. | | creatorUserID | string | Group creator user ID. | | introduction | string | Group description recorded in the application. | | notification | string | Group announcement recorded in the application. | | memberCount | number | Group member count recorded in the application. | | status | GroupStatus | Group status. | | createTime | number | Application record creation time as a Unix timestamp in milliseconds. | | ex | string | Application record extension string. | The nickname, avatar, and group information in an application record reflect the values when the record was created. Query the current user profile or group profile to show the latest information. Listen for group application changes When a group application is added, handled, or deleted, OnGroupApplicationAdded , OnGroupApplicationAccepted , OnGroupApplicationRejected , or OnGroupApplicationDeleted is triggered respectively. Each callback receives a GroupApplicationItem directly: const handleApplicationChanged = application: GroupApplicationItem = // Update the application record by groupID and userID ; const handleApplicationDeleted = application: GroupApplicationItem = // Delete the application record by groupID and userID ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; Remove these listeners when signing out, switching accounts, or discarding application list state." }, { - "path": "/platform-api/conversation/conversation-groups/delete-conversation-group", - "title": "Delete a conversation group", - "description": "OpenIM Enterprise Platform API: delete a conversation group owned by a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups delete-conversation-group", - "content": "Delete a conversation group owned by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/delete conversation group Request example curl request POST \"$ API ADDRESS /conversation/delete conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | Response The common response has errCode: 0 when the group was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Deleting a group does not delete the conversations it contained. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "description": "OpenIM React Native SDK guide for get sent group applications.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-applicant", + "content": "Call getGroupApplicationListAsApplicant to retrieve group applications sent by the current account. const applications = await OpenIMSDK.getGroupApplicationListAsApplicant groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed, ApplicationHandleResult.Agree, ApplicationHandleResult.Reject, , offset: 0, count: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | | handleResults | number | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of applications to retrieve. | For ApplicationHandleResult values, see Get received group applications /sdk/react native/group/group applications/get group application list as recipient . Return value When the call completes, it returns GroupApplicationItem sent by the current account. See Get received group applications /sdk/react native/group/group applications/get group application list as recipient for application fields and application change event handling." }, { - "path": "/platform-api/conversation/conversation-groups/list-conversation-groups", - "title": "List conversation groups", - "description": "OpenIM Enterprise Platform API: get a user's conversation groups and synchronization version.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups list-conversation-groups", - "content": "Get a user's conversation groups and their synchronization version. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/get conversation groups Request example curl request POST \"$ API ADDRESS /conversation/get conversation groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"maxVersion\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | maxVersion | No | Int64Value | Highest group version already known by the caller. | Response | Property | Type | Description | | | | | | data.groups | ConversationGroup | Group records. See ConversationGroup /platform api/conversation/overview conversationgroup . | | data.maxVersion | int | Highest version represented by this result. | | data.full | bool | Whether the result is a full snapshot. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Treat full and maxVersion as synchronization metadata; do not infer a full snapshot from an empty array alone. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", + "title": "Get pending group application count", + "description": "OpenIM React Native SDK guide for get pending group application count.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-unhandled-count", + "content": "Call getGroupApplicationUnhandledCount to retrieve the number of group applications that remain unhandled after a specified time. const count = await OpenIMSDK.getGroupApplicationUnhandledCount time: 0, ; Parameters | Parameter | Type | Required | Description | | | | | | time | number | Yes | Start time as a Unix timestamp in milliseconds. Pass 0 to count every pending application. | Return value When the call completes, it returns a number representing the number of pending group applications after the specified time." }, { - "path": "/platform-api/conversation/conversation-groups/set-conversation-group-order", - "title": "Set conversation group order", - "description": "OpenIM Enterprise Platform API: set the display order of a user's conversation groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups set-conversation-group-order", - "content": "Set the display order of multiple conversation groups for a user. HTTP request POST API ADDRESS /conversation/set conversation group order Request example curl request POST \"$ API ADDRESS /conversation/set conversation group order\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"orders\": \"conversationGroupID\":\"conversation group 001\",\"order\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | orders | Yes | ConversationGroupOrder | Group IDs and their target order values. See ConversationGroupOrder /platform api/conversation/overview conversationgrouporder . | Response The common response has errCode: 0 when the order was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Supply each target group at most once. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/accept-group-application", + "title": "Accept a group application", + "description": "OpenIM React Native SDK guide for accept a group application.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications accept-group-application", + "content": "Call acceptGroupApplication to accept a user's group application. await OpenIMSDK.acceptGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: 'Approved', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group in the application. | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | handleMsg | string | Yes | Handling message. Pass an empty string when no message is needed. | When the call completes, the group application is accepted. Application status changes trigger OnGroupApplicationAccepted ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." }, { - "path": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", - "title": "Add conversations to groups", - "description": "OpenIM Enterprise Platform API: add conversations to one or more conversation groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups add-conversations-to-groups", - "content": "Add selected conversations to one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/add conversations to groups Request example curl request POST \"$ API ADDRESS /conversation/add conversations to groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to add. | | conversationGroupIDs | Yes | string | Destination group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "description": "OpenIM React Native SDK guide for reject a group application.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications refuse-group-application", + "content": "Call refuseGroupApplication to reject a user's group application. await OpenIMSDK.refuseGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: 'The application cannot be accepted at this time', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group in the application. | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | handleMsg | string | Yes | Rejection reason. Pass an empty string when no reason is needed. | When the call completes, the group application is rejected. Application status changes trigger OnGroupApplicationRejected ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." }, { - "path": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", - "title": "Remove conversations from groups", - "description": "OpenIM Enterprise Platform API: remove conversations from one or more conversation groups.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api conversation conversation-groups remove-conversations-from-groups", - "content": "Remove selected conversations from one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/remove conversations from groups Request example curl request POST \"$ API ADDRESS /conversation/remove conversations from groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to remove. | | conversationGroupIDs | Yes | string | Source group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Removing a conversation from a group does not delete the conversation. Related pages Conversation overview /platform api/conversation/overview" + "path": "/sdk/react-native/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "description": "OpenIM React Native SDK guide for delete group applications.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group group-applications delete-group-requests", + "content": "Call deleteGroupRequests to delete specified group application records in batches. await OpenIMSDK.deleteGroupRequests fromUserID: application.userID, groupID: application.groupID, , ; Parameters Each item in the array contains the following fields: | Parameter | Type | Required | Description | | | | | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | groupID | string | Yes | ID of the group in the application. | Deleting an application record does not handle a pending application. To accept or reject an application, use Accept a group application /sdk/react native/group/group applications/accept group application or Reject a group application /sdk/react native/group/group applications/refuse group application , respectively. When the call completes, the request to delete the records is complete. Deleting an application record triggers OnGroupApplicationDeleted ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." }, { - "path": "/platform-api/timer/managing-tasks/create-timer-task", - "title": "Create a timer task", - "description": "OpenIM Enterprise Platform API: schedule a task that invokes a business callback.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks create-timer-task", - "content": "Schedule a task that invokes a configured business handler at the specified time. HTTP request POST API ADDRESS /timer/create timer task Request example curl request POST \"$ API ADDRESS /timer/create timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskName\":\"Reminder\",\"taskCategory\":\"reminder\",\"executeAt\":1719800000000,\"executeBefore\":1719800060000,\"maxRetry\":1,\"callbackConfig\": \"callbackMethod\":\"openim http\",\"callbackPayload\":\" \\\"event\\\":\\\"reminder\\\" \" ,\"userID\":\"user 001\",\"dedupKey\":\"reminder 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskName | Yes | string | Task name. | | taskCategory | Yes | string | Business defined category. | | executeAt | Yes | int | Scheduled Unix time in milliseconds. | | executeBefore | Yes | int | Latest permitted execution time in milliseconds. | | maxRetry | Yes | int | Maximum retry count. | | callbackConfig | Yes | TimerTaskCallbackConfig | See TimerTaskCallbackConfig /platform api/timer/overview timertaskcallbackconfig . | | userID | Yes | string | Associated OpenIM user ID. | | dedupKey | Yes | string | Stable business idempotency key. | Response data.task contains the created TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Reuse dedupKey when retrying the same logical creation request. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", + "title": "Get group members", + "description": "OpenIM React Native SDK guide for get group members.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-group-member-list", + "content": "Call getGroupMemberList to retrieve members of a group in pages and filter them by role. const members = await OpenIMSDK.getGroupMemberList groupID: 'group 001', filter: GroupMemberFilter.All, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | filter | GroupMemberFilter | Yes | Member role filter. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | GroupMemberFilter values are: | Enum value | Value | Description | | | | | | GroupMemberFilter.All | 0 | All members. | | GroupMemberFilter.Owner | 1 | Group owner only. | | GroupMemberFilter.Admin | 2 | Administrators only. | | GroupMemberFilter.Normal | 3 | Regular members only. | | GroupMemberFilter.AdminAndNormal | 4 | Administrators and regular members. | | GroupMemberFilter.AdminAndOwner | 5 | Administrators and the group owner. | To retrieve the next page, set offset to the number of members already retrieved. Return value When the call completes, it returns GroupMemberItem for the current page. See Group overview /sdk/react native/group/overview group for field descriptions. Listen for group member changes When a member joins, leaves, or has profile information changed, OnGroupMemberAdded , OnGroupMemberDeleted , and OnGroupMemberInfoChanged are triggered respectively. Each callback receives a GroupMemberItem directly: const handleMemberAdded = member: GroupMemberItem = // Add the member to the corresponding group member list ; const handleMemberDeleted = member: GroupMemberItem = // Delete the member by member.groupID and member.userID ; const handleMemberChanged = member: GroupMemberItem = // Update the member profile by member.groupID and member.userID ; OpenIMSDK.on OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.on OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; OpenIMSDK.off OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.off OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; Remove these listeners when signing out, switching accounts, or discarding member list state." }, { - "path": "/platform-api/timer/managing-tasks/update-timer-task", - "title": "Update a timer task", - "description": "OpenIM Enterprise Platform API: update timer execution, retry, category, and callback settings.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks update-timer-task", - "content": "Update a timer task's schedule, category, retry policy, or callback configuration. HTTP request POST API ADDRESS /timer/update timer task Request example curl request POST \"$ API ADDRESS /timer/update timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"taskName\":\"Updated reminder\",\"executeAt\":1719900000000,\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | | taskName | No | string | New name. | | taskCategory | No | string | New business category. | | executeAt | No | int | New execution time in Unix milliseconds. | | executeBefore | No | int | New latest execution time in Unix milliseconds. | | maxRetry | No | int | New maximum retry count. | | callbackConfig | No | TimerTaskCallbackConfig | New callback configuration. | Response The common response has errCode: 0 when the task was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit fields that should remain unchanged. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get group member profiles", + "description": "OpenIM React Native SDK guide for get group member profiles.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-specified-group-members-info", + "content": "Call getSpecifiedGroupMembersInfo to retrieve member profiles for specified users in a group. const members = await OpenIMSDK.getSpecifiedGroupMembersInfo groupID: 'group 001', userIDList: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userIDList | string | Yes | User IDs of the members to retrieve. | Return value When the call completes, it returns matching GroupMemberItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." }, { - "path": "/platform-api/timer/managing-tasks/delete-timer-task", - "title": "Delete a timer task", - "description": "OpenIM Enterprise Platform API: delete a specified timer task owned by a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks delete-timer-task", - "content": "Delete a specified timer task owned by a user. HTTP request POST API ADDRESS /timer/delete timer task Request example curl request POST \"$ API ADDRESS /timer/delete timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response The common response has errCode: 0 when the task was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Do not assume deletion cancels a callback that has already started executing. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", + "title": "Check users in a group", + "description": "OpenIM React Native SDK guide for check users in a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-users-in-group", + "content": "Call getUsersInGroup to retrieve the user IDs from a specified set that have joined a group. const userIDs = await OpenIMSDK.getUsersInGroup groupID: 'group 001', userIDList: 'user 001', 'user 002', 'user 003' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userIDList | string | Yes | User IDs to check. | Return value When the call completes, it returns string containing the user IDs that have joined the target group." }, { - "path": "/platform-api/timer/managing-tasks/get-timer-task", - "title": "Get a timer task", - "description": "OpenIM Enterprise Platform API: get a timer task by task and user ID.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks get-timer-task", - "content": "Get the complete configuration of a timer task. HTTP request POST API ADDRESS /timer/get timer task Request example curl request POST \"$ API ADDRESS /timer/get timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response data.task contains the requested TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may access the target user's task. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "description": "OpenIM React Native SDK guide for search group members.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members search-group-members", + "content": "Call searchGroupMembers to search members of a group by user ID or group nickname. const members = await OpenIMSDK.searchGroupMembers groupID: 'group 001', keywordList: 'Zhang' , isSearchUserID: false, isSearchMemberNickname: true, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | keywordList | string | Yes | Search keywords. | | isSearchUserID | boolean | Yes | Whether to match user IDs. | | isSearchMemberNickname | boolean | Yes | Whether to match group nicknames. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | Return value When the call completes, it returns matching GroupMemberItem entries for the current page. See Group overview /sdk/react native/group/overview group for field descriptions." }, { - "path": "/platform-api/timer/managing-tasks/list-timer-tasks", - "title": "List timer tasks", - "description": "OpenIM Enterprise Platform API: list a user's timer tasks by category with pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api timer managing-tasks list-timer-tasks", - "content": "List a user's timer tasks, optionally restricted to selected business categories. HTTP request POST API ADDRESS /timer/list timer task Request example curl request POST \"$ API ADDRESS /timer/list timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"pageCount\":1,\"pageSize\":20,\"userID\":\"user 001\",\"categories\": \"reminder\" ' Request body | Parameter | Required | Type | Description | | | | | | | pageCount | Yes | int | Page number starting at 1 . | | pageSize | Yes | int | Number of records per page. | | userID | Yes | string | User whose tasks are queried. | | categories | Yes | string | Business category filters. | Response data.tasks contains an array of TimerTask /platform api/timer/overview timertask records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Page size limits follow the delivered server version. Related pages Timer overview /platform api/timer/overview" + "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "description": "OpenIM React Native SDK guide for invite users to a group.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members invite-user-to-group", + "content": "Call inviteUserToGroup to invite one or more users to a group. await OpenIMSDK.inviteUserToGroup groupID: 'group 001', reason: 'Invitation to join the project discussion group', userIDList: 'user 002', 'user 003' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reason | string | Yes | Invitation message. Pass an empty string when no message is needed. | | userIDList | string | Yes | User IDs to invite. | When the call completes, the invitation request is submitted. When a user actually joins the group, OnGroupMemberAdded is triggered; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + }, + { + "path": "/sdk/react-native/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "description": "OpenIM React Native SDK guide for remove group members.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members kick-group-member", + "content": "Call kickGroupMember to remove one or more members from a group. await OpenIMSDK.kickGroupMember groupID: 'group 001', reason: 'No longer involved in the project', userIDList: 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reason | string | Yes | Removal reason. Pass an empty string when no reason is needed. | | userIDList | string | Yes | User IDs of the members to remove. | When the call completes, the specified members are removed from the group. Removing a member triggers OnGroupMemberDeleted ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/book-meeting", - "title": "Schedule a meeting", - "description": "OpenIM Enterprise Platform API: schedule a meeting for a future start time.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management book-meeting", - "content": "Schedule a meeting for a future start time. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /rtc meeting/book meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/book meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Weekly sync\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": \"user 002\" ,\"inviteeUserIDs\": \"user 003\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ,\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence rule. Use a non recurring rule when scheduling a single meeting. | Response data.detail contains the created MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Scheduling does not return a real time connection token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate creator, host, co host, invitee, and tenant boundaries on your backend. All meeting times are Unix timestamps in milliseconds; meetingDuration is in seconds. Related pages Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", + "title": "Update a group nickname", + "description": "OpenIM React Native SDK guide for update a group nickname.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-nickname", + "content": "Call setGroupMemberInfo to update a member's group nickname. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', nickname: 'Project owner', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose nickname to update. | | nickname | string | Yes | New nickname for the member in the group. | A group nickname applies only to this group and does not change the user's account nickname. When the call completes, the group nickname is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/create-immediate-meeting", - "title": "Create an immediate meeting", - "description": "OpenIM Enterprise Platform API: create a meeting immediately and return real-time connection details.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management create-immediate-meeting", - "content": "Create a meeting immediately and return the real time audio and video connection details for the creator. HTTP request POST API ADDRESS /rtc meeting/create immediate meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/create immediate meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Support call\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": ,\"inviteeUserIDs\": \"user 002\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":true,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule metadata, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | Response | Property | Type | Description | | | | | | data.detail | MeetingInfoSetting | Created meeting details and settings. | | data.liveKit | LiveKit | Real time service URL and access token for the creator. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Return data.liveKit only to the authenticated participant for whom it was issued. Related pages Join a meeting /platform api/meeting/meeting management/join meeting Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "description": "OpenIM React Native SDK guide for manage group administrators.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-role-level", + "content": "Call setGroupMemberInfo to make a member an administrator or remove administrator status. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', roleLevel: GroupMemberRole.Admin, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose role to set. | | roleLevel | GroupMemberRole | Yes | Member role to set. | | Enum value | Value | Description | | | | | | GroupMemberRole.Normal | 20 | Regular member. Pass this value to remove administrator status. | | GroupMemberRole.Admin | 60 | Administrator. | | GroupMemberRole.Owner | 100 | Group owner role, used only to identify the current role. | You cannot transfer group ownership by setting GroupMemberRole.Owner . Use Transfer group ownership /sdk/react native/group/managing group members/transfer group owner instead. When the call completes, the member role is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/join-meeting", - "title": "Join a meeting", - "description": "OpenIM Enterprise Platform API: validate a participant and meeting password, then issue connection details.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management join-meeting", - "content": "Validate the meeting and password, admit a participant, and issue real time connection details. HTTP request POST API ADDRESS /rtc meeting/join meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/join meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\",\"password\":\"123456\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | password | Yes | string | Meeting password; use an empty string for a meeting without a password. | Response data.liveKit contains the LiveKit /platform api/meeting/overview livekit service URL and participant access token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Issue connection details only after authenticating userID in your business system. Do not share or persist the returned participant token outside the meeting session. Related pages Get a meeting token /platform api/meeting/meeting management/get meeting token Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member avatar", + "description": "OpenIM React Native SDK guide for update a group member avatar.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-avatar", + "content": "Call setGroupMemberInfo to update a member's group avatar. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', faceURL: 'https://example.com/avatar.png', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose avatar to update. | | faceURL | string | Yes | Member avatar URL for this group. | A group avatar applies only to the specified group. To update an account avatar, use Update your profile /sdk/react native/user/profile/set self info . When the call completes, the group avatar is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/get-meeting-token", - "title": "Get a meeting token", - "description": "OpenIM Enterprise Platform API: issue real-time meeting connection details for a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting-token", - "content": "Issue real time audio and video connection details for a specified meeting participant. HTTP request POST API ADDRESS /rtc meeting/get meeting token Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting token\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant for whom the token is issued. | Response data.meetingID identifies the meeting and data.liveKit contains the LiveKit /platform api/meeting/overview livekit URL and participant token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Authenticate the participant before issuing the token and return it only to that participant. Related pages Join a meeting /platform api/meeting/meeting management/join meeting" + "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", + "title": "Set group member extra data", + "description": "OpenIM React Native SDK guide for set group member extra data.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-extension", + "content": "Call setGroupMemberInfo to set a member's ex extension field. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', ex: JSON.stringify title: 'maintainer', , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose extension data to set. | | ex | string | Yes | Group member extension string. It can contain JSON or another string format for business specific data. | When the call completes, the member extension field is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/update-meeting", - "title": "Update a meeting", - "description": "OpenIM Enterprise Platform API: update selected meeting information, settings, and invitees.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management update-meeting", - "content": "Update selected meeting information, recurrence settings, participant permissions, and invitees. HTTP request POST API ADDRESS /rtc meeting/update meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/update meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"updatingUserID\":\"user 001\",\"title\":\"Updated weekly sync\",\"scheduledTime\":1719900000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ,\"repeatMeetingID\":\"repeat meeting 001\",\"repeatSequence\":1 ,\"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"inviteeInfo\": \"inviteeUserIDs\": \"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | updatingUserID | Yes | string | User performing the update. | | title | No | StringValue | New title. | | scheduledTime | No | Int64Value | New start time in Unix milliseconds. | | meetingDuration | No | Int64Value | New duration in seconds. | | password | No | StringValue | New password, including an empty value to remove it. | | timeZone | No | StringValue | New creator selected time zone. | | repeatInfo | Yes | MeetingRepeatInfo | Recurrence information associated with this meeting. | | canParticipantsEnableCamera | No | BoolValue | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | No | BoolValue | Whether participants may unmute microphones. | | canParticipantsShareScreen | No | BoolValue | Whether participants may share screens. | | disableCameraOnJoin | No | BoolValue | Whether cameras start disabled. | | disableMicrophoneOnJoin | No | BoolValue | Whether microphones start muted. | | canParticipantJoinMeetingEarly | No | BoolValue | Whether participants may join early. | | lockMeeting | No | BoolValue | Whether new participants are blocked from joining. | | audioEncouragement | No | BoolValue | Whether active speaker highlighting is enabled. | | videoMirroring | No | BoolValue | Whether video mirroring is enabled. | | inviteeInfo | Yes | InviteeInfo | Updated invitee user IDs. | Response The common response has errCode: 0 when the update was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Use wrapper fields to distinguish omitted values from explicit zero, empty, or false values. Related pages Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "description": "OpenIM React Native SDK guide for transfer group ownership.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members transfer-group-owner", + "content": "Call transferGroupOwner to transfer group ownership to another member. await OpenIMSDK.transferGroupOwner groupID: 'group 001', newOwnerUserID: 'user 002', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | newOwnerUserID | string | Yes | User ID of the new group owner. This user must already be a member of the group. | When the call completes, group ownership is transferred. The member roles of the former and new owners change through OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/get-meeting", - "title": "Get a meeting", - "description": "OpenIM Enterprise Platform API: get a meeting's details, settings, and recurrence information.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting", - "content": "Get a meeting's system and creator defined information, meeting settings, and recurrence information. HTTP request POST API ADDRESS /rtc meeting/get meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"meetingID\":\"meeting 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the meeting. | | meetingID | Yes | string | Meeting ID. | Response data.meetingDetail contains a MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the requesting user may view the target meeting. Related pages Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "description": "OpenIM React Native SDK guide for mute or unmute a group member.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", + "content": "Call changeGroupMemberMute to set a mute duration for a member. Pass 0 to remove the mute. await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member to mute or unmute. | | mutedSeconds | number | Yes | Mute duration in seconds. Pass 0 to remove the mute. | When the call completes, the member mute state is updated. Member profile changes trigger OnGroupMemberInfoChanged ; read muteEndTime from the event parameter to get the mute end time. See Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." }, { - "path": "/platform-api/meeting/meeting-management/list-meetings", - "title": "List a user's meetings", - "description": "OpenIM Enterprise Platform API: list meetings created or attended by a user, filtered by status.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management list-meetings", - "content": "List meetings created or attended by a user, restricted to selected meeting statuses. HTTP request POST API ADDRESS /rtc meeting/get meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose meetings are queried. | | status | Yes | string | Meeting status filters. | Response data.meetingDetails contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Status values must match those supported by the delivered meeting service. Related pages Get user related meetings /platform api/meeting/meeting management/get user related meetings" + "path": "/sdk/react-native/message/overview-message", + "title": "Message overview", + "description": "OpenIM React Native SDK guide for message overview.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message overview-message", + "content": "OpenIM React Native SDK represents each message with MessageItem . Creating a message only creates a MessageItem ready to send; to send it to a one to one user or group, call a sending API. Receiving, querying, and state changes such as deletion, revocation, and modification are handled through their respective APIs or events. Message lists use clientMsgID to identify, deduplicate, and update individual messages. MessageItem does not contain conversationID ; obtain the message's conversation from the current conversation, history query parameters, or event context. Message workflow | Stage | Related capability | Description | | | | | | Create | create Message | Creates a MessageItem ready to send. | | Send | sendMessage and sendMessageNotOss | Sends a message to a one to one chat or group chat. | | Receive | New message events | Receives real time, offline, and online only messages. | | Query | Message history, lookup by ID, and search | Reads or locates saved messages by conversation. | | State changes | Revocation, deletion, modification, and read receipts | Updates the message list from call results and the corresponding events. | MessageItem type The message objects returned when creating, sending, receiving, or querying messages are MessageItem . Common public fields include: | Field | Type | Description | | | | | | clientMsgID | string | Client message ID, used to deduplicate, update, and locate messages. | | serverMsgID | string | Server message ID. | | sessionType | SessionType | Conversation type, used to distinguish one to one chats from group chats. | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID for a one to one message. | | groupID | string | Group ID for a group message. | | contentType | MessageType | Message content type, which determines the content field to render. | | createTime | number | Message object creation time. | | sendTime | number | Message send time. | | seq | number | Server message sequence number. | | senderPlatformID | Platform | Client platform that sent the message. | | status | MessageStatus | Message send status. | | isRead | boolean | Read state. | | senderNickname | string | Sender nickname. | | senderFaceUrl | string | Sender avatar URL. | | offlinePush | OfflinePush | Offline push configuration. | | content | string | SDK serialized message content. For rendering, read the content field that corresponds to contentType . | | ex | string | Message extension field. | | localEx | string | Message extension field used only on the current device. | Message content is stored in the MessageItem field that corresponds to contentType : | Content | Field | | | | | Text, rich text, and Markdown | textElem , advancedTextElem , markdownTextElem | | Images, audio, video, and files | pictureElem , soundElem , videoElem , fileElem | | @ messages | atTextElem | | Reply messages | quoteElem | | Merged forwards | mergeElem | | Contact cards, locations, and emoji | cardElem , locationElem , faceElem | | Custom messages | customElem | | Notifications, typing status, and attached status | notificationElem , typingElem , attachedInfoElem | All content fields are optional. A message usually uses only the content field that corresponds to its contentType ; determine contentType before reading that field for rendering. Create and send messages First call the applicable creation API to obtain a MessageItem , then call a sending API. Use Send a message /sdk/react native/message/sending messages/send message when the SDK uploads a local media file; use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss when the media file already has a remote URL. | Content | Page | | | | | Text and rich text | Create a text message /sdk/react native/message/creating messages/create text message , Create a rich text message /sdk/react native/message/creating messages/create advanced text message | | @ messages | Create an @ message /sdk/react native/message/creating messages/create text at message | | Images, audio, video, and files | Create an image message from a file /sdk/react native/message/creating messages/create image message by file , Create an audio message from a file /sdk/react native/message/creating messages/create sound message by file , Create a video message from files /sdk/react native/message/creating messages/create video message by file , Create a file message from a file /sdk/react native/message/creating messages/create file message by file | | Contact cards, locations, and emoji | Create a contact card message /sdk/react native/message/creating messages/create card message , Create a location message /sdk/react native/message/creating messages/create location message , Create an emoji message /sdk/react native/message/creating messages/create face message | | Replies, forwards, and merged forwards | Create a reply message /sdk/react native/message/creating messages/create quote message , Create a forwarded message /sdk/react native/message/creating messages/create forward message , Create a merged forward message /sdk/react native/message/creating messages/create merger message | | Custom messages | Create a custom message /sdk/react native/message/creating messages/create custom message | Browse by task | Task | Page | | | | | Receive real time, offline, and online only messages | Receive messages /sdk/react native/message/receiving messages/receive messages | | Receive custom business messages | Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages | | Load message history or message context | Load message history /sdk/react native/message/retrieving messages/load older messages , Load message context /sdk/react native/message/retrieving messages/load message context | | Find or search messages by ID | Find messages by ID /sdk/react native/message/retrieving messages/find messages by id , Search messages /sdk/react native/message/searching messages/search messages | | Delete, revoke, or modify messages | Delete messages in a batch /sdk/react native/message/managing messages/delete saved messages , Revoke a message /sdk/react native/message/managing messages/revoke a message , Modify a message /sdk/react native/message/managing messages/modify a message | | Manage message data used only on the current device | Delete a local message /sdk/react native/message/managing messages/delete local message , Set a local message extension /sdk/react native/message/managing messages/set message local ex | | Report or query group message read status | Report group messages as read /sdk/react native/message/managing read status/send group read receipts , Get members who read a group message /sdk/react native/message/managing read status/get group message readers | | Report or query typing status | Report typing status /sdk/react native/message/composing messages/update typing status , Get typing status /sdk/react native/message/composing messages/get typing status | | Transcribe audio | Check audio transcription availability /sdk/react native/message/composing messages/check speech to text , Transcribe audio /sdk/react native/message/composing messages/transcribe audio | Event handling Complete event listener examples for message events are available on the following pages: New, offline, and online only messages: OnRecvNewMessage , OnRecvOfflineNewMessage , and OnRecvOnlineOnlyMessage . See Receive messages /sdk/react native/message/receiving messages/receive messages . Custom business messages: OnRecvCustomBusinessMessage . See Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages . Message deletion: OnMsgDeleted . See Delete messages in a batch /sdk/react native/message/managing messages/delete saved messages . Message revocation: OnNewRecvMessageRevoked . See Revoke a message /sdk/react native/message/managing messages/revoke a message . Message modification: OnMessageModified . See Modify a message /sdk/react native/message/managing messages/modify a message . Group message read status: OnRecvGroupReadReceipt . See Report group messages as read /sdk/react native/message/managing read status/send group read receipts . Typing status changes: OnInputStatusChanged . See Update input states /sdk/react native/message/composing messages/change input states ." }, { - "path": "/platform-api/meeting/meeting-management/invite-meeting-users", - "title": "Invite users to a meeting", - "description": "OpenIM Enterprise Platform API: invite users to an existing meeting and return per-user results.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management invite-meeting-users", - "content": "Invite multiple users to an existing meeting and return per user processing results. HTTP request POST API ADDRESS /rtc meeting/invite meeting invitees Request example curl request POST \"$ API ADDRESS /rtc meeting/invite meeting invitees\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"inviterUserID\":\"user 001\",\"inviteeUserIDs\": \"user 002\",\"user 003\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | inviterUserID | Yes | string | User initiating the invitation. | | inviteeUserIDs | Yes | string | Users to invite. | Response | Property | Type | Description | | | | | | data.successUserIDList | string | Users successfully added to the invitation state. | | data.failedUserIDList | string | Users whose invitations failed. | | data.meetingDetail | MeetingInfoSetting | Updated meeting details. | An overall errCode: 0 does not imply that every invitee succeeded; inspect both user ID lists. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that inviterUserID has permission to invite participants. Related pages Meeting overview /platform api/meeting/overview" + "path": "/sdk/react-native/message/creating-messages/create-text-message", + "title": "Create a text message", + "description": "OpenIM React Native SDK guide for create a text message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-message", + "content": "Use createTextMessage to create a text message ready to send. const message = await OpenIMSDK.createTextMessage 'Hello, welcome to the discussion.' ; The argument is the message text. The call returns a MessageItem ; pass it as message to Send a message /sdk/react native/message/sending messages/send message ." }, { - "path": "/platform-api/meeting/meeting-management/leave-meeting", - "title": "Leave a meeting", - "description": "OpenIM Enterprise Platform API: remove a specified user's active participation in a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management leave-meeting", - "content": "Make a specified participant leave the current meeting without ending the meeting for everyone else. HTTP request POST API ADDRESS /rtc meeting/leave meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/leave meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant leaving the meeting. | Response The common response has errCode: 0 when the participant state was updated. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. This operation does not end or cancel the meeting. Related pages End a meeting /platform api/meeting/meeting management/end meeting" + "path": "/sdk/react-native/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "description": "OpenIM React Native SDK guide for create an @ message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-at-message", + "content": "Use createTextAtMessage to create a mention message in a group chat. The mentions in text must correspond to atUserIDList . const message = await OpenIMSDK.createTextAtMessage text: '@user 001 Please confirm the release content.', atUserIDList: 'user 001' , atUsersInfo: atUserID: 'user 001', groupNickname: 'Lee', , , ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Body text of the mention message. | | atUserIDList | string | Yes | User IDs of the mentioned members. | | atUsersInfo | AtUsersInfoItem | No | Display names of mentioned members in the group. | | message | MessageItem | No | An attached message object. | The call returns a MessageItem ready to send. Pass it as message to Send a message /sdk/react native/message/sending messages/send message ." }, { - "path": "/platform-api/meeting/meeting-management/end-meeting", - "title": "End or cancel a meeting", - "description": "OpenIM Enterprise Platform API: cancel a scheduled meeting or end an active meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management end-meeting", - "content": "Cancel a scheduled meeting or end an active meeting for all participants. HTTP request POST API ADDRESS /rtc meeting/end meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/end meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\",\"endType\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | endType | Yes | MeetingEndType | 0 CancelType cancels a scheduled meeting; 1 EndType ends an active meeting. | Response The common response has errCode: 0 when the requested state transition completed. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent business permission before ending a meeting for all participants. Related pages Leave a meeting /platform api/meeting/meeting management/leave meeting" + "path": "/sdk/react-native/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "description": "OpenIM React Native SDK guide for create a custom message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-custom-message", + "content": "Use createCustomMessage to create a custom business message. The sending and receiving applications must agree on the formats of data and extension . const message = await OpenIMSDK.createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify version: 1 , description: 'Task card', ; Parameters | Parameter | Type | Required | Description | | | | | | | data | string | Yes | Business data string. It can contain JSON. | | extension | string | Yes | Business extension data string. | | description | string | Yes | Message description. It can also be fallback text for clients that do not support the message type. | The call returns a MessageItem ready to send. Receiving clients should validate the business data format and version. For server delivered business notifications, see Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages ." }, { - "path": "/platform-api/meeting/meeting-management/get-user-related-meetings", - "title": "Get user-related meetings", - "description": "OpenIM Enterprise Platform API: list meetings related to a user by status and time range.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-management get-user-related-meetings", - "content": "List meetings related to a user by meeting status and optional time range. HTTP request POST API ADDRESS /rtc meeting/get user related meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get user related meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ,\"startTime\":1719800000000,\"endTime\":1722400000000 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose related meetings are queried. | | status | Yes | string | Meeting status filters. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | Response data.meetings contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records matching both the status and time constraints. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Ensure endTime is not earlier than startTime . Related pages List a user's meetings /platform api/meeting/meeting management/list meetings" + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", + "title": "Create an image message from a file", + "description": "OpenIM React Native SDK guide for create an image message from a file.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-file", + "content": "Use createImageMessageFromFullPath to create a message from an image stored on the device. const message = await OpenIMSDK.createImageMessageFromFullPath imagePath ; imagePath is the full path to the image on the device. The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local resource." }, { - "path": "/platform-api/meeting/meeting-settings/set-personal-setting", - "title": "Set personal meeting preferences", - "description": "Set a user's camera and microphone preferences for joining a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings set-personal-setting", - "content": "Set a user's camera and microphone preferences for joining a meeting. HTTP request POST API ADDRESS /rtc meeting/set personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | cameraOnEntry | No | BoolValue | Whether the camera is enabled on entry. | | microphoneOnEntry | No | BoolValue | Whether the microphone is enabled on entry. | Response errCode: 0 means the preference update succeeded. Permissions and limits Available only in OpenIM Enterprise. Omit wrapper values that should remain unchanged; explicit false disables the preference." + "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "description": "OpenIM React Native SDK guide for create an image message from a url.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-url", + "content": "Use createImageMessageByURL to create a message from uploaded image resource information. The source image, large image, and thumbnail can share one resource description or use separate resources with different sizes or quality. const picture = uuid: 'image 001', type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: 'https://www.example.com/picture.png', ; const message = await OpenIMSDK.createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', ; Parameters | Parameter | Type | Required | Description | | | | | | | sourcePicture | PicBaseInfo | Yes | Source image resource information. | | bigPicture | PicBaseInfo | Yes | Large image resource information. | | snapshotPicture | PicBaseInfo | Yes | Thumbnail resource information. | | sourcePath | string | Yes | Local image path. Pass an empty string when only a remote resource is available. | Each PicBaseInfo contains uuid , type , size , width , height , and url : the resource ID, type, byte size, pixel dimensions, and remote URL. The call returns a MessageItem ready to send. Use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss to send it." }, { - "path": "/platform-api/meeting/meeting-settings/get-personal-setting", - "title": "Get personal meeting preferences", - "description": "Get a user's camera and microphone preferences for a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings get-personal-setting", - "content": "Get a user's personal audio and video preferences for a meeting. HTTP request POST API ADDRESS /rtc meeting/get personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | Response data.setting contains a PersonalMeetingSetting /platform api/meeting/overview personalmeetingsetting with cameraOnEntry and microphoneOnEntry . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may read the participant's meeting preferences." + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", + "title": "Create an audio message from a file", + "description": "OpenIM React Native SDK guide for create an audio message from a file.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-file", + "content": "Use createSoundMessageFromFullPath to create a message from an audio file on the device. const message = await OpenIMSDK.createSoundMessageFromFullPath soundPath, duration: 18, ; Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Full path to the audio file. | | duration | number | Yes | Audio duration in seconds. | The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local audio resource." }, { - "path": "/platform-api/meeting/meeting-settings/operate-all-streams", - "title": "Control participant media streams", - "description": "Control camera and microphone state across meeting participants.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings operate-all-streams", - "content": "Apply camera or microphone state changes across meeting participants. HTTP request POST API ADDRESS /rtc meeting/operate meeting all stream Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | operatorUserID | Yes | string | User performing the operation. | | cameraOnEntry | No | BoolValue | Target camera state. | | microphoneOnEntry | No | BoolValue | Target microphone state. | Response data.streamNotExistUserIDList identifies participants without a matching media stream. data.failedUserIDList identifies other failed operations. Inspect both lists even when errCode is 0 . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." + "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "description": "OpenIM React Native SDK guide for create an audio message from a url.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-url", + "content": "Use createSoundMessageByURL to create a message from uploaded audio resource information. const message = await OpenIMSDK.createSoundMessageByURL uuid: 'audio 001', soundPath: '', sourceUrl: 'https://www.example.com/sound.mp3', dataSize: 54000, duration: 18, soundType: 'audio/mpeg', ; Parameters | Parameter | Type | Required | Description | | | | | | | uuid | string | Yes | Audio resource ID. | | soundPath | string | Yes | Local audio path. Pass an empty string when only a remote resource is available. | | sourceUrl | string | Yes | URL of the uploaded audio. | | dataSize | number | Yes | Audio size in bytes. | | duration | number | Yes | Audio duration in seconds. | | soundType | string | No | Audio type. | The call returns a MessageItem ready to send. Use the actual upload result for resource information, then use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss ." }, { - "path": "/platform-api/meeting/meeting-settings/modify-participant-name", - "title": "Modify a participant name", - "description": "Change a participant's display name within a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings modify-participant-name", - "content": "Change a participant's display name within a meeting without changing the user's global profile. HTTP request POST API ADDRESS /rtc meeting/modify meeting participant name Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserID | Yes | string | Target participant. | | nickname | Yes | string | New in meeting display name. | Response errCode: 0 means the in meeting name was updated. Permissions and limits Available only in OpenIM Enterprise. This operation does not update UserInfo.nickname ." + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", + "title": "Create a video message from files", + "description": "OpenIM React Native SDK guide for create a video message from files.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-file", + "content": "Use createVideoMessageFromFullPath to create a message from a video file and cover image on the device. const message = await OpenIMSDK.createVideoMessageFromFullPath videoPath, videoType: 'video/mp4', duration: 36, snapshotPath, ; Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Full path to the video file. | | videoType | string | Yes | Video type. | | duration | number | Yes | Video duration in seconds. | | snapshotPath | string | Yes | Full path to the video cover image. | The call returns a MessageItem ready to send. Use Send a message /sdk/react native/message/sending messages/send message to upload the local video and cover image." }, { - "path": "/platform-api/meeting/meeting-settings/remove-participants", - "title": "Remove meeting participants", - "description": "Remove selected participants from a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings remove-participants", - "content": "Remove selected participants from an active meeting. HTTP request POST API ADDRESS /rtc meeting/remove participants Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserIDs | Yes | string | Participants to remove. | Response Inspect data.successUserIDList and data.failedUserIDList ; a successful envelope can still contain per user failures. Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." + "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "description": "OpenIM React Native SDK guide for create a video message from urls.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-url", + "content": "Use createVideoMessageByURL to create a message from uploaded video and cover image resources. const message = await OpenIMSDK.createVideoMessageByURL videoPath: '', duration: 36, videoType: 'video/mp4', videoUUID: 'video 001', videoUrl: 'https://www.example.com/video.mp4', videoSize: 820000, snapshotPath: '', snapshotUUID: 'cover 001', snapshotSize: 42000, snapshotUrl: 'https://www.example.com/snapshot.png', snapshotWidth: 1280, snapshotHeight: 720, snapShotType: 'image/jpeg', ; Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Local video path. Pass an empty string when only a remote resource is available. | | duration | number | Yes | Video duration in seconds. | | videoType | string | Yes | Video type. | | videoUUID , videoUrl , videoSize | string , string , number | Yes | Video resource ID, remote URL, and byte size. | | snapshotPath | string | Yes | Local cover image path. Pass an empty string when only a remote resource is available. | | snapshotUUID , snapshotUrl , snapshotSize | string , string , number | Yes | Cover image resource ID, remote URL, and byte size. | | snapshotWidth , snapshotHeight | number | Yes | Cover image width and height in pixels. | | snapShotType | string | No | Cover image type. | The call returns a MessageItem ready to send. Use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss to send it." }, { - "path": "/platform-api/meeting/meeting-settings/set-meeting-host", - "title": "Set meeting hosts", - "description": "Set the host and co-hosts of a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings set-meeting-host", - "content": "Set the primary host and co host list of a meeting. HTTP request POST API ADDRESS /rtc meeting/set meeting host info Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | hostUserID | No | StringValue | New primary host. | | coHostUserIDs | Yes | string | Complete co host user ID list. | Response errCode: 0 means host information was updated. Permissions and limits Available only in OpenIM Enterprise. Validate role transfer authority before changing the primary host." + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", + "title": "Create a file message from a file", + "description": "OpenIM React Native SDK guide for create a file message from a file.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-file", + "content": "Use createFileMessageFromFullPath to create a message from a file on the device. const message = await OpenIMSDK.createFileMessageFromFullPath filePath, fileName: 'product guide.pdf', ; Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Full path to the file. | | fileName | string | Yes | File name shown to recipients. | The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local file." }, { - "path": "/platform-api/meeting/meeting-settings/clean-previous-meetings", - "title": "Clean previous meeting state", - "description": "Clear stale meeting connection state retained before a user logs in.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-settings clean-previous-meetings", - "content": "Clear stale meeting connection state retained before a user starts a new login session. HTTP request POST API ADDRESS /rtc meeting/clean previous meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose stale state is cleared. | | reasonCode | Yes | int | Business reason code. | | reason | Yes | string | Human readable cleanup reason. | Response errCode: 0 means stale meeting state was cleared. Permissions and limits Available only in OpenIM Enterprise. Use this for stale connection recovery, not as a general meeting history deletion API." + "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "description": "OpenIM React Native SDK guide for create a file message from a url.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-url", + "content": "Use createFileMessageByURL to create a message from uploaded file resource information. const message = await OpenIMSDK.createFileMessageByURL filePath: '', fileName: 'product guide.pdf', uuid: 'file 001', sourceUrl: 'https://www.example.com/product guide.pdf', fileSize: 256000, fileType: 'application/pdf', ; Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Local file path. Pass an empty string when only a remote resource is available. | | fileName | string | Yes | File name shown to recipients. | | uuid | string | Yes | File resource ID. | | sourceUrl | string | Yes | URL of the uploaded file. | | fileSize | number | Yes | File size in bytes. | | fileType | string | No | File type. | The call returns a MessageItem ready to send. Use the actual upload result for resource information, then use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss ." }, { - "path": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", - "title": "Create a recurring meeting", - "description": "Create a recurrence rule and generate its first meeting instance.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings create-repeat-meeting", - "content": "Create a recurrence definition and generate its first meeting instance. HTTP request POST API ADDRESS /rtc meeting/create repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting series creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Shared title, schedule, host, and invitees. | | setting | Yes | MeetingSetting | Shared meeting settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence end, count, type, interval, and weekdays. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . data.generatedMeeting contains the first MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instance. Permissions and limits Available only in OpenIM Enterprise. Validate recurrence boundaries and the creator's authority over all invitees." + "path": "/sdk/react-native/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "description": "OpenIM React Native SDK guide for create a contact card message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-card-message", + "content": "Use createCardMessage to create a user contact card message. const message = await OpenIMSDK.createCardMessage userID: 'user 002', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', ; Parameters | Parameter | Type | Required | Description | | | | | | | userID | string | Yes | User ID represented by the card. | | nickname | string | Yes | Nickname shown on the card. | | faceURL | string | Yes | Avatar URL shown on the card. | | ex | string | Yes | Card extension data. Pass an empty string when it is not used. | The call returns a MessageItem ready to send. message.cardElem contains the card information passed during creation." }, { - "path": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", - "title": "Update a recurring meeting", - "description": "Update a recurrence definition and its future meeting instances.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings update-repeat-meeting", - "content": "Update a recurrence definition and the future instances generated from it. HTTP request POST API ADDRESS /rtc meeting/update repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | updatingUserID | Yes | string | User performing the update. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Updated shared meeting information. | | setting | Yes | MeetingSetting | Updated shared settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Updated recurrence rule. | Response Returns updated data.repeatMeeting and the affected data.generatedMeeting . Permissions and limits Available only in OpenIM Enterprise. Do not assume completed or historical instances are rewritten." + "path": "/sdk/react-native/message/creating-messages/create-location-message", + "title": "Create a location message", + "description": "OpenIM React Native SDK guide for create a location message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-location-message", + "content": "Use createLocationMessage to create a location message. const message = await OpenIMSDK.createLocationMessage description: 'Pudong New Area, Shanghai', longitude: 121.4737, latitude: 31.2304, ; Parameters | Parameter | Type | Required | Description | | | | | | | description | string | Yes | Location name or address description. | | longitude | number | Yes | Longitude. | | latitude | number | Yes | Latitude. | The call returns a MessageItem ready to send." }, { - "path": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", - "title": "Delete a recurring meeting", - "description": "Delete a recurring meeting definition.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings delete-repeat-meeting", - "content": "Delete a recurring meeting definition. HTTP request POST API ADDRESS /rtc meeting/delete repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | operatorUserID | Yes | string | User performing the deletion. | Response errCode: 0 means the recurrence definition was deleted. Permissions and limits Available only in OpenIM Enterprise. This response does not state that historical meeting instances or recordings were deleted." + "path": "/sdk/react-native/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "description": "OpenIM React Native SDK guide for create an emoji message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-face-message", + "content": "Use createFaceMessage to create an emoji message defined by your application. const message = await OpenIMSDK.createFaceMessage index: 12, data: JSON.stringify url: 'https://www.example.com/emoji.png', , ; index is an emoji index agreed by both clients. data is a custom format string agreed by the sending and receiving clients. Use it to provide emoji identification or rendering information, such as an image URL, a fixed key, or other business data. The call returns a MessageItem ready to send." }, { - "path": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", - "title": "Get a recurring meeting", - "description": "Get a recurring meeting definition and generation state.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings get-repeat-meeting", - "content": "Get a recurrence definition, generation progress, next schedule time, and status. HTTP request POST API ADDRESS /rtc meeting/get repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may view the series." + "path": "/sdk/react-native/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "description": "OpenIM React Native SDK guide for create a reply message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-quote-message", + "content": "Use createQuoteMessage to create a reply message with the complete original message object. const message = await OpenIMSDK.createQuoteMessage text: 'I agree with this approach.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Reply text. | | message | MessageItem | Yes | Original message being replied to. | The call returns a new MessageItem ready to send. When rendering replies, handle the case where the original message has been deleted or cannot be displayed." }, { - "path": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", - "title": "List recurring meetings", - "description": "List recurring meeting definitions created by a user.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meetings", - "content": "List recurring meeting definitions created by a user. HTTP request POST API ADDRESS /rtc meeting/list repeat meetings Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Series creator. | Response data.repeatMeetings contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata records. These are recurrence definitions, not individual instances. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "description": "OpenIM React Native SDK guide for create a markdown message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-markdown-message", + "content": "Use createMarkdownMessage to create a Markdown message. const message = await OpenIMSDK.createMarkdownMessage ' Release complete\\n\\n Android\\n iOS', ; The argument is the complete Markdown source text. createMarkdownMessage only creates the message; it does not render or sanitize Markdown. The call returns a MessageItem ready to send. When displaying untrusted Markdown, use a Markdown renderer with appropriate security controls." }, { - "path": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", - "title": "List recurring meeting instances", - "description": "List meeting instances generated for a recurring meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meeting-instances", - "content": "List individual meeting instances already generated for a recurring meeting. HTTP request POST API ADDRESS /rtc meeting/list repeat meeting instances Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.meetings contains generated MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instances. Permissions and limits Available only in OpenIM Enterprise. Future instances not yet generated are not represented in this array." + "path": "/sdk/react-native/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "description": "OpenIM React Native SDK guide for create a forwarded message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-forward-message", + "content": "Use createForwardMessage to create a forwarded message from an existing message. const message = await OpenIMSDK.createForwardMessage sourceMessage ; sourceMessage must be a complete MessageItem . The call returns a new MessageItem ready to send to a direct or group chat." }, { - "path": "/platform-api/meeting/meeting-records/get-user-meeting-histories", - "title": "Get a user's meeting history", - "description": "List a user's meeting attendance history by time, status, and pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-user-meeting-histories", - "content": "List a user's meeting attendance history. HTTP request POST API ADDRESS /rtc meeting/get user meeting histories Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Participant user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | | status | Yes | string | Meeting status filters. | Response data.total is the matching count. data.meetingHistories contains UserMeetingHistory /platform api/meeting/overview usermeetinghistory records. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "description": "OpenIM React Native SDK guide for create a merged forward message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-merger-message", + "content": "Use createMergerMessage to create a merged forwarded message containing multiple messages. const message = await OpenIMSDK.createMergerMessage messageList: selectedMessages, title: 'Project discussion', summaryList: 'Alex: The release plan is confirmed', 'Lee: I will follow up on testing' , ; Parameters | Parameter | Type | Required | Description | | | | | | | messageList | MessageItem | Yes | Messages to merge. | | title | string | Yes | Title of the merged message. | | summaryList | string | Yes | Summary lines shown for the merged message. | The call returns a MessageItem ready to send. Summary content should follow the display and privacy rules of the current conversation." }, { - "path": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", - "title": "Get meetings hosted by a user", - "description": "List meetings hosted by a user by time range and pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-user-hosted-meetings", - "content": "List meetings hosted by a user. HTTP request POST API ADDRESS /rtc meeting/get user hosted meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Host user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | Response data.total is the matching count. data.hostedMeetings contains HostedMeeting /platform api/meeting/overview hostedmeeting records. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", + "title": "Create a rich-text message", + "description": "OpenIM React Native SDK guide for create a rich-text message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-text-message", + "content": "Use createAdvancedTextMessage to create a rich text message with message entities. const message = await OpenIMSDK.createAdvancedTextMessage text: 'See https://openim.io', messageEntityList: type: 'url', offset: 4, length: 17, url: 'https://openim.io', , , ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw rich text content. | | messageEntityList | MessageEntity | No | Entities in the text. | Each MessageEntity contains type , offset , and length , with optional url and info . The call returns a MessageItem ready to send. Use Send a message /sdk/react native/message/sending messages/send message to send it." }, { - "path": "/platform-api/meeting/meeting-records/get-meeting-records", - "title": "Get meeting recordings", - "description": "List meeting recordings by host, participant, time range, and pagination.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-records", - "content": "List recordings for meetings hosted or attended by selected users. HTTP request POST API ADDRESS /rtc meeting/get meeting records Request body | Parameter | Required | Type | Description | | | | | | | hostUserID | Yes | string | Host filter. | | joinedUserID | Yes | string | Participant filter. | | startTime | Yes | int | Range start in Unix milliseconds. | | endTime | Yes | int | Range end in Unix milliseconds. | | pagination | Yes | RequestPagination | Page settings. | Response data.total is the matching count. data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries, including files and recording status. Permissions and limits Available only in OpenIM Enterprise. Treat URLs as protected recording resources and apply business authorization before returning them." + "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", + "title": "Create a rich-text reply", + "description": "OpenIM React Native SDK guide for create a rich-text reply.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", + "content": "Use createAdvancedQuoteMessage to create a rich text reply with an original message reference and text entities. const message = await OpenIMSDK.createAdvancedQuoteMessage text: 'I have reviewed the related link.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw reply text. | | message | MessageItem | Yes | Original message being replied to. | | messageEntityList | MessageEntity | No | Entities in the text. | MessageEntity uses type , offset , and length to describe an entity, with optional url and info . The call returns a MessageItem ready to send." }, { - "path": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", - "title": "Get recordings by meeting IDs", - "description": "Get recording records for selected meeting IDs.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-records-by-meeting-ids", - "content": "Get recording records for selected meetings. HTTP request POST API ADDRESS /rtc meeting/get meeting records by meeting ids Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the recordings. | | meetingIDs | Yes | string | Meeting IDs to query. | Response data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every meeting ID." + "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", + "title": "Create a targeted group message", + "description": "OpenIM React Native SDK guide for create a targeted group message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", + "content": "Use createTargetedGroupMessage to create a message object delivered only to selected group members. const textMessage = await OpenIMSDK.createTextMessage 'Please review this, relevant members.' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Message object to send selectively. | | dstUserIDs | string | Yes | User IDs of group members who receive the message. | The call returns a MessageItem ready to send. Pass the target group in groupID and use Send a message /sdk/react native/message/sending messages/send message to deliver it." }, { - "path": "/platform-api/meeting/meeting-records/get-meeting-attendance", - "title": "Get meeting attendance", - "description": "Get the users who attended or were absent from a meeting.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-attendance", - "content": "Get attendance results for a meeting. HTTP request POST API ADDRESS /rtc meeting/get meeting attendance Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | Response data.joinedUserIDs lists attendees and data.absentUserIDs lists invitees recorded as absent. Permissions and limits Available only in OpenIM Enterprise. Attendance reflects meeting service records, not arbitrary business attendance rules." + "path": "/sdk/react-native/message/sending-messages/send-message", + "title": "Send a message", + "description": "OpenIM React Native SDK guide for send a message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message", + "content": "Call sendMessage to send the MessageItem returned by a message creation API. For a direct chat, set recvID ; for a group chat, set groupID . When messages are created from local image, audio, video, or file paths, the SDK uploads the resources during sending. For media messages created with remote URLs, use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss . const sentMessage = await OpenIMSDK.sendMessage recvID: receiverUserID, groupID: '', message, ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | | message | MessageItem | Yes | Message to send. | | offlinePushInfo | OfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. | The call returns the sent MessageItem . When sending progress is available, SendMessageProgress is emitted with progress and message : function handleSendMessageProgress info // ... // Set the listener OpenIMSDK.on OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; // Remove the listener OpenIMSDK.off OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/platform-api/meeting/meeting-records/delete-meeting-records", - "title": "Delete meeting recordings", - "description": "Delete recording records by meeting or real-time room ID.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-records delete-meeting-records", - "content": "Delete recording records for selected meeting or real time room IDs. HTTP request POST API ADDRESS /rtc meeting/delete meeting records Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time room IDs. | Response errCode: 0 means the requested recording records were deleted. Permissions and limits Available only in OpenIM Enterprise. This is destructive. Validate recording ownership and retention policy before calling it." + "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "description": "OpenIM React Native SDK guide for send an uploaded media message.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message-not-oss", + "content": "Call sendMessageNotOss to send an image, audio, video, or file message that already contains remote resource URLs. The SDK does not upload these resources again. const sentMessage = await OpenIMSDK.sendMessageNotOss recvID: receiverUserID, groupID: '', message: uploadedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | | message | MessageItem | Yes | Message created by a URL based message creation API. | | offlinePushInfo | OfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. | The call returns the sent MessageItem . Resource URLs, sizes, types, and dimensions in message should come from the actual upload result. For local path media messages, use Send a message /sdk/react native/message/sending messages/send message ." }, { - "path": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", - "title": "Get a call room by group ID", - "description": "Get the active real-time call room and participants associated with a group.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-room-by-group-id", - "content": "Get the active real time call room associated with a group. HTTP request POST API ADDRESS /rtc meeting/signal get room by group id Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | OpenIM group ID. | Response Returns data.invitation , participant metadata, and data.roomID . Participant metadata combines group, group member, and user information for the active room. Permissions and limits Available only in OpenIM Enterprise. Validate access to the group before returning live room state." + "path": "/sdk/react-native/message/receiving-messages/receive-messages", + "title": "Receive messages", + "description": "OpenIM React Native SDK guide for receive messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-messages", + "content": "When a new message arrives, OnRecvNewMessage is emitted with one MessageItem . Offline and online only messages are delivered through OnRecvOfflineNewMessage and OnRecvOnlineOnlyMessage ; all three callbacks receive a MessageItem directly. function handleNewMessage message // ... function handleOfflineMessage message // ... function handleOnlineOnlyMessage message // ... // Set the listeners OpenIMSDK.on OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; // Remove the listeners OpenIMSDK.off OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; Use clientMsgID to identify messages. Remove the listeners when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/platform-api/meeting/meeting-signaling/get-signal-rooms", - "title": "Get call rooms", - "description": "Get multiple real-time call rooms by room ID.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-rooms", - "content": "Get multiple real time call rooms and their current invitation and participant state. HTTP request POST API ADDRESS /rtc meeting/signal get rooms Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time call room IDs. | Response data.roomList contains room records with invitation metadata, participant metadata, and room IDs. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every room ID." + "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "description": "OpenIM React Native SDK guide for receive custom business messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-custom-business-messages", + "content": "When the server sends a custom business notification, OnRecvCustomBusinessMessage is emitted. Its callback receives business data, not a MessageItem ; ordinary custom chat messages are delivered through the new message events in Receive messages /sdk/react native/message/receiving messages/receive messages . function handleCustomBusinessMessage data // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; Validate the received data against your business protocol before processing it. Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/platform-api/meeting/meeting-signaling/get-signal-invitation", - "title": "Get a call invitation", - "description": "Get real-time call invitation and offline-push information for a room.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-invitation", - "content": "Get the real time call invitation and associated offline push information for a room. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | Response data.invitationInfo contains InvitationInfo /platform api/meeting/overview invitationinfo . data.offlinePushInfo contains the invitation's offline push configuration. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "description": "OpenIM React Native SDK guide for load message history.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-older-messages", + "content": "Use getAdvancedHistoryMessageList to page through older messages in a conversation. Pass an empty string for startClientMsgID on the first page, then pass the clientMsgID of the oldest loaded message. const page = await OpenIMSDK.getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, viewType: ViewType.History, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is loaded. | | startClientMsgID | string | Yes | Pagination anchor; pass an empty string for the first page. | | count | number | Yes | Number of messages to load. | | viewType | ViewType | Yes | Use ViewType.History when browsing message history. | Return value The call returns AdvancedGetMessageResult : | Field | Type | Description | | | | | | messageList | MessageItem | Messages on the current page. | | isEnd | boolean | Whether the older boundary has been reached. | | errCode | number | Status code for this history request. | | errMsg | string | Description corresponding to errCode . | Deduplicate messages by clientMsgID before adding messageList to the conversation." }, { - "path": "/platform-api/meeting/meeting-signaling/get-startup-invitation", - "title": "Get a startup call invitation", - "description": "Get a call invitation that a user must restore when the application starts.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-signaling get-startup-invitation", - "content": "Get a still relevant real time call invitation that should be restored when a user's application starts. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info start app Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose invitation state is restored. | Response Returns data.invitation and data.offlinePushInfo when a recoverable invitation exists. Permissions and limits Available only in OpenIM Enterprise. Revalidate timeout and room state before presenting the restored invitation." + "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", + "title": "Load message history in reverse", + "description": "OpenIM React Native SDK guide for load message history in reverse.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-newer-messages", + "content": "Use getAdvancedHistoryMessageListReverse to load history in the newer direction from a message anchor. const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse conversationID, startClientMsgID: anchorMessage.clientMsgID, count: 30, viewType: ViewType.History, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is loaded. | | startClientMsgID | string | Yes | Message ID used as the newer direction anchor. | | count | number | Yes | Number of messages to load. | | viewType | ViewType | Yes | Use ViewType.History when browsing message history. | The call returns AdvancedGetMessageResult ; messageList contains the current page and isEnd indicates whether the newer boundary has been reached. See Load message history /sdk/react native/message/retrieving messages/load older messages for the other result fields." }, { - "path": "/platform-api/meeting/meeting-chat/send-meeting-chat", - "title": "Send a meeting chat message", - "description": "Send a broadcast or targeted message within a meeting room.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-chat send-meeting-chat", - "content": "Send a meeting room chat message to all participants or selected users. Meeting chat uses its own message model and is separate from the standard OpenIM message APIs. HTTP request POST API ADDRESS /rtc meeting/send meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | Sender user ID. | | type | Yes | int | Meeting chat business content type. | | payload | Yes | string | Message payload. | | dstUserIDs | Yes | string | Target users; an empty array broadcasts to the room. | | nickname | Yes | string | Sender display name. | | faceURL | Yes | string | Sender avatar URL. | Response data.message contains the created MeetingChatMessage /platform api/meeting/overview meetingchatmessage , including its Seq. Permissions and limits Available only in OpenIM Enterprise." + "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "description": "OpenIM React Native SDK guide for find messages by id.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages find-messages-by-id", + "content": "Use findMessageList to find messages by conversation ID and message ID. It is useful when navigating to a known message from a search result, quote, or notification. const result = await OpenIMSDK.findMessageList conversationID, clientMsgIDList: clientMsgID , , ; const targetMessage = result.findResultItems?. 0 ?.messageList 0 ; Parameters findMessageList receives an array of query conditions. Each item contains: | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the target messages. | | clientMsgIDList | string | Yes | Message IDs to find. | Return value The call returns SearchMessageResult ; ID based results are in findResultItems . Each result item contains conversationID and messageList . A missing message may produce an empty result item or message list. See Search messages /sdk/react native/message/searching messages/search messages for the complete result structure." }, { - "path": "/platform-api/meeting/meeting-chat/pull-meeting-chat", - "title": "Pull meeting chat messages", - "description": "Incrementally pull meeting chat messages by creation time and Seq.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-chat pull-meeting-chat", - "content": "Incrementally pull meeting chat messages using the meeting creation time and the last received Seq. HTTP request POST API ADDRESS /rtc meeting/pull meeting chat Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | createTime | Yes | int | Meeting/chat creation time in Unix milliseconds. | | currentSeq | Yes | int | Last meeting chat Seq already received. | | srcUserID | Yes | string | User performing the pull. | Response data.createTime is the returned stream's creation marker. data.messages contains ordered MeetingChatMessage /platform api/meeting/overview meetingchatmessage records. Permissions and limits Available only in OpenIM Enterprise. Persist the highest processed Seq and keep creation time paired with the same meeting." + "path": "/sdk/react-native/message/retrieving-messages/load-message-context", + "title": "Load message context", + "description": "OpenIM React Native SDK guide for load message context.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-message-context", + "content": "Use fetchSurroundingMessages to load messages before and after a known message, such as when opening a result from search or a reply. const messageList = await OpenIMSDK.fetchSurroundingMessages startMessage: targetMessage, viewType: ViewType.Search, before: 20, after: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | | startMessage | MessageItem | Yes | Retrieved anchor message. | | viewType | ViewType | Yes | Context view type; use ViewType.Search for a search result. | | before | number | Yes | Maximum messages to load before the anchor. | | after | number | Yes | Maximum messages to load after the anchor. | The call returns messageList , where messageList contains the retrieved surrounding MessageItem . The number of messages may be less than before + after near a boundary or when messages have been deleted." }, { - "path": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", - "title": "Revoke a meeting chat message", - "description": "Revoke a meeting chat message by room and Seq.", - "context": "Platform API", - "keywords": "platform-api v3 platform-api meeting meeting-chat revoke-meeting-chat", - "content": "Revoke a meeting chat message by room ID and Seq. HTTP request POST API ADDRESS /rtc meeting/revoke meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | User performing the revocation. | | seq | Yes | int | Meeting chat message Seq. | | ex | Yes | string | Business extension data. | | sourceMessageSendTime | Yes | int | Original message send time. | | sourceMessageSendID | Yes | string | Original sender ID. | | sourceMessageSenderNickname | Yes | string | Original sender display name. | Response data.message contains the resulting MeetingChatMessage /platform api/meeting/overview meetingchatmessage . Permissions and limits Available only in OpenIM Enterprise. Enforce sender, host, or moderator revocation policy in the business backend." + "path": "/sdk/react-native/message/searching-messages/search-messages", + "title": "Search messages", + "description": "OpenIM React Native SDK guide for search messages.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message searching-messages search-messages", + "content": "Use searchLocalMessages to search messages already synchronized to the current account's local store. const result = await OpenIMSDK.searchLocalMessages conversationID, keywordList: 'release' , messageTypeList: MessageType.TextMessage , pageIndex: 1, count: 20, ; Parameters keywordList can contain one or more keywords. A search field typically supplies one keyword after trimming surrounding whitespace and removing empty values. | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation to search. | | keywordList | string | Yes | Keywords to search for. | | keywordListMatchType | number | No | Match mode for multiple keywords: 0 matches any keyword OR , and 1 requires all keywords AND . Omitted values use 0 . | | senderUserIDList | string | No | Restrict results to messages sent by these users. | | messageTypeList | MessageType | No | Restrict results to the specified message types, such as text and mention messages. | | searchTimePosition | number | No | Search end position as a Unix timestamp in seconds. | | searchTimePeriod | number | No | Search range backward from searchTimePosition , in seconds. | | pageIndex | number | No | Result page, starting at 1 . | | count | number | No | Number of messages per page. | Return value The call returns SearchMessageResult : | Field | Type | Description | | | | | | totalCount | number | Number of messages matching the current conditions. | | searchResultItems | SearchMessageResultItem | Results organized by conversation. | Each SearchMessageResultItem contains conversation information and messageList . When keywords or filters change, restart from page one so results from different conditions are not mixed. To load messages around a hit, see Load message context /sdk/react native/message/retrieving messages/load message context ." }, { - "path": "/sdk/error-codes", - "title": "Client SDK error codes", - "description": "Identify common OpenIMClientSDK error codes, distinguish their source, and apply safe handling guidance.", - "context": "SDKs · Common reference · v4", - "keywords": "sdk v4 sdk error-codes", - "content": "Scope This page lists the common client error codes used by OpenIMClientSDK. The iOS, Android, Flutter, WASM, and Electron SDKs expose failures through different callbacks, exceptions, or rejected promises, but errors returned by OpenIM SDK Core retain the same meaning. Platform wrappers, operating systems, and runtimes can still add errors that are not listed here, so always retain the error message and client SDK version. A client call can also return a business error from OpenIMServer. Do not interpret every failure as a client error; identify its source first. Identify the error source | Code | Source | How to handle it | | | | | | 0 | Common success code | The business operation succeeded. Continue reading the data returned by the API. | | 1 9999 | OpenIMServer | Use the Platform API error code reference /platform api/error codes to diagnose parameters, permissions, tokens, groups, or message state. | | Codes from 10000 through 10401 listed on this page | OpenIMClientSDK | Diagnose client networking, lifecycle state, local data, and operation preconditions. The codes are not contiguous; do not infer meanings for undefined values. | | 20001 29999 | Business server or webhook | These codes are defined by the integrating business system. Maintain their meanings and user facing messages in that backend. | Common and session errors | Code | Meaning | Recommended action | | | | | | 10000 | Network request failed | Check device connectivity, API and WebSocket addresses, TLS certificates, and proxy configuration. Retry after connectivity is restored. | | 10001 | Network request timed out | Check network quality and service health. For a state changing operation, query its actual result before retrying. | | 10002 | Invalid arguments | Check required fields, data types, enum values, and mutually exclusive parameters against the current API page. | | 10003 | The call context timed out or was canceled | Check caller timeouts, page or task lifecycle, and whether login state changed while the call was running. | | 10004 | Resource initialization is incomplete | This code can be returned by client versions that still define it. Wait for initialization and login to finish before calling an API that depends on local resources. | | 10005 | Unrecognized error | Retain the error message, SDK version, and API name. Confirm reproducible steps before upgrading or submitting diagnostic information. | | 10006 | Internal SDK error | Collect client logs and a minimal reproduction, then verify SDK compatibility. Do not display internal details directly to end users. | | 10007 | No update is available | The synchronization or update produced no new data. Keep the current state and decide whether to refresh based on the API's documented behavior. | | 10008 | SDK is not initialized | Complete the platform's SDK initialization flow and wait for success before calling other APIs. | | 10009 | SDK login is incomplete | Wait for login success before calling authenticated APIs, and avoid concurrent or repeated login attempts. | | 10100 | User ID does not exist or is not registered | Confirm that a trusted backend registered the user with OpenIMServer and that the client uses the correct userID . | | 10101 | The user has logged out | Stop authenticated calls and clear session state. Obtain a new token and sign in again if the client should continue. | | 10102 | Repeated login | Do not start another login while the previous attempt is still active. Reuse the current SDK instance, or log out before changing accounts. | Message errors | Code | Meaning | Recommended action | | | | | | 10200 | File not found | Check the local path, temporary file lifetime, and read permissions before recreating or uploading the file message. | | 10201 | Message decompression failed | Verify client and server compatibility and synchronize the message again. Retain logs if the same data continues to fail. | | 10202 | Binary WebSocket message decoding failed | Verify the client and server protocol versions and check whether a proxy is modifying WebSocket data. | | 10203 | Message or binary protocol type is unsupported | Use a message type supported by the current SDK and verify client server version compatibility. | | 10204 | The message cannot be sent again | Only the original failed message can be resent. Create a new message object if an already successful message must be sent again. | | 10205 | Message content type is unsupported | Use a supported type, or implement the corresponding custom message handling on both the client and server. | | 10206 | The message has no server sequence number | The message is not ready for an operation that requires seq . Wait for sending or synchronization to finish and retry with the latest message object. | | 10207 | The message has been deleted | Remove it from UI and business state. Do not continue modifying, revoking, or querying the stale message object. | Conversation and group errors | Code | Meaning | Recommended action | | | | | | 10301 | The current conversation or group type does not support the operation | Check the API's supported conversation and group types, and do not apply it to an unsupported group. | | 10302 | The operation supports only a specific group type | Check the target's groupType and use an API that matches that group type. | | 10303 | The current unread count is already 0 | Refresh the UI from the latest conversation state instead of decrementing or clearing the count again. | | 10400 | Group ID not found | Check the groupID , retrieve the group again, and confirm that it has not been dismissed. | | 10401 | Invalid group type | Use a group type supported by the current SDK and OpenIMServer, and verify the groupType returned during creation or retrieval. | Version compatibility Error definitions evolve with client SDK releases. Code 10004 exists in some released versions, while the current OpenIM SDK Core distinguishes initialization and login readiness with 10008 and 10009 . Applications that support older clients can continue recognizing 10004 ; new handling should distinguish an uninitialized SDK from an incomplete login. Do not automatically classify an integer that is absent from this page as a client error. First determine whether it came from the client, OpenIMServer, or a business webhook, then use the current SDK version's error message and release notes. Handling recommendations 1. Record the code, message, API name, client SDK version, and necessary target identifiers. Redact tokens, full message bodies, and other sensitive data. 2. Correct invalid parameters, session state, or unsupported preconditions instead of retrying automatically. 3. Use backoff for network failures and timeouts. Before retrying messages or other state changes, query or synchronize actual state to avoid duplicate operations. 4. Map technical errors to stable product messages rather than exposing internal details to end users. 5. If 10005 , 10006 , or decoding errors persist, retain complete logs and follow the platform guide for WASM logging /sdk/wasm/logger , iOS logging /sdk/ios/logger , Flutter logging /sdk/flutter/logger , or Electron log upload /sdk/electron/logger/upload logs . This page was migrated from the legacy client error code reference https://github.com/openimsdk/docs/blob/a177b296f1abe53ba2cf7d897acf86467a45e7c6/docs/sdks/errcode.md and verified against the current OpenIM SDK Core definitions https://github.com/openimsdk/openim sdk core/blob/9267a252faab02bbc8ffab6223e6ae2341a0f7c9/pkg/sdkerrs/code.go and the compatibility definitions https://github.com/openimsdk/openim sdk core/blob/514c760dfae502c651e88646c9a7754b2767534d/pkg/sdkerrs/code.go ." + "path": "/sdk/react-native/message/composing-messages/update-typing-status", + "title": "Report typing status", + "description": "OpenIM React Native SDK guide for report typing status.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages update-typing-status", + "content": "Use typingStatusUpdate to send a typing hint to the other participant in a direct chat. await OpenIMSDK.typingStatusUpdate recvID: receiverUserID, msgTip: 'Typing...', ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Yes | User ID receiving the typing hint. | | msgTip | string | Yes | Typing hint text to send. | After the call completes, the typing hint has been sent. To update the current account's input state based on conversation focus, use Update input states /sdk/react native/message/composing messages/change input states ." }, { - "path": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", - "title": "Search conversations", - "description": "Search local conversations by conversation name with the WASM SDK.", - "context": "SDKs · WASM · v4", - "keywords": "sdk wasm v4 sdk wasm conversation retrieving-conversations search-conversations", - "content": "searchConversation performs a partial match against showName in the SDK's local conversation data. Use it for search within a conversation list. The search term must not be empty, and the method does not query the server for conversations that have not been synchronized locally. const data: conversations = await openimsdk.searchConversation searchKeyword.trim ; renderConversationResults conversations ; When the Promise resolves, data contains the matching ConversationItem , ordered by latestMsgSendTime from newest to oldest. The results reflect the conversation data stored locally at the time of the call, and the query itself does not trigger events. To keep visible search results current, listen for the conversation events described in Get the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and update matching results by conversationID ." + "path": "/sdk/react-native/message/composing-messages/get-typing-status", + "title": "Get typing status", + "description": "OpenIM React Native SDK guide for get typing status.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages get-typing-status", + "content": "Use getInputStates to query a user's current input state in a conversation. const platformIDs = await OpenIMSDK.getInputStates conversationID, userID, ; const isTyping = platformIDs.length 0; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Target conversation ID. | | userID | string | Yes | User ID whose input state is queried. | The call returns an array of platform IDs currently reporting input. An empty array means that no platform is currently reporting input. To keep the display current, handle the OnInputStatusChanged event described in Update input states /sdk/react native/message/composing messages/change input states ." }, { - "path": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", - "title": "Mark all conversations as read", - "description": "Clear the unread counts of all currently unread conversations with the WASM SDK.", - "context": "SDKs · WASM · v4", - "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations mark-all-conversations-read", - "content": "When the user explicitly chooses a “mark all as read” action, call markAllConversationMessageAsRead to process every unread conversation currently recorded in the local SDK: await openimsdk.markAllConversationMessageAsRead ; When the Promise resolves, the SDK has finished processing the unread conversations found for this operation. It does not mean that the related conversation events have already arrived or that every other client has finished updating its UI. When OnConversationChanged arrives, use conversationID to update each matching conversation, and use OnTotalUnreadMessageCountChanged to update the aggregate unread count. See Get the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and Track the total unread count /sdk/wasm/conversation/managing conversations/get total unread count for the complete listeners. Query both values again when the latest state must be confirmed." + "path": "/sdk/react-native/message/composing-messages/change-input-states", + "title": "Update input states", + "description": "OpenIM React Native SDK guide for update input states.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages change-input-states", + "content": "Use changeInputStates to update the current account's input state in a conversation. Pass focus: true while typing, and false after sending, losing focus, or leaving the conversation. await OpenIMSDK.changeInputStates conversationID, focus: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose input state is updated. | | focus | boolean | Yes | true means the user is typing; false means typing has stopped. | Avoid reporting the same state on every keyboard event. When the state changes, OnInputStatusChanged is emitted with conversationID , userID , and platformIDs . function handleInputStatusChanged inputStatus // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", - "title": "Hide all conversations", - "description": "Hide all conversations from the conversation list on the current device with the WASM SDK.", - "context": "SDKs · WASM · v4", - "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations hide-all-conversations", - "content": "hideAllConversations resets the list state, unread count, latest message summary, and draft of every conversation on the current device so that those conversations no longer appear in the paginated conversation list: await openimsdk.hideAllConversations ; When the Promise resolves, only the local conversation state has been reset. The operation does not delete local message records or server messages, and it does not remove groups, friend relationships, or conversations on other clients. A conversation can appear again after a new message arrives or valid conversation state is established again. After the bulk hide operation, query the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and total unread count /sdk/wasm/conversation/managing conversations/get total unread count again, then update the UI with the latest results. Do not treat Promise resolution as a remote state event." + "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "description": "OpenIM React Native SDK guide for check audio transcription availability.", + "context": "SDKs · React Native · v4", + "keywords": "sdk react-native v4 sdk react-native message composing-messages check-speech-to-text", + "content": "speechToTextCapabilities is used only to query supported audio formats, sample rates, recording duration, and file size limits. The interface that actually performs speech recognition is Transcribe audio /sdk/react native/message/composing messages/transcribe audio . const capabilities = await OpenIMSDK.speechToTextCapabilities ; Return value The call returns SpeechToTextCapabilities : | Field | Type | Description | | | | | | format | string | Supported audio formats. | | sampleRateHz | number | Required audio sample rate in hertz. | | maxRecordTimeMs | number | Maximum recording duration in milliseconds. | | maxFileSize | number | Maximum file size in bytes. | | provider | string | Current speech recognition provider. |" }, { - "path": "/sdk/react-native/user/overview-user", - "title": "User overview", - "description": "Learn about current-user profiles, public user profiles, account settings, and online status in the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "description": "OpenIM React Native SDK guide for transcribe audio.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user overview-user", - "content": "The OpenIM React Native SDK identifies users by userID . User APIs read and update the signed in account's profile, retrieve public user profiles, and subscribe to user online status. Friends, friend requests, and the blocklist belong to relationships between users. See Relationships overview /sdk/react native/user/overview relationships . User types The React Native SDK returns different user objects for different scenarios: | Type | Use case | Main APIs | | | | | | SelfUserInfo | The signed in user's profile, avatar, nickname, and account level message reception setting | getSelfUserInfo , setSelfInfo | | PublicUserItem | Looking up users and displaying public profile cards | getUsersInfo | | UserOnlineState | A user's online status and online platform list | subscribeUsersStatus , getSubscribeUsersStatus , unsubscribeUsersStatus | SelfUserInfo represents the signed in user, while PublicUserItem represents public information available for lookup. Friend profiles, blocklist relationships, and group member profiles use objects from the relationships or group capabilities. Feature entry points | Need | Recommended page | | | | | Look up a public profile by userID for a profile card | Get user profiles /sdk/react native/user/profile/get users info | | Read or update the current user's nickname, avatar, and extension data | Get your profile /sdk/react native/user/profile/get self user info , Update your profile /sdk/react native/user/profile/set self info | | Set the account level message reception option | Set global message reception /sdk/react native/user/profile/set global message reception | | Set how requests to add the current account are handled | Set friend request permissions /sdk/react native/user/profile/set friend add permission | | Subscribe to, read, and cancel online status subscriptions | Subscribe to online status /sdk/react native/user/online status/subscribe users status , Get subscribed user status /sdk/react native/user/online status/get subscribe users status , Unsubscribe from online status /sdk/react native/user/online status/unsubscribe users status | | Manage friends, friend requests, or the blocklist | Relationships overview /sdk/react native/user/overview relationships | Event listeners User state changes emit events. See the following pages for listener examples: Current user profile changes: Update your profile /sdk/react native/user/profile/set self info . User online status changes: Subscribe to online status /sdk/react native/user/online status/subscribe users status . Friend, friend request, and blocklist changes: Relationships overview /sdk/react native/user/overview relationships ." + "keywords": "sdk react-native v4 sdk react-native message composing-messages transcribe-audio", + "content": "Use speechToText to transcribe a local audio file that the SDK can read. Pass a local path, not a remote URL, Base64 data, or an uploaded file name. const text = await OpenIMSDK.speechToText filename ; filename is the local audio file path. The call returns text , where text is the transcription. See Check speech recognition support /sdk/react native/message/composing messages/check speech to text when capability information is needed; to save the result in a local voice message, see Save a local transcript /sdk/react native/message/composing messages/save local transcript ." }, { - "path": "/sdk/react-native/user/overview-relationships", - "title": "Relationships overview", - "description": "Learn about friends, friend requests, and blocklists in the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "description": "OpenIM React Native SDK guide for save a local transcript.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user overview-relationships", - "content": "Relationships record the current user's friendships, friend requests, and blocklist relationships with other users. User profiles, account settings, and online status are covered by the User overview /sdk/react native/user/overview user . Relationship objects The React Native SDK returns different objects for different relationship scenarios: | Type | Use case | Main APIs | | | | | | PublicUserItem | Looking up public profiles and displaying friend candidates or stranger profile cards | getUsersInfo | | FriendUserItem | Friend lists, friend remarks, pinned friends, and relationship extension data | getFriendListPage , getSpecifiedFriendsInfo | | FriendshipInfo | Checking the friendship between the current user and target users | checkFriend | | FriendApplicationItem | Received or sent friend requests and their handling status | getFriendApplicationListAsRecipient , getFriendApplicationListAsApplicant | | BlackUserItem | Blocklist relationships maintained by the current account | getBlackList , addBlack , removeBlack | Feature entry points | Need | Recommended page | | | | | Look up public user profiles | Get user profiles /sdk/react native/user/profile/get users info | | Page through, search, or look up friends by ID | Get the friend list /sdk/react native/user/friends/get friend list page , Search friends /sdk/react native/user/friends/search friends , Get friend profiles /sdk/react native/user/friends/get specified friends info | | Check a friendship | Check friendship /sdk/react native/user/friends/check friend | | Update or delete a friendship | Update friend information /sdk/react native/user/friends/update friends , Delete a friend /sdk/react native/user/friends/delete friend | | Send or handle a friend request | Send a friend request /sdk/react native/user/friend applications/add friend , Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient , Accept a friend request /sdk/react native/user/friend applications/accept friend application , Reject a friend request /sdk/react native/user/friend applications/refuse friend application | | View and maintain the blocklist | Get the blocklist /sdk/react native/user/blacklist/get black list , Block a user /sdk/react native/user/blacklist/add black , Unblock a user /sdk/react native/user/blacklist/remove black | Event listeners Relationship changes emit events. Listener examples are documented on the following pages: Friend request changes: Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient . Friend and friend profile changes: Get the friend list /sdk/react native/user/friends/get friend list page . Blocklist changes: Get the blocklist /sdk/react native/user/blacklist/get black list ." + "keywords": "sdk react-native v4 sdk react-native message composing-messages save-local-transcript", + "content": "Use setMessageLocalContent to save transcription text in a voice message on the current device. Pass the complete message object and preserve its existing fields. const updatedMessage = ...message, soundElem: ...message.soundElem, text: text: transcript, translate: message.soundElem?.text?.translate ?? , , , ; await OpenIMSDK.setMessageLocalContent conversationID, message: updatedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | MessageItem | Yes | Complete message object containing the transcription. | After the call completes, the transcription is saved in the message content on the current device." }, { - "path": "/sdk/react-native/user/profile/get-users-info", - "title": "Get user profiles", - "description": "Get public user profiles with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "description": "OpenIM React Native SDK guide for delete a local message.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile get-users-info", - "content": "Call getUsersInfo to retrieve public user information for a batch of user IDs. This is useful for friend candidates and stranger profile cards. If your product needs to search by nickname, phone number, organization, email, or another business field, have your backend perform the search and authorization checks first, then pass the returned user IDs to getUsersInfo . const userIDList = Array.from new Set 'user a', 'user b' ; const users = await OpenIMSDK.getUsersInfo userIDList ; Parameter description userIDList is the array of user IDs to retrieve. Deduplicate the IDs before calling the API and keep the number of IDs in a single request within a reasonable limit. Return result The method returns the matching PublicUserItem : | Field | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Public account nickname. | | faceURL | string | Public account avatar URL. | | ex | string | Account extension field whose format is defined by your business. | The returned array is not guaranteed to follow the order of the input IDs. To retrieve the signed in user's information, see Get your profile /sdk/react native/user/profile/get self user info and Update your profile /sdk/react native/user/profile/set self info ." + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-local-message", + "content": "Use deleteMessageFromLocalStorage to delete one message from a conversation on the current device. await OpenIMSDK.deleteMessageFromLocalStorage conversationID, clientMsgID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | ID of the message to delete. | After the call completes, the target message is deleted on the current device." }, { - "path": "/sdk/react-native/user/profile/get-self-user-info", - "title": "Get your profile", - "description": "Get the current user profile with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "description": "OpenIM React Native SDK guide for delete messages in a batch.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile get-self-user-info", - "content": "Call getSelfUserInfo to get the signed in account's user information. const currentUser = await OpenIMSDK.getSelfUserInfo ; Return result The method returns the current account's SelfUserInfo : | Field | Type | Description | | | | | | userID | string | The OpenIM user ID of the signed in user. | | nickname | string | Account nickname. | | faceURL | string | Account avatar URL. | | createTime | number | Time when the user record was created. | | globalRecvMsgOpt | MessageReceiveOptType | The account's global message reception option. | | ex | string | An account extension string defined by your business. | Call this method after initialization and login to display the current account's avatar, nickname, and global message reception setting. Clear the stored current user information when switching accounts." + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-saved-messages", + "content": "Use deleteMessages to delete multiple messages from one conversation. await OpenIMSDK.deleteMessages conversationID, clientMsgIDs, isSync: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the messages. | | clientMsgIDs | string | Yes | IDs of the messages to delete; all must belong to the same conversation. | | isSync | boolean | Yes | Whether to synchronize deletion to the other participant. true deletes the messages for both participants; false deletes them only for the current account. In either case, the deletion is synchronized to the current account's other devices. | After the call completes, the deletion request has completed. With isSync: true , the other participant also deletes the messages; with false , only the current account deletes them. Listen for message deletion When messages are deleted, OnMsgDeleted is emitted with the deleted MessageItem . Use clientMsgID to update the corresponding message list. function handleMessageDeleted message // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/sdk/react-native/user/profile/set-self-info", - "title": "Update your profile", - "description": "Update the current user profile with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "description": "OpenIM React Native SDK guide for delete all messages from a user in a group chat.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile set-self-info", - "content": "Call setSelfInfo to update the signed in account's basic display profile. Pass only the nickname , faceURL , or ex fields that should change in this request. await OpenIMSDK.setSelfInfo nickname: nickname.trim , faceURL, ex: mergedExtra, ; Parameter description | Parameter | Type | Required | Description | | | | | | | nickname | string | No | New nickname. | | faceURL | string | No | New avatar URL. | | ex | string | No | Extended user information. | Pass at least one profile field that should be updated. ex is a string. You can pass a JSON string or another business defined format for extended user information. After the profile is updated, the OnSelfInfoUpdated event carries the updated user information. Listen for current user profile changes When the user's profile changes, OnSelfInfoUpdated is emitted with the updated SelfUserInfo : function handleSelfInfoUpdated selfUserInfo: SelfUserInfo // ... // Add the listener OpenIMSDK.on OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnSelfInfoUpdated, handleSelfInfoUpdated ; Remove the listener when the user logs out, switches accounts, or the user state is torn down." + "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-user-messages", + "content": "Use deleteUserAllMessagesInConv to delete all messages from a specified user in a group conversation. await OpenIMSDK.deleteUserAllMessagesInConv conversationID, userID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Target group conversation ID. | | userID | string | Yes | User whose messages are deleted. | This is a group management operation. After it completes, the deletion request has completed; the server validates permissions. Listen for deletion of a user's messages After deletion, OnDeleteUserAllMsgsInConv is emitted with conversationID and userID . Use them to remove that user's messages from the target conversation. function handleUserMessagesDeleted data // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/sdk/react-native/user/profile/set-global-message-reception", - "title": "Set global message reception", - "description": "Set the global message reception option with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "description": "OpenIM React Native SDK guide for revoke a message.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile set-global-message-reception", - "content": "globalRecvMsgOpt controls the current account's global message reception option. Use setSelfInfo to update the field: await OpenIMSDK.setSelfInfo globalRecvMsgOpt: MessageReceiveOptType.NotNotify, ; Parameter description | Enum value | Numeric value | Description | | | | | | MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. | | MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. | After the setting is updated, the current user information is delivered through OnSelfInfoUpdated . See Update your profile /sdk/react native/user/profile/set self info for the listener example. The global message reception option applies to the account. A conversation can also have its own message reception setting." + "keywords": "sdk react-native v4 sdk react-native message managing-messages revoke-a-message", + "content": "Use revokeMessage to revoke a sent message. Conversation members then see the message's revoked state. await OpenIMSDK.revokeMessage conversationID, clientMsgID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | ID of the message to revoke. | After the call completes, the revocation request has completed. The server validates which messages, senders, and time ranges are eligible. Listen for message revocation When a message is revoked, OnNewRecvMessageRevoked is emitted with RevokedInfo . Use its clientMsgID to update the message's revoked state. function handleMessageRevoked revokedInfo // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; Remove the listener when the component is destroyed, the account signs out, or the account changes. To remove a message only from the current device, use Delete a local message /sdk/react native/message/managing messages/delete local message ." }, { - "path": "/sdk/react-native/user/profile/set-friend-add-permission", - "title": "Set friend request permissions", - "description": "Set friend request permissions with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/modify-a-message", + "title": "Modify a message", + "description": "OpenIM React Native SDK guide for modify a message.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user profile set-friend-add-permission", - "content": "addFriendPermission controls whether users who add the current account must wait for the current user to review the request. Use setSelfInfo to update this account level setting: await OpenIMSDK.setSelfInfo addFriendPermission: AddFriendPermission.AddFriendAllowed, ; Parameter description | Enum value | Numeric value | Description | | | | | | AddFriendPermission.AddFriendAllowed | 0 | Allow requests, but require the current user to review them. | | AddFriendPermission.AddFriendAllowedNoReview | 1 | Allow requests and establish the friendship without review. | | AddFriendPermission.AddFriendDenied | 2 | Do not allow other users to add the current account. | This setting applies to future add friend actions. It does not remove existing friends or automatically process pending requests. After the setting is updated, the current user information is delivered through OnSelfInfoUpdated ; see Update your profile /sdk/react native/user/profile/set self info for the listener example." + "keywords": "sdk react-native v4 sdk react-native message managing-messages modify-a-message", + "content": "Use modifyMessage to modify an existing message in a conversation. const updatedMessage = ...message, textElem: ...message.textElem, content: editedText, , ; const modifiedMessage = await OpenIMSDK.modifyMessage conversationID, message: updatedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | MessageItem | Yes | Complete modified message. Preserve its original clientMsgID and other required fields. | Return value The call returns the server confirmed MessageItem . You can replace the message with the same clientMsgID in your list. The server validates permitted message types, senders, and time limits. Listen for message modification When a message is modified, OnMessageModified is emitted with the modified MessageItem directly. function handleMessageModified message // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnMessageModified, handleMessageModified ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnMessageModified, handleMessageModified ; Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/sdk/react-native/user/online-status/subscribe-users-status", - "title": "Subscribe to online status", - "description": "Subscribe to user online status with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "description": "OpenIM React Native SDK guide for insert a local one-to-one message.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user online-status subscribe-users-status", - "content": "Call subscribeUsersStatus to subscribe to the online status of specific users. Subscribe only to users whose status the current screen needs to display. const userIDs = ...new Set visibleUserIDs.filter Boolean ; const states = await OpenIMSDK.subscribeUsersStatus userIDs ; The method returns the current UserOnlineState for these users: | Field | Type | Description | | | | | | userID | string | ID of the user whose status is reported. | | status | OnlineState | OnlineState.Online means online; OnlineState.Offline means offline. | | platformIDs | Platform optional | Platforms on which the user is currently online. | Online status indicates whether the user is connected to OpenIMServer. It does not indicate whether the user is viewing the app or a conversation. Listen for online status changes When a subscribed user's status changes, OnUserStatusChanged is emitted: const handleStatusChanged = state: UserOnlineState = // Update the status for state.userID ; // Add the listener OpenIMSDK.on OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnUserStatusChanged, handleStatusChanged ; Cancel subscriptions and remove the listener when logging out, switching accounts, or when those users no longer need to be displayed." + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-single-message", + "content": "Use insertSingleMessageToLocalStorage to write one message to the current device's direct chat history. await OpenIMSDK.insertSingleMessageToLocalStorage message, recvID, sendID, ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Complete message object to write. | | recvID | string | Yes | Direct chat recipient user ID. | | sendID | string | Yes | Message sender user ID. | After the call completes, the message is written to the current device's direct chat history. To send it to the other participant, use Send a message /sdk/react native/message/sending messages/send message ." }, { - "path": "/sdk/react-native/user/online-status/get-subscribe-users-status", - "title": "Get subscribed user status", - "description": "Get the status of subscribed users with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "description": "OpenIM React Native SDK guide for insert a local group message.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user online-status get-subscribe-users-status", - "content": "Call getSubscribeUsersStatus to get the online status of users subscribed by the current account. const states = await OpenIMSDK.getSubscribeUsersStatus ; The method returns UserOnlineState for the subscribed users. Subscribe to a target user first with Subscribe to online status /sdk/react native/user/online status/subscribe users status ." + "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-group-message", + "content": "Use insertGroupMessageToLocalStorage to write one message to the current device's group chat history. await OpenIMSDK.insertGroupMessageToLocalStorage message, groupID, sendID, ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Complete message object to write. | | groupID | string | Yes | Target group ID. | | sendID | string | Yes | Message sender user ID. | After the call completes, the message is written to the current device's group chat history. To send a message to group members, use Send a message /sdk/react native/message/sending messages/send message ." }, { - "path": "/sdk/react-native/user/online-status/unsubscribe-users-status", - "title": "Unsubscribe from online status", - "description": "Cancel user online-status subscriptions with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "description": "OpenIM React Native SDK guide for clear all local messages.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user online-status unsubscribe-users-status", - "content": "Call unsubscribeUsersStatus to cancel online status subscriptions for specific users. await OpenIMSDK.unsubscribeUsersStatus userIDs ; Cancel the corresponding subscriptions when a page changes, search results change, the user logs out, or those users no longer need to be displayed." + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-local-messages", + "content": "Use deleteAllMsgFromLocal to clear all messages for the current account on the current device. await OpenIMSDK.deleteAllMsgFromLocal ; This account level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, all messages on the current device are cleared; server history remains available." }, { - "path": "/sdk/react-native/user/friends/get-friend-list-page", - "title": "Get the friend list", - "description": "Get the friend list with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "description": "OpenIM React Native SDK guide for clear local and server messages.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends get-friend-list-page", - "content": "Call getFriendListPage to retrieve the current user's friends page by page. const friends = await OpenIMSDK.getFriendListPage offset: 0, count: 50, filterBlack: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of friends to request. | | filterBlack | boolean | No | Whether to filter out blocked users. | The method returns the current page as FriendUserItem . Increase offset by the number of returned items to load the next page. Query the list again after friends are added or deleted. Friend fields FriendUserItem contains the following fields: | Field | Type | Description | | | | | | userID | string | Friend user ID. | | nickname | string | Friend nickname. | | faceURL | string | Friend avatar URL. | | remark | string | Remark set for the friend by the current user. | | isPinned | boolean | Whether the friend is pinned. | | ownerUserID | string | User ID that owns the friendship. | | operatorUserID | string | User ID that most recently changed the relationship. | | addSource | number | Source from which the friendship was added. | | createTime | number | Time when the friendship was created. | | ex | string | Friendship extension field. | | attachedInfo | string | Information attached by the SDK. | remark , isPinned , and ex belong to the friendship and are not account level user information. Listen for friend changes When a friendship changes, OnFriendAdded , OnFriendInfoChanged , or OnFriendDeleted is emitted with the corresponding friend information: const handleFriendAdd = friend: FriendUserItem = // Add the friend ; const handleFriendChanged = friend: FriendUserItem = // Update the friend by friend.userID ; const handleFriendDeleted = friend: FriendUserItem = // Remove the friend by friend.userID ; // Add listeners OpenIMSDK.on OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.on OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.on OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; // Remove listeners OpenIMSDK.off OpenIMEvent.OnFriendAdded, handleFriendAdd ; OpenIMSDK.off OpenIMEvent.OnFriendInfoChanged, handleFriendChanged ; OpenIMSDK.off OpenIMEvent.OnFriendDeleted, handleFriendDeleted ; Remove these listeners when logging out, switching accounts, or tearing down the friend list state." + "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-messages", + "content": "Use deleteAllMsgFromLocalAndSvr to clear all messages saved for the current account locally and on the server. await OpenIMSDK.deleteAllMsgFromLocalAndSvr ; This account level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, local and server deletion requests have completed; copies already saved by other conversation members are not affected." }, { - "path": "/sdk/react-native/user/friends/search-friends", - "title": "Search friends", - "description": "Search the current user's friends with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "description": "OpenIM React Native SDK guide for set a local message extension.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends search-friends", - "content": "Call searchFriends to search the current user's friends. Trim leading and trailing whitespace before submitting a search. The current request uses the first non empty value in keywordList . const friends = await OpenIMSDK.searchFriends keywordList: keyword.trim , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | keywordList | string | Yes | Search keywords. The current request uses the first non empty keyword. | | isSearchUserID | boolean | Yes | Whether to match user IDs. | | isSearchNickname | boolean | Yes | Whether to match friend nicknames. | | isSearchRemark | boolean | Yes | Whether to match friend remarks. | The method returns SearchedFriendsInfo . Each item contains friend fields and relationship : 0 indicates a blocklist relationship and 1 indicates a friendship." + "keywords": "sdk react-native v4 sdk react-native message managing-messages set-message-local-ex", + "content": "Use setMessageLocalEx to save local extension data for a message on the current device. await OpenIMSDK.setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify expanded: true , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | Target message ID. | | localEx | string | Yes | Local extension string. It can contain JSON or another format of business extension data. | After the call completes, the local extension data is saved in the message on the current device." }, { - "path": "/sdk/react-native/user/friends/get-specified-friends-info", - "title": "Get friend profiles", - "description": "Get specified friend profiles with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "description": "OpenIM React Native SDK guide for report group messages as read.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends get-specified-friends-info", - "content": "Call getSpecifiedFriendsInfo to retrieve relationship information for specified user IDs. const friends = await OpenIMSDK.getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | userIDList | string | Yes | User IDs to retrieve. | | filterBlack | boolean | No | Whether to filter out blocked users. | The method returns matching FriendUserItem ; the array is not guaranteed to follow the order of the input IDs. See Get the friend list /sdk/react native/user/friends/get friend list page for field descriptions. For public information about users who are not your friends, use Get user profiles /sdk/react native/user/profile/get users info ." + "keywords": "sdk react-native v4 sdk react-native message managing-read-status send-group-read-receipts", + "content": "Use sendGroupMessageReadReceipt to report messages read in a group chat. await OpenIMSDK.sendGroupMessageReadReceipt conversationID, clientMsgIDs, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgIDs | string | Yes | IDs of messages that were read; all must belong to the group conversation. | After the call completes, the read receipt has been reported. To update the conversation unread count, see Mark a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read . Listen for group read status changes When group message read status changes, OnRecvGroupReadReceipt is emitted with GroupMessageReceiptInfo , including conversationID , read and unread counts, and readers for each message. function handleGroupReadReceipt payload // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; Remove the listener when the component is destroyed, the account signs out, or the account changes." }, { - "path": "/sdk/react-native/user/friends/check-friend", - "title": "Check friendship status", - "description": "Check friendships with the OpenIM React Native SDK.", + "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "description": "OpenIM React Native SDK guide for get members who read a group message.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends check-friend", - "content": "Call checkFriend to check the friendship between the current user and multiple target users. const checks = await OpenIMSDK.checkFriend 'user a', 'user b' ; The returned FriendshipInfo corresponds to the input IDs by userID : | Field | Type | Description | | | | | | userID | string | ID of the user being checked. | | result | number | 1 means the users are friends; 0 means they are not. | To determine a blocklist relationship, call Get the blocklist /sdk/react native/user/blacklist/get black list separately." + "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", + "content": "Use getGroupMessageReaderList to page through members who have or have not read a group message. const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgID | string | Yes | Message ID whose read status is queried. | | filter | GroupMessageReaderFilter | Yes | Member filter. Read returns readers and Unread returns members who have not read the message. | | offset | number | Yes | Pagination offset; use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | The call returns the current page as GroupMemberItem . See Group overview /sdk/react native/group/overview group for member fields; increase offset for subsequent pages." }, { - "path": "/sdk/react-native/user/friends/update-friends", - "title": "Update friend information", - "description": "Update friend information with the OpenIM React Native SDK.", + "path": "/sdk/react-native/file-uploads/upload-file", + "title": "Upload a file", + "description": "Upload a file independently and obtain its remote URL with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends update-friends", - "content": "Call updateFriends to update every friend in friendUserIDs . await OpenIMSDK.updateFriends friendUserIDs: friendUserID , remark: remark, isPinned: true, ; Parameter description | Parameter | Type | Required | Description | | | | | | | friendUserIDs | string | Yes | Friend user IDs to update. | | remark | string | No | New remark. | | isPinned | boolean | No | Whether to pin the friend. | | ex | string | No | New extension string. | Pass at least one field to update in addition to friendUserIDs . Call the method separately when different friends need different values. After friend information changes, OnFriendInfoChanged is emitted; see Get the friend list /sdk/react native/user/friends/get friend list page for the listener example." + "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", + "content": "Use uploadFile to upload a local file independently. You can use it for avatars, group avatars, profile attachments, or other business files. const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | The file name used for the upload. | | contentType | string | Yes | The MIME type of the file. | | uuid | string | Yes | The business identifier for this upload. | | cause | string | No | The business defined reason for the upload. | | filepath | string | Yes | A local file path that the app can read. | When the call completes, it returns the remote resource URL in url . You can use the URL to update an avatar, store a business attachment, or create and send a URL based media message. Listen for upload status UploadOnProgress is triggered during the upload. Its callback parameter includes the uploaded amount in current and the total file size in size . UploadComplete is triggered when the upload completes. Its callback parameter's data includes fileSize , streamSize , and storageSize . function handleUploadProgress current, size // ... function handleUploadComplete data // ... // Register listeners OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // Remove listeners OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; Remove the listeners when the component is destroyed, the user signs out, or the account changes." }, { - "path": "/sdk/react-native/user/friends/delete-friend", - "title": "Delete a friend", - "description": "Delete a friend with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/overview-calling", + "title": "Audio and video calling overview", + "description": "OpenIM React Native SDK guide for audio and video calling.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friends delete-friend", - "content": "Call deleteFriend to delete the friendship between the current user and a specified user. await OpenIMSDK.deleteFriend friendUserID ; friendUserID is the user ID of the friend to delete. After the friend is deleted, OnFriendDeleted is emitted with the deleted friend's information. See Get the friend list /sdk/react native/user/friends/get friend list page for the listener example." + "keywords": "sdk react-native v4 sdk react-native calling overview-calling", + "content": "OpenIM React Native SDK provides calling signaling APIs for starting and handling call invitations, querying room information, and synchronizing call state. It handles call business signaling only; it does not capture or play audio and video, connect to media rooms, or render call UI. After starting or accepting a call, the SDK returns room credentials such as roomID , token , and liveURL . The application passes these credentials to a real time audio and video media engine to join the call room, and handles device permissions, media tracks, weak network strategy, and UI state itself. Call flow 1. Call signalingInvite to start a one to one call, or signalingInviteInGroup to start a group call. 2. Invitees receive the call invitation through OnReceiveNewInvitation and choose whether to accept or reject it. 3. After accepting, call signalingAccept and use the returned room credentials to join the call room. 4. During the call, update the call UI based on invitation status, participant status, media stream status, and custom signals. 5. The inviter can cancel an invitation that has not connected; call participants can hang up an established call. Core data | Data | Description | | | | | RtcInvite | Call invitation containing the inviter, invitees, group, room, media type, timeout, and session type. | | RtcInviteResults | The roomID , token , and liveURL returned after starting or accepting a call, or querying room credentials. | | CallingRoomData | Room ID, invitation information, and participant information returned when querying by group. | | OnReceiveNewInvitationPayload | Event parameter for a received call invitation, containing invitation , optional offlinePushInfo , and participant information. | customData and custom signals are both application defined strings. Use JSON or another format required by the application protocol. Call state After calling the start, accept, reject, cancel, or hang up API, update the UI for the current action from the corresponding result. Call state from other users or devices is received through events. Use roomID to distinguish calls; use both roomID and userID to distinguish participant state. For invitation lifecycle, participant room entry and room exit, and media stream listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events . For custom signal listeners, see Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal . Browse by task | Task | Page | | | | | Start a one to one or group call | Start a one to one call /sdk/react native/calling/managing calls/start single call , Start a group call /sdk/react native/calling/managing calls/start group call | | Accept or reject an invitation | Accept a call /sdk/react native/calling/managing calls/accept call , Reject a call /sdk/react native/calling/managing calls/reject call | | Cancel an invitation or hang up a call | Cancel a call invitation /sdk/react native/calling/managing calls/cancel call , Hang up a call /sdk/react native/calling/managing calls/hang up call | | Query a room or restore a pending invitation | Get a group call room /sdk/react native/calling/retrieving call information/get room by group id , Get room credentials /sdk/react native/calling/retrieving call information/get token by room id , Restore a pending invitation /sdk/react native/calling/retrieving call information/restore pending invitation | | Handle events and custom signals | Handle call events /sdk/react native/calling/managing calls/handle call events , Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal |" }, { - "path": "/sdk/react-native/user/friend-applications/add-friend", - "title": "Send a friend application", - "description": "Send a friend request with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "description": "Start a one-to-one audio or video call with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications add-friend", - "content": "Call addFriend to send a friend request to a specified user. await OpenIMSDK.addFriend toUserID, reqMsg, ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID to add. | | reqMsg | string | Yes | Message attached to the request. Pass an empty string when there is no message. | A successful call means that the friend request was submitted; it does not mean that the recipient has accepted it. For request status changes, see the listener examples in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-single-call", + "content": "Call signalingInvite to start a one to one audio or video call. The call returns room credentials that the app can use to connect a real time audio and video media engine with roomID , token , and liveURL . const roomCredentials = await OpenIMSDK.signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , groupID: '', roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Single, platformID: currentPlatform, , ; Parameters | Parameter | Type | Required | Description | | | | | | | invitation | RtcInvite | Yes | The call invitation. | | invitation.inviterUserID | string | Yes | User ID of the user starting the call. | | invitation.inviteeUserIDList | string | Yes | Invited user IDs. For a one to one call, provide the other user's ID. | | invitation.groupID | string | Yes | Pass an empty string for a one to one call. | | invitation.roomID | string | Yes | Room ID for this call. Subsequent call operations and state handling use this value to identify the call. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Media type, such as audio or video . | | invitation.sessionType | SessionType | Yes | Pass SessionType.Single for a one to one call. | | invitation.platformID | Platform | Yes | Inviter platform. Pass the Platform enum value for the current client. | | invitation.customData | string | No | Application defined extension string sent with the invitation. | | invitation.initiateTime | number | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | | invitation.busyLineUserIDList | string | No | Busy user list. It is usually omitted when starting a new invitation. | | offlinePushInfo | OfflinePush | No | Push content for invited users when they are offline. | | offlinePushInfo.title | string | Conditional | Push title when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string when offlinePushInfo is provided. Pass an empty string when there is no content. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether to update the iOS badge when offlinePushInfo is provided. | Return value The call returns RtcInviteResults : | Field | Type | Description | | | | | | roomID | string | Call room ID. | | token | string | Credential for joining the call room. | | liveURL | string | Room address returned by the calling service. | | busyLineUserIDList | string | IDs of invited users that are currently busy. | The invitee receives OnReceiveNewInvitation with OnReceiveNewInvitationPayload . For acceptance, rejection, cancellation, and hang up events, see Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-recipient", - "title": "Get received friend applications", - "description": "Get received friend requests with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/start-group-call", + "title": "Start a group call", + "description": "Start a group audio or video call with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-recipient", - "content": "Call getFriendApplicationListAsRecipient to page through friend requests received by the current user. const applications = await OpenIMSDK.getFriendApplicationListAsRecipient handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; Parameter description | Parameter | Type | Required | Description | | | | | | | handleResults | number | Yes | Request handling results to retrieve. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of requests to retrieve. | | Enum value | Numeric value | Meaning | | | | | | ApplicationHandleResult.Unprocessed | 0 | Pending. | | ApplicationHandleResult.Agree | 1 | Accepted. | | ApplicationHandleResult.Reject | 1 | Rejected. | The method returns the current page as FriendApplicationItem . Friend request fields FriendApplicationItem contains the following fields: | Field | Type | Description | | | | | | fromUserID | string | Applicant's user ID. | | fromNickname | string | Applicant's nickname. | | fromFaceURL | string | Applicant's avatar URL. | | toUserID | string | Recipient's user ID. | | toNickname | string | Recipient's nickname. | | toFaceURL | string | Recipient's avatar URL. | | reqMsg | string | Message attached to the request. | | handleResult | ApplicationHandleResult | Current handling result. | | handlerUserID | string | User ID that handled the request. | | handleMsg | string | Message entered when handling the request. | | handleTime | number | Time when the request was handled. | | createTime | number | Time when the request record was created. | | ex | string | Request record extension string. | Listen for friend request changes When a friend request changes, OnFriendApplicationAdded , OnFriendApplicationAccepted , OnFriendApplicationRejected , or OnFriendApplicationDeleted is emitted with a FriendApplicationItem : const handleApplicationChanged = application: FriendApplicationItem = // Update the request by fromUserID and toUserID ; const handleApplicationDeleted = application: FriendApplicationItem = // Remove the request by fromUserID and toUserID ; // Add listeners OpenIMSDK.on OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; // Remove listeners OpenIMSDK.off OpenIMEvent.OnFriendApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnFriendApplicationDeleted, handleApplicationDeleted ; Identify a request with both fromUserID and toUserID . Remove these listeners when logging out, switching accounts, or tearing down the request list state." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-group-call", + "content": "Call signalingInviteInGroup to start a group audio or video call. groupID identifies the group where the call starts. inviteeUserIDList specifies the members to invite; it does not automatically invite every group member. const roomCredentials = await OpenIMSDK.signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: memberUserIDs, groupID, roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Group, platformID: currentPlatform, , ; Parameters | Parameter | Type | Required | Description | | | | | | | invitation | RtcInvite | Yes | The call invitation. | | invitation.inviterUserID | string | Yes | User ID of the user starting the call. | | invitation.inviteeUserIDList | string | Yes | User IDs of the group members to invite. | | invitation.groupID | string | Yes | Target group ID. | | invitation.roomID | string | Yes | Room ID for this group call. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Media type, such as audio or video . | | invitation.sessionType | SessionType | Yes | Pass SessionType.Group for a group call. | | invitation.platformID | Platform | Yes | Inviter platform. Pass the Platform enum value for the current client. | | invitation.customData | string | No | Application defined extension string sent with the invitation. | | invitation.initiateTime | number | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | | invitation.busyLineUserIDList | string | No | Busy user list. It is usually omitted when starting a new invitation. | | offlinePushInfo | OfflinePush | No | Push content for invited users when they are offline. | | offlinePushInfo.title | string | Conditional | Push title when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string when offlinePushInfo is provided. Pass an empty string when there is no content. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether to update the iOS badge when offlinePushInfo is provided. | The call returns RtcInviteResults , which includes roomID , token , liveURL , and an optional busyLineUserIDList . For field descriptions, see Start a one to one call /sdk/react native/calling/managing calls/start single call . Invited members receive OnReceiveNewInvitation with OnReceiveNewInvitationPayload . For member acceptance, rejection, and room leave status, see Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/friend-applications/get-friend-application-list-as-applicant", - "title": "Get sent friend applications", - "description": "Get sent friend requests with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/accept-call", + "title": "Accept a call", + "description": "Accept a call invitation with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-list-as-applicant", - "content": "Call getFriendApplicationListAsApplicant to page through friend requests sent by the current user. const applications = await OpenIMSDK.getFriendApplicationListAsApplicant offset: 0, count: 20, ; Parameter description | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of requests to retrieve. | The method returns the current page as FriendApplicationItem . See Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient for request fields." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls accept-call", + "content": "After receiving OnReceiveNewInvitation , call signalingAccept to accept the call invitation. const roomCredentials = await OpenIMSDK.signalingAccept opUserID: currentUserID, invitation, ; opUserID is the user ID of the user accepting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback. The call returns RtcInviteResults , which contains the call room's roomID , token , and liveURL . Other participants receive the acceptance through OnInviteeAccepted ; use invitation.roomID in its callback to identify the call. For event listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/friend-applications/get-friend-application-unhandled-count", - "title": "Get pending application count", - "description": "Get the unhandled friend-request count with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/reject-call", + "title": "Reject a call", + "description": "Reject a call invitation with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications get-friend-application-unhandled-count", - "content": "Call getFriendApplicationUnhandledCount to get the number of unhandled friend requests after a specified time. const count = await OpenIMSDK.getFriendApplicationUnhandledCount time, ; Parameter description | Parameter | Type | Required | Description | | | | | | | time | number | Yes | Start time for the query, normally the last time the request list was viewed. | The method returns the number of unhandled friend requests after the specified time." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls reject-call", + "content": "After receiving a call invitation, call signalingReject to reject it when the invitation will not be accepted. await OpenIMSDK.signalingReject opUserID: currentUserID, invitation, ; opUserID is the user ID of the user rejecting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback. After the call returns, the rejection request is complete. The inviter receives the result through OnInviteeRejected ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/friend-applications/accept-friend-application", - "title": "Accept a friend application", - "description": "Accept a friend request with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "description": "Cancel a call invitation with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications accept-friend-application", - "content": "Call acceptFriendApplication to accept a friend request. await OpenIMSDK.acceptFriendApplication toUserID: applicantUserID, handleMsg: '', ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID of the applicant. | | handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. | Accepting the request establishes a friendship and emits friend request status changes and OnFriendAdded . See Get the friend list /sdk/react native/user/friends/get friend list page for the friend list listener." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls cancel-call", + "content": "Before the call connects, the inviter can call signalingCancel to cancel the invitation. await OpenIMSDK.signalingCancel opUserID: currentUserID, invitation, ; opUserID is the user ID that cancels the invitation. Use the complete RtcInvite object saved when the call was initiated for invitation . After the call returns, the cancellation request is complete. Invitees receive the cancellation through OnInvitationCancelled ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/friend-applications/refuse-friend-application", - "title": "Reject a friend application", - "description": "Reject a friend request with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/hang-up-call", + "title": "Hang up a call", + "description": "Hang up a call with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications refuse-friend-application", - "content": "Call refuseFriendApplication to reject a friend request. await OpenIMSDK.refuseFriendApplication toUserID: applicantUserID, handleMsg: '', ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID of the applicant. | | handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. | For request status changes, see the listener examples in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls hang-up-call", + "content": "After a call connects, call signalingHungUp to hang up. await OpenIMSDK.signalingHungUp opUserID: currentUserID, invitation, ; opUserID is the user ID hanging up the call. Use the complete RtcInvite object for the current call for invitation ; its roomID must match the active call room. After the call returns, the hang up request is complete. Other participants receive call end information through OnHangUp ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/friend-applications/delete-friend-requests", - "title": "Delete friend applications", - "description": "Delete friend-request records with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "description": "Listen for call events with OpenIM React Native SDK.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user friend-applications delete-friend-requests", - "content": "Call deleteFriendRequests to delete multiple friend request records. Parameter description Each item in the array contains the following fields: | Parameter | Type | Required | Description | | | | | | | fromUserID | string | Yes | Applicant's user ID. | | toUserID | string | Yes | Recipient's user ID. | await OpenIMSDK.deleteFriendRequests fromUserID, toUserID , ; Deleting a record is not the same as rejecting the request, and it does not delete an established friendship. For request record changes, see OnFriendApplicationDeleted in Get received friend requests /sdk/react native/user/friend applications/get friend application list as recipient ." + "keywords": "sdk react-native v4 sdk react-native calling managing-calls handle-call-events", + "content": "Call events report invitation status, participant status, and media stream status. For invitation events, read room information from invitation in the callback parameter. Media stream events provide roomID directly. To send and receive custom signals, see Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal . Event parameters | Event | Callback parameter type | Common fields | | | | | | OnReceiveNewInvitation | OnReceiveNewInvitationPayload | invitation , userID , participant , offlinePushInfo . | | OnInviteeAccepted | OnInviteeAcceptedPayload | invitation , userID , participant , opUserPlatformID . | | OnInviteeRejected | OnInviteeRejectedPayload | invitation , userID , participant , opUserPlatformID . | | OnInvitationCancelled | OnInvitationCancelledPayload | invitation , userID , participant , offlinePushInfo . | | OnInvitationTimeout | OnReceiveNewInvitationPayload | invitation , userID , participant , offlinePushInfo . | | OnInviteeAcceptedByOtherDevice | OnInviteeAcceptedPayload | invitation , userID , participant , opUserPlatformID . | | OnInviteeRejectedByOtherDevice | OnInviteeRejectedPayload | invitation , userID , participant , opUserPlatformID . | | OnHangUp | OnHangUpPayload | invitation , userID , offlinePushInfo . | | OnRoomParticipantConnected | OnRoomParticipantConnectedPayload | invitation , groupID , participant . | | OnRoomParticipantDisconnected | OnRoomParticipantDisconnectedPayload | invitation , groupID , participant . | | OnStreamChange | OnStreamChangePayload | roomID , streamType , mute . | Use invitation.roomID or roomID to distinguish calls. Use participant.userInfo.userID to distinguish participants. function handleReceiveNewInvitation payload: OnReceiveNewInvitationPayload // ... function handleInviteeAccepted payload: OnInviteeAcceptedPayload // ... function handleInviteeRejected payload: OnInviteeRejectedPayload // ... function handleInvitationCancelled payload: OnInvitationCancelledPayload // ... function handleInvitationTimeout payload: OnReceiveNewInvitationPayload // ... function handleInviteeAcceptedByOtherDevice payload: OnInviteeAcceptedPayload // ... function handleInviteeRejectedByOtherDevice payload: OnInviteeRejectedPayload // ... function handleHangUp payload: OnHangUpPayload // ... function handleRoomParticipantConnected payload: OnRoomParticipantConnectedPayload, // ... function handleRoomParticipantDisconnected payload: OnRoomParticipantDisconnectedPayload, // ... function handleStreamChange payload: OnStreamChangePayload // ... // Start listening OpenIMSDK.on OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.on OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.on OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.on OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.on OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.on OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice, ; OpenIMSDK.on OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice, ; OpenIMSDK.on OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected, ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected, ; OpenIMSDK.on OpenIMEvent.OnStreamChange, handleStreamChange ; // Stop listening OpenIMSDK.off OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.off OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.off OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.off OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.off OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.off OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice, ; OpenIMSDK.off OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice, ; OpenIMSDK.off OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected, ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected, ; OpenIMSDK.off OpenIMEvent.OnStreamChange, handleStreamChange ; Stop listening when the component is unmounted, the user signs out, or the account changes." }, { - "path": "/sdk/react-native/user/blacklist/get-black-list", - "title": "Get the blacklist", - "description": "Get the blocklist with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending invitation", + "description": "Restore a pending call invitation.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user blacklist get-black-list", - "content": "Call getBlackList to get the current account's blocklist. const blockedUsers = await OpenIMSDK.getBlackList ; The method returns BlackUserItem : | Field | Type | Description | | | | | | userID | string | ID of the blocked user. | | nickname | string | Nickname of the blocked user. | | faceURL | string | Avatar URL of the blocked user. | | ownerUserID | string | User ID that owns the blocklist relationship. | | operatorUserID | string | User ID that performed the block operation. | | createTime | number | Time when the blocklist record was created. | | addSource | number | Source from which the user was blocked. | | ex | string | Blocklist extension field. | Use userID when checking a blocklist relationship in a profile card or contact list. Blocklist management is separate from group management; use group APIs for muting or removing group members. Listen for blocklist changes When the blocklist changes, OnBlackAdded or OnBlackDeleted is emitted with the corresponding blocked user information: const handleBlackAdded = blackUser: BlackUserItem = // Add or update the record by blackUser.userID ; const handleBlackDeleted = blackUser: BlackUserItem = // Remove the record by blackUser.userID ; OpenIMSDK.on OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.on OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; OpenIMSDK.off OpenIMEvent.OnBlackAdded, handleBlackAdded ; OpenIMSDK.off OpenIMEvent.OnBlackDeleted, handleBlackDeleted ; Remove these listeners when logging out, switching accounts, or tearing down the blocklist state." + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information restore-pending-invitation", + "content": "When the app starts or returns to the foreground, call getSignalingInvitationInfoStartApp to get a call invitation that is still pending. const invitation, offlinePushInfo = await OpenIMSDK.getSignalingInvitationInfoStartApp ; Return value | Field | Type | Description | | | | | | invitation | RtcInvite or null | Pending call invitation; null when no invitation is pending. | | offlinePushInfo | OfflinePush | Offline push content included with the invitation. | When invitation is not null , use its invitation information to restore the incoming call UI. Subsequent cancellation, timeout, acceptance, and hang up states are received through Handle call events /sdk/react native/calling/managing calls/handle call events ." }, { - "path": "/sdk/react-native/user/blacklist/add-black", - "title": "Add a user to the blacklist", - "description": "Block a user with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "description": "Get a call room by group ID.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user blacklist add-black", - "content": "Call addBlack to add a specified user to the current account's blocklist. await OpenIMSDK.addBlack toUserID, ex, ; Parameter description | Parameter | Type | Required | Description | | | | | | | toUserID | string | Yes | User ID to block. | | ex | string | No | Blocklist relationship extension information. | After the user is blocked, OnBlackAdded is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the blocklist and listener example." + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-room-by-group-id", + "content": "Call signalingGetRoomByGroupID to get group call room information by group ID. groupID is the target group ID. const room = await OpenIMSDK.signalingGetRoomByGroupID groupID ; Return value The call returns CallingRoomData : | Field | Type | Description | | | | | | roomID | string | Call room ID. | | invitation | RtcInvite optional | Call invitation information for the room. | | participant | ParticipantInfo optional | Information about current room participants. | userInfo in participant contains user information. In group calls, it can also contain groupMemberInfo and groupInfo . Use the returned roomID to query room credentials or handle the corresponding call state." }, { - "path": "/sdk/react-native/user/blacklist/remove-black", - "title": "Remove a user from the blacklist", - "description": "Unblock a user with the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get room credentials", + "description": "Get call credentials by room ID.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native user blacklist remove-black", - "content": "Call removeBlack to remove a specified user from the current account's blocklist. await OpenIMSDK.removeBlack blackUserID ; blackUserID is the user ID to unblock. After the user is removed, OnBlackDeleted is emitted. See Get the blocklist /sdk/react native/user/blacklist/get black list for the listener example." + "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-token-by-room-id", + "content": "When a call room ID is known and room credentials are needed, call signalingGetTokenByRoomID . roomID is the target call room ID. const roomCredentials = await OpenIMSDK.signalingGetTokenByRoomID roomID ; Return value The call returns RtcInviteResults , including roomID , token , liveURL , and an optional busyLineUserIDList . Provide the returned room credentials to a real time audio and video media engine to join the call room." }, { - "path": "/sdk/react-native/conversation/overview-conversation", - "title": "Conversation overview", - "description": "Learn about conversations, conversation state, and conversation groups in the OpenIM React Native SDK.", + "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "description": "Send a custom signal in a call room.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation overview-conversation", - "content": "In the OpenIM React Native SDK, a conversation is a chat state maintained by the current account. Both one to one and group chats correspond to a ConversationItem , which contains list presentation data, unread state, drafts, and message reception settings. Conversation records and chat targets use different identifiers. conversationID identifies the current account's conversation record, while a one to one target uses the other user's userID and a group target uses groupID . Group profiles, members, and permissions are managed through group APIs. Conversation identifiers | Identifier | Meaning | | | | | conversationID | Conversation record ID for the current account. | | userID | The other user's ID in a one to one conversation. | | groupID | Group ID for a group conversation. | | sourceID | Chat target used when querying by type: pass userID for one to one conversations or groupID for group conversations. | To generate a conversationID from a chat target, call Resolve a conversation ID /sdk/react native/conversation/retrieving conversations/get conversation id with sourceID and sessionType . Conversation data ConversationItem contains list presentation data and settings for the current account: | Category | Fields | Description | | | | | | Identity and type | conversationID , conversationType | Identify the conversation record and distinguish one to one and group conversations. | | List presentation | showName , faceURL , latestMsg , latestMsgSendTime | Display the conversation name, avatar, and latest message. | | Unread and mentions | unreadCount , groupAtType | Display unread counts and group mention status. | | List organization | isPinned , isMarked , draftText , remark | Manage pinning, marking, drafts, and the current account's remark. | | Message policies | recvMsgOpt , isPrivateChat , burnDuration , isMsgDestruct , msgDestructTime | Configure message reception, burn after reading, and server side deletion. | | Other state and extensions | isNotInGroup , attachedInfo , ex | Indicate group membership state, SDK attached information, and application extensions. | Find a page by task | Task | Related page | | | | | Get one or more conversations | Open a conversation /sdk/react native/conversation/retrieving conversations/get conversation by target , Get conversations by ID /sdk/react native/conversation/retrieving conversations/get conversations by id , Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list | | Organize the conversation list | Pin or unpin a conversation /sdk/react native/conversation/managing conversations/pin conversation , Mark or unmark a conversation /sdk/react native/conversation/managing conversations/mark conversation , Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups | | Manage drafts, remarks, and extensions | Set a conversation draft /sdk/react native/conversation/managing conversations/set conversation draft , Set a conversation remark /sdk/react native/conversation/managing conversations/set conversation remark , Set conversation extra data /sdk/react native/conversation/managing conversations/set conversation extension | | Configure message reception and retention | Set conversation message reception /sdk/react native/conversation/managing conversations/set message receive option , Enable or disable burn after reading /sdk/react native/conversation/managing conversations/set private chat , Schedule server message deletion /sdk/react native/conversation/managing conversations/set message destruct | | Handle unread counts and group mentions | Mark a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read , Track the total unread count /sdk/react native/conversation/managing conversations/get total unread count , Reset group mention status /sdk/react native/conversation/managing conversations/clear group mentions | Hide, delete, and clear These operations have different scopes: | Operation | Effect | | | | | Hide a conversation /sdk/react native/conversation/managing conversations/hide a conversation | Hide one conversation from the current account's list; it may reappear when a new message arrives. | | Delete a conversation and its messages /sdk/react native/conversation/managing conversations/delete conversation with messages | Delete the conversation record and the current account's messages in it. | | Clear messages in a conversation /sdk/react native/conversation/managing conversations/clear conversation messages | Keep the conversation record and clear only the current account's messages. | Events Conversation state changes are delivered through events: Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list covers new conversations and conversation field changes. Track the total unread count /sdk/react native/conversation/managing conversations/get total unread count covers total unread count changes. Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups covers conversation group and membership changes." + "keywords": "sdk react-native v4 sdk react-native calling sending-custom-signals send-a-custom-signal", + "content": "Call signalingSendCustomSignal to send an application defined signal to a call room, such as raising a hand or changing the layout. customInfo is a string. To send structured data, pass a JSON string. await OpenIMSDK.signalingSendCustomSignal roomID, customInfo: JSON.stringify type: 'hand raised', , ; Parameters | Parameter | Type | Description | | | | | | roomID | string | Target call room ID. | | customInfo | string | Application defined signal content. | After the call returns, the custom signal request is complete. Receive custom signals When another participant sends a custom signal, OnReceiveCustomSignal is triggered. Its callback parameter is OnReceiveCustomSignalPayload , which contains roomID and customInfo . function handleCustomSignal payload: OnReceiveCustomSignalPayload // ... // Start listening OpenIMSDK.on OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; // Stop listening OpenIMSDK.off OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; Stop listening when the component is unmounted, the user signs out, or the account changes. After receiving customInfo , parse and handle its data according to the application protocol." }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-by-target", - "title": "Open a conversation", - "description": "Query a conversation by its chat target and session type.", + "path": "/sdk/react-native/events/overview-events", + "title": "Events overview", + "description": "Understand the OpenIM React Native SDK event model, event categories, and listener lifecycle.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-by-target", - "content": "Call getOneConversation to query a conversation by its chat target and session type. const conversation = await OpenIMSDK.getOneConversation sourceID: targetUserID, sessionType: SessionType.Single, ; Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Pass the other user's ID for a one to one conversation or the group ID for a group conversation. | | sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one to one conversations and SessionType.Group for group conversations. | Return result The call returns a ConversationItem . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields." + "keywords": "sdk react-native v4 sdk react-native events overview-events", + "content": "Event model The OpenIM React Native SDK uses OpenIMEvent to define event names and a shared listener interface to report connection state, data changes, and business signaling. Call OpenIMSDK.on to register a listener and OpenIMSDK.off to remove it. Event names can use enum values from OpenIMEvent or the corresponding event strings. When using a string, it must exactly match the event name defined by the SDK. function handleEvent payload: unknown // Update application state from the event payload. // Set listener OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleEvent ; // Or use the event string OpenIMSDK.on \"onConversationChanged\", handleEvent ; // Remove listener OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleEvent ; // Or use the event string OpenIMSDK.off \"onConversationChanged\", handleEvent ; The callback parameter for each event is defined by the SDK declaration. It can be an entity, an array, a progress value, or error information. See the corresponding feature page for the exact parameter format and handling example. Event categories React Native SDK events are grouped by business domain: | Event category | Typical events | Description | | | | | | Connection and sign in state | OnConnecting , OnConnectSuccess , OnConnectFailed , OnKickedOffline , OnUserTokenExpired , OnUserTokenInvalid | Connection, connection failure, forced sign out, and token state changes. | | Initial synchronization | OnSyncServerStart , OnSyncServerProgress , OnSyncServerFinish , OnSyncServerFailed | The lifecycle of server data synchronization after sign in. | | Users and online status | OnSelfInfoUpdated , OnUserStatusChanged | Changes to the current user's profile and user online status. | | Friends and blacklist | OnFriendAdded , OnFriendDeleted , OnFriendInfoChanged , OnFriendApplicationAdded , OnBlackAdded | Changes to friend relationships, friend applications, and the blacklist. | | Conversations and unread state | OnNewConversation , OnConversationChanged , OnTotalUnreadMessageCountChanged , OnInputStatusChanged | Conversation list, unread count, and typing state changes. | | Conversation groups | OnConversationGroupAdded , OnConversationGroupChanged , OnConversationGroupDeleted | Conversation groups and their membership changes. | | Groups and members | OnGroupInfoChanged , OnGroupMemberAdded , OnGroupMemberDeleted , OnGroupApplicationAdded , OnJoinedGroupAdded | Group profile, member, application, and joined group changes. | | Messages | OnRecvNewMessage , OnMsgDeleted , OnNewRecvMessageRevoked , OnMessageModified , OnRecvC2CReadReceipt | New messages, deletions, revocations, modifications, and one to one read receipts. | | File uploads | UploadOnProgress , UploadComplete | File upload progress and completion. | | Audio and video calls | OnReceiveNewInvitation , OnInviteeAccepted , OnInvitationCancelled , OnHangUp , OnReceiveCustomSignal | Call invitations, participant state, and call signaling changes. | | Custom business messages | OnRecvCustomBusinessMessage | Custom business messages. | Registration timing and lifecycle The React Native SDK allows global listeners to be registered at any time. It starts delivering connection, synchronization, and business data events after initSDK and sign in; register listeners before the operation whose events you need to receive. The React Native SDK supports multiple listeners for the same event. Every registered listener receives the event, unlike the single listener mechanism in the Flutter and Android SDKs, where a later listener replaces the earlier one. Even though multiple listeners are supported, register and manage callbacks centrally in the application so that rendering or re entering a component does not register the same business handler repeatedly. Keep listener functions in stable references. When logging out, switching accounts, or destroying related state, call off with the same event name and function reference used for registration. Connection and initial synchronization events Connection events report the SDK connection state: | Event | Description | | | | | OnConnecting | The SDK starts connecting to the server. | | OnConnectSuccess | The SDK connects successfully. | | OnConnectFailed | The connection fails and error information is provided. | | OnKickedOffline | The current account signs in on another client or is forced offline by the server. | | OnUserTokenExpired | The current login token has expired. | | OnUserTokenInvalid | The current login token is invalid. | After sign in, the SDK reports initial synchronization through these events: | Event | Description | | | | | OnSyncServerStart | Synchronization starts. | | OnSyncServerProgress | The current synchronization progress. | | OnSyncServerFinish | The current synchronization completes. | | OnSyncServerFailed | The current synchronization fails. | After synchronization completes, query the data needed by the current interface again. Later user, friend, conversation, group, message, and call changes are reported by the corresponding business events. Handle events by domain The feature pages below provide complete parameter descriptions and listener examples: | Event scope | Reference pages | | | | | User profile and online status | Update the current user profile /sdk/react native/user/profile/set self info , Subscribe to user online status /sdk/react native/user/online status/subscribe users status | | Friends, friend applications, and blacklist | Get the friend list by page /sdk/react native/user/friends/get friend list page , Get received friend applications /sdk/react native/user/friend applications/get friend application list as recipient , Get the blacklist /sdk/react native/user/blacklist/get black list | | Conversations, unread counts, and conversation groups | Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list , Get the total unread count /sdk/react native/conversation/managing conversations/get total unread count , Conversation groups overview /sdk/react native/conversation/managing conversation groups/overview conversation groups | | Groups, members, and applications | Group overview /sdk/react native/group/overview group , Get received group applications /sdk/react native/group/group applications/get group application list as recipient , Get the group member list by page /sdk/react native/group/retrieving group members/get group member list | | Messages and message status | Receive messages /sdk/react native/message/receiving messages/receive messages , Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages , Delete saved messages in a batch /sdk/react native/message/managing messages/delete saved messages , Revoke a message /sdk/react native/message/managing messages/revoke a message , Modify a message /sdk/react native/message/managing messages/modify a message , Send group read receipts /sdk/react native/message/managing read status/send group read receipts | | File uploads | Upload a file /sdk/react native/file uploads/upload file | | Audio and video calls and custom signaling | Handle call events /sdk/react native/calling/managing calls/handle call events , Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal |" }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversation-id", - "title": "Resolve a conversation ID", - "description": "Generate a conversation ID from a chat target and session type.", + "path": "/sdk/react-native/logger", + "title": "Logging", + "description": "Configure OpenIM React Native SDK logging, write diagnostic information, and upload logs.", "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversation-id", - "content": "Call getConversationIDBySessionType to generate a conversation ID from a chat target and session type. const conversationID = await OpenIMSDK.getConversationIDBySessionType sourceID: targetUserID, sessionType: SessionType.Single, ; Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Pass the other user's ID for a one to one conversation or the group ID for a group conversation. | | sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one to one conversations and SessionType.Group for group conversations. | Return result The call returns the conversation ID as a string ." + "keywords": "sdk react-native v4 sdk react-native logger", + "content": "OpenIM React Native SDK logs help diagnose initialization, connection, and business API problems. Development and staging environments can use more detailed logs. Production should reduce the log level and avoid recording tokens, complete message bodies, raw file URLs, call room credentials, or private user fields. Configure logging during initialization Configure the log directory and level when calling initSDK : await OpenIMSDK.initSDK apiAddr, wsAddr, dataDir, logFilePath, logLevel: LogLevel.Debug, isLogStandardOutput: true, ; | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log verbosity: Debug , Info , Warn , Error , Fatal , or Panic . | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard log. Enable it for development diagnostics. | Use LogLevel.Debug for development diagnostics. Production applications usually use LogLevel.Warn or LogLevel.Error and disable unnecessary standard output. Write application logs Call logs to write business diagnostic information to the SDK log: await OpenIMSDK.logs logLevel: LogLevel.Error, file: 'chatRepository.ts', line: 184, msgs: 'send message failed', err: error.message, keyAndValue: 'conversationID', conversationID, 'clientMsgID', clientMsgID, , ; | Parameter | Type | Description | | | | | | logLevel | number | Log level for this entry. | | file | string | File or module name at the call site. | | line | number | Line number at the call site. | | msgs | string | Short business action or diagnostic description. | | err | string | Error information; pass an empty string when there is no error. | | keyAndValue | string | Additional diagnostic fields passed as key and value pairs. | Use keyAndValue only for non sensitive identifiers needed for diagnosis, such as conversationID , clientMsgID , groupID , or roomID . Upload logs When a user actively submits diagnostic logs, call uploadLogs to upload the client logs: await OpenIMSDK.uploadLogs line: 2000, cancelID: 'support ticket 42', ex: 'user initiated diagnostics', ; | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines to read for this upload. | | cancelID | string | No | Identifier for this upload. | | ex | string | No | Additional diagnostic description; it must not contain credentials or private data. | When the call returns, the log upload request has completed. Before uploading, explain the log collection scope to the user and follow privacy and compliance requirements." }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/get-conversations-by-id", - "title": "Get conversations by ID", - "description": "Retrieve multiple conversations by their conversation IDs.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations get-conversations-by-id", - "content": "When you already have a set of conversation IDs, call getMultipleConversation to retrieve their conversation information. const conversations = await OpenIMSDK.getMultipleConversation conversationIDList ; Parameters conversationIDList is the array of conversation IDs to query. Return result The call returns ConversationItem . The result may contain fewer items than the input IDs; an ID that is not returned was not found by the SDK. See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields." + "path": "/sdk/electron/getting-started/authenticate-and-init", + "title": "Authenticate and initialize", + "description": "Use the Electron FFI initSDK, login, and unInitSDK methods to establish a session, and understand how their parameters differ from WASM login.", + "context": "SDKs · Electron · v4", + "keywords": "sdk electron v4 sdk electron getting-started authenticate-and-init", + "content": "The Electron FFI SDK separates SDK initialization from user authentication. First call initSDK to configure the OpenIMServer addresses and local runtime directory, then call login with the userID and token. This differs from WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session , where a single InitAndLoginConfig is passed to login . This page covers only the Electron FFI lifecycle APIs. Use the WASM authentication page as a reference for the handling boundaries around connection success, token expiration, and forced sign out. When registering Electron FFI listeners, use the event enum exported by the current Electron SDK rather than copying the WASM SdkEvent type directly. Differences from WASM | Step | Electron FFI | WASM | | | | | | Configure server addresses and runtime | initSDK InitConfig | Included in login InitAndLoginConfig | | Submit user credentials | login userID, token | Included in the same login call | | Release the native SDK | unInitSDK | No equivalent public unload API; use logout to end the session | If the Electron renderer uses the WASM package, follow the WASM authentication page directly and do not call the initSDK described here. Initialize the SDK At initialization, InitConfig supplies server addresses, platform information, a local data directory, and logging options. Parameters | Field | Type | Required | Description | | | | | | | apiAddr | string | Yes | OpenIMServer HTTP API address. | | wsAddr | string | Yes | OpenIMServer WebSocket address. | | platformID | number | Yes | Current client platform value. It must conform to the OpenIMServer multi device login policy. | | dataDir | string | Yes | Writable absolute path for the native SDK's local data. | | systemType | string | Yes | System type identifier required by the Electron FFI SDK. | | logLevel | LogLevel | No | Logging level. | | logFilePath | string | No | Log file path. | | isLogStandardOutput | boolean | No | Whether to write logs to standard output. | await openimsdk.initSDK apiAddr, wsAddr, platformID, dataDir: '/absolute/path/to/openim data', systemType: 'electron', logLevel: LogLevel.Warn, isLogStandardOutput: false, ; When the initSDK Promise succeeds, the native SDK has initialized and can proceed to login. It has not established a user session, and a connection event has not necessarily arrived. Log in the current user Call login after initialization succeeds. FFI login accepts only the user's credentials. Parameters | Field | Type | Required | Description | | | | | | | userID | string | Yes | Current OpenIMSDK user ID. It must match the token. | | token | string | Yes | OpenIMSDK token issued by a trusted backend. | await openimsdk.login userID, token, ; When the login Promise succeeds, the login request has completed. Use connection events such as OnConnectSuccess to decide when business APIs that require a connection are available. See the WASM authentication page /sdk/wasm/getting started/authenticate and manage session for event registration. Log out and uninitialize When the user signs out or switches accounts, first call the shared logout method to end the session. Call unInitSDK afterward when the native resources must be released. await openimsdk.logout ; await openimsdk.unInitSDK ; unInitSDK takes no business parameters. When switching accounts, finish signing out the old account and clear its state before calling initSDK and login again when necessary. Do not initialize two native instances concurrently. Next steps Electron SDK overview /sdk/electron/overview WASM authentication and session management /sdk/wasm/getting started/authenticate and manage session Create media messages from full paths /sdk/electron/message/create media from full path" }, { - "path": "/sdk/react-native/conversation/retrieving-conversations/retrieve-conversation-list", - "title": "Retrieve the conversation list", - "description": "Retrieve the current user's conversation list with pagination.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation retrieving-conversations retrieve-conversation-list", - "content": "Use getConversationListSplit to retrieve the conversation list page by page. const conversations = await OpenIMSDK.getConversationListSplit offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page and increase it by the number of items already requested. | | count | number | Yes | Number of conversations to request. | Return result The call returns the current page as ConversationItem . When fewer than count items are returned, the current list has reached its end. Conversation fields ConversationItem contains the chat target, list presentation data, and settings for the current account: | Field | Type | Description | | | | | | conversationID | string | Conversation ID. | | conversationType | SessionType | Conversation type, such as one to one or group. | | userID | string | The other user's ID in a one to one conversation; usually empty for group conversations. | | groupID | string | Group ID for a group conversation; usually empty for one to one conversations. | | showName | string | Display name of the conversation. | | faceURL | string | Display avatar URL of the conversation. | | recvMsgOpt | MessageReceiveOptType | Message reception setting for the conversation. | | unreadCount | number | Number of unread messages in the conversation. | | groupAtType | GroupAtType | Mention status for a group conversation; not used for one to one conversations. | | latestMsg | string | JSON serialized content of the latest message. | | latestMsgSendTime | number | Time when the latest message was sent. | | draftText | string | Draft saved on the current device. | | draftTextTime | number | Time when the draft was updated. | | isPrivateChat | boolean | Whether burn after reading is enabled for the one to one conversation. | | burnDuration | number | Burn after reading duration for the one to one conversation. | | isMsgDestruct | boolean | Whether scheduled server side message deletion is enabled. | | msgDestructTime | number | Server side message deletion period. | | isPinned | boolean | Whether the conversation is pinned. | | isMarked Enterprise | boolean | Whether the conversation is marked. | | isNotInGroup | boolean | Whether the current account is no longer in the group. | | attachedInfo | string | Additional information attached by the SDK. | | ex | string optional | Conversation extension string. | | remark Enterprise | string optional | Conversation remark. | When loading multiple pages, deduplicate them by conversationID . Start again from offset: 0 when refreshing the list. Listen for conversation changes OnNewConversation is emitted when a conversation is created. OnConversationChanged is emitted when an existing conversation changes. Both callbacks receive ConversationItem . function handleNewConversation conversations: ConversationItem // ... function handleConversationChanged conversations: ConversationItem // ... OpenIMSDK.on OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.on OpenIMEvent.OnConversationChanged, handleConversationChanged ; OpenIMSDK.off OpenIMEvent.OnNewConversation, handleNewConversation ; OpenIMSDK.off OpenIMEvent.OnConversationChanged, handleConversationChanged ; Remove the listeners when logging out, switching accounts, or tearing down the conversation list state." + "path": "/sdk/electron/message/create-media-from-full-path", + "title": "Create media messages from full paths", + "description": "Use the Electron FFI *FromFullPath APIs to create image, video, audio, and file messages from absolute local paths.", + "context": "SDKs · Electron · v4", + "keywords": "sdk electron v4 sdk electron message create-media-from-full-path", + "content": "Electron FFI provides a set of APIs for creating media messages from complete local file paths . They are intended for desktop applications that already have an absolute disk path, such as one returned by a system file picker. Browser applications and Electron applications using WASM should use the corresponding ByFile or ByURL methods. For images, see Create an image message from a file /sdk/wasm/message/creating messages/create image message by file and Create an image message from a URL /sdk/wasm/message/creating messages/create image message by url . For independent file uploads, see Upload a file /sdk/wasm/file uploads/upload file . After creating a MessageItem , send it with sendMessage just like any message that uses the shared message model. See Send a message /sdk/wasm/message/sending messages/send message for sending parameters and events. Supported methods | Method | Purpose | | | | | createImageMessageFromFullPath imagePath | Create an image message from an absolute local image path. | | createSoundMessageFromFullPath params | Create an audio message from an absolute local audio path. | | createVideoMessageFromFullPath params | Create a video message from absolute video and snapshot paths. | | createFileMessageFromFullPath params | Create a regular file message from an absolute local path. | These methods create message objects only. They do not send a message automatically or trigger a new message event. Image messages createImageMessageFromFullPath accepts the image's absolute file path directly. const data: message = await openimsdk.createImageMessageFromFullPath '/absolute/path/to/photo.jpg', ; await openimsdk.sendMessage recvID, groupID: '', message, ; Audio messages Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Absolute path to the audio file. | | duration | number | Yes | Audio duration. Pass an integer rather than a decimal value. | const data: message = await openimsdk.createSoundMessageFromFullPath soundPath: '/absolute/path/to/voice.m4a', duration: 3200, ; Video messages Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Absolute path to the video file. | | videoType | string | Yes | Video type, such as mp4 . | | duration | number | Yes | Video duration. Pass an integer rather than a decimal value. | | snapshotPath | string | Yes | Absolute path to the video cover snapshot. | const data: message = await openimsdk.createVideoMessageFromFullPath videoPath: '/absolute/path/to/clip.mp4', videoType: 'mp4', duration: 12000, snapshotPath: '/absolute/path/to/cover.jpg', ; File messages Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Absolute path to the file. | | fileName | string | Yes | File name displayed to conversation members. | const data: message = await openimsdk.createFileMessageFromFullPath filePath: '/absolute/path/to/report.pdf', fileName: 'report.pdf', ; Results When any of the four FromFullPath Promises succeeds, its data is a MessageItem ready to send. A subsequent successful sendMessage Promise means only that the send request completed. The recipient confirms delivery through its new message event. Related pages Electron SDK overview /sdk/electron/overview Send a message /sdk/wasm/message/sending messages/send message Upload a file /sdk/wasm/file uploads/upload file" }, { - "path": "/sdk/react-native/conversation/managing-conversations/pin-conversation", - "title": "Pin or unpin a conversation", - "description": "Pin or unpin a conversation for the current account.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations pin-conversation", - "content": "Call pinConversation to set whether a conversation is pinned. await OpenIMSDK.pinConversation conversationID, isPinned: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isPinned | boolean | Yes | Set true to pin or false to unpin. | Return result After the call completes, the conversation's isPinned state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/sdk/electron/logger/upload-logs", + "title": "Upload logs", + "description": "Use the Electron FFI uploadLogs method to upload client diagnostic logs.", + "context": "SDKs · Electron · v4", + "keywords": "sdk electron v4 sdk electron logger upload-logs", + "content": "Electron FFI provides uploadLogs to upload diagnostic logs already written by the native SDK to the log collection service configured for the current OpenIMServer. See WASM logging /sdk/wasm/logger for browser side log configuration. The WASM package does not provide an equivalent uploadLogs method. Upload logs only when troubleshooting, when a user explicitly submits diagnostics, or when operations staff request them. Before uploading, confirm that logs do not contain tokens, message content, or other sensitive fields. If business context is required, use ex for a non sensitive diagnostic label; never put credentials in it. Upload logs Parameters | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines or line range configuration to read for the upload, as required by Electron FFI. | | cancelID | string | No | Cancellation identifier. When omitted, the SDK uses its default value. | | ex | string | No | Additional description attached to the upload. Omit it or pass an empty string when not needed. | await openimsdk.uploadLogs line: 2000, ex: 'desktop diag session', ; Result When the uploadLogs Promise succeeds, the current upload request has completed. It does not change conversations, messages, or user profiles, and it does not trigger business domain events. If the upload fails, record errCode , errMsg , and the current user ID to correlate the failure with OpenIMServer logs. Do not repeat the complete log content in the failure log. Related pages Electron SDK overview /sdk/electron/overview WASM logging /sdk/wasm/logger Authenticate and initialize /sdk/electron/getting started/authenticate and init" }, { - "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation", - "title": "Mark or unmark a conversation", - "description": "Mark or unmark a conversation for the current account.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation", - "content": "Call setConversation to set the marked state of a conversation. await OpenIMSDK.setConversation conversationID, isMarked: true, ; Set isMarked to false to unmark the conversation. The marked state belongs to the current account, and marked conversations appear in the built in marked conversation group. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for group management. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isMarked | boolean | No | Set true to mark or false to unmark. | Return result After the call completes, the conversation's isMarked state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/platform-api/webhooks/overview", + "title": "Overview", + "description": "OpenIM Webhooks overview, including delivery behavior, configuration, protocol, and callback coverage.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks overview", + "content": "Webhooks let OpenIM notify a business backend over HTTP or HTTPS before or after an operation. Before event callbacks can validate, reject, or adjust an operation. After event callbacks synchronize completed user, relationship, group, message, presence, and conversation changes. Delivery model | Type | Invocation | Typical use | Effect on OpenIM | | | | | | | Before event | Synchronous | Moderation, authorization, field changes, risk controls | OpenIM waits for the response and uses failedContinue , actionCode , and nextCode to continue or stop. | | After event | Asynchronous | Synchronization, auditing, analytics, notifications | The operation has completed; the response cannot change its result. | Before event handlers are on the OpenIM request path and must remain low latency and highly available. After event delivery can still be affected by network, process, or queue failures, so it must not be the only persistence mechanism for financial or similarly critical events. Configure Webhooks Configure a common URL and enable callbacks in config/webhooks.yml : url: https://api.example.com/openim/webhooks beforeSendSingleMsg: enable: true timeout: 5 failedContinue: false deniedTypes: afterUserRegister: enable: true timeout: 5 | Setting | Description | | | | | url | Base receiver URL. OpenIM appends the callbackCommand . | | enable | Enables the callback. | | timeout | Receiver timeout in seconds. | | failedContinue | Whether a before event operation continues after receiver failure or timeout. | | attentionIds | User or group IDs observed by an after event callback. | | allowedTypes | Message content types allowed to trigger the callback. | | deniedTypes | Message content types excluded from the callback. | | insecureSkipVerify Enterprise | Skips HTTPS certificate verification. Use only in controlled tests. | | signature.algorithm Enterprise | HMAC SHA1 , HMAC SHA256 , HMAC SHA512 , RSA SHA256 , or ECDSA SHA256 . | | signature.signatureHeader Enterprise | Header carrying the signature. | | signature.nonceHeader Enterprise | Header carrying the signed nonce. | | signature.secret Enterprise | HMAC secret or asymmetric private key. | The current Enterprise signature covers the nonce header, not the full body. Always use HTTPS and validate signature, nonce freshness, and replay state. Request and response protocol OpenIM sends JSON with POST to WEBHOOK ADDRESS / callbackCommand and supplies operationID as a request header. Dispatch by callbackCommand , not arrival order, and make handlers idempotent using the event's business key, message ID, or operationID . Before event responses use: \"actionCode\":0,\"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"nextCode\":0 CallbackAction | Value | Name | Description | | | | | | 0 | ActionAllow | Use nextCode to continue or stop. This is the value required by the current common response parser. | | 1 | ActionForbidden | Reserved. To reject, return actionCode: 0 , nextCode: 1 , and a business error. | CallbackNextCode | Value | Name | Description | | | | | | 0 | Continue | Continue the OpenIM operation. | | 1 | Stop | Stop the operation using errCode , errMsg , and errDlt . | Callback coverage Users: registration and profile updates. Relationships: friend requests, acceptance, deletion, remarks, blacklist changes, and imports. Groups: creation, joining, leaving, dismissal, ownership, and group/member profile updates. Messages: one to one and group sends, final message modification, read status, and revocation. Push and presence: online/offline push targeting and user online, offline, or forced logout state. Conversations: creation callbacks are available in OpenIM Enterprise. Integration guidance Host receivers on a stable backend, never on a client. Define strict before event timeouts and an explicit failedContinue policy. Acknowledge after event callbacks quickly, then enqueue expensive work. Restrict source addresses, rate, and body size at the gateway, and use HTTPS." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-remark", - "title": "Set a conversation remark", - "description": "Set a remark for a conversation for the current account.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-remark", - "content": "Call setConversation to set a conversation remark for the current account. await OpenIMSDK.setConversation conversationID, remark: 'Project discussion', ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | remark | string | No | Conversation remark. Pass an empty string to clear the existing remark. | When displaying a conversation name, the application can prefer remark and fall back to showName when no remark is set. A conversation remark does not update the user's profile or the group name. Return result After the call completes, the conversation's remark is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/platform-api/webhooks/user/before-user-register", + "title": "Before user registration", + "description": "Validate or adjust user profiles before registration.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user before-user-register", + "content": "Validate, reject, or adjust user profiles before OpenIM registers them. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeUserRegisterCommand . | | users | UserInfo | Users about to be registered. See UserInfo /platform api/user/overview userinfo . | Response Return the common before event response. An optional users array replaces the profiles OpenIM will process. Use nextCode: 1 with a business error to reject registration. Processing rules Configuration key: beforeUserRegister . OpenIM waits synchronously; failure behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-extension", - "title": "Set conversation extra data", - "description": "Set the conversation extension string.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-extension", - "content": "Use setConversation to set the conversation extension field ex . await OpenIMSDK.setConversation conversationID, ex: JSON.stringify category: 'work', , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | ex | string | No | Conversation extension string. Pass a JSON string or another format of extension data as needed by the application. | If existing extension data must be preserved, read the current ex , update it according to the application's rules, and write the complete value back. Return result After the call completes, the conversation's ex is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/platform-api/webhooks/user/after-user-register", + "title": "After user registration", + "description": "Synchronize user profiles after registration completes.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user after-user-register", + "content": "Synchronize user profiles after OpenIM registration completes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserRegisterCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserRegisterCommand . | | users | UserInfo | Registered users. See UserInfo /platform api/user/overview userinfo . | Response Return an HTTP success response promptly. The registration is already complete and cannot be changed by this response. Processing rules Configuration key: afterUserRegister . Process idempotently by user ID or operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-conversation-draft", - "title": "Set a conversation draft", - "description": "Save a draft for a conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-conversation-draft", - "content": "Use setConversationDraft to save a conversation draft. Submit the current editor content when the user leaves the chat screen, switches conversations, or is about to log out. await OpenIMSDK.setConversationDraft conversationID, draftText: editorValue, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID for the draft. | | draftText | string | Yes | Draft content. Pass an empty string to clear the draft. | Keep the editor state in the application while the user is typing, then save the latest value before leaving the screen. Return result After the call completes, the draft is saved. Changes to draftText and draftTextTime in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . Clear the application's editor state when the account changes or the user logs out." + "path": "/platform-api/webhooks/user/before-update-user-info", + "title": "Before updating user information", + "description": "Validate or adjust nickname, avatar, and extension data before a user profile update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user before-update-user-info", + "content": "Validate or adjust profile fields before OpenIM updates a user. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoCommand Request body | Property | Required | Type | Description | | | | | | | callbackCommand | Yes | string | callbackBeforeUpdateUserInfoCommand . | | userID | Yes | string | User being updated. | | nickName | No | string | Proposed nickname. | | faceURL | No | string | Proposed avatar URL. | | ex | No | string | Proposed extension data. | Response Return the common before event response and optional nickName , faceURL , or ex replacements. Only returned business fields override the pending update. Processing rules Configuration key: beforeUpdateUserInfo . Use nextCode: 1 to reject the update." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-message-receive-option", - "title": "Set conversation message reception", - "description": "Set the message reception option for a conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-receive-option", - "content": "Call setConversationRecvMessageOpt to set the message reception option for one conversation. await OpenIMSDK.setConversationRecvMessageOpt conversationID, opt: MessageReceiveOptType.NotNotify, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | opt | MessageReceiveOptType | Yes | Message reception option for the conversation. | Common MessageReceiveOptType values are: | Enum value | Numeric value | Description | | | | | | MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. | | MessageReceiveOptType.NotReceive | 1 | Do not receive messages from this conversation. | | MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. | Return result After the call completes, the conversation's recvMsgOpt is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . For the account level default, see Set global message reception /sdk/react native/user/profile/set global message reception ." + "path": "/platform-api/webhooks/user/after-update-user-info", + "title": "After updating user information", + "description": "Synchronize nickname, avatar, and extension changes after a profile update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user after-update-user-info", + "content": "Synchronize a completed user profile update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoCommand Request body Includes callbackCommand , userID , nickName , faceURL , and ex with the resulting profile values. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfo . Process idempotently by user ID and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/clear-group-mentions", - "title": "Reset group mention status", - "description": "Reset the mention status of a group conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-group-mentions", - "content": "After the user handles mention messages in a group conversation, call resetConversationGroupAtType to reset the conversation's group mention status. await OpenIMSDK.resetConversationGroupAtType conversationID ; Parameters conversationID is the ID of the group conversation whose mention status should be reset. The method restores groupAtType to its normal state. It does not set states such as “mentioned me” or “mentioned everyone”. Resetting the group mention status and marking a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read are separate operations. Return result After the call completes, the conversation's group mention status is reset. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." + "path": "/platform-api/webhooks/user/before-update-user-info-ex", + "title": "Before updating selected user fields", + "description": "Validate or adjust optional user profile fields before an update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user before-update-user-info-ex", + "content": "Validate or adjust only the optional profile fields included in a selected field update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeUpdateUserInfoExCommand Request body Includes callbackCommand , required userID , and optional nickName , faceURL , and ex values. Response Return the common before event response plus only the replacement fields that OpenIM should apply. Processing rules Configuration key: beforeUpdateUserInfoEx . Omitted fields remain untouched; nextCode: 1 rejects the update." }, { - "path": "/sdk/react-native/conversation/managing-conversations/mark-conversation-read", - "title": "Mark a conversation as read", - "description": "Mark a conversation as read for the current account.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations mark-conversation-read", - "content": "After the user opens a conversation and reads its messages, call markConversationMessageAsRead to mark it as read. await OpenIMSDK.markConversationMessageAsRead conversationID ; Parameters conversationID is the ID of the conversation to mark as read. Return result After the call completes, the current account's unread state for the conversation is updated. Unread count changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list . For group conversations, this method changes only the current account's conversation unread state." + "path": "/platform-api/webhooks/user/after-update-user-info-ex", + "title": "After updating selected user fields", + "description": "Synchronize optional user profile fields after an update completes.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks user after-update-user-info-ex", + "content": "Synchronize the fields changed by a completed selected field user update. HTTP request POST WEBHOOK ADDRESS /callbackAfterUpdateUserInfoExCommand Request body Includes callbackCommand , userID , and the optional nickName , faceURL , and ex fields that changed. Response Return success promptly. The profile update is already complete. Processing rules Configuration key: afterUpdateUserInfoEx . Process idempotently by user ID and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/get-total-unread-count", - "title": "Track the total unread count", - "description": "Get the total unread message count across the current account's conversations.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations get-total-unread-count", - "content": "Call getTotalUnreadMsgCount to get the total unread count across all conversations for the current account. Do not calculate it by adding unreadCount from loaded pages, because unloaded conversations would be omitted. const totalUnread = await OpenIMSDK.getTotalUnreadMsgCount ; Return result The call returns the total unread count as a number . Listen for changes When the app is in the foreground, use OnTotalUnreadMessageCountChanged to listen for changes: function handleTotalUnreadChanged totalUnread: number // ... OpenIMSDK.on OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; OpenIMSDK.off OpenIMEvent.OnTotalUnreadMessageCountChanged, handleTotalUnreadChanged ; Remove the listener when the component is destroyed, the user logs out, or the account changes." + "path": "/platform-api/webhooks/relation/before-add-friend", + "title": "Before adding a friend", + "description": "Validate a friend request before it is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-add-friend", + "content": "Validate a friend request before it is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | | ex | string | Extension data | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriend . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-private-chat", - "title": "Enable or disable burn after reading", - "description": "Enable or disable burn after reading for a conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-private-chat", - "content": "Call setConversationPrivateChat to enable or disable burn after reading for a conversation. Set the duration separately with setConversationBurnDuration ; see Set the burn duration /sdk/react native/conversation/managing conversations/set burn duration . await OpenIMSDK.setConversationPrivateChat conversationID, isPrivate: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isPrivate | boolean | Yes | Set true to enable or false to disable. | Return result After the call completes, the conversation's burn after reading state is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/platform-api/webhooks/relation/after-add-friend", + "title": "After adding a friend", + "description": "Synchronize a newly created friend request.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-add-friend", + "content": "Synchronize a newly created friend request. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendCommand . | | fromUserID | string | Request sender | | toUserID | string | Request recipient | | reqMsg | string | Request message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriend . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-burn-duration", - "title": "Set the burn duration", - "description": "Set the burn-after-reading duration for a conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-burn-duration", - "content": "Call setConversationBurnDuration to set the burn after reading duration in seconds. This method sets only the duration; use Enable or disable burn after reading /sdk/react native/conversation/managing conversations/set private chat to enable the mode. Do not confuse burnDuration with the server side deletion period msgDestructTime . await OpenIMSDK.setConversationBurnDuration conversationID, burnDuration: 30, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | burnDuration | number | Yes | Burn after reading duration in seconds. | Return result After the call completes, the conversation's burn after reading duration is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/platform-api/webhooks/relation/before-add-friend-agree", + "title": "Before accepting a friend request", + "description": "Validate a friend-request acceptance.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-add-friend-agree", + "content": "Validate a friend request acceptance. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddFriendAgree . OpenIM waits synchronously; timeout behavior follows failedContinue . The protocol retains the historical field names blackUserID , HandleResult , and HandleMsg ; parse them exactly as shown." }, { - "path": "/sdk/react-native/conversation/managing-conversations/set-message-destruct", - "title": "Schedule server message deletion", - "description": "Configure scheduled deletion of messages stored on the server.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations set-message-destruct", - "content": "Call setConversation to configure scheduled server side message deletion for a conversation. await OpenIMSDK.setConversation conversationID, isMsgDestruct: true, msgDestructTime: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation ID to update. | | isMsgDestruct | boolean | No | Whether scheduled server side message deletion is enabled. | | msgDestructTime | number | No | Message deletion period in seconds. | Pass isMsgDestruct: true together with msgDestructTime to enable the policy. Pass isMsgDestruct: false to disable it. This policy is different from burn after reading, which uses isPrivateChat and burnDuration . Scheduled deletion affects messages stored on the server. Messages already synchronized to a device are not actively removed; after local data is cleared or the device changes, messages deleted from the server cannot be retrieved again. Return result After the call completes, the scheduled server side message deletion policy is updated. Changes in the conversation list are delivered through OnConversationChanged ; see Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list ." + "path": "/platform-api/webhooks/relation/after-add-friend-agree", + "title": "After accepting a friend request", + "description": "Synchronize a newly established friendship.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-add-friend-agree", + "content": "Synchronize a newly established friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterAddFriendAgreeCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterAddFriendAgreeCommand . | | fromUserID | string | User performing the action | | blackUserID | string | Counterparty user ID | | HandleResult | int | Request handling result | | HandleMsg | string | Handling message | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterAddFriendAgree . Process idempotently using the relationship key and operationID . The protocol retains these historical field names." }, { - "path": "/sdk/react-native/conversation/managing-conversations/hide-a-conversation", - "title": "Hide a conversation", - "description": "Hide a conversation from the current account's conversation list.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-a-conversation", - "content": "Call hideConversation to hide a conversation from the current account's conversation list. A new message or later conversation synchronization may make it appear again. await OpenIMSDK.hideConversation conversationID ; Parameters conversationID is the ID of the conversation to hide. Return result After the call completes, remove the conversation with the matching conversationID from the current list. If OnConversationChanged is received later, update the list by conversationID . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." + "path": "/platform-api/webhooks/relation/after-delete-friend", + "title": "After deleting a friend", + "description": "Synchronize a deleted friendship.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-delete-friend", + "content": "Synchronize a deleted friendship. HTTP request POST WEBHOOK ADDRESS /callbackAfterDeleteFriendCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDeleteFriendCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Deleted friend | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterDeleteFriend . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/hide-all-conversations", - "title": "Hide all conversations", - "description": "Hide all conversations for the current account.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations hide-all-conversations", - "content": "Call hideAllConversations to hide all conversations for the current account. await OpenIMSDK.hideAllConversations ; After the call completes, query the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list and the total unread count /sdk/react native/conversation/managing conversations/get total unread count to refresh the UI. A conversation may reappear when a new message arrives or its state is synchronized again." + "path": "/platform-api/webhooks/relation/before-set-friend-remark", + "title": "Before setting a friend remark", + "description": "Validate or replace a friend remark.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-set-friend-remark", + "content": "Validate or replace a friend remark. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Proposed remark | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeSetFriendRemark . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return remark to replace the pending value." }, { - "path": "/sdk/react-native/conversation/managing-conversations/delete-conversation-with-messages", - "title": "Delete a conversation and its messages", - "description": "Delete a conversation and the current account's messages in it.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations delete-conversation-with-messages", - "content": "Call deleteConversationAndDeleteAllMsg to delete the conversation record and the current account's messages in it. await OpenIMSDK.deleteConversationAndDeleteAllMsg conversationID ; Parameters conversationID is the ID of the conversation to delete. Return result After the call completes, remove the conversation and its messages from the current screen. If OnConversationChanged is received later, update the list by conversationID . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener details." + "path": "/platform-api/webhooks/relation/after-set-friend-remark", + "title": "After setting a friend remark", + "description": "Synchronize an updated friend remark.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-set-friend-remark", + "content": "Synchronize an updated friend remark. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetFriendRemarkCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetFriendRemarkCommand . | | ownerUserID | string | Relationship owner | | friendUserID | string | Friend user ID | | remark | string | Resulting remark | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetFriendRemark . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversations/clear-conversation-messages", - "title": "Clear messages in a conversation", - "description": "Clear the current account's messages in a conversation without deleting the conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversations clear-conversation-messages", - "content": "Call clearConversationAndDeleteAllMsg to clear the current account's messages in a conversation without deleting the conversation. await OpenIMSDK.clearConversationAndDeleteAllMsg conversationID ; Parameters conversationID is the ID of the conversation whose messages should be cleared. Return result After the call completes, clear the message list shown on the current screen. If the latest message, summary, or unread state changes, read the updated conversation from OnConversationChanged or query the conversation list again. See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for listener cleanup." + "path": "/platform-api/webhooks/relation/before-add-black", + "title": "Before adding to the blacklist", + "description": "Validate a blacklist addition.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-add-black", + "content": "Validate a blacklist addition. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAddBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAddBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User being blocked | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeAddBlack . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/overview-conversation-groups", - "title": "Conversation group overview", - "description": "Learn about conversation groups in the OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups overview-conversation-groups", - "content": "Conversation groups classify the current account's conversation list by business scenario, such as work, pending tasks, or custom categories. Group types ConversationGroupType contains these values: | Enum value | Numeric value | Description | | | | | | ConversationGroupType.ConversationGroupTypeNormal | 0 | Normal custom group. | | ConversationGroupType.ConversationGroupTypeFilter | 1 | Group filtered by rules. | | ConversationGroupType.ConversationGroupTypeAll | 2 | Query all group types. | Group fields ConversationGroup uses conversationGroupID as its identifier: | Field | Type | Description | | | | | | conversationGroupID | string | Conversation group ID. | | name | string | Group name. | | serial | number | Group sort value. | | version | number | Group data version. | | conversationGroupType | ConversationGroupType | Group type. | | hidden | boolean | Whether the group is hidden. | | unreadCount | number | Total unread count in the group. | | conversationIDs | string | Conversation IDs currently in the group. | | ex | string optional | Application extension string. | Listen for group changes Group operations emit events for added, updated, or deleted groups. Membership events include the group, conversation IDs, and conversation details. Event callbacks receive the entities directly, without a data field. Update groups by conversationGroupID and membership by the event's conversationIDs . const handleGroupAdded = groups: ConversationGroup = // ... ; const handleGroupChanged = groups: ConversationGroup = // ... ; const handleGroupDeleted = groups: ConversationGroup = // ... ; const handleGroupMemberAdded = payload: ConversationGroupMemberChangedCallbackData = // ... ; const handleGroupMemberDeleted = payload: ConversationGroupMemberChangedCallbackData = // ... ; OpenIMSDK.on OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.on OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.on OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupAdded, handleGroupAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupChanged, handleGroupChanged ; OpenIMSDK.off OpenIMEvent.OnConversationGroupDeleted, handleGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberAdded, handleGroupMemberAdded ; OpenIMSDK.off OpenIMEvent.OnConversationGroupMemberDeleted, handleGroupMemberDeleted ; Remove the listeners when the component is destroyed, the user logs out, or the account changes." + "path": "/platform-api/webhooks/relation/after-remove-black", + "title": "After removing from the blacklist", + "description": "Synchronize a blacklist removal.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-remove-black", + "content": "Synchronize a blacklist removal. HTTP request POST WEBHOOK ADDRESS /callbackAfterRemoveBlackCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterRemoveBlackCommand . | | ownerUserID | string | Blacklist owner | | blackUserID | string | User removed from the blacklist | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRemoveBlack . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/create-conversation-group", - "title": "Create a conversation group", - "description": "Create a conversation group for the current account.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups create-conversation-group", - "content": "Call createConversationGroup to create a conversation group for the current account. A normal group requires at least name ; you can also add a conversation when creating it. const group = await OpenIMSDK.createConversationGroup name: 'Work', order: 100, conversationID, conversationGroupType: ConversationGroupType.ConversationGroupTypeNormal, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | Group name. | | order | number | No | Group sort value. | | ex | string | No | Group extension string. | | conversationID | string | No | Conversation ID to add immediately after creation. | | conversationGroupType | ConversationGroupType | No | Group type. Use ConversationGroupTypeNormal for a normal custom group. | Return result The call returns the new ConversationGroupResp , including fields such as conversationGroupID , name , order , and conversationIDs . Group creation is delivered through OnConversationGroupAdded ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + "path": "/platform-api/webhooks/relation/before-import-friends", + "title": "Before importing friends", + "description": "Validate or filter a batch of friend IDs before import.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation before-import-friends", + "content": "Validate or filter a batch of friend IDs before import. HTTP request POST WEBHOOK ADDRESS /callbackBeforeImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Friend IDs to import | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the operation. Processing rules Configuration key: beforeImportFriends . OpenIM waits synchronously; timeout behavior follows failedContinue . The response may return friendUserIDs to replace the import set." + }, + { + "path": "/platform-api/webhooks/relation/after-import-friends", + "title": "After importing friends", + "description": "Synchronize the result of a friend import.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks relation after-import-friends", + "content": "Synchronize the result of a friend import. HTTP request POST WEBHOOK ADDRESS /callbackAfterImportFriendsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterImportFriendsCommand . | | ownerUserID | string | Relationship owner | | friendUserIDs | string | Imported friend IDs | Response Return HTTP success promptly. The relationship operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterImportFriends . Process idempotently using the relationship key and operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-groups", - "title": "Get conversation groups", - "description": "Query the current account's conversation groups by type.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-groups", - "content": "Call getConversationGroups to get the current account's conversation groups by type. const groups = await OpenIMSDK.getConversationGroups ConversationGroupType.ConversationGroupTypeNormal, ; Parameters The parameter is a ConversationGroupType : use ConversationGroupTypeNormal for normal custom groups or ConversationGroupTypeAll to query all group types. Return result The call returns the matching ConversationGroup . See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for fields. Groups store conversation IDs; use Get conversations in a group /sdk/react native/conversation/managing conversation groups/get conversation group info with conversations when conversation details are also needed." + "path": "/platform-api/webhooks/group/before-create-group", + "title": "Before creating a group", + "description": "Validate or adjust group information and initial members before a group is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-create-group", + "content": "Validate or adjust group information and initial members before a group is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | introduction | string | Group introduction. | | faceURL | string | Group avatar URL. | | ownerUserID | string | Group owner user ID. | | createTime | int | Group creation time in milliseconds. | | memberCount | int | Initial member count. | | ex | string | Extension data. | | status | int | Group status. | | creatorUserID | string | Group creator user ID. | | groupType | int | Group type. | | needVerification | int | Join verification policy. | | lookMemberInfo | int | Whether ordinary members can view member profiles. | | applyMemberFriend | int | Whether ordinary members can add other members as friends. | | notificationUpdateTime | int | Announcement update time in milliseconds. | | notificationUserID | string | User who last updated the announcement. | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | | initMemberList | object | Initial members, each containing userID and roleLevel . | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may also return the mutable group fields shown above to replace the values OpenIM is about to process. Processing rules Configuration key: beforeCreateGroup . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", - "title": "Get conversations in a group", - "description": "Query a conversation group and its paginated conversations.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-info-with-conversations", - "content": "Call getConversationGroupInfoWithConversations to get a conversation group and its paginated conversation list. const result = await OpenIMSDK.getConversationGroupInfoWithConversations conversationGroupID, pagination: pageNumber: 1, showNumber: 20, , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Conversation group ID to query. | | pagination.pageNumber | number | Yes | Page number, starting at 1 . | | pagination.showNumber | number | Yes | Number of conversations per page. | Return result The call returns an object with these fields: | Field | Type | Description | | | | | | group | ConversationGroup | Current group information. | | conversationTotal | number | Total number of conversations in the group. | | conversationElems | ConversationItem | Conversation details for the current page. | Stop requesting pages after the number of loaded conversations reaches conversationTotal . See Retrieve the conversation list /sdk/react native/conversation/retrieving conversations/retrieve conversation list for conversation fields and Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for group fields." + "path": "/platform-api/webhooks/group/after-create-group", + "title": "After creating a group", + "description": "Synchronize group information and initial members after a group is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-create-group", + "content": "Synchronize group information and initial members after a group is created. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupCommand and the complete group snapshot described by GroupInfo /platform api/group/overview groupinfo . It also includes initMemberList , announcement metadata, and these Enterprise fields: | Property | Type | Description | | | | | | displayIsRead Enterprise | boolean | Whether group message read status is displayed. | | muteBypassUserIDs Enterprise | string | Users allowed to send messages while the group is muted. | Response Return HTTP success promptly. Group creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroup . Process idempotently using groupID or operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id", - "title": "Get groups for a conversation", - "description": "Query the conversation groups that contain a conversation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups get-conversation-group-ids-by-conversation-id", - "content": "A conversation can belong to multiple conversation groups. Call getConversationGroupByConversationID to get the groups that contain it. To query all groups or filter by type, use Get conversation groups /sdk/react native/conversation/managing conversation groups/get conversation groups . const groups = await OpenIMSDK.getConversationGroupByConversationID conversationID ; Parameters conversationID is an OpenIM conversation ID, not a chat group ID. Return result The call returns ConversationGroup ; each item is a complete group object." + "path": "/platform-api/webhooks/group/before-member-join-group", + "title": "Before members join a group", + "description": "Validate or adjust member profiles before users become group members.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-member-join-group", + "content": "Validate or adjust member profiles before users become group members. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMembersJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeMembersJoinGroupCommand . | | groupID | string | Group ID. | | memberList | object | Members about to join, including userID and ex . | | groupEx | string | Group extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . memberCallbackList may contain adjusted profiles for the members OpenIM is about to add. Processing rules Configuration key: beforeMemberJoinGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the operation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/update-conversation-group", - "title": "Update a conversation group", - "description": "Update an existing conversation group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups update-conversation-group", - "content": "Call updateConversationGroup to update an existing conversation group. Pass only the fields that need to change. const group = await OpenIMSDK.updateConversationGroup conversationGroupID, name: 'Priority work', hidden: false, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Conversation group ID to update. | | name | string | No | New group name. | | ex | string | No | New group extension string. | | hidden | boolean | No | Whether the group is hidden. | Return result The call returns the updated ConversationGroupResp . Group changes are delivered through OnConversationGroupChanged ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + "path": "/platform-api/webhooks/group/before-invite-user-to-group", + "title": "Before inviting users to a group", + "description": "Validate a group invitation and optionally refuse individual invitees.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-invite-user-to-group", + "content": "Validate a group invitation and optionally refuse individual invitees. HTTP request POST WEBHOOK ADDRESS /callbackBeforeInviteJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeInviteJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reason | string | Invitation reason. | | invitedUserIDs | string | User IDs to invite. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . Set refusedMembersAccount to the user IDs that must not be added. Processing rules Configuration key: beforeInviteUserToGroup . OpenIM waits synchronously. Use nextCode: 1 to reject the entire invitation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/set-conversation-group-order", - "title": "Reorder conversation groups", - "description": "Batch-update the sort values of conversation groups.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups set-conversation-group-order", - "content": "Call setConversationGroupOrder to batch update the sort values of conversation groups. await OpenIMSDK.setConversationGroupOrder conversationGroupID: firstGroupID, order: 100 , conversationGroupID: secondGroupID, order: 200 , ; Parameters The method receives an array. Each item contains: | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Group ID whose order should be updated. | | order | number | Yes | New sort value. The application should use one consistent sort direction. | Return result The call does not return group data. The UI can use the submitted values or obtain the latest groups from OnConversationGroupChanged or a new query. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + "path": "/platform-api/webhooks/group/before-apply-join-group", + "title": "Before applying to join a group", + "description": "Run authorization or risk checks before a group join application is created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-apply-join-group", + "content": "Run authorization or risk checks before a group join application is created. HTTP request POST WEBHOOK ADDRESS /callbackBeforeJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeJoinGroupCommand . | | groupID | string | Group ID. | | groupType | string | Group type. | | applyID | string | Applicant user ID. | | reqMessage | string | Application message. | | ex | string | Extension data. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the application. Processing rules Configuration key: beforeApplyJoinGroup . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/add-conversations-to-groups", - "title": "Add conversations to groups", - "description": "Add one or more conversations to conversation groups.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups add-conversations-to-groups", - "content": "Call addConversationsToGroups to add one or more conversations to one or more conversation groups. await OpenIMSDK.addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversation IDs to add. | | conversationGroupIDs | string | Yes | Target conversation group IDs. | Return result After the call completes, the conversation group membership request is complete. Membership changes are delivered through OnConversationGroupMemberAdded ; the callback includes the group, conversation IDs, and conversation details. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups for the listener." + "path": "/platform-api/webhooks/group/after-join-group", + "title": "After joining a group", + "description": "Synchronize membership changes after a user joins a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-join-group", + "content": "Synchronize membership changes after a user joins a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterJoinGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterJoinGroupCommand . | | operationID | string | OpenIM operation trace ID. | | groupID | string | Group ID. | | reqMessage | string | Join application or invitation message. | | joinSource | int | Source of the membership change. | | inviterUserID | string | Inviter user ID, when applicable. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterJoinGroup . Process idempotently using the group and user identifiers or operationID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/remove-conversations-from-groups", - "title": "Remove conversations from groups", - "description": "Remove one or more conversations from conversation groups.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups remove-conversations-from-groups", - "content": "Call removeConversationsFromGroups to remove one or more conversations from the specified groups. await OpenIMSDK.removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: conversationGroupID , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversation IDs to remove. | | conversationGroupIDs | string | Yes | Target conversation group IDs. | Return result After the call completes, the membership removal request is complete. Membership changes are delivered through OnConversationGroupMemberDeleted ; the callback includes the group and conversation IDs. See Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + "path": "/platform-api/webhooks/group/after-quit-group", + "title": "After leaving a group", + "description": "Synchronize membership changes after a user leaves a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-quit-group", + "content": "Synchronize membership changes after a user voluntarily leaves a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterQuitGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterQuitGroupCommand . | | groupID | string | Group ID. | | userID | string | User who left the group. | Response Return HTTP success promptly. The membership change is already complete and cannot be changed by this response. Processing rules Configuration key: afterQuitGroup . Process idempotently using groupID:userID ." }, { - "path": "/sdk/react-native/conversation/managing-conversation-groups/delete-conversation-group", - "title": "Delete a conversation group", - "description": "Delete a conversation group and its conversation membership.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native conversation managing-conversation-groups delete-conversation-group", - "content": "Call deleteConversationGroup to delete a conversation group and its conversation membership. await OpenIMSDK.deleteConversationGroup conversationGroupID ; conversationGroupID is the ID of the conversation group. Return result After the call completes, the group deletion request is complete. The operation does not delete conversations or messages. Group changes are delivered through OnConversationGroupDeleted ; see Conversation group overview /sdk/react native/conversation/managing conversation groups/overview conversation groups ." + "path": "/platform-api/webhooks/group/after-kick-group-member", + "title": "After removing group members", + "description": "Synchronize membership changes after members are removed from a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-kick-group-member", + "content": "Synchronize membership changes after members are removed from a group. HTTP request POST WEBHOOK ADDRESS /callbackAfterKickGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterKickGroupCommand . | | groupID | string | Group ID. | | kickedUserIDs | string | Removed user IDs. | | reason | string | Removal reason. | Response Return HTTP success promptly. The membership changes are already complete and cannot be changed by this response. Processing rules Configuration key: afterKickGroupMember . Process each member idempotently using groupID:userID ." }, { - "path": "/sdk/react-native/group/overview-group", - "title": "Group overview", - "description": "OpenIM React Native SDK guide for group overview.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group overview-group", - "content": "In OpenIM, group chats are organized as groups. In group APIs, use groupID to identify the target group, for example when querying group profiles, managing members, or handling group applications. After you create a group, obtain its groupID from the returned group information. A group chat session uses conversationID for conversation settings, message history, and unread status. conversationID identifies a conversation, whereas groupID identifies a group; do not confuse them when supplying API parameters. Core data types | Type | Purpose | | | | | GroupItem | A group's name, avatar, announcement, owner, join verification setting, member count, and extension data. | | GroupMemberItem | A user's nickname, role, mute state, and join information in a specific group. | Member roles use GroupMemberRole : Normal is a regular member, Admin is an administrator, and Owner is the group owner. Common GroupItem fields | Field | Type | Description | | | | | | groupID | string | Group ID. | | groupName | string | Group name. | | notification | string | Group announcement. | | friendUserIDs | string | Group friend user ID information. | | remark | string | Group remark set by the current account. | Common GroupMemberItem fields | Field | Type | Description | | | | | | groupID | string | ID of the group that the member belongs to. | | userID | string | Member user ID. | | nickname | string | The user's nickname in the current group. | | faceURL | string | The user's avatar URL in the current group. | | roleLevel | GroupMemberRole | Member role. | | muteEndTime | number | Time when the mute ends. | | joinTime | number | Time when the member joined the group. | | joinSource | GroupJoinSource | How the member joined the group. | | inviterUserID | string | User ID of the member who invited this user. | | operatorUserID | string | User ID of the user who last updated this member profile. | | ex | string | Group member extension string. | nickname , faceURL , and roleLevel belong to the member profile in the current group. They can differ for the same user in another group. Find a page by task | Task | Pages | | | | | Create and maintain group profiles | Create a group /sdk/react native/group/create group , Update group profile /sdk/react native/group/update group profile , Publish a group announcement /sdk/react native/group/set group announcement , Set group extra data /sdk/react native/group/set group extension | | Configure join and member permissions | Set group join verification /sdk/react native/group/set group join verification , Set member profile access /sdk/react native/group/set group member profile access , Set group member friend request permissions /sdk/react native/group/set group member friend permission | | Join, leave, or dismiss groups | Apply to join a group /sdk/react native/group/join group , Leave a group /sdk/react native/group/quit group , Dismiss a group /sdk/react native/group/dismiss group | | Retrieve groups | Get group information /sdk/react native/group/retrieving groups/get specified groups info , Get joined groups by page /sdk/react native/group/retrieving groups/get joined group list page , Search groups /sdk/react native/group/retrieving groups/search groups | | Retrieve and handle group applications | Get received group applications /sdk/react native/group/group applications/get group application list as recipient , Get sent group applications /sdk/react native/group/group applications/get group application list as applicant | | Retrieve and manage group members | Get group members /sdk/react native/group/retrieving group members/get group member list , Invite users to a group /sdk/react native/group/managing group members/invite user to group , Remove group members /sdk/react native/group/managing group members/kick group member , Manage group administrators /sdk/react native/group/managing group members/set group member role level , Transfer group ownership /sdk/react native/group/managing group members/transfer group owner | | Manage group chat messaging permissions | Change group mute status /sdk/react native/group/change group mute , Mute or unmute a group member /sdk/react native/group/managing group members/change group member mute | Listen for group changes When the current account joins or leaves a group, when group profile information changes, or when a group is dismissed, OnJoinedGroupAdded , OnJoinedGroupDeleted , OnGroupInfoChanged , and OnGroupDismissed are triggered respectively. Each callback receives a GroupItem directly: const handleJoinedGroupAdded = group: GroupItem = // Add group to the joined group list ; const handleJoinedGroupDeleted = group: GroupItem = // Remove the group from the joined group list by group.groupID ; const handleGroupInfoChanged = group: GroupItem = // Update the group profile by group.groupID ; const handleGroupDismissed = group: GroupItem = // Close or remove the dismissed group by group.groupID ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.on OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.on OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupAdded, handleJoinedGroupAdded ; OpenIMSDK.off OpenIMEvent.OnJoinedGroupDeleted, handleJoinedGroupDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupInfoChanged, handleGroupInfoChanged ; OpenIMSDK.off OpenIMEvent.OnGroupDismissed, handleGroupDismissed ; Remove these listeners when signing out, switching accounts, or discarding group related state. For member change listeners, see Get group members /sdk/react native/group/retrieving group members/get group member list . For group application change listeners, see Get received group applications /sdk/react native/group/group applications/get group application list as recipient ." + "path": "/platform-api/webhooks/group/after-dismiss-group", + "title": "After dismissing a group", + "description": "Synchronize group state after a group is dismissed.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-dismiss-group", + "content": "Synchronize group state after a group is dismissed. HTTP request POST WEBHOOK ADDRESS /callbackAfterDisMissGroupCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterDisMissGroupCommand . The historical capitalization is part of the protocol. | | groupID | string | Group ID. | | ownerID | string | Group owner user ID. | | groupType | string | Group type. | | membersID | string | IDs of members affected by dismissal. | Response Return HTTP success promptly. Group dismissal is already complete and cannot be changed by this response. Processing rules Configuration key: afterDismissGroup . Process idempotently using groupID ." }, { - "path": "/sdk/react-native/group/create-group", - "title": "Create a group", - "description": "OpenIM React Native SDK guide for create a group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group create-group", - "content": "Call createGroup to create a group and set its initial members, administrators, and owner. const group = await OpenIMSDK.createGroup memberUserIDs: 'user 003', 'user 004' , adminUserIDs: 'user 002' , ownerUserID: currentUserID, groupInfo: groupName: 'Project discussion group', groupType: GroupType.WorkingGroup, faceURL: 'https://example.com/group.png', , ; Parameters | Parameter | Type | Required | Description | | | | | | memberUserIDs | string | Yes | User IDs of the initial regular members. | | adminUserIDs | string | No | User IDs of the initial administrators. | | ownerUserID | string | No | User ID of the group owner. The current user is used when omitted. | | groupInfo | Partial | Yes | Initial group profile. Common fields include groupName , groupType , and faceURL . | A regular member, administrator, and owner cannot be the same user. Use GroupType.WorkingGroup for groupInfo.groupType to create a regular group. Return value When the call completes, it returns the newly created GroupItem . Use the returned groupID to open the group profile or group chat. When the current account joins the group, OnJoinedGroupAdded returns the group information; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/after-transfer-group-owner", + "title": "After transferring group ownership", + "description": "Synchronize the owner change after group ownership is transferred.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-transfer-group-owner", + "content": "Synchronize the owner change after group ownership is transferred. HTTP request POST WEBHOOK ADDRESS /callbackAfterTransferGroupOwnerCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterTransferGroupOwnerCommand . | | groupID | string | Group ID. | | oldOwnerUserID | string | Previous owner user ID. | | newOwnerUserID | string | New owner user ID. | Response Return HTTP success promptly. The ownership transfer is already complete and cannot be changed by this response. Processing rules Configuration key: afterTransferGroupOwner . Process idempotently using groupID and newOwnerUserID ." }, { - "path": "/sdk/react-native/group/update-group-profile", - "title": "Update group profile", - "description": "OpenIM React Native SDK guide for update group profile.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group update-group-profile", - "content": "Call setGroupInfo to update a group name, description, or avatar. Provide only the fields that need to change. await OpenIMSDK.setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group to update. | | groupName | string | No | New group name. | | introduction | string | No | New group description. | | faceURL | string | No | URL of the new group avatar. | In addition to groupID , provide at least one group profile field to update. Fields that are not provided keep their current values. Return value When the call completes, the group profile is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/before-set-group-member-info", + "title": "Before updating group member information", + "description": "Validate or adjust fields before a group member profile is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-set-group-member-info", + "content": "Validate or adjust fields before a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Group nickname, when changed. | | faceURL | string | Avatar URL, when changed. | | roleLevel | int | Group role level, when changed. | | ex | string | Extension data, when changed. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return nickName , faceURL , roleLevel , and ex to replace the pending values. Processing rules Configuration key: beforeSetGroupMemberInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/set-group-announcement", - "title": "Publish a group announcement", - "description": "OpenIM React Native SDK guide for publish a group announcement.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-announcement", - "content": "Call setGroupInfo to set or update a group announcement. await OpenIMSDK.setGroupInfo groupID, notification: announcement, ; groupID is the target group ID and notification is the announcement content. Pass an empty string to clear the announcement. The announcement and the group description, introduction , are separate fields. Return value When the call completes, the group announcement is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/after-set-group-member-info", + "title": "After updating group member information", + "description": "Synchronize changes after a group member profile is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-set-group-member-info", + "content": "Synchronize changes after a group member profile is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupMemberInfoCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSetGroupMemberInfoCommand . | | groupID | string | Group ID. | | userID | string | Member user ID. | | nickName | string | Updated group nickname, when present. | | faceURL | string | Updated avatar URL, when present. | | roleLevel | int | Updated group role level, when present. | | ex | string | Updated extension data, when present. | Response Return HTTP success promptly. The member profile update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupMemberInfo . Process idempotently using groupID:userID ." }, { - "path": "/sdk/react-native/group/set-group-extension", - "title": "Set group extra data", - "description": "OpenIM React Native SDK guide for set group extra data.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-extension", - "content": "Call setGroupInfo to set the group's ex extension field. await OpenIMSDK.setGroupInfo groupID, ex: JSON.stringify projectID: 'project 42', , ; groupID is the target group ID. ex is a string and can contain JSON or another string format for business specific data. Return value When the call completes, the group extension field is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/before-set-group-info", + "title": "Before updating group information", + "description": "Validate or adjust group fields before group information is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-set-group-info", + "content": "Validate or adjust group fields before group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoCommand , operationID , groupID , and the pending groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return the pending group fields to replace the values OpenIM is about to store. Processing rules Configuration key: beforeSetGroupInfo . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/set-group-join-verification", - "title": "Set group join verification", - "description": "OpenIM React Native SDK guide for set group join verification.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-join-verification", - "content": "Call setGroupInfo to configure verification for group applications and invitations. await OpenIMSDK.setGroupInfo groupID, needVerification: GroupVerificationType.AllNeed, ; Parameters groupID is the target group ID. needVerification uses GroupVerificationType : | Enum value | Value | Description | | | | | | GroupVerificationType.ApplyNeedInviteNot | 0 | Applications require approval, while member invitations let users join directly. | | GroupVerificationType.AllNeed | 1 | Applications and regular member invitations require approval. Invitations from the owner or an administrator are excluded. | | GroupVerificationType.AllNot | 2 | Applications and invitations let users join directly. | Return value When the call completes, the group join verification setting is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/after-set-group-info", + "title": "After updating group information", + "description": "Synchronize changes after group information is updated.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-set-group-info", + "content": "Synchronize changes after group information is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoCommand , operationID , groupID , and the updated groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend values. Response Return HTTP success promptly. The group update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfo . Process idempotently using groupID or operationID ." }, { - "path": "/sdk/react-native/group/set-group-member-profile-access", - "title": "Set member profile access", - "description": "OpenIM React Native SDK guide for set member profile access.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-member-profile-access", - "content": "Call setGroupInfo to configure whether group members can view other members' profiles. This setting controls only member profile visibility and is independent of setting group member friend request permissions /sdk/react native/group/set group member friend permission . await OpenIMSDK.setGroupInfo groupID, lookMemberInfo: AllowType.NotAllowed, ; Parameters groupID is the target group ID. lookMemberInfo uses AllowType : | Enum value | Value | Description | | | | | | AllowType.Allowed | 0 | Members can view other members' profiles. | | AllowType.NotAllowed | 1 | Members cannot view other members' profiles. | Return value When the call completes, member profile visibility is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/before-set-group-info-ex", + "title": "Before updating selected group fields", + "description": "Validate or adjust the selected fields before a partial group update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group before-set-group-info-ex", + "content": "Validate or adjust the selected fields before a partial group update. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackBeforeSetGroupInfoExCommand , operationID , groupID , and only the group fields selected for update: groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , or applyMemberFriend . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may return selected group fields to replace the pending values. Processing rules Configuration key: beforeSetGroupInfoEx . OpenIM waits synchronously. Use nextCode: 1 to reject the update; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/set-group-member-friend-permission", - "title": "Set member friend request permission", - "description": "OpenIM React Native SDK guide for set member friend request permission.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group set-group-member-friend-permission", - "content": "Call setGroupInfo to configure whether members can send friend requests to other members through the group. This setting controls only friend requests initiated from the member relationship and is independent of setting member profile visibility /sdk/react native/group/set group member profile access . await OpenIMSDK.setGroupInfo groupID, applyMemberFriend: AllowType.NotAllowed, ; Parameters groupID is the target group ID. applyMemberFriend uses AllowType : | Enum value | Value | Description | | | | | | AllowType.Allowed | 0 | Members can send friend requests through the group member relationship. | | AllowType.NotAllowed | 1 | Members cannot send friend requests through the group member relationship. | Return value When the call completes, group member friend request permissions are updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/group/after-set-group-info-ex", + "title": "After updating selected group fields", + "description": "Synchronize changes after a partial group information update.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks group after-set-group-info-ex", + "content": "Synchronize changes after selected group fields are updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterSetGroupInfoExCommand Request body The payload contains callbackCommand: callbackAfterSetGroupInfoExCommand , operationID , groupID , and the updated values among groupName , notification , introduction , faceURL , ex , needVerification , lookMemberInfo , and applyMemberFriend . Response Return HTTP success promptly. The partial update is already complete and cannot be changed by this response. Processing rules Configuration key: afterSetGroupInfoEx . Process idempotently using groupID or operationID ." }, { - "path": "/sdk/react-native/group/change-group-mute", - "title": "Change group mute status", - "description": "OpenIM React Native SDK guide for change group mute status.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group change-group-mute", - "content": "Call changeGroupMute to enable or disable group wide muting. await OpenIMSDK.changeGroupMute groupID, isMute: true, muteBypassUserIDs: serviceAccountUserID , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | isMute | boolean | Yes | Use true to enable group wide muting or false to disable it. | | muteBypassUserIDs Enterprise | string | No | User IDs that can still send messages while the group is muted. | Do not add every member to muteBypassUserIDs . The server controls whether the group owner and administrators can send messages. Return value When the call completes, the group wide mute setting is updated. Group profile changes trigger OnGroupInfoChanged ; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/message/before-send-single-message", + "title": "Before sending a one-to-one message", + "description": "Review, reject, or inspect fields before a one-to-one message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message before-send-single-message", + "content": "Use this callback for content moderation, policy enforcement, or field validation before a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendSingleMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeSendSingleMsgCommand . | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID. | | serverMsgID | string | OpenIM server message ID. | | clientMsgID | string | Client message ID. | | operationID | string | OpenIM operation trace ID. | | senderPlatformID | int | Sender platform ID. | | senderNickname | string | Sender nickname. | | sessionType | int | Conversation type. | | msgFrom | int | Message source. | | contentType | int | Message content type /platform api/message/message content types . | | status | int | Message status. | | sendTime | int | Send time in milliseconds. | | createTime | int | Creation time in milliseconds. | | content | string | JSON string for the selected message content type. | | seq | int | Message sequence number. | | atUserList | string | Mentioned user IDs. | | faceURL | string | Sender avatar URL. | | ex | string | Extension data. | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendSingleMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/join-group", - "title": "Apply to join a group", - "description": "OpenIM React Native SDK guide for apply to join a group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group join-group", - "content": "Call joinGroup with a group ID, application message, and join source to apply to join a group. await OpenIMSDK.joinGroup groupID, reqMsg: 'Request to join the project discussion group', joinSource: GroupJoinSource.Search, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reqMsg | string | Yes | Application message. Pass an empty string when no message is needed. | | joinSource | GroupJoinSource | Yes | How the user initiated joining the group. | | ex | string | No | Business specific extension string. | Common joinSource values are: | Enum value | Value | Description | | | | | | GroupJoinSource.Invitation | 2 | Joined through an invitation. | | GroupJoinSource.Search | 3 | Joined through search. | | GroupJoinSource.QrCode | 4 | Joined through a QR code. | joinSource records how the user joined; it does not determine whether approval is required. Return value When the call completes, the join request is submitted. After the current account joins the group successfully, OnJoinedGroupAdded returns the group information; see Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/message/after-send-single-message", + "title": "After sending a one-to-one message", + "description": "Synchronize a message event after a one-to-one message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-send-single-message", + "content": "Synchronize a message event after a one to one message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendSingleMsgCommand Request body The payload contains callbackCommand: callbackAfterSendSingleMsgCommand and the complete message snapshot described on Before sending a one to one message /platform api/webhooks/message/before send single message , including serverMsgID , clientMsgID , seq , sender and recipient IDs, content, timestamps, and keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendSingleMsg . Process idempotently using clientMsgID , optionally scoped by the conversation ID." }, { - "path": "/sdk/react-native/group/quit-group", - "title": "Leave a group", - "description": "OpenIM React Native SDK guide for leave a group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group quit-group", - "content": "Call quitGroup to leave a group that the current account has joined. await OpenIMSDK.quitGroup groupID ; groupID is the ID of the group to leave. A group owner must transfer ownership before leaving the group. Return value When the call completes, the current account has left the target group. After the current account leaves successfully, OnJoinedGroupDeleted is triggered and its callback receives the corresponding group information. See Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/message/before-send-group-message", + "title": "Before sending a group message", + "description": "Review, reject, or inspect fields before a group message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message before-send-group-message", + "content": "Use this callback for content moderation, policy enforcement, or field validation before a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackBeforeSendGroupMsgCommand Request body The payload contains callbackCommand: callbackBeforeSendGroupMsgCommand , groupID , and the common message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message , except recvID ; group callbacks use groupID instead to identify the destination. Group messages also expose this field: | Property | Type | Description | | | | | | keyVersion Enterprise | int | Message encryption key version. | Response Return the common before event response from Webhooks overview /platform api/webhooks/overview . Use nextCode: 1 to reject the message. Processing rules Configuration key: beforeSendGroupMsg . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/dismiss-group", - "title": "Dismiss a group", - "description": "OpenIM React Native SDK guide for dismiss a group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group dismiss-group", - "content": "Call dismissGroup to dismiss a group. await OpenIMSDK.dismissGroup groupID ; groupID is the ID of the group to dismiss. Dismissing a group affects every member, and the server validates whether the caller has permission. Return value When the call completes, the group is dismissed. After a group is dismissed, relevant clients receive OnGroupDismissed ; its callback receives the dismissed group information. See Group overview /sdk/react native/group/overview group for event handling." + "path": "/platform-api/webhooks/message/after-send-group-message", + "title": "After sending a group message", + "description": "Synchronize a message event after a group message is sent.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-send-group-message", + "content": "Synchronize a message event after a group message is sent. HTTP request POST WEBHOOK ADDRESS /callbackAfterSendGroupMsgCommand Request body The payload contains callbackCommand: callbackAfterSendGroupMsgCommand , groupID , and the complete message snapshot described on Before sending a group message /platform api/webhooks/message/before send group message . It also includes keyVersion Enterprise . Response Return HTTP success promptly. Message delivery has already been processed and cannot be changed by this response. Processing rules Configuration key: afterSendGroupMsg . Process idempotently using clientMsgID , scoped by groupID when necessary." }, { - "path": "/sdk/react-native/group/retrieving-groups/get-specified-groups-info", - "title": "Get group information", - "description": "OpenIM React Native SDK guide for get group information.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-specified-groups-info", - "content": "Call getSpecifiedGroupsInfo to retrieve information for specific groups by group ID. const groups = await OpenIMSDK.getSpecifiedGroupsInfo 'group 001', 'group 002', ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | IDs of the groups to retrieve. | Return value When the call completes, it returns matching GroupItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." + "path": "/platform-api/webhooks/message/before-message-modify", + "title": "Before writing a message", + "description": "Adjust permitted message fields before the message is written.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message before-message-modify", + "content": "Adjust permitted message fields before the message is written to OpenIM storage. HTTP request POST WEBHOOK ADDRESS /callbackBeforeMsgModifyCommand Request body The payload contains callbackCommand: callbackBeforeMsgModifyCommand and the message fields described on Before sending a one to one message /platform api/webhooks/message/before send single message . recvID and keyVersion are Enterprise extensions for this callback. Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace content , recipient or group identifiers, message IDs, sender profile, conversation and content types, status, sending options, offline push data, mention data, attachments, and extension data. Processing rules Configuration key: beforeMsgModify . OpenIM waits synchronously. Use nextCode: 1 to reject writing the message; timeout behavior follows failedContinue . Return only fields that should replace the values OpenIM is about to write." }, { - "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list", - "title": "Get joined groups", - "description": "OpenIM React Native SDK guide for get joined groups.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list", - "content": "Call getJoinedGroupList to retrieve every group that the current account has joined. const groups = await OpenIMSDK.getJoinedGroupList ; Return value When the call completes, it returns GroupItem . For many groups, use Get joined groups by page /sdk/react native/group/retrieving groups/get joined group list page to retrieve them in batches." + "path": "/platform-api/webhooks/message/after-single-message-read", + "title": "After one-to-one messages are read", + "description": "Synchronize read-state changes for one-to-one messages.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-single-message-read", + "content": "Synchronize read state changes after one to one messages are marked as read. HTTP request POST WEBHOOK ADDRESS /callbackAfterSingleMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterSingleMsgReadCommand . | | conversationID | string | Conversation ID. | | userID | string | User whose read state changed. | | Seqs | int | Message sequence numbers marked as read. The capitalization is part of the protocol. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterSingleMsgRead . Process idempotently using conversationID , userID , and the sequence numbers." }, { - "path": "/sdk/react-native/group/retrieving-groups/get-joined-group-list-page", - "title": "Get joined groups by page", - "description": "OpenIM React Native SDK guide for get joined groups by page.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups get-joined-group-list-page", - "content": "Call getJoinedGroupListPage to retrieve groups joined by the current account in pages. const groups = await OpenIMSDK.getJoinedGroupListPage offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of groups to retrieve. | To retrieve the next page, set offset to the number of groups already retrieved. Return value When the call completes, it returns GroupItem for the current page. See Group overview /sdk/react native/group/overview group for field descriptions." + "path": "/platform-api/webhooks/message/after-group-message-read", + "title": "After group messages are read", + "description": "Synchronize read-state changes for group messages.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-group-message-read", + "content": "Synchronize a read event after group message read state is updated. HTTP request POST WEBHOOK ADDRESS /callbackAfterGroupMsgReadCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterGroupMsgReadCommand . | | sendID | string | Message sender user ID. | | receiveID | string | Message recipient user ID. | | unreadMsgNum | int | Current unread message count. | | contentType | int | Message content type /platform api/message/message content types . | Response Return HTTP success promptly. The read state is already updated and cannot be changed by this response. Processing rules Configuration key: afterGroupMsgRead . Process duplicate callbacks idempotently." }, { - "path": "/sdk/react-native/group/retrieving-groups/is-join-group", - "title": "Check group membership", - "description": "OpenIM React Native SDK guide for check group membership.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups is-join-group", - "content": "Call isJoinGroup to check whether the current account has joined a group. const isJoined = await OpenIMSDK.isJoinGroup 'group 001' ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group to check. | Return value When the call completes, it returns a boolean : true if the current account has joined the group, or false otherwise." + "path": "/platform-api/webhooks/message/after-revoke-message", + "title": "After revoking a message", + "description": "Synchronize a revoke event after a message is revoked.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks message after-revoke-message", + "content": "Synchronize a revoke event after a message is revoked. HTTP request POST WEBHOOK ADDRESS /callbackBeforeAfterMsgCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeAfterMsgCommand . | | conversationID | string | Conversation ID. | | seq | int | Sequence number of the revoked message. | | userID | string | User who initiated the revoke operation. | Response Return HTTP success promptly. The revoke operation is already complete and cannot be changed by this response. Processing rules Configuration key: afterRevokeMsg . Process idempotently using conversationID:seq ." }, { - "path": "/sdk/react-native/group/retrieving-groups/search-groups", - "title": "Search groups", - "description": "OpenIM React Native SDK guide for search groups.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-groups search-groups", - "content": "Call searchGroups to search groups by group ID or group name. const groups = await OpenIMSDK.searchGroups keywordList: 'project' , isSearchGroupID: false, isSearchGroupName: true, ; Parameters | Parameter | Type | Required | Description | | | | | | keywordList | string | Yes | Search keywords. | | isSearchGroupID | boolean | Yes | Whether to match group IDs. | | isSearchGroupName | boolean | Yes | Whether to match group names. | Return value When the call completes, it returns matching GroupItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." + "path": "/platform-api/webhooks/push/before-online-push", + "title": "Before one-to-one online push", + "description": "Adjust target users or push policy before an online one-to-one push.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push before-online-push", + "content": "Adjust target users or push policy before an online one to one push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | userIDList | string | Target user IDs. | | title | string | Push title. | | desc | string | Push summary. | | ex | string | Extension data. | | iOSPushSound | string | iOS notification sound. | | iOSBadgeCount | boolean | Whether to update the iOS badge. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID when present. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-recipient", - "title": "Get received group applications", - "description": "OpenIM React Native SDK guide for get received group applications.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-recipient", - "content": "Group owners and administrators can call getGroupApplicationListAsRecipient to retrieve received group applications. const applications = await OpenIMSDK.getGroupApplicationListAsRecipient groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed , offset: 0, count: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | | handleResults | number | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of applications to retrieve. | Common ApplicationHandleResult values are: | Enum value | Value | Meaning | | | | | | ApplicationHandleResult.Unprocessed | 0 | Pending. | | ApplicationHandleResult.Agree | 1 | Accepted. | | ApplicationHandleResult.Reject | 1 | Rejected. | Return value When the call completes, it returns GroupApplicationItem that the current account can handle. Group application fields | Field | Type | Description | | | | | | groupID | string | ID of the group that the user applied to join. | | userID | string | User ID of the applicant. | | nickname | string | Applicant nickname recorded in the application. | | userFaceURL | string | Applicant avatar URL recorded in the application. | | reqMsg | string | Application message. | | reqTime | number | Application time. | | joinSource | GroupJoinSource | Source of the group application. | | handleResult | ApplicationHandleResult | Current handling result. | | handleUserID | string | User ID of the person who handled the application. | | handledMsg | string | Message entered while handling the application. | | handledTime | number | Time when the application was handled. | | groupName | string | Group name recorded in the application. | | groupFaceURL | string | Group avatar URL recorded in the application. | | groupType | GroupType | Group type. | | ownerUserID | string | Group owner user ID. | | creatorUserID | string | Group creator user ID. | | introduction | string | Group description recorded in the application. | | notification | string | Group announcement recorded in the application. | | memberCount | number | Group member count recorded in the application. | | status | GroupStatus | Group status. | | createTime | number | Application record creation time as a Unix timestamp in milliseconds. | | ex | string | Application record extension string. | The nickname, avatar, and group information in an application record reflect the values when the record was created. Query the current user profile or group profile to show the latest information. Listen for group application changes When a group application is added, handled, or deleted, OnGroupApplicationAdded , OnGroupApplicationAccepted , OnGroupApplicationRejected , or OnGroupApplicationDeleted is triggered respectively. Each callback receives a GroupApplicationItem directly: const handleApplicationChanged = application: GroupApplicationItem = // Update the application record by groupID and userID ; const handleApplicationDeleted = application: GroupApplicationItem = // Delete the application record by groupID and userID ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.on OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged ; OpenIMSDK.off OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted ; Remove these listeners when signing out, switching accounts, or discarding application list state." + "path": "/platform-api/webhooks/push/before-group-online-push", + "title": "Before group online push", + "description": "Adjust target users or push policy before an online group push.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push before-group-online-push", + "content": "Adjust target users or push policy before an online group push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeGroupOnlinePushCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeGroupOnlinePushCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID. | | platform | string | Client platform name. | | clientMsgID | string | Client message ID. | | sendID | string | Sender user ID. | | groupID | string | Group ID. | | contentType | int | Message content type /platform api/message/message content types . | | sessionType | int | Conversation type. | | atUserIDList | string | Mentioned user IDs. | | content | string | Message content JSON string. | | seq | int | Message sequence number. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the online recipients and offlinePushInfo may replace fallback push metadata. Processing rules Configuration key: beforeGroupOnlinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/group-applications/get-group-application-list-as-applicant", - "title": "Get sent group applications", - "description": "OpenIM React Native SDK guide for get sent group applications.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-list-as-applicant", - "content": "Call getGroupApplicationListAsApplicant to retrieve group applications sent by the current account. const applications = await OpenIMSDK.getGroupApplicationListAsApplicant groupIDs: 'group 001' , handleResults: ApplicationHandleResult.Unprocessed, ApplicationHandleResult.Agree, ApplicationHandleResult.Reject, , offset: 0, count: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | groupIDs | string | Yes | Group IDs to retrieve applications for. Pass an empty array to skip filtering by group. | | handleResults | number | Yes | Application results to retrieve. Pass an empty array to skip filtering by result. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of applications to retrieve. | For ApplicationHandleResult values, see Get received group applications /sdk/react native/group/group applications/get group application list as recipient . Return value When the call completes, it returns GroupApplicationItem sent by the current account. See Get received group applications /sdk/react native/group/group applications/get group application list as recipient for application fields and application change event handling." + "path": "/platform-api/webhooks/push/before-offline-push", + "title": "Before offline push", + "description": "Adjust recipients and notification metadata before an offline push.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push before-offline-push", + "content": "Adjust the actual recipients and notification metadata before an offline push. HTTP request POST WEBHOOK ADDRESS /callbackBeforeOfflinePushCommand Request body The payload contains callbackCommand: callbackBeforeOfflinePushCommand and the recipient, platform, notification, message, conversation, mention, and content fields described on Before one to one online push /platform api/webhooks/push/before online push . Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . userIDList may replace the push recipients and offlinePushInfo may replace push metadata. Processing rules Configuration key: beforeOfflinePush . OpenIM waits synchronously; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/group-applications/get-group-application-unhandled-count", - "title": "Get pending group application count", - "description": "OpenIM React Native SDK guide for get pending group application count.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications get-group-application-unhandled-count", - "content": "Call getGroupApplicationUnhandledCount to retrieve the number of group applications that remain unhandled after a specified time. const count = await OpenIMSDK.getGroupApplicationUnhandledCount time: 0, ; Parameters | Parameter | Type | Required | Description | | | | | | time | number | Yes | Start time as a Unix timestamp in milliseconds. Pass 0 to count every pending application. | Return value When the call completes, it returns a number representing the number of pending group applications after the specified time." + "path": "/platform-api/webhooks/push/after-user-online", + "title": "After a user comes online", + "description": "Synchronize presence after a user establishes an online connection.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push after-user-online", + "content": "Synchronize presence after a user establishes an online connection. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOnlineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOnlineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | isAppBackground | boolean | Whether the client application is in the background. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already online and cannot be changed by this response. Processing rules Configuration key: afterUserOnline . Process idempotently using userID , platformID , and connID ." }, { - "path": "/sdk/react-native/group/group-applications/accept-group-application", - "title": "Accept a group application", - "description": "OpenIM React Native SDK guide for accept a group application.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications accept-group-application", - "content": "Call acceptGroupApplication to accept a user's group application. await OpenIMSDK.acceptGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: 'Approved', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group in the application. | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | handleMsg | string | Yes | Handling message. Pass an empty string when no message is needed. | When the call completes, the group application is accepted. Application status changes trigger OnGroupApplicationAccepted ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." + "path": "/platform-api/webhooks/push/after-user-offline", + "title": "After a user goes offline", + "description": "Synchronize presence after a user connection closes.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push after-user-offline", + "content": "Synchronize presence after a user connection closes. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserOfflineCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserOfflineCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | | connID | string | Connection ID. | Response Return HTTP success promptly. The connection is already offline and cannot be changed by this response. Processing rules Configuration key: afterUserOffline . Process idempotently using userID , platformID , and connID ." }, { - "path": "/sdk/react-native/group/group-applications/refuse-group-application", - "title": "Reject a group application", - "description": "OpenIM React Native SDK guide for reject a group application.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications refuse-group-application", - "content": "Call refuseGroupApplication to reject a user's group application. await OpenIMSDK.refuseGroupApplication groupID: application.groupID, fromUserID: application.userID, handleMsg: 'The application cannot be accepted at this time', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the group in the application. | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | handleMsg | string | Yes | Rejection reason. Pass an empty string when no reason is needed. | When the call completes, the group application is rejected. Application status changes trigger OnGroupApplicationRejected ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." + "path": "/platform-api/webhooks/push/after-user-kick-off", + "title": "After a user is forced offline", + "description": "Synchronize connection state after a user is forced offline.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks push after-user-kick-off", + "content": "Synchronize connection state after a user is forced offline. HTTP request POST WEBHOOK ADDRESS /callbackAfterUserKickOffCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackAfterUserKickOffCommand . | | operationID | string | OpenIM operation trace ID. | | platformID | int | Client platform ID /platform api/user/overview platformid . | | platform | string | Client platform name. | | userID | string | User ID. | | seq | int | Connection sequence number. | Response Return HTTP success promptly. The user has already been forced offline and this response cannot reverse the operation. Processing rules Configuration key: afterUserKickOff . Process idempotently using the user, platform, and operation identifiers." }, { - "path": "/sdk/react-native/group/group-applications/delete-group-requests", - "title": "Delete group applications", - "description": "OpenIM React Native SDK guide for delete group applications.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group group-applications delete-group-requests", - "content": "Call deleteGroupRequests to delete specified group application records in batches. await OpenIMSDK.deleteGroupRequests fromUserID: application.userID, groupID: application.groupID, , ; Parameters Each item in the array contains the following fields: | Parameter | Type | Required | Description | | | | | | fromUserID | string | Yes | Applicant user ID, corresponding to userID in the application record. | | groupID | string | Yes | ID of the group in the application. | Deleting an application record does not handle a pending application. To accept or reject an application, use Accept a group application /sdk/react native/group/group applications/accept group application or Reject a group application /sdk/react native/group/group applications/refuse group application , respectively. When the call completes, the request to delete the records is complete. Deleting an application record triggers OnGroupApplicationDeleted ; see Get received group applications /sdk/react native/group/group applications/get group application list as recipient for complete event handling." + "path": "/platform-api/webhooks/conversation/before-create-single-chat-conversations", + "title": "Before creating one-to-one conversations", + "description": "Adjust default conversation properties before one-to-one conversations are first created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation before-create-single-chat-conversations", + "content": "Adjust default properties before one to one conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateSingleChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateSingleChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | user id | string | Other participant user ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateSingleChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/get-group-member-list", - "title": "Get group members", - "description": "OpenIM React Native SDK guide for get group members.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-group-member-list", - "content": "Call getGroupMemberList to retrieve members of a group in pages and filter them by role. const members = await OpenIMSDK.getGroupMemberList groupID: 'group 001', filter: GroupMemberFilter.All, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | filter | GroupMemberFilter | Yes | Member role filter. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | GroupMemberFilter values are: | Enum value | Value | Description | | | | | | GroupMemberFilter.All | 0 | All members. | | GroupMemberFilter.Owner | 1 | Group owner only. | | GroupMemberFilter.Admin | 2 | Administrators only. | | GroupMemberFilter.Normal | 3 | Regular members only. | | GroupMemberFilter.AdminAndNormal | 4 | Administrators and regular members. | | GroupMemberFilter.AdminAndOwner | 5 | Administrators and the group owner. | To retrieve the next page, set offset to the number of members already retrieved. Return value When the call completes, it returns GroupMemberItem for the current page. See Group overview /sdk/react native/group/overview group for field descriptions. Listen for group member changes When a member joins, leaves, or has profile information changed, OnGroupMemberAdded , OnGroupMemberDeleted , and OnGroupMemberInfoChanged are triggered respectively. Each callback receives a GroupMemberItem directly: const handleMemberAdded = member: GroupMemberItem = // Add the member to the corresponding group member list ; const handleMemberDeleted = member: GroupMemberItem = // Delete the member by member.groupID and member.userID ; const handleMemberChanged = member: GroupMemberItem = // Update the member profile by member.groupID and member.userID ; OpenIMSDK.on OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.on OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.on OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; OpenIMSDK.off OpenIMEvent.OnGroupMemberAdded, handleMemberAdded ; OpenIMSDK.off OpenIMEvent.OnGroupMemberDeleted, handleMemberDeleted ; OpenIMSDK.off OpenIMEvent.OnGroupMemberInfoChanged, handleMemberChanged ; Remove these listeners when signing out, switching accounts, or discarding member list state." + "path": "/platform-api/webhooks/conversation/after-create-single-chat-conversations", + "title": "After creating one-to-one conversations", + "description": "Synchronize complete conversation properties after one-to-one conversations are created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation after-create-single-chat-conversations", + "content": "Synchronize complete properties after one to one conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateSingleChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateSingleChatConversationsCommand and the complete property set described on Before creating one to one conversations /platform api/webhooks/conversation/before create single chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateSingleChatConversations . Process idempotently using owner user id:conversation id ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/get-specified-group-members-info", - "title": "Get group member profiles", - "description": "OpenIM React Native SDK guide for get group member profiles.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-specified-group-members-info", - "content": "Call getSpecifiedGroupMembersInfo to retrieve member profiles for specified users in a group. const members = await OpenIMSDK.getSpecifiedGroupMembersInfo groupID: 'group 001', userIDList: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userIDList | string | Yes | User IDs of the members to retrieve. | Return value When the call completes, it returns matching GroupMemberItem entries. See Group overview /sdk/react native/group/overview group for field descriptions." + "path": "/platform-api/webhooks/conversation/before-create-group-chat-conversations", + "title": "Before creating group conversations", + "description": "Adjust default conversation properties before group conversations are first created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation before-create-group-chat-conversations", + "content": "Adjust default properties before group conversations are first created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackBeforeCreateGroupChatConversationsCommand Request body | Property | Type | Description | | | | | | callbackCommand | string | callbackBeforeCreateGroupChatConversationsCommand . | | owner user id | string | User who owns the conversation. | | conversation id | string | Conversation ID. | | conversation type | int | Conversation type. | | group id | string | Group ID. | | recv msg opt | int | Message receive option. | | is pinned | boolean | Whether the conversation is pinned. | | is marked | boolean | Whether the conversation is marked. | | is private chat | boolean | Whether burn after reading is enabled. | | burn duration | int | Burn after reading duration. | | group at type | int | Group mention reminder type. | | attached info | string | Attached conversation data. | | ex | string | Extension data. | Response Return the common before event fields from Webhooks overview /platform api/webhooks/overview . The response may replace recv msg opt , is pinned , is marked , is private chat , burn duration , group at type , attached info , and ex . Processing rules Configuration key: beforeCreateGroupChatConversations . OpenIM waits synchronously. Use nextCode: 1 to reject creation; timeout behavior follows failedContinue ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/get-users-in-group", - "title": "Check users in a group", - "description": "OpenIM React Native SDK guide for check users in a group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members get-users-in-group", - "content": "Call getUsersInGroup to retrieve the user IDs from a specified set that have joined a group. const userIDs = await OpenIMSDK.getUsersInGroup groupID: 'group 001', userIDList: 'user 001', 'user 002', 'user 003' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userIDList | string | Yes | User IDs to check. | Return value When the call completes, it returns string containing the user IDs that have joined the target group." + "path": "/platform-api/webhooks/conversation/after-create-group-chat-conversations", + "title": "After creating group conversations", + "description": "Synchronize complete conversation properties after group conversations are created.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api webhooks conversation after-create-group-chat-conversations", + "content": "Synchronize complete properties after group conversations are created. This callback is available in OpenIM Enterprise. HTTP request POST WEBHOOK ADDRESS /callbackAfterCreateGroupChatConversationsCommand Request body The payload contains callbackCommand: callbackAfterCreateGroupChatConversationsCommand and the complete property set described on Before creating group conversations /platform api/webhooks/conversation/before create group chat conversations . Response Return HTTP success promptly. Conversation creation is already complete and cannot be changed by this response. Processing rules Configuration key: afterCreateGroupChatConversations . Process idempotently using owner user id:conversation id ." }, { - "path": "/sdk/react-native/group/retrieving-group-members/search-group-members", - "title": "Search group members", - "description": "OpenIM React Native SDK guide for search group members.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group retrieving-group-members search-group-members", - "content": "Call searchGroupMembers to search members of a group by user ID or group nickname. const members = await OpenIMSDK.searchGroupMembers groupID: 'group 001', keywordList: 'Zhang' , isSearchUserID: false, isSearchMemberNickname: true, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | keywordList | string | Yes | Search keywords. | | isSearchUserID | boolean | Yes | Whether to match user IDs. | | isSearchMemberNickname | boolean | Yes | Whether to match group nicknames. | | offset | number | Yes | Pagination offset. Use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | Return value When the call completes, it returns matching GroupMemberItem entries for the current page. See Group overview /sdk/react native/group/overview group for field descriptions." + "path": "/platform-api/timer/overview", + "title": "Overview", + "description": "Overview of the OpenIM Enterprise timer-task service.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer overview", + "content": "The timer module lets a backend register delayed tasks that call a configured business handler at the scheduled time. It is suitable for message reminders, scheduled operations, and business compensation, but it is not a high frequency real time scheduler. Capabilities Create a timer task /platform api/timer/managing tasks/create timer task Update a timer task /platform api/timer/managing tasks/update timer task Delete a timer task /platform api/timer/managing tasks/delete timer task Get a timer task /platform api/timer/managing tasks/get timer task List timer tasks /platform api/timer/managing tasks/list timer tasks Resource representations TimerTaskCallbackConfig | Property | Type | Description | | | | | | callbackMethod | string | Callback strategy. See TimerTaskCallbackMethod timertaskcallbackmethod . | | callbackPayload | string | Business payload passed to the callback handler. | TimerTask | Property | Type | Description | | | | | | taskID | string | Timer task ID. | | taskName | string | Display name. | | taskCategory | string | Business defined task category. | | srcUserID | string | User associated with the task. | | executeAt | int | Scheduled execution time as a Unix timestamp in milliseconds. | | executeBefore | int | Latest permitted execution time as a Unix timestamp in milliseconds. | | maxRetry | int | Maximum retries after execution failure. | | callbackConfig | TimerTaskCallbackConfig | Callback method and payload. | | createdAt | int | Creation time in Unix milliseconds. | | updatedAt | int | Last update time in Unix milliseconds. | | dedupKey | string | Business idempotency key used to prevent duplicate creation. | Enumerations TimerTaskStatus | Value | Name | Description | | | | | | 0 | Pending | Waiting for execution. | | 1 | Processing | Currently executing. | TimerTaskCallbackMethod | Value | Description | | | | | openim message | Invoke an OpenIM message operation. | | openim http | Invoke a configured HTTP handler. | | openim rpc | Invoke a preconfigured RPC handler. | | preset | Invoke a server side preset handler. | Integration guidance Call timer endpoints from an authorized business backend. Validate the target user, callback destination, and tenant boundary before creating or changing a task. Use a stable dedupKey for retryable task creation." }, { - "path": "/sdk/react-native/group/managing-group-members/invite-user-to-group", - "title": "Invite users to a group", - "description": "OpenIM React Native SDK guide for invite users to a group.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members invite-user-to-group", - "content": "Call inviteUserToGroup to invite one or more users to a group. await OpenIMSDK.inviteUserToGroup groupID: 'group 001', reason: 'Invitation to join the project discussion group', userIDList: 'user 002', 'user 003' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reason | string | Yes | Invitation message. Pass an empty string when no message is needed. | | userIDList | string | Yes | User IDs to invite. | When the call completes, the invitation request is submitted. When a user actually joins the group, OnGroupMemberAdded is triggered; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/meeting/overview", + "title": "Overview", + "description": "Overview of OpenIM Enterprise meetings, real-time calls, meeting chat, and recordings.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting overview", + "content": "The meeting module provides scheduled and immediate meetings, participant controls, recurring meetings, meeting chat, recording queries, and real time call recovery. All endpoints in this module are available only in OpenIM Enterprise and must be called through an authorized business backend. Capabilities Meeting management Schedule a meeting /platform api/meeting/meeting management/book meeting Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Join a meeting /platform api/meeting/meeting management/join meeting Get a meeting token /platform api/meeting/meeting management/get meeting token Update a meeting /platform api/meeting/meeting management/update meeting Get a meeting /platform api/meeting/meeting management/get meeting List a user's meetings /platform api/meeting/meeting management/list meetings Invite users to a meeting /platform api/meeting/meeting management/invite meeting users Leave a meeting /platform api/meeting/meeting management/leave meeting End or cancel a meeting /platform api/meeting/meeting management/end meeting Meeting controls and records Set personal meeting preferences /platform api/meeting/meeting settings/set personal setting Control participant media streams /platform api/meeting/meeting settings/operate all streams Remove meeting participants /platform api/meeting/meeting settings/remove participants Create a recurring meeting /platform api/meeting/recurring meetings/create repeat meeting Get meeting recordings /platform api/meeting/meeting records/get meeting records Get meeting attendance /platform api/meeting/meeting records/get meeting attendance Real time calls and meeting chat Get a call room by group ID /platform api/meeting/meeting signaling/get room by group id Get a startup call invitation /platform api/meeting/meeting signaling/get startup invitation Send a meeting chat message /platform api/meeting/meeting chat/send meeting chat Pull meeting chat messages /platform api/meeting/meeting chat/pull meeting chat Resource representations LiveKit | Property | Type | Description | | | | | | token | string | Participant access token. | | url | string | Real time service URL. | SystemGeneratedMeetingInfo | Property | Type | Description | | | | | | creatorUserID | string | Creator user ID. | | creatorNickname | string | Creator display name. | | status | string | Meeting status. | | startTime | int | Start time in Unix milliseconds. | | meetingID | string | Meeting ID. | CreatorDefinedMeetingInfo | Property | Type | Description | | | | | | title | string | Meeting title. | | scheduledTime | int | Scheduled start in Unix milliseconds. | | meetingDuration | int | Duration in seconds. | | password | string | Password, or empty when not required. | | timeZone | string | Creator selected time zone. | | hostUserID | string | Primary host user ID. | | coHostUSerID | string | Co host user IDs. The protocol uses this exact capitalization. | | inviteeUserIDs | string | Invitee user IDs. | MeetingInfo | Property | Type | Description | | | | | | systemGenerated | SystemGeneratedMeetingInfo | Server generated identity and status. | | creatorDefinedMeeting | CreatorDefinedMeetingInfo | Creator defined meeting information. | MeetingSetting | Property | Type | Description | | | | | | canParticipantsEnableCamera | bool | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | bool | Whether participants may unmute microphones. | | canParticipantsShareScreen | bool | Whether participants may share screens. | | disableCameraOnJoin | bool | Whether cameras start disabled. | | disableMicrophoneOnJoin | bool | Whether microphones start muted. | | canParticipantJoinMeetingEarly | bool | Whether participants may join early. | | lockMeeting | bool | Whether new participants are prevented from joining. | | audioEncouragement | bool | Whether active speaker highlighting is enabled. | | videoMirroring | bool | Whether video mirroring is enabled. | | recordOn | bool | Whether server side recording is enabled by policy. | MeetingInfoSetting | Property | Type | Description | | | | | | info | MeetingInfo | Meeting identity and creator defined information. | | setting | MeetingSetting | Meeting level settings. | | repeatInfo | MeetingRepeatInfo | Recurrence information for this instance. | MeetingRepeatInfoReq | Property | Type | Description | | | | | | endDate | int | Recurrence end in Unix milliseconds. | | repeatTimes | int | Planned number of instances. | | repeatType | RepeatType | Recurrence frequency. | | interval | int | Interval between occurrences. | | repeatDaysOfWeek | DayOfWeek | Weekdays included by the rule. | MeetingRepeatInfo Includes every MeetingRepeatInfoReq property plus repeatMeetingID and repeatSequence . RepeatMeetingData | Property | Type | Description | | | | | | repeatMeetingID | string | Recurring meeting ID. | | creatorUserID | string | Creator user ID. | | creatorDefinedMeetingInfo | CreatorDefinedMeetingInfo | Shared meeting information. | | setting | MeetingSetting | Shared settings. | | repeatInfo | MeetingRepeatInfo | Recurrence rule and identity. | | generatedCount | int | Number of generated instances. | | nextScheduleTime | int | Next scheduled generation time. | | status | RepeatStatus | Recurrence status. | PersonalMeetingSetting | Property | Type | Description | | | | | | cameraOnEntry | bool | Whether the camera is enabled on entry. | | microphoneOnEntry | bool | Whether the microphone is enabled on entry. | MeetingUser | Property | Type | Description | | | | | | userID | string | OpenIM user ID. | | nickname | string | Display name. | FileRecord | Property | Type | Description | | | | | | size | string | File size in the format returned by the service. | | fileURL | string | Recording file URL. | MeetingRecord | Property | Type | Description | | | | | | roomID | string | Meeting or call room ID. | | meetingName | string | Meeting name. | | ex | string | Business extension data. | | hostUserID | string | Host user ID. | | hostUserNickname | string | Host display name. | | createTime | int | Creation time in Unix milliseconds. | | startTime | int | Start time in Unix milliseconds. | | endTime | int | End time in Unix milliseconds. | | joinedUsers | MeetingUser | Participants recorded for the meeting. | | status | int | Meeting record status. | | fileRecords | FileRecord | Recording files. | | egressID | string | Recording job ID. | | downloadUrl | string | Recording download URL. | | egressUploading | bool | Whether a recording is still uploading. | | recordStatus | int | See RecordStatus recordstatus . | | videoFileSize | int | Video size in bytes. | | videoCoverUrl | string | Video cover URL. | | videoName | string | Video filename. | UserMeetingHistory Contains roomID , meetingName , hostUserID , hostUserNickname , startTime , endTime , status , and ex for a meeting attended by a user. HostedMeeting Contains roomID , meetingName , status , startTime , endTime , and ex for a meeting hosted by a user. MeetingChatMessage | Property | Type | Description | | | | | | seq | int | Meeting chat Seq. | | sendID | string | Sender user ID. | | contentType | int | Content type. See Message content types /platform api/message/message content types . | | content | string | Message content. | | createTimeMs | int | Creation time in Unix milliseconds. | | dstUserIDs | string | Target users; empty means room broadcast. | | nickname | string | Sender display name. | | faceURL | string | Sender avatar URL. | InviteeInfo | Property | Type | Description | | | | | | inviteeUserIDs | string | Replacement invitee list used by meeting updates. | InvitationInfo | Property | Type | Description | | | | | | inviterUserID | string | Invitation sender. | | inviteeUserIDList | string | Invitees. | | customData | string | Business extension data. | | groupID | string | Related group ID. | | roomID | string | Call room ID. | | timeout | int | Invitation timeout. | | mediaType | string | Call media type. | | platformID | int | Originating platform. See PlatformID /platform api/user/overview platformid . | | sessionType | int | Call session type. See ConversationType /platform api/conversation/overview conversationtype . | | initiateTime | int | Invitation initiation time. | | busyLineUserIDList | string | Users whose lines are busy. | Enumerations RepeatType | Value | Name | Description | | | | | | 0 | REPEAT TYPE NONE | Does not repeat. | | 1 | REPEAT TYPE DAILY | Daily. | | 2 | REPEAT TYPE WEEKLY | Weekly. | | 3 | REPEAT TYPE WEEKDAY | Weekdays. | | 4 | REPEAT TYPE MONTHLY | Monthly. | | 5 | REPEAT TYPE YEARLY | Yearly. | | 6 | REPEAT TYPE HOURLY | Hourly. | DayOfWeek | Value | Name | | | | | 0 | SUNDAY | | 1 | MONDAY | | 2 | TUESDAY | | 3 | WEDNESDAY | | 4 | THURSDAY | | 5 | FRIDAY | | 6 | SATURDAY | RepeatStatus | Value | Name | Description | | | | | | 0 | REPEAT STATUS UNKNOWN | Unknown. | | 1 | REPEAT STATUS ACTIVE | Active. | | 2 | REPEAT STATUS COMPLETED | Completed. | RecordStatus | Value | Name | Description | | | | | | 0 | NotStarted | Not started. | | 1 | Completed | Completed. | | 2 | Failed | Failed. | | 3 | Processing | Processing. | Integration guidance Authenticate users and validate meeting, room, recording, and tenant permissions in the business backend. Treat real time connection tokens and recording URLs as sensitive resources. Use the meeting chat Seq and creation marker together when incrementally restoring meeting chat." }, { - "path": "/sdk/react-native/group/managing-group-members/kick-group-member", - "title": "Remove group members", - "description": "OpenIM React Native SDK guide for remove group members.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members kick-group-member", - "content": "Call kickGroupMember to remove one or more members from a group. await OpenIMSDK.kickGroupMember groupID: 'group 001', reason: 'No longer involved in the project', userIDList: 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | reason | string | Yes | Removal reason. Pass an empty string when no reason is needed. | | userIDList | string | Yes | User IDs of the members to remove. | When the call completes, the specified members are removed from the group. Removing a member triggers OnGroupMemberDeleted ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/user/account-governance/ban-user", + "title": "Ban users", + "description": "OpenIM Enterprise Platform API: ban specified users from continuing to use the service.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance ban-user", + "content": "Ban one or more users from continuing to use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/ban user Request example curl request POST \"$ API ADDRESS /user/ban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to ban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-nickname", - "title": "Update a group nickname", - "description": "OpenIM React Native SDK guide for update a group nickname.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-nickname", - "content": "Call setGroupMemberInfo to update a member's group nickname. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', nickname: 'Project owner', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose nickname to update. | | nickname | string | Yes | New nickname for the member in the group. | A group nickname applies only to this group and does not change the user's account nickname. When the call completes, the group nickname is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/user/account-governance/unban-user", + "title": "Unban users", + "description": "OpenIM Enterprise Platform API: remove the ban from specified users.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance unban-user", + "content": "Remove the ban from one or more OpenIM users. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unban user Request example curl request POST \"$ API ADDRESS /user/unban user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unban. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-role-level", - "title": "Manage group administrators", - "description": "OpenIM React Native SDK guide for manage group administrators.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-role-level", - "content": "Call setGroupMemberInfo to make a member an administrator or remove administrator status. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', roleLevel: GroupMemberRole.Admin, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose role to set. | | roleLevel | GroupMemberRole | Yes | Member role to set. | | Enum value | Value | Description | | | | | | GroupMemberRole.Normal | 20 | Regular member. Pass this value to remove administrator status. | | GroupMemberRole.Admin | 60 | Administrator. | | GroupMemberRole.Owner | 100 | Group owner role, used only to identify the current role. | You cannot transfer group ownership by setting GroupMemberRole.Owner . Use Transfer group ownership /sdk/react native/group/managing group members/transfer group owner instead. When the call completes, the member role is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/user/account-governance/unregister-user", + "title": "Unregister users", + "description": "OpenIM Enterprise Platform API: unregister user accounts that no longer use the service.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance unregister-user", + "content": "Unregister one or more user accounts that no longer use the OpenIM service. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/unregister user Request example curl request POST \"$ API ADDRESS /user/unregister user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to unregister. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\" Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Request array limits follow the limits of the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-avatar", - "title": "Update a group member avatar", - "description": "OpenIM React Native SDK guide for update a group member avatar.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-avatar", - "content": "Call setGroupMemberInfo to update a member's group avatar. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', faceURL: 'https://example.com/avatar.png', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose avatar to update. | | faceURL | string | Yes | Member avatar URL for this group. | A group avatar applies only to the specified group. To update an account avatar, use Update your profile /sdk/react native/user/profile/set self info . When the call completes, the group avatar is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/user/account-governance/list-disabled-users", + "title": "List disabled users", + "description": "OpenIM Enterprise Platform API: list disabled accounts by user, status, and pagination criteria.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api user account-governance list-disabled-users", + "content": "List disabled accounts by user ID, status, and pagination criteria. This endpoint is available only in OpenIM Enterprise. Configure the API address and a valid token as described in Prepare to use the API /platform api/prepare to use api . HTTP request POST API ADDRESS /user/page find disable users Request example curl request POST \"$ API ADDRESS /user/page find disable users\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body \"userIDs\": \"user 001\" , \"status\": 1, \"pagination\": \"pageNumber\": 1, \"showNumber\": 20 | Parameter | Required | Type | Description | | | | | | | userIDs | Yes | string | OpenIM user IDs to query. | | status | No | int | Account status filter. | | pagination | Yes | RequestPagination | Pagination settings. | Response A normally processed request typically returns 200 OK . Check errCode in the response body to determine whether the operation succeeded. \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"users\": \"userID\": \"user 001\", \"nickname\": \"Example user\", \"faceURL\": \"https://example.com/avatar.png\", \"ex\": \" \", \"createTime\": 1719800000000, \"appMangerLevel\": 0, \"globalRecvMsgOpt\": 0, \"status\": 1, \"addFriendPermission\": 0, \"category\": \"default\" , \"total\": 1 Response properties | Property | Type | Description | | | | | | errCode | int | Business error code. 0 indicates success. | | errMsg | string | Short error message; normally empty on success. | | errDlt | string | Detailed error information; normally empty on success. | | data.users | UserInfo | User records. See UserInfo /platform api/user/overview userinfo . | | data.total | int | Total number of matching records. | Errors Error responses use the common Platform API structure. See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target users. Pagination and request array limits follow the delivered server version. Related pages Prepare to use the API /platform api/prepare to use api User overview /platform api/user/overview Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/group/managing-group-members/set-group-member-extension", - "title": "Set group member extra data", - "description": "OpenIM React Native SDK guide for set group member extra data.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members set-group-member-extension", - "content": "Call setGroupMemberInfo to set a member's ex extension field. await OpenIMSDK.setGroupMemberInfo groupID: 'group 001', userID: 'user 002', ex: JSON.stringify title: 'maintainer', , ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member whose extension data to set. | | ex | string | Yes | Group member extension string. It can contain JSON or another string format for business specific data. | When the call completes, the member extension field is updated. Member profile changes trigger OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/relation/managing-friend-requests/delete-sent-friend-requests", + "title": "Delete sent friend requests", + "description": "OpenIM Enterprise Platform API: delete friend requests sent by a specified user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-sent-friend-requests", + "content": "Delete selected friend request records sent by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests from user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"fromUserID\":\"user 001\",\"toUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | fromUserID | Yes | string | User ID of the request sender. | | toUserIDs | Yes | string | User IDs of the request recipients whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request sender. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List sent friend requests /platform api/relation/managing friend requests/list sent friend requests" }, { - "path": "/sdk/react-native/group/managing-group-members/transfer-group-owner", - "title": "Transfer group ownership", - "description": "OpenIM React Native SDK guide for transfer group ownership.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members transfer-group-owner", - "content": "Call transferGroupOwner to transfer group ownership to another member. await OpenIMSDK.transferGroupOwner groupID: 'group 001', newOwnerUserID: 'user 002', ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | newOwnerUserID | string | Yes | User ID of the new group owner. This user must already be a member of the group. | When the call completes, group ownership is transferred. The member roles of the former and new owners change through OnGroupMemberInfoChanged ; see Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/relation/managing-friend-requests/delete-received-friend-requests", + "title": "Delete received friend requests", + "description": "OpenIM Enterprise Platform API: delete friend requests received by a specified user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api relation managing-friend-requests delete-received-friend-requests", + "content": "Delete selected friend request records received by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /friend/delete friend requests to user Request example curl request POST \"$ API ADDRESS /friend/delete friend requests to user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"toUserID\":\"user 001\",\"fromUserIDs\": \"user 002\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Availability and permissions depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | toUserID | Yes | string | User ID of the request recipient. | | fromUserIDs | Yes | string | User IDs of the request senders whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes for the common error structure. Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the request recipient. Request array limits follow the delivered server version. Related pages Relationship overview /platform api/relation/overview List received friend requests /platform api/relation/managing friend requests/list received friend requests" + }, + { + "path": "/platform-api/group/group-applications/get-group-application-badge-count", + "title": "Get the group application badge count", + "description": "OpenIM Enterprise Platform API: get the pending group-application badge count for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications get-group-application-badge-count", + "content": "Get the group application badge count currently displayed for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/get group application badge count Request example curl request POST \"$ API ADDRESS /group/get group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\",\"data\": \"count\":1 Response properties | Property | Type | Description | | | | | | data.count | int | Current group application badge count. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to read the user's application state. Related pages Group overview /platform api/group/overview Clear the group application badge count /platform api/group/group applications/clear group application badge count" }, { - "path": "/sdk/react-native/group/managing-group-members/change-group-member-mute", - "title": "Mute or unmute a group member", - "description": "OpenIM React Native SDK guide for mute or unmute a group member.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native group managing-group-members change-group-member-mute", - "content": "Call changeGroupMemberMute to set a mute duration for a member. Pass 0 to remove the mute. await OpenIMSDK.changeGroupMemberMute groupID: 'group 001', userID: 'user 002', mutedSeconds: 3600, ; Parameters | Parameter | Type | Required | Description | | | | | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member to mute or unmute. | | mutedSeconds | number | Yes | Mute duration in seconds. Pass 0 to remove the mute. | When the call completes, the member mute state is updated. Member profile changes trigger OnGroupMemberInfoChanged ; read muteEndTime from the event parameter to get the mute end time. See Get group members /sdk/react native/group/retrieving group members/get group member list for event handling." + "path": "/platform-api/group/group-applications/clear-group-application-badge-count", + "title": "Clear the group application badge count", + "description": "OpenIM Enterprise Platform API: clear the current group-application badge count for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications clear-group-application-badge-count", + "content": "Clear the group application badge count currently stored for a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/clear group application badge count Request example curl request POST \"$ API ADDRESS /group/clear group application badge count\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | OpenIM user ID. | Response The API returns the common response envelope. errCode is 0 when the count was cleared successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority to update the user's application state. Related pages Group overview /platform api/group/overview Get the group application badge count /platform api/group/group applications/get group application badge count" }, { - "path": "/sdk/react-native/message/overview-message", - "title": "Message overview", - "description": "OpenIM React Native SDK guide for message overview.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message overview-message", - "content": "OpenIM React Native SDK represents each message with MessageItem . Creating a message only creates a MessageItem ready to send; to send it to a one to one user or group, call a sending API. Receiving, querying, and state changes such as deletion, revocation, and modification are handled through their respective APIs or events. Message lists use clientMsgID to identify, deduplicate, and update individual messages. MessageItem does not contain conversationID ; obtain the message's conversation from the current conversation, history query parameters, or event context. Message workflow | Stage | Related capability | Description | | | | | | Create | create Message | Creates a MessageItem ready to send. | | Send | sendMessage and sendMessageNotOss | Sends a message to a one to one chat or group chat. | | Receive | New message events | Receives real time, offline, and online only messages. | | Query | Message history, lookup by ID, and search | Reads or locates saved messages by conversation. | | State changes | Revocation, deletion, modification, and read receipts | Updates the message list from call results and the corresponding events. | MessageItem type The message objects returned when creating, sending, receiving, or querying messages are MessageItem . Common public fields include: | Field | Type | Description | | | | | | clientMsgID | string | Client message ID, used to deduplicate, update, and locate messages. | | serverMsgID | string | Server message ID. | | sessionType | SessionType | Conversation type, used to distinguish one to one chats from group chats. | | sendID | string | Sender user ID. | | recvID | string | Recipient user ID for a one to one message. | | groupID | string | Group ID for a group message. | | contentType | MessageType | Message content type, which determines the content field to render. | | createTime | number | Message object creation time. | | sendTime | number | Message send time. | | seq | number | Server message sequence number. | | senderPlatformID | Platform | Client platform that sent the message. | | status | MessageStatus | Message send status. | | isRead | boolean | Read state. | | senderNickname | string | Sender nickname. | | senderFaceUrl | string | Sender avatar URL. | | offlinePush | OfflinePush | Offline push configuration. | | content | string | SDK serialized message content. For rendering, read the content field that corresponds to contentType . | | ex | string | Message extension field. | | localEx | string | Message extension field used only on the current device. | Message content is stored in the MessageItem field that corresponds to contentType : | Content | Field | | | | | Text, rich text, and Markdown | textElem , advancedTextElem , markdownTextElem | | Images, audio, video, and files | pictureElem , soundElem , videoElem , fileElem | | @ messages | atTextElem | | Reply messages | quoteElem | | Merged forwards | mergeElem | | Contact cards, locations, and emoji | cardElem , locationElem , faceElem | | Custom messages | customElem | | Notifications, typing status, and attached status | notificationElem , typingElem , attachedInfoElem | All content fields are optional. A message usually uses only the content field that corresponds to its contentType ; determine contentType before reading that field for rendering. Create and send messages First call the applicable creation API to obtain a MessageItem , then call a sending API. Use Send a message /sdk/react native/message/sending messages/send message when the SDK uploads a local media file; use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss when the media file already has a remote URL. | Content | Page | | | | | Text and rich text | Create a text message /sdk/react native/message/creating messages/create text message , Create a rich text message /sdk/react native/message/creating messages/create advanced text message | | @ messages | Create an @ message /sdk/react native/message/creating messages/create text at message | | Images, audio, video, and files | Create an image message from a file /sdk/react native/message/creating messages/create image message by file , Create an audio message from a file /sdk/react native/message/creating messages/create sound message by file , Create a video message from files /sdk/react native/message/creating messages/create video message by file , Create a file message from a file /sdk/react native/message/creating messages/create file message by file | | Contact cards, locations, and emoji | Create a contact card message /sdk/react native/message/creating messages/create card message , Create a location message /sdk/react native/message/creating messages/create location message , Create an emoji message /sdk/react native/message/creating messages/create face message | | Replies, forwards, and merged forwards | Create a reply message /sdk/react native/message/creating messages/create quote message , Create a forwarded message /sdk/react native/message/creating messages/create forward message , Create a merged forward message /sdk/react native/message/creating messages/create merger message | | Custom messages | Create a custom message /sdk/react native/message/creating messages/create custom message | Browse by task | Task | Page | | | | | Receive real time, offline, and online only messages | Receive messages /sdk/react native/message/receiving messages/receive messages | | Receive custom business messages | Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages | | Load message history or message context | Load message history /sdk/react native/message/retrieving messages/load older messages , Load message context /sdk/react native/message/retrieving messages/load message context | | Find or search messages by ID | Find messages by ID /sdk/react native/message/retrieving messages/find messages by id , Search messages /sdk/react native/message/searching messages/search messages | | Delete, revoke, or modify messages | Delete messages in a batch /sdk/react native/message/managing messages/delete saved messages , Revoke a message /sdk/react native/message/managing messages/revoke a message , Modify a message /sdk/react native/message/managing messages/modify a message | | Manage message data used only on the current device | Delete a local message /sdk/react native/message/managing messages/delete local message , Set a local message extension /sdk/react native/message/managing messages/set message local ex | | Report or query group message read status | Report group messages as read /sdk/react native/message/managing read status/send group read receipts , Get members who read a group message /sdk/react native/message/managing read status/get group message readers | | Report or query typing status | Report typing status /sdk/react native/message/composing messages/update typing status , Get typing status /sdk/react native/message/composing messages/get typing status | | Transcribe audio | Check audio transcription availability /sdk/react native/message/composing messages/check speech to text , Transcribe audio /sdk/react native/message/composing messages/transcribe audio | Event handling Complete event listener examples for message events are available on the following pages: New, offline, and online only messages: OnRecvNewMessage , OnRecvOfflineNewMessage , and OnRecvOnlineOnlyMessage . See Receive messages /sdk/react native/message/receiving messages/receive messages . Custom business messages: OnRecvCustomBusinessMessage . See Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages . Message deletion: OnMsgDeleted . See Delete messages in a batch /sdk/react native/message/managing messages/delete saved messages . Message revocation: OnNewRecvMessageRevoked . See Revoke a message /sdk/react native/message/managing messages/revoke a message . Message modification: OnMessageModified . See Modify a message /sdk/react native/message/managing messages/modify a message . Group message read status: OnRecvGroupReadReceipt . See Report group messages as read /sdk/react native/message/managing read status/send group read receipts . Typing status changes: OnInputStatusChanged . See Update input states /sdk/react native/message/composing messages/change input states ." + "path": "/platform-api/group/group-applications/delete-user-group-requests", + "title": "Delete applications sent by a user", + "description": "OpenIM Enterprise Platform API: delete a user's applications to selected groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications delete-user-group-requests", + "content": "Delete join application records sent by a user to selected groups. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests from user Request example curl request POST \"$ API ADDRESS /group/delete group requests from user\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"userID\":\"user 001\",\"groupIDs\": \"group 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User who sent the applications. | | groupIDs | Yes | string | Groups whose application records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target user. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List applications sent by a user /platform api/group/group applications/list user requested group applications" }, { - "path": "/sdk/react-native/message/creating-messages/create-text-message", - "title": "Create a text message", - "description": "OpenIM React Native SDK guide for create a text message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-message", - "content": "Use createTextMessage to create a text message ready to send. const message = await OpenIMSDK.createTextMessage 'Hello, welcome to the discussion.' ; The argument is the message text. The call returns a MessageItem ; pass it as message to Send a message /sdk/react native/message/sending messages/send message ." + "path": "/platform-api/group/group-applications/delete-group-received-requests", + "title": "Delete applications received by a group", + "description": "OpenIM Enterprise Platform API: delete selected applications received by a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api group group-applications delete-group-received-requests", + "content": "Delete selected join application records received by a group. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /group/delete group requests to group Request example curl request POST \"$ API ADDRESS /group/delete group requests to group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"groupID\":\"group 001\",\"userIDs\": \"user 001\" ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | Group that received the applications. | | userIDs | Yes | string | Applicants whose records are deleted. | Response The API returns the common response envelope. errCode is 0 when the records were deleted successfully. \"errCode\":0,\"errMsg\":\"\",\"errDlt\":\"\" Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over the target group. Request array limits follow the delivered server version. Related pages Group overview /platform api/group/overview List group applications /platform api/group/group applications/list received group applications" }, { - "path": "/sdk/react-native/message/creating-messages/create-text-at-message", - "title": "Create an @ message", - "description": "OpenIM React Native SDK guide for create an @ message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-text-at-message", - "content": "Use createTextAtMessage to create a mention message in a group chat. The mentions in text must correspond to atUserIDList . const message = await OpenIMSDK.createTextAtMessage text: '@user 001 Please confirm the release content.', atUserIDList: 'user 001' , atUsersInfo: atUserID: 'user 001', groupNickname: 'Lee', , , ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Body text of the mention message. | | atUserIDList | string | Yes | User IDs of the mentioned members. | | atUsersInfo | AtUsersInfoItem | No | Display names of mentioned members in the group. | | message | MessageItem | No | An attached message object. | The call returns a MessageItem ready to send. Pass it as message to Send a message /sdk/react native/message/sending messages/send message ." + "path": "/platform-api/message/content-processing/translate-text", + "title": "Translate text", + "description": "OpenIM Enterprise Platform API: translate text and return the detected source language.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message content-processing translate-text", + "content": "Translate text into a target language and return the detected source language. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /third/translate text Request example curl request POST \"$ API ADDRESS /third/translate text\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"content\":\"Hello\",\"sourceLanguageCode\":\"en\",\"targetLanguageCode\":\"zh CN\" ' Request body | Parameter | Required | Type | Description | | | | | | | content | Yes | string | Text to translate. | | sourceLanguageCode | Yes | string | Source BCP 47 language tag. Leave empty to enable detection. | | targetLanguageCode | Yes | string | Target BCP 47 language tag. | Response data.translatedText contains the translation and data.detectedLanguageCode contains the detected source BCP 47 tag. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Input size and language availability limits depend on the delivered translation service. Related pages Message overview /platform api/message/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-custom-message", - "title": "Create a custom message", - "description": "OpenIM React Native SDK guide for create a custom message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-custom-message", - "content": "Use createCustomMessage to create a custom business message. The sending and receiving applications must agree on the formats of data and extension . const message = await OpenIMSDK.createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify version: 1 , description: 'Task card', ; Parameters | Parameter | Type | Required | Description | | | | | | | data | string | Yes | Business data string. It can contain JSON. | | extension | string | Yes | Business extension data string. | | description | string | Yes | Message description. It can also be fallback text for clients that do not support the message type. | The call returns a MessageItem ready to send. Receiving clients should validate the business data format and version. For server delivered business notifications, see Receive custom business messages /sdk/react native/message/receiving messages/receive custom business messages ." + "path": "/platform-api/message/streaming-messages/append-stream-message", + "title": "Append stream-message packets", + "description": "OpenIM Enterprise Platform API: append indexed text packets to a stream message.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message streaming-messages append-stream-message", + "content": "Append a batch of indexed text packets to an existing stream message and optionally mark the stream complete. HTTP request POST API ADDRESS /msg/append stream msg Request example curl request POST \"$ API ADDRESS /msg/append stream msg\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"clientMsgID\":\"client msg 001\",\"startIndex\":0,\"packets\": \"Hello\", \" world\" ,\"end\":true ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | Conversation containing the stream message. | | clientMsgID | Yes | string | Client message ID of the stream message. | | startIndex | Yes | int | Index assigned to the first packet in this batch. | | packets | Yes | string | Ordered stream message packets. | | end | Yes | bool | Whether this batch completes the stream. | Response The common response has errCode: 0 when the batch was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Preserve packet indexes when retrying; do not blindly append duplicate content. Related pages Upload stream message content /platform api/message/streaming messages/put stream message" }, { - "path": "/sdk/react-native/message/creating-messages/create-image-message-by-file", - "title": "Create an image message from a file", - "description": "OpenIM React Native SDK guide for create an image message from a file.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-file", - "content": "Use createImageMessageFromFullPath to create a message from an image stored on the device. const message = await OpenIMSDK.createImageMessageFromFullPath imagePath ; imagePath is the full path to the image on the device. The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local resource." + "path": "/platform-api/message/streaming-messages/put-stream-message", + "title": "Upload stream-message content", + "description": "OpenIM Enterprise Platform API: continuously upload UTF-8 content to a stream message over HTTP PUT.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message streaming-messages put-stream-message", + "content": "Continuously write UTF 8 output from a model or business service to the same stream message. HTTP request PUT API ADDRESS /msg/append stream msg?conversationID= CONVERSATION ID &clientMsgID= CLIENT MSG ID &operationID= OPERATION ID Request example curl request PUT \"$ API ADDRESS /msg/append stream msg?conversationID=si user 001 user 002&clientMsgID=client msg 001&operationID=$ OPERATION ID \" \\ header \"Content Type: text/plain; charset=utf 8\" header \"token: $ TOKEN \" \\ data binary 'Generated response content' Request parameters | Parameter | Location | Required | Type | Description | | | | | | | | conversationID | Query or header | Yes | string | Conversation containing the stream message. | | clientMsgID | Query or header | Yes | string | Client message ID of the stream message. | | operationID | Query or header | Yes | string | Unique trace ID for this request. | | token | Header | Yes | string | Valid user or administrator token. | | body | Body | Yes | bytes | UTF 8 stream message content. | Response The server returns write results as a stream. Handle interrupted connections and partial writes; do not retry a chunk until its state is known. Permissions and limits Available only in OpenIM Enterprise. The body must be valid UTF 8. conversationID and clientMsgID must identify the same appendable stream message. Related pages Append stream message packets /platform api/message/streaming messages/append stream message" }, { - "path": "/sdk/react-native/message/creating-messages/create-image-message-by-url", - "title": "Create an image message from a URL", - "description": "OpenIM React Native SDK guide for create an image message from a url.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-image-message-by-url", - "content": "Use createImageMessageByURL to create a message from uploaded image resource information. The source image, large image, and thumbnail can share one resource description or use separate resources with different sizes or quality. const picture = uuid: 'image 001', type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: 'https://www.example.com/picture.png', ; const message = await OpenIMSDK.createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', ; Parameters | Parameter | Type | Required | Description | | | | | | | sourcePicture | PicBaseInfo | Yes | Source image resource information. | | bigPicture | PicBaseInfo | Yes | Large image resource information. | | snapshotPicture | PicBaseInfo | Yes | Thumbnail resource information. | | sourcePath | string | Yes | Local image path. Pass an empty string when only a remote resource is available. | Each PicBaseInfo contains uuid , type , size , width , height , and url : the resource ID, type, byte size, pixel dimensions, and remote URL. The call returns a MessageItem ready to send. Use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss to send it." + "path": "/platform-api/message/read-status/mark-conversation-read", + "title": "Mark a conversation read through a Seq", + "description": "OpenIM Enterprise Platform API: advance a user's read position in a conversation to a message Seq.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message read-status mark-conversation-read", + "content": "Advance a user's read position in a conversation to the specified message Seq. Use this for read state migration or correction when the exact read boundary is known. HTTP request POST API ADDRESS /msg/mark conversation read Request example curl request POST \"$ API ADDRESS /msg/mark conversation read\" \\ header \"Content Type: application/json; charset=utf 8\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"userID\":\"user 001\",\"seq\":125 ' Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | userID | Yes | string | User whose read position is updated. | | seq | Yes | int | Last message Seq treated as read. | Response The common response has errCode: 0 when the read position was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the Seq belongs to the specified conversation before changing imported state. Related pages Set a conversation unread count /platform api/message/unread count/reset conversation unread" }, { - "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-file", - "title": "Create an audio message from a file", - "description": "OpenIM React Native SDK guide for create an audio message from a file.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-file", - "content": "Use createSoundMessageFromFullPath to create a message from an audio file on the device. const message = await OpenIMSDK.createSoundMessageFromFullPath soundPath, duration: 18, ; Parameters | Parameter | Type | Required | Description | | | | | | | soundPath | string | Yes | Full path to the audio file. | | duration | number | Yes | Audio duration in seconds. | The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local audio resource." + "path": "/platform-api/message/managing-messages/modify-message", + "title": "Modify a message", + "description": "Modify message content by conversation ID and Seq with the OpenIM Enterprise Platform API.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message managing-messages modify-message", + "content": "Modify the content of a message identified by conversation ID and Seq. The response reports the modification time and count. This endpoint is available in OpenIM Enterprise. HTTP request POST API ADDRESS /msg/modify message Request example curl request POST \"$ API ADDRESS /msg/modify message\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" \\ header \"token: $ TOKEN \" \\ data raw ' \"conversationID\":\"si user 001 user 002\",\"seq\":1,\"newContent\":\"updated content\",\"oldContent\":\"original content\" ' Enterprise: this endpoint requires the corresponding Enterprise service. Availability and authorization depend on the delivered version. Request body | Parameter | Required | Type | Description | | | | | | | conversationID | Yes | string | OpenIM conversation ID. | | seq | Yes | int | Message Seq. | | newContent | Yes | string | New message content. | | oldContent | Yes | string | Previous message content used for concurrency validation. | Response \"errCode\": 0, \"errMsg\": \"\", \"errDlt\": \"\", \"data\": \"modifiedTime\": 1719800000000, \"modifiedCount\": 1 | Field | Type | Description | | | | | | data.modifiedTime | int | Modification time as a Unix timestamp in milliseconds. | | data.modifiedCount | int | Number of modifications recorded for the message. | Authorize the operator and target resource in your business backend. Relevant clients can receive the synchronized message change according to the delivered Enterprise version. Related pages Message overview /platform api/message/overview Revoke a message /platform api/message/managing messages/revoke msg Error codes /platform api/error codes" }, { - "path": "/sdk/react-native/message/creating-messages/create-sound-message-by-url", - "title": "Create an audio message from a URL", - "description": "OpenIM React Native SDK guide for create an audio message from a url.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-sound-message-by-url", - "content": "Use createSoundMessageByURL to create a message from uploaded audio resource information. const message = await OpenIMSDK.createSoundMessageByURL uuid: 'audio 001', soundPath: '', sourceUrl: 'https://www.example.com/sound.mp3', dataSize: 54000, duration: 18, soundType: 'audio/mpeg', ; Parameters | Parameter | Type | Required | Description | | | | | | | uuid | string | Yes | Audio resource ID. | | soundPath | string | Yes | Local audio path. Pass an empty string when only a remote resource is available. | | sourceUrl | string | Yes | URL of the uploaded audio. | | dataSize | number | Yes | Audio size in bytes. | | duration | number | Yes | Audio duration in seconds. | | soundType | string | No | Audio type. | The call returns a MessageItem ready to send. Use the actual upload result for resource information, then use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss ." + "path": "/platform-api/message/unread-count/get-conversations-unread-count", + "title": "Get conversation unread counts", + "description": "OpenIM Enterprise Platform API: get a user's unread counts for selected conversations.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message unread-count get-conversations-unread-count", + "content": "Get a user's unread message counts for selected conversations. HTTP request POST API ADDRESS /msg/get conversations unread count Request example curl request POST \"$ API ADDRESS /msg/get conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is queried. | | conversationIDs | Yes | string | Conversations to query. | Response data.unreadCount maps each conversation ID to its unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Message overview /platform api/message/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-video-message-by-file", - "title": "Create a video message from files", - "description": "OpenIM React Native SDK guide for create a video message from files.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-file", - "content": "Use createVideoMessageFromFullPath to create a message from a video file and cover image on the device. const message = await OpenIMSDK.createVideoMessageFromFullPath videoPath, videoType: 'video/mp4', duration: 36, snapshotPath, ; Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Full path to the video file. | | videoType | string | Yes | Video type. | | duration | number | Yes | Video duration in seconds. | | snapshotPath | string | Yes | Full path to the video cover image. | The call returns a MessageItem ready to send. Use Send a message /sdk/react native/message/sending messages/send message to upload the local video and cover image." + "path": "/platform-api/message/unread-count/clear-conversations-unread-count", + "title": "Clear conversation unread counts", + "description": "OpenIM Enterprise Platform API: clear a user's unread counts in selected conversations.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message unread-count clear-conversations-unread-count", + "content": "Clear a user's unread counts in selected conversations. HTTP request POST API ADDRESS /msg/clear conversations unread count Request example curl request POST \"$ API ADDRESS /msg/clear conversations unread count\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is cleared. | | conversationIDs | Yes | string | Conversations to clear. | Response data.unreadCount maps each requested conversation ID to its resulting unread count. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Clearing unread counts changes user state; validate the target user and conversations. Related pages Get conversation unread counts /platform api/message/unread count/get conversations unread count" }, { - "path": "/sdk/react-native/message/creating-messages/create-video-message-by-url", - "title": "Create a video message from URLs", - "description": "OpenIM React Native SDK guide for create a video message from urls.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-video-message-by-url", - "content": "Use createVideoMessageByURL to create a message from uploaded video and cover image resources. const message = await OpenIMSDK.createVideoMessageByURL videoPath: '', duration: 36, videoType: 'video/mp4', videoUUID: 'video 001', videoUrl: 'https://www.example.com/video.mp4', videoSize: 820000, snapshotPath: '', snapshotUUID: 'cover 001', snapshotSize: 42000, snapshotUrl: 'https://www.example.com/snapshot.png', snapshotWidth: 1280, snapshotHeight: 720, snapShotType: 'image/jpeg', ; Parameters | Parameter | Type | Required | Description | | | | | | | videoPath | string | Yes | Local video path. Pass an empty string when only a remote resource is available. | | duration | number | Yes | Video duration in seconds. | | videoType | string | Yes | Video type. | | videoUUID , videoUrl , videoSize | string , string , number | Yes | Video resource ID, remote URL, and byte size. | | snapshotPath | string | Yes | Local cover image path. Pass an empty string when only a remote resource is available. | | snapshotUUID , snapshotUrl , snapshotSize | string , string , number | Yes | Cover image resource ID, remote URL, and byte size. | | snapshotWidth , snapshotHeight | number | Yes | Cover image width and height in pixels. | | snapShotType | string | No | Cover image type. | The call returns a MessageItem ready to send. Use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss to send it." + "path": "/platform-api/message/unread-count/reset-conversation-unread", + "title": "Set a conversation unread count", + "description": "OpenIM Enterprise Platform API: set a target unread count for migration or state correction.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api message unread-count reset-conversation-unread", + "content": "Set a target unread count for a user in selected conversations. This operation is intended for data migration or state correction; it is distinct from setting an exact read Seq. HTTP request POST API ADDRESS /msg/reset conversation unread Request example curl request POST \"$ API ADDRESS /msg/reset conversation unread\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"num\":3 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose unread state is changed. | | conversationIDs | Yes | string | Conversations to update. | | num | Yes | int | Target unread count. | Response The common response has errCode: 0 when the target state was applied. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. For an exact imported read boundary, use Mark a conversation read through a Seq /platform api/message/read status/mark conversation read . Related pages Migrate to OpenIM /platform api/migration to openim" }, { - "path": "/sdk/react-native/message/creating-messages/create-file-message-by-file", - "title": "Create a file message from a file", - "description": "OpenIM React Native SDK guide for create a file message from a file.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-file", - "content": "Use createFileMessageFromFullPath to create a message from a file on the device. const message = await OpenIMSDK.createFileMessageFromFullPath filePath, fileName: 'product guide.pdf', ; Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Full path to the file. | | fileName | string | Yes | File name shown to recipients. | The call returns a MessageItem ready to send. When you use Send a message /sdk/react native/message/sending messages/send message , the SDK uploads the local file." + "path": "/platform-api/conversation/conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "OpenIM Enterprise Platform API: create a conversation group for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups create-conversation-group", + "content": "Create a conversation group for a user and optionally add one conversation to it. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/create conversation group Request example curl request POST \"$ API ADDRESS /conversation/create conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"order\":1,\"ex\":\" \",\"conversationID\":\"si user 001 user 002\",\"conversationGroupType\":1 ' Enterprise: This endpoint requires the corresponding OpenIM Enterprise services. Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the group. | | name | Yes | string | Display name. | | order | Yes | int | Display order. | | ex | No | string | Business extension data. | | conversationID | No | string | Conversation to add when creating the group. | | conversationGroupType | Yes | ConversationGroupType | 0 : normal group; 1 : filter group. | Response data.group contains the created ConversationGroup /platform api/conversation/overview conversationgroup , including its ID, conversations, type, order, version, and creation time. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. The caller must validate its authority over ownerUserID and the optional conversation. Related pages Conversation overview /platform api/conversation/overview List conversation groups /platform api/conversation/conversation groups/list conversation groups" }, { - "path": "/sdk/react-native/message/creating-messages/create-file-message-by-url", - "title": "Create a file message from a URL", - "description": "OpenIM React Native SDK guide for create a file message from a url.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-file-message-by-url", - "content": "Use createFileMessageByURL to create a message from uploaded file resource information. const message = await OpenIMSDK.createFileMessageByURL filePath: '', fileName: 'product guide.pdf', uuid: 'file 001', sourceUrl: 'https://www.example.com/product guide.pdf', fileSize: 256000, fileType: 'application/pdf', ; Parameters | Parameter | Type | Required | Description | | | | | | | filePath | string | Yes | Local file path. Pass an empty string when only a remote resource is available. | | fileName | string | Yes | File name shown to recipients. | | uuid | string | Yes | File resource ID. | | sourceUrl | string | Yes | URL of the uploaded file. | | fileSize | number | Yes | File size in bytes. | | fileType | string | No | File type. | The call returns a MessageItem ready to send. Use the actual upload result for resource information, then use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss ." + "path": "/platform-api/conversation/conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "OpenIM Enterprise Platform API: update a conversation group's name, extension data, or hidden state.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups update-conversation-group", + "content": "Update a conversation group's display name, extension data, or hidden state. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/update conversation group Request example curl request POST \"$ API ADDRESS /conversation/update conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\",\"name\":\"Priority\",\"ex\":\" \",\"Hidden\":false ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | | name | No | StringValue | New display name. | | ex | No | StringValue | New business extension data. | | Hidden | No | BoolValue | Whether the group is hidden. The request field uses this exact capitalization. | Response data.group contains the updated ConversationGroup /platform api/conversation/overview conversationgroup . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit optional wrapper fields that should remain unchanged. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-card-message", - "title": "Create a contact card message", - "description": "OpenIM React Native SDK guide for create a contact card message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-card-message", - "content": "Use createCardMessage to create a user contact card message. const message = await OpenIMSDK.createCardMessage userID: 'user 002', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', ; Parameters | Parameter | Type | Required | Description | | | | | | | userID | string | Yes | User ID represented by the card. | | nickname | string | Yes | Nickname shown on the card. | | faceURL | string | Yes | Avatar URL shown on the card. | | ex | string | Yes | Card extension data. Pass an empty string when it is not used. | The call returns a MessageItem ready to send. message.cardElem contains the card information passed during creation." + "path": "/platform-api/conversation/conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "OpenIM Enterprise Platform API: delete a conversation group owned by a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups delete-conversation-group", + "content": "Delete a conversation group owned by a user. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/delete conversation group Request example curl request POST \"$ API ADDRESS /conversation/delete conversation group\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"conversationGroupID\":\"conversation group 001\",\"ownerUserID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | conversationGroupID | Yes | string | Conversation group ID. | | ownerUserID | Yes | string | User who owns the group. | Response The common response has errCode: 0 when the group was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Deleting a group does not delete the conversations it contained. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-location-message", - "title": "Create a location message", - "description": "OpenIM React Native SDK guide for create a location message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-location-message", - "content": "Use createLocationMessage to create a location message. const message = await OpenIMSDK.createLocationMessage description: 'Pudong New Area, Shanghai', longitude: 121.4737, latitude: 31.2304, ; Parameters | Parameter | Type | Required | Description | | | | | | | description | string | Yes | Location name or address description. | | longitude | number | Yes | Longitude. | | latitude | number | Yes | Latitude. | The call returns a MessageItem ready to send." + "path": "/platform-api/conversation/conversation-groups/list-conversation-groups", + "title": "List conversation groups", + "description": "OpenIM Enterprise Platform API: get a user's conversation groups and synchronization version.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups list-conversation-groups", + "content": "Get a user's conversation groups and their synchronization version. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /conversation/get conversation groups Request example curl request POST \"$ API ADDRESS /conversation/get conversation groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"maxVersion\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | maxVersion | No | Int64Value | Highest group version already known by the caller. | Response | Property | Type | Description | | | | | | data.groups | ConversationGroup | Group records. See ConversationGroup /platform api/conversation/overview conversationgroup . | | data.maxVersion | int | Highest version represented by this result. | | data.full | bool | Whether the result is a full snapshot. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Treat full and maxVersion as synchronization metadata; do not infer a full snapshot from an empty array alone. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-face-message", - "title": "Create an emoji message", - "description": "OpenIM React Native SDK guide for create an emoji message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-face-message", - "content": "Use createFaceMessage to create an emoji message defined by your application. const message = await OpenIMSDK.createFaceMessage index: 12, data: JSON.stringify url: 'https://www.example.com/emoji.png', , ; index is an emoji index agreed by both clients. data is a custom format string agreed by the sending and receiving clients. Use it to provide emoji identification or rendering information, such as an image URL, a fixed key, or other business data. The call returns a MessageItem ready to send." + "path": "/platform-api/conversation/conversation-groups/set-conversation-group-order", + "title": "Set conversation group order", + "description": "OpenIM Enterprise Platform API: set the display order of a user's conversation groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups set-conversation-group-order", + "content": "Set the display order of multiple conversation groups for a user. HTTP request POST API ADDRESS /conversation/set conversation group order Request example curl request POST \"$ API ADDRESS /conversation/set conversation group order\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"orders\": \"conversationGroupID\":\"conversation group 001\",\"order\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the groups. | | orders | Yes | ConversationGroupOrder | Group IDs and their target order values. See ConversationGroupOrder /platform api/conversation/overview conversationgrouporder . | Response The common response has errCode: 0 when the order was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Supply each target group at most once. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-quote-message", - "title": "Create a reply message", - "description": "OpenIM React Native SDK guide for create a reply message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-quote-message", - "content": "Use createQuoteMessage to create a reply message with the complete original message object. const message = await OpenIMSDK.createQuoteMessage text: 'I agree with this approach.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Reply text. | | message | MessageItem | Yes | Original message being replied to. | The call returns a new MessageItem ready to send. When rendering replies, handle the case where the original message has been deleted or cannot be displayed." + "path": "/platform-api/conversation/conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "OpenIM Enterprise Platform API: add conversations to one or more conversation groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups add-conversations-to-groups", + "content": "Add selected conversations to one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/add conversations to groups Request example curl request POST \"$ API ADDRESS /conversation/add conversations to groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to add. | | conversationGroupIDs | Yes | string | Destination group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Request array limits follow the delivered server version. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-markdown-message", - "title": "Create a Markdown message", - "description": "OpenIM React Native SDK guide for create a markdown message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-markdown-message", - "content": "Use createMarkdownMessage to create a Markdown message. const message = await OpenIMSDK.createMarkdownMessage ' Release complete\\n\\n Android\\n iOS', ; The argument is the complete Markdown source text. createMarkdownMessage only creates the message; it does not render or sanitize Markdown. The call returns a MessageItem ready to send. When displaying untrusted Markdown, use a Markdown renderer with appropriate security controls." + "path": "/platform-api/conversation/conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "OpenIM Enterprise Platform API: remove conversations from one or more conversation groups.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api conversation conversation-groups remove-conversations-from-groups", + "content": "Remove selected conversations from one or more conversation groups owned by the same user. HTTP request POST API ADDRESS /conversation/remove conversations from groups Request example curl request POST \"$ API ADDRESS /conversation/remove conversations from groups\" \\ header \"Content Type: application/json; charset=utf 8\" \\ header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" \\ data raw ' \"ownerUserID\":\"user 001\",\"conversationIDs\": \"si user 001 user 002\" ,\"conversationGroupIDs\": \"conversation group 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | ownerUserID | Yes | string | User who owns the conversations and groups. | | conversationIDs | Yes | string | Conversation IDs to remove. | | conversationGroupIDs | Yes | string | Source group IDs. | Response The common response has errCode: 0 when the memberships were updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Removing a conversation from a group does not delete the conversation. Related pages Conversation overview /platform api/conversation/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-forward-message", - "title": "Create a forwarded message", - "description": "OpenIM React Native SDK guide for create a forwarded message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-forward-message", - "content": "Use createForwardMessage to create a forwarded message from an existing message. const message = await OpenIMSDK.createForwardMessage sourceMessage ; sourceMessage must be a complete MessageItem . The call returns a new MessageItem ready to send to a direct or group chat." + "path": "/platform-api/timer/managing-tasks/create-timer-task", + "title": "Create a timer task", + "description": "OpenIM Enterprise Platform API: schedule a task that invokes a business callback.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks create-timer-task", + "content": "Schedule a task that invokes a configured business handler at the specified time. HTTP request POST API ADDRESS /timer/create timer task Request example curl request POST \"$ API ADDRESS /timer/create timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskName\":\"Reminder\",\"taskCategory\":\"reminder\",\"executeAt\":1719800000000,\"executeBefore\":1719800060000,\"maxRetry\":1,\"callbackConfig\": \"callbackMethod\":\"openim http\",\"callbackPayload\":\" \\\"event\\\":\\\"reminder\\\" \" ,\"userID\":\"user 001\",\"dedupKey\":\"reminder 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskName | Yes | string | Task name. | | taskCategory | Yes | string | Business defined category. | | executeAt | Yes | int | Scheduled Unix time in milliseconds. | | executeBefore | Yes | int | Latest permitted execution time in milliseconds. | | maxRetry | Yes | int | Maximum retry count. | | callbackConfig | Yes | TimerTaskCallbackConfig | See TimerTaskCallbackConfig /platform api/timer/overview timertaskcallbackconfig . | | userID | Yes | string | Associated OpenIM user ID. | | dedupKey | Yes | string | Stable business idempotency key. | Response data.task contains the created TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Reuse dedupKey when retrying the same logical creation request. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-merger-message", - "title": "Create a merged forward message", - "description": "OpenIM React Native SDK guide for create a merged forward message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-merger-message", - "content": "Use createMergerMessage to create a merged forwarded message containing multiple messages. const message = await OpenIMSDK.createMergerMessage messageList: selectedMessages, title: 'Project discussion', summaryList: 'Alex: The release plan is confirmed', 'Lee: I will follow up on testing' , ; Parameters | Parameter | Type | Required | Description | | | | | | | messageList | MessageItem | Yes | Messages to merge. | | title | string | Yes | Title of the merged message. | | summaryList | string | Yes | Summary lines shown for the merged message. | The call returns a MessageItem ready to send. Summary content should follow the display and privacy rules of the current conversation." + "path": "/platform-api/timer/managing-tasks/update-timer-task", + "title": "Update a timer task", + "description": "OpenIM Enterprise Platform API: update timer execution, retry, category, and callback settings.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks update-timer-task", + "content": "Update a timer task's schedule, category, retry policy, or callback configuration. HTTP request POST API ADDRESS /timer/update timer task Request example curl request POST \"$ API ADDRESS /timer/update timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"taskName\":\"Updated reminder\",\"executeAt\":1719900000000,\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | | taskName | No | string | New name. | | taskCategory | No | string | New business category. | | executeAt | No | int | New execution time in Unix milliseconds. | | executeBefore | No | int | New latest execution time in Unix milliseconds. | | maxRetry | No | int | New maximum retry count. | | callbackConfig | No | TimerTaskCallbackConfig | New callback configuration. | Response The common response has errCode: 0 when the task was updated successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Omit fields that should remain unchanged. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-advanced-text-message", - "title": "Create a rich-text message", - "description": "OpenIM React Native SDK guide for create a rich-text message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-text-message", - "content": "Use createAdvancedTextMessage to create a rich text message with message entities. const message = await OpenIMSDK.createAdvancedTextMessage text: 'See https://openim.io', messageEntityList: type: 'url', offset: 4, length: 17, url: 'https://openim.io', , , ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw rich text content. | | messageEntityList | MessageEntity | No | Entities in the text. | Each MessageEntity contains type , offset , and length , with optional url and info . The call returns a MessageItem ready to send. Use Send a message /sdk/react native/message/sending messages/send message to send it." + "path": "/platform-api/timer/managing-tasks/delete-timer-task", + "title": "Delete a timer task", + "description": "OpenIM Enterprise Platform API: delete a specified timer task owned by a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks delete-timer-task", + "content": "Delete a specified timer task owned by a user. HTTP request POST API ADDRESS /timer/delete timer task Request example curl request POST \"$ API ADDRESS /timer/delete timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response The common response has errCode: 0 when the task was deleted successfully. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Do not assume deletion cancels a callback that has already started executing. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", - "title": "Create a rich-text reply", - "description": "OpenIM React Native SDK guide for create a rich-text reply.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", - "content": "Use createAdvancedQuoteMessage to create a rich text reply with an original message reference and text entities. const message = await OpenIMSDK.createAdvancedQuoteMessage text: 'I have reviewed the related link.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw reply text. | | message | MessageItem | Yes | Original message being replied to. | | messageEntityList | MessageEntity | No | Entities in the text. | MessageEntity uses type , offset , and length to describe an entity, with optional url and info . The call returns a MessageItem ready to send." + "path": "/platform-api/timer/managing-tasks/get-timer-task", + "title": "Get a timer task", + "description": "OpenIM Enterprise Platform API: get a timer task by task and user ID.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks get-timer-task", + "content": "Get the complete configuration of a timer task. HTTP request POST API ADDRESS /timer/get timer task Request example curl request POST \"$ API ADDRESS /timer/get timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"taskID\":\"task 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | taskID | Yes | string | Timer task ID. | | userID | Yes | string | User associated with the task. | Response data.task contains the requested TimerTask /platform api/timer/overview timertask . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may access the target user's task. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "Create a targeted group message", - "description": "OpenIM React Native SDK guide for create a targeted group message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", - "content": "Use createTargetedGroupMessage to create a message object delivered only to selected group members. const textMessage = await OpenIMSDK.createTextMessage 'Please review this, relevant members.' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Message object to send selectively. | | dstUserIDs | string | Yes | User IDs of group members who receive the message. | The call returns a MessageItem ready to send. Pass the target group in groupID and use Send a message /sdk/react native/message/sending messages/send message to deliver it." + "path": "/platform-api/timer/managing-tasks/list-timer-tasks", + "title": "List timer tasks", + "description": "OpenIM Enterprise Platform API: list a user's timer tasks by category with pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api timer managing-tasks list-timer-tasks", + "content": "List a user's timer tasks, optionally restricted to selected business categories. HTTP request POST API ADDRESS /timer/list timer task Request example curl request POST \"$ API ADDRESS /timer/list timer task\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"pageCount\":1,\"pageSize\":20,\"userID\":\"user 001\",\"categories\": \"reminder\" ' Request body | Parameter | Required | Type | Description | | | | | | | pageCount | Yes | int | Page number starting at 1 . | | pageSize | Yes | int | Number of records per page. | | userID | Yes | string | User whose tasks are queried. | | categories | Yes | string | Business category filters. | Response data.tasks contains an array of TimerTask /platform api/timer/overview timertask records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Page size limits follow the delivered server version. Related pages Timer overview /platform api/timer/overview" }, { - "path": "/sdk/react-native/message/sending-messages/send-message", - "title": "Send a message", - "description": "OpenIM React Native SDK guide for send a message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message", - "content": "Call sendMessage to send the MessageItem returned by a message creation API. For a direct chat, set recvID ; for a group chat, set groupID . When messages are created from local image, audio, video, or file paths, the SDK uploads the resources during sending. For media messages created with remote URLs, use Send an uploaded media message /sdk/react native/message/sending messages/send message not oss . const sentMessage = await OpenIMSDK.sendMessage recvID: receiverUserID, groupID: '', message, ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | | message | MessageItem | Yes | Message to send. | | offlinePushInfo | OfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. | The call returns the sent MessageItem . When sending progress is available, SendMessageProgress is emitted with progress and message : function handleSendMessageProgress info // ... // Set the listener OpenIMSDK.on OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; // Remove the listener OpenIMSDK.off OpenIMEvent.SendMessageProgress, handleSendMessageProgress ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-management/book-meeting", + "title": "Schedule a meeting", + "description": "OpenIM Enterprise Platform API: schedule a meeting for a future start time.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management book-meeting", + "content": "Schedule a meeting for a future start time. This endpoint is available only in OpenIM Enterprise. HTTP request POST API ADDRESS /rtc meeting/book meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/book meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Weekly sync\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": \"user 002\" ,\"inviteeUserIDs\": \"user 003\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ,\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence rule. Use a non recurring rule when scheduling a single meeting. | Response data.detail contains the created MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Scheduling does not return a real time connection token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate creator, host, co host, invitee, and tenant boundaries on your backend. All meeting times are Unix timestamps in milliseconds; meetingDuration is in seconds. Related pages Create an immediate meeting /platform api/meeting/meeting management/create immediate meeting Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/sending-messages/send-message-not-oss", - "title": "Send an uploaded media message", - "description": "OpenIM React Native SDK guide for send an uploaded media message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message sending-messages send-message-not-oss", - "content": "Call sendMessageNotOss to send an image, audio, video, or file message that already contains remote resource URLs. The SDK does not upload these resources again. const sentMessage = await OpenIMSDK.sendMessageNotOss recvID: receiverUserID, groupID: '', message: uploadedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient user ID for a direct chat; pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat; pass an empty string for a direct chat. | | message | MessageItem | Yes | Message created by a URL based message creation API. | | offlinePushInfo | OfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. | The call returns the sent MessageItem . Resource URLs, sizes, types, and dimensions in message should come from the actual upload result. For local path media messages, use Send a message /sdk/react native/message/sending messages/send message ." + "path": "/platform-api/meeting/meeting-management/create-immediate-meeting", + "title": "Create an immediate meeting", + "description": "OpenIM Enterprise Platform API: create a meeting immediately and return real-time connection details.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management create-immediate-meeting", + "content": "Create a meeting immediately and return the real time audio and video connection details for the creator. HTTP request POST API ADDRESS /rtc meeting/create immediate meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/create immediate meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"creatorUserID\":\"user 001\",\"creatorDefinedMeetingInfo\": \"title\":\"Support call\",\"scheduledTime\":1719800000000,\"meetingDuration\":3600,\"password\":\"\",\"timeZone\":\"Asia/Shanghai\",\"hostUserID\":\"user 001\",\"coHostUSerID\": ,\"inviteeUserIDs\": \"user 002\" ,\"setting\": \"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":true,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"recordOn\":false ' Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Title, schedule metadata, password, host, co hosts, and invitees. | | setting | Yes | MeetingSetting | Meeting level media, joining, locking, and recording settings. | Response | Property | Type | Description | | | | | | data.detail | MeetingInfoSetting | Created meeting details and settings. | | data.liveKit | LiveKit | Real time service URL and access token for the creator. | Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Return data.liveKit only to the authenticated participant for whom it was issued. Related pages Join a meeting /platform api/meeting/meeting management/join meeting Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/receiving-messages/receive-messages", - "title": "Receive messages", - "description": "OpenIM React Native SDK guide for receive messages.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-messages", - "content": "When a new message arrives, OnRecvNewMessage is emitted with one MessageItem . Offline and online only messages are delivered through OnRecvOfflineNewMessage and OnRecvOnlineOnlyMessage ; all three callbacks receive a MessageItem directly. function handleNewMessage message // ... function handleOfflineMessage message // ... function handleOnlineOnlyMessage message // ... // Set the listeners OpenIMSDK.on OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage ; OpenIMSDK.on OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; // Remove the listeners OpenIMSDK.off OpenIMEvent.OnRecvNewMessage, handleNewMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOfflineNewMessage, handleOfflineMessage ; OpenIMSDK.off OpenIMEvent.OnRecvOnlineOnlyMessage, handleOnlineOnlyMessage ; Use clientMsgID to identify messages. Remove the listeners when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-management/join-meeting", + "title": "Join a meeting", + "description": "OpenIM Enterprise Platform API: validate a participant and meeting password, then issue connection details.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management join-meeting", + "content": "Validate the meeting and password, admit a participant, and issue real time connection details. HTTP request POST API ADDRESS /rtc meeting/join meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/join meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\",\"password\":\"123456\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | password | Yes | string | Meeting password; use an empty string for a meeting without a password. | Response data.liveKit contains the LiveKit /platform api/meeting/overview livekit service URL and participant access token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Issue connection details only after authenticating userID in your business system. Do not share or persist the returned participant token outside the meeting session. Related pages Get a meeting token /platform api/meeting/meeting management/get meeting token Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", - "title": "Receive custom business messages", - "description": "OpenIM React Native SDK guide for receive custom business messages.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message receiving-messages receive-custom-business-messages", - "content": "When the server sends a custom business notification, OnRecvCustomBusinessMessage is emitted. Its callback receives business data, not a MessageItem ; ordinary custom chat messages are delivered through the new message events in Receive messages /sdk/react native/message/receiving messages/receive messages . function handleCustomBusinessMessage data // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnRecvCustomBusinessMessage, handleCustomBusinessMessage, ; Validate the received data against your business protocol before processing it. Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-management/get-meeting-token", + "title": "Get a meeting token", + "description": "OpenIM Enterprise Platform API: issue real-time meeting connection details for a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting-token", + "content": "Issue real time audio and video connection details for a specified meeting participant. HTTP request POST API ADDRESS /rtc meeting/get meeting token Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting token\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant for whom the token is issued. | Response data.meetingID identifies the meeting and data.liveKit contains the LiveKit /platform api/meeting/overview livekit URL and participant token. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Authenticate the participant before issuing the token and return it only to that participant. Related pages Join a meeting /platform api/meeting/meeting management/join meeting" }, { - "path": "/sdk/react-native/message/retrieving-messages/load-older-messages", - "title": "Load message history", - "description": "OpenIM React Native SDK guide for load message history.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-older-messages", - "content": "Use getAdvancedHistoryMessageList to page through older messages in a conversation. Pass an empty string for startClientMsgID on the first page, then pass the clientMsgID of the oldest loaded message. const page = await OpenIMSDK.getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, viewType: ViewType.History, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is loaded. | | startClientMsgID | string | Yes | Pagination anchor; pass an empty string for the first page. | | count | number | Yes | Number of messages to load. | | viewType | ViewType | Yes | Use ViewType.History when browsing message history. | Return value The call returns AdvancedGetMessageResult : | Field | Type | Description | | | | | | messageList | MessageItem | Messages on the current page. | | isEnd | boolean | Whether the older boundary has been reached. | | errCode | number | Status code for this history request. | | errMsg | string | Description corresponding to errCode . | Deduplicate messages by clientMsgID before adding messageList to the conversation." + "path": "/platform-api/meeting/meeting-management/update-meeting", + "title": "Update a meeting", + "description": "OpenIM Enterprise Platform API: update selected meeting information, settings, and invitees.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management update-meeting", + "content": "Update selected meeting information, recurrence settings, participant permissions, and invitees. HTTP request POST API ADDRESS /rtc meeting/update meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/update meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"updatingUserID\":\"user 001\",\"title\":\"Updated weekly sync\",\"scheduledTime\":1719900000000,\"meetingDuration\":3600,\"password\":\"123456\",\"timeZone\":\"Asia/Shanghai\",\"repeatInfo\": \"endDate\":1722400000000,\"repeatTimes\":4,\"repeatType\":1,\"interval\":1,\"repeatDaysOfWeek\": 1 ,\"repeatMeetingID\":\"repeat meeting 001\",\"repeatSequence\":1 ,\"canParticipantsEnableCamera\":true,\"canParticipantsUnmuteMicrophone\":true,\"canParticipantsShareScreen\":true,\"disableCameraOnJoin\":false,\"disableMicrophoneOnJoin\":true,\"canParticipantJoinMeetingEarly\":false,\"lockMeeting\":false,\"audioEncouragement\":true,\"videoMirroring\":true,\"inviteeInfo\": \"inviteeUserIDs\": \"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | updatingUserID | Yes | string | User performing the update. | | title | No | StringValue | New title. | | scheduledTime | No | Int64Value | New start time in Unix milliseconds. | | meetingDuration | No | Int64Value | New duration in seconds. | | password | No | StringValue | New password, including an empty value to remove it. | | timeZone | No | StringValue | New creator selected time zone. | | repeatInfo | Yes | MeetingRepeatInfo | Recurrence information associated with this meeting. | | canParticipantsEnableCamera | No | BoolValue | Whether participants may enable cameras. | | canParticipantsUnmuteMicrophone | No | BoolValue | Whether participants may unmute microphones. | | canParticipantsShareScreen | No | BoolValue | Whether participants may share screens. | | disableCameraOnJoin | No | BoolValue | Whether cameras start disabled. | | disableMicrophoneOnJoin | No | BoolValue | Whether microphones start muted. | | canParticipantJoinMeetingEarly | No | BoolValue | Whether participants may join early. | | lockMeeting | No | BoolValue | Whether new participants are blocked from joining. | | audioEncouragement | No | BoolValue | Whether active speaker highlighting is enabled. | | videoMirroring | No | BoolValue | Whether video mirroring is enabled. | | inviteeInfo | Yes | InviteeInfo | Updated invitee user IDs. | Response The common response has errCode: 0 when the update was accepted. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Use wrapper fields to distinguish omitted values from explicit zero, empty, or false values. Related pages Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/retrieving-messages/load-newer-messages", - "title": "Load message history in reverse", - "description": "OpenIM React Native SDK guide for load message history in reverse.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-newer-messages", - "content": "Use getAdvancedHistoryMessageListReverse to load history in the newer direction from a message anchor. const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse conversationID, startClientMsgID: anchorMessage.clientMsgID, count: 30, viewType: ViewType.History, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is loaded. | | startClientMsgID | string | Yes | Message ID used as the newer direction anchor. | | count | number | Yes | Number of messages to load. | | viewType | ViewType | Yes | Use ViewType.History when browsing message history. | The call returns AdvancedGetMessageResult ; messageList contains the current page and isEnd indicates whether the newer boundary has been reached. See Load message history /sdk/react native/message/retrieving messages/load older messages for the other result fields." + "path": "/platform-api/meeting/meeting-management/get-meeting", + "title": "Get a meeting", + "description": "OpenIM Enterprise Platform API: get a meeting's details, settings, and recurrence information.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management get-meeting", + "content": "Get a meeting's system and creator defined information, meeting settings, and recurrence information. HTTP request POST API ADDRESS /rtc meeting/get meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/get meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"meetingID\":\"meeting 001\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the meeting. | | meetingID | Yes | string | Meeting ID. | Response data.meetingDetail contains a MeetingInfoSetting /platform api/meeting/overview meetinginfosetting . Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that the requesting user may view the target meeting. Related pages Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", - "title": "Find messages by ID", - "description": "OpenIM React Native SDK guide for find messages by id.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages find-messages-by-id", - "content": "Use findMessageList to find messages by conversation ID and message ID. It is useful when navigating to a known message from a search result, quote, or notification. const result = await OpenIMSDK.findMessageList conversationID, clientMsgIDList: clientMsgID , , ; const targetMessage = result.findResultItems?. 0 ?.messageList 0 ; Parameters findMessageList receives an array of query conditions. Each item contains: | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the target messages. | | clientMsgIDList | string | Yes | Message IDs to find. | Return value The call returns SearchMessageResult ; ID based results are in findResultItems . Each result item contains conversationID and messageList . A missing message may produce an empty result item or message list. See Search messages /sdk/react native/message/searching messages/search messages for the complete result structure." + "path": "/platform-api/meeting/meeting-management/list-meetings", + "title": "List a user's meetings", + "description": "OpenIM Enterprise Platform API: list meetings created or attended by a user, filtered by status.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management list-meetings", + "content": "List meetings created or attended by a user, restricted to selected meeting statuses. HTTP request POST API ADDRESS /rtc meeting/get meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose meetings are queried. | | status | Yes | string | Meeting status filters. | Response data.meetingDetails contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Status values must match those supported by the delivered meeting service. Related pages Get user related meetings /platform api/meeting/meeting management/get user related meetings" }, { - "path": "/sdk/react-native/message/retrieving-messages/load-message-context", - "title": "Load message context", - "description": "OpenIM React Native SDK guide for load message context.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message retrieving-messages load-message-context", - "content": "Use fetchSurroundingMessages to load messages before and after a known message, such as when opening a result from search or a reply. const messageList = await OpenIMSDK.fetchSurroundingMessages startMessage: targetMessage, viewType: ViewType.Search, before: 20, after: 20, ; Parameters | Parameter | Type | Required | Description | | | | | | | startMessage | MessageItem | Yes | Retrieved anchor message. | | viewType | ViewType | Yes | Context view type; use ViewType.Search for a search result. | | before | number | Yes | Maximum messages to load before the anchor. | | after | number | Yes | Maximum messages to load after the anchor. | The call returns messageList , where messageList contains the retrieved surrounding MessageItem . The number of messages may be less than before + after near a boundary or when messages have been deleted." + "path": "/platform-api/meeting/meeting-management/invite-meeting-users", + "title": "Invite users to a meeting", + "description": "OpenIM Enterprise Platform API: invite users to an existing meeting and return per-user results.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management invite-meeting-users", + "content": "Invite multiple users to an existing meeting and return per user processing results. HTTP request POST API ADDRESS /rtc meeting/invite meeting invitees Request example curl request POST \"$ API ADDRESS /rtc meeting/invite meeting invitees\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"inviterUserID\":\"user 001\",\"inviteeUserIDs\": \"user 002\",\"user 003\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | inviterUserID | Yes | string | User initiating the invitation. | | inviteeUserIDs | Yes | string | Users to invite. | Response | Property | Type | Description | | | | | | data.successUserIDList | string | Users successfully added to the invitation state. | | data.failedUserIDList | string | Users whose invitations failed. | | data.meetingDetail | MeetingInfoSetting | Updated meeting details. | An overall errCode: 0 does not imply that every invitee succeeded; inspect both user ID lists. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Validate that inviterUserID has permission to invite participants. Related pages Meeting overview /platform api/meeting/overview" }, { - "path": "/sdk/react-native/message/searching-messages/search-messages", - "title": "Search messages", - "description": "OpenIM React Native SDK guide for search messages.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message searching-messages search-messages", - "content": "Use searchLocalMessages to search messages already synchronized to the current account's local store. const result = await OpenIMSDK.searchLocalMessages conversationID, keywordList: 'release' , messageTypeList: MessageType.TextMessage , pageIndex: 1, count: 20, ; Parameters keywordList can contain one or more keywords. A search field typically supplies one keyword after trimming surrounding whitespace and removing empty values. | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation to search. | | keywordList | string | Yes | Keywords to search for. | | keywordListMatchType | number | No | Match mode for multiple keywords: 0 matches any keyword OR , and 1 requires all keywords AND . Omitted values use 0 . | | senderUserIDList | string | No | Restrict results to messages sent by these users. | | messageTypeList | MessageType | No | Restrict results to the specified message types, such as text and mention messages. | | searchTimePosition | number | No | Search end position as a Unix timestamp in seconds. | | searchTimePeriod | number | No | Search range backward from searchTimePosition , in seconds. | | pageIndex | number | No | Result page, starting at 1 . | | count | number | No | Number of messages per page. | Return value The call returns SearchMessageResult : | Field | Type | Description | | | | | | totalCount | number | Number of messages matching the current conditions. | | searchResultItems | SearchMessageResultItem | Results organized by conversation. | Each SearchMessageResultItem contains conversation information and messageList . When keywords or filters change, restart from page one so results from different conditions are not mixed. To load messages around a hit, see Load message context /sdk/react native/message/retrieving messages/load message context ." + "path": "/platform-api/meeting/meeting-management/leave-meeting", + "title": "Leave a meeting", + "description": "OpenIM Enterprise Platform API: remove a specified user's active participation in a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management leave-meeting", + "content": "Make a specified participant leave the current meeting without ending the meeting for everyone else. HTTP request POST API ADDRESS /rtc meeting/leave meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/leave meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 002\" ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant leaving the meeting. | Response The common response has errCode: 0 when the participant state was updated. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. This operation does not end or cancel the meeting. Related pages End a meeting /platform api/meeting/meeting management/end meeting" }, { - "path": "/sdk/react-native/message/composing-messages/update-typing-status", - "title": "Report typing status", - "description": "OpenIM React Native SDK guide for report typing status.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages update-typing-status", - "content": "Use typingStatusUpdate to send a typing hint to the other participant in a direct chat. await OpenIMSDK.typingStatusUpdate recvID: receiverUserID, msgTip: 'Typing...', ; Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Yes | User ID receiving the typing hint. | | msgTip | string | Yes | Typing hint text to send. | After the call completes, the typing hint has been sent. To update the current account's input state based on conversation focus, use Update input states /sdk/react native/message/composing messages/change input states ." + "path": "/platform-api/meeting/meeting-management/end-meeting", + "title": "End or cancel a meeting", + "description": "OpenIM Enterprise Platform API: cancel a scheduled meeting or end an active meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management end-meeting", + "content": "Cancel a scheduled meeting or end an active meeting for all participants. HTTP request POST API ADDRESS /rtc meeting/end meeting Request example curl request POST \"$ API ADDRESS /rtc meeting/end meeting\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"meetingID\":\"meeting 001\",\"userID\":\"user 001\",\"endType\":1 ' Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | endType | Yes | MeetingEndType | 0 CancelType cancels a scheduled meeting; 1 EndType ends an active meeting. | Response The common response has errCode: 0 when the requested state transition completed. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent business permission before ending a meeting for all participants. Related pages Leave a meeting /platform api/meeting/meeting management/leave meeting" }, { - "path": "/sdk/react-native/message/composing-messages/get-typing-status", - "title": "Get typing status", - "description": "OpenIM React Native SDK guide for get typing status.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages get-typing-status", - "content": "Use getInputStates to query a user's current input state in a conversation. const platformIDs = await OpenIMSDK.getInputStates conversationID, userID, ; const isTyping = platformIDs.length 0; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Target conversation ID. | | userID | string | Yes | User ID whose input state is queried. | The call returns an array of platform IDs currently reporting input. An empty array means that no platform is currently reporting input. To keep the display current, handle the OnInputStatusChanged event described in Update input states /sdk/react native/message/composing messages/change input states ." + "path": "/platform-api/meeting/meeting-management/get-user-related-meetings", + "title": "Get user-related meetings", + "description": "OpenIM Enterprise Platform API: list meetings related to a user by status and time range.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-management get-user-related-meetings", + "content": "List meetings related to a user by meeting status and optional time range. HTTP request POST API ADDRESS /rtc meeting/get user related meetings Request example curl request POST \"$ API ADDRESS /rtc meeting/get user related meetings\" header \"Content Type: application/json\" header \"operationID: $ OPERATION ID \" header \"token: $ TOKEN \" data raw ' \"userID\":\"user 001\",\"status\": \"scheduled\" ,\"startTime\":1719800000000,\"endTime\":1722400000000 ' Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose related meetings are queried. | | status | Yes | string | Meeting status filters. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | Response data.meetings contains MeetingInfoSetting /platform api/meeting/overview meetinginfosetting records matching both the status and time constraints. Errors See Error codes /platform api/error codes . Permissions and limits Available only in OpenIM Enterprise. Ensure endTime is not earlier than startTime . Related pages List a user's meetings /platform api/meeting/meeting management/list meetings" }, { - "path": "/sdk/react-native/message/composing-messages/check-speech-to-text", - "title": "Check audio transcription availability", - "description": "OpenIM React Native SDK guide for check audio transcription availability.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages check-speech-to-text", - "content": "speechToTextCapabilities is used only to query supported audio formats, sample rates, recording duration, and file size limits. The interface that actually performs speech recognition is Transcribe audio /sdk/react native/message/composing messages/transcribe audio . const capabilities = await OpenIMSDK.speechToTextCapabilities ; Return value The call returns SpeechToTextCapabilities : | Field | Type | Description | | | | | | format | string | Supported audio formats. | | sampleRateHz | number | Required audio sample rate in hertz. | | maxRecordTimeMs | number | Maximum recording duration in milliseconds. | | maxFileSize | number | Maximum file size in bytes. | | provider | string | Current speech recognition provider. |" + "path": "/platform-api/meeting/meeting-settings/set-personal-setting", + "title": "Set personal meeting preferences", + "description": "Set a user's camera and microphone preferences for joining a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings set-personal-setting", + "content": "Set a user's camera and microphone preferences for joining a meeting. HTTP request POST API ADDRESS /rtc meeting/set personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | | cameraOnEntry | No | BoolValue | Whether the camera is enabled on entry. | | microphoneOnEntry | No | BoolValue | Whether the microphone is enabled on entry. | Response errCode: 0 means the preference update succeeded. Permissions and limits Available only in OpenIM Enterprise. Omit wrapper values that should remain unchanged; explicit false disables the preference." }, { - "path": "/sdk/react-native/message/composing-messages/transcribe-audio", - "title": "Transcribe audio", - "description": "OpenIM React Native SDK guide for transcribe audio.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages transcribe-audio", - "content": "Use speechToText to transcribe a local audio file that the SDK can read. Pass a local path, not a remote URL, Base64 data, or an uploaded file name. const text = await OpenIMSDK.speechToText filename ; filename is the local audio file path. The call returns text , where text is the transcription. See Check speech recognition support /sdk/react native/message/composing messages/check speech to text when capability information is needed; to save the result in a local voice message, see Save a local transcript /sdk/react native/message/composing messages/save local transcript ." + "path": "/platform-api/meeting/meeting-settings/get-personal-setting", + "title": "Get personal meeting preferences", + "description": "Get a user's camera and microphone preferences for a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings get-personal-setting", + "content": "Get a user's personal audio and video preferences for a meeting. HTTP request POST API ADDRESS /rtc meeting/get personal setting Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | Participant user ID. | Response data.setting contains a PersonalMeetingSetting /platform api/meeting/overview personalmeetingsetting with cameraOnEntry and microphoneOnEntry . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may read the participant's meeting preferences." }, { - "path": "/sdk/react-native/message/composing-messages/save-local-transcript", - "title": "Save a local transcript", - "description": "OpenIM React Native SDK guide for save a local transcript.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages save-local-transcript", - "content": "Use setMessageLocalContent to save transcription text in a voice message on the current device. Pass the complete message object and preserve its existing fields. const updatedMessage = ...message, soundElem: ...message.soundElem, text: text: transcript, translate: message.soundElem?.text?.translate ?? , , , ; await OpenIMSDK.setMessageLocalContent conversationID, message: updatedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | MessageItem | Yes | Complete message object containing the transcription. | After the call completes, the transcription is saved in the message content on the current device." + "path": "/platform-api/meeting/meeting-settings/operate-all-streams", + "title": "Control participant media streams", + "description": "Control camera and microphone state across meeting participants.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings operate-all-streams", + "content": "Apply camera or microphone state changes across meeting participants. HTTP request POST API ADDRESS /rtc meeting/operate meeting all stream Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | operatorUserID | Yes | string | User performing the operation. | | cameraOnEntry | No | BoolValue | Target camera state. | | microphoneOnEntry | No | BoolValue | Target microphone state. | Response data.streamNotExistUserIDList identifies participants without a matching media stream. data.failedUserIDList identifies other failed operations. Inspect both lists even when errCode is 0 . Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." }, { - "path": "/sdk/react-native/message/composing-messages/change-input-states", - "title": "Update input states", - "description": "OpenIM React Native SDK guide for update input states.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message composing-messages change-input-states", - "content": "Use changeInputStates to update the current account's input state in a conversation. Pass focus: true while typing, and false after sending, losing focus, or leaving the conversation. await OpenIMSDK.changeInputStates conversationID, focus: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose input state is updated. | | focus | boolean | Yes | true means the user is typing; false means typing has stopped. | Avoid reporting the same state on every keyboard event. When the state changes, OnInputStatusChanged is emitted with conversationID , userID , and platformIDs . function handleInputStatusChanged inputStatus // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnInputStatusChanged, handleInputStatusChanged ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-settings/modify-participant-name", + "title": "Modify a participant name", + "description": "Change a participant's display name within a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings modify-participant-name", + "content": "Change a participant's display name within a meeting without changing the user's global profile. HTTP request POST API ADDRESS /rtc meeting/modify meeting participant name Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserID | Yes | string | Target participant. | | nickname | Yes | string | New in meeting display name. | Response errCode: 0 means the in meeting name was updated. Permissions and limits Available only in OpenIM Enterprise. This operation does not update UserInfo.nickname ." }, { - "path": "/sdk/react-native/message/managing-messages/delete-local-message", - "title": "Delete a local message", - "description": "OpenIM React Native SDK guide for delete a local message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-local-message", - "content": "Use deleteMessageFromLocalStorage to delete one message from a conversation on the current device. await OpenIMSDK.deleteMessageFromLocalStorage conversationID, clientMsgID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | ID of the message to delete. | After the call completes, the target message is deleted on the current device." + "path": "/platform-api/meeting/meeting-settings/remove-participants", + "title": "Remove meeting participants", + "description": "Remove selected participants from a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings remove-participants", + "content": "Remove selected participants from an active meeting. HTTP request POST API ADDRESS /rtc meeting/remove participants Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | participantUserIDs | Yes | string | Participants to remove. | Response Inspect data.successUserIDList and data.failedUserIDList ; a successful envelope can still contain per user failures. Permissions and limits Available only in OpenIM Enterprise. Require host or equivalent moderation permission." }, { - "path": "/sdk/react-native/message/managing-messages/delete-saved-messages", - "title": "Delete messages in a batch", - "description": "OpenIM React Native SDK guide for delete messages in a batch.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-saved-messages", - "content": "Use deleteMessages to delete multiple messages from one conversation. await OpenIMSDK.deleteMessages conversationID, clientMsgIDs, isSync: true, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the messages. | | clientMsgIDs | string | Yes | IDs of the messages to delete; all must belong to the same conversation. | | isSync | boolean | Yes | Whether to synchronize deletion to the other participant. true deletes the messages for both participants; false deletes them only for the current account. In either case, the deletion is synchronized to the current account's other devices. | After the call completes, the deletion request has completed. With isSync: true , the other participant also deletes the messages; with false , only the current account deletes them. Listen for message deletion When messages are deleted, OnMsgDeleted is emitted with the deleted MessageItem . Use clientMsgID to update the corresponding message list. function handleMessageDeleted message // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnMsgDeleted, handleMessageDeleted ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-settings/set-meeting-host", + "title": "Set meeting hosts", + "description": "Set the host and co-hosts of a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings set-meeting-host", + "content": "Set the primary host and co host list of a meeting. HTTP request POST API ADDRESS /rtc meeting/set meeting host info Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | userID | Yes | string | User performing the operation. | | hostUserID | No | StringValue | New primary host. | | coHostUserIDs | Yes | string | Complete co host user ID list. | Response errCode: 0 means host information was updated. Permissions and limits Available only in OpenIM Enterprise. Validate role transfer authority before changing the primary host." }, { - "path": "/sdk/react-native/message/managing-messages/delete-user-messages", - "title": "Delete all messages from a user in a group chat", - "description": "OpenIM React Native SDK guide for delete all messages from a user in a group chat.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages delete-user-messages", - "content": "Use deleteUserAllMessagesInConv to delete all messages from a specified user in a group conversation. await OpenIMSDK.deleteUserAllMessagesInConv conversationID, userID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Target group conversation ID. | | userID | string | Yes | User whose messages are deleted. | This is a group management operation. After it completes, the deletion request has completed; the server validates permissions. Listen for deletion of a user's messages After deletion, OnDeleteUserAllMsgsInConv is emitted with conversationID and userID . Use them to remove that user's messages from the target conversation. function handleUserMessagesDeleted data // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnDeleteUserAllMsgsInConv, handleUserMessagesDeleted, ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-settings/clean-previous-meetings", + "title": "Clean previous meeting state", + "description": "Clear stale meeting connection state retained before a user logs in.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-settings clean-previous-meetings", + "content": "Clear stale meeting connection state retained before a user starts a new login session. HTTP request POST API ADDRESS /rtc meeting/clean previous meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose stale state is cleared. | | reasonCode | Yes | int | Business reason code. | | reason | Yes | string | Human readable cleanup reason. | Response errCode: 0 means stale meeting state was cleared. Permissions and limits Available only in OpenIM Enterprise. Use this for stale connection recovery, not as a general meeting history deletion API." }, { - "path": "/sdk/react-native/message/managing-messages/revoke-a-message", - "title": "Revoke a message", - "description": "OpenIM React Native SDK guide for revoke a message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages revoke-a-message", - "content": "Use revokeMessage to revoke a sent message. Conversation members then see the message's revoked state. await OpenIMSDK.revokeMessage conversationID, clientMsgID, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | ID of the message to revoke. | After the call completes, the revocation request has completed. The server validates which messages, senders, and time ranges are eligible. Listen for message revocation When a message is revoked, OnNewRecvMessageRevoked is emitted with RevokedInfo . Use its clientMsgID to update the message's revoked state. function handleMessageRevoked revokedInfo // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnNewRecvMessageRevoked, handleMessageRevoked ; Remove the listener when the component is destroyed, the account signs out, or the account changes. To remove a message only from the current device, use Delete a local message /sdk/react native/message/managing messages/delete local message ." + "path": "/platform-api/meeting/recurring-meetings/create-repeat-meeting", + "title": "Create a recurring meeting", + "description": "Create a recurrence rule and generate its first meeting instance.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings create-repeat-meeting", + "content": "Create a recurrence definition and generate its first meeting instance. HTTP request POST API ADDRESS /rtc meeting/create repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Meeting series creator. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Shared title, schedule, host, and invitees. | | setting | Yes | MeetingSetting | Shared meeting settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Recurrence end, count, type, interval, and weekdays. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . data.generatedMeeting contains the first MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instance. Permissions and limits Available only in OpenIM Enterprise. Validate recurrence boundaries and the creator's authority over all invitees." + }, + { + "path": "/platform-api/meeting/recurring-meetings/update-repeat-meeting", + "title": "Update a recurring meeting", + "description": "Update a recurrence definition and its future meeting instances.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings update-repeat-meeting", + "content": "Update a recurrence definition and the future instances generated from it. HTTP request POST API ADDRESS /rtc meeting/update repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | updatingUserID | Yes | string | User performing the update. | | creatorDefinedMeetingInfo | Yes | CreatorDefinedMeetingInfo | Updated shared meeting information. | | setting | Yes | MeetingSetting | Updated shared settings. | | repeatInfo | Yes | MeetingRepeatInfoReq | Updated recurrence rule. | Response Returns updated data.repeatMeeting and the affected data.generatedMeeting . Permissions and limits Available only in OpenIM Enterprise. Do not assume completed or historical instances are rewritten." }, { - "path": "/sdk/react-native/message/managing-messages/modify-a-message", - "title": "Modify a message", - "description": "OpenIM React Native SDK guide for modify a message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages modify-a-message", - "content": "Use modifyMessage to modify an existing message in a conversation. const updatedMessage = ...message, textElem: ...message.textElem, content: editedText, , ; const modifiedMessage = await OpenIMSDK.modifyMessage conversationID, message: updatedMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | MessageItem | Yes | Complete modified message. Preserve its original clientMsgID and other required fields. | Return value The call returns the server confirmed MessageItem . You can replace the message with the same clientMsgID in your list. The server validates permitted message types, senders, and time limits. Listen for message modification When a message is modified, OnMessageModified is emitted with the modified MessageItem directly. function handleMessageModified message // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnMessageModified, handleMessageModified ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnMessageModified, handleMessageModified ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/recurring-meetings/delete-repeat-meeting", + "title": "Delete a recurring meeting", + "description": "Delete a recurring meeting definition.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings delete-repeat-meeting", + "content": "Delete a recurring meeting definition. HTTP request POST API ADDRESS /rtc meeting/delete repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | | operatorUserID | Yes | string | User performing the deletion. | Response errCode: 0 means the recurrence definition was deleted. Permissions and limits Available only in OpenIM Enterprise. This response does not state that historical meeting instances or recordings were deleted." }, { - "path": "/sdk/react-native/message/managing-messages/insert-local-single-message", - "title": "Insert a local one-to-one message", - "description": "OpenIM React Native SDK guide for insert a local one-to-one message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-single-message", - "content": "Use insertSingleMessageToLocalStorage to write one message to the current device's direct chat history. await OpenIMSDK.insertSingleMessageToLocalStorage message, recvID, sendID, ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Complete message object to write. | | recvID | string | Yes | Direct chat recipient user ID. | | sendID | string | Yes | Message sender user ID. | After the call completes, the message is written to the current device's direct chat history. To send it to the other participant, use Send a message /sdk/react native/message/sending messages/send message ." + "path": "/platform-api/meeting/recurring-meetings/get-repeat-meeting", + "title": "Get a recurring meeting", + "description": "Get a recurring meeting definition and generation state.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings get-repeat-meeting", + "content": "Get a recurrence definition, generation progress, next schedule time, and status. HTTP request POST API ADDRESS /rtc meeting/get repeat meeting Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.repeatMeeting contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata . Permissions and limits Available only in OpenIM Enterprise. Validate that the caller may view the series." }, { - "path": "/sdk/react-native/message/managing-messages/insert-local-group-message", - "title": "Insert a local group message", - "description": "OpenIM React Native SDK guide for insert a local group message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages insert-local-group-message", - "content": "Use insertGroupMessageToLocalStorage to write one message to the current device's group chat history. await OpenIMSDK.insertGroupMessageToLocalStorage message, groupID, sendID, ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Complete message object to write. | | groupID | string | Yes | Target group ID. | | sendID | string | Yes | Message sender user ID. | After the call completes, the message is written to the current device's group chat history. To send a message to group members, use Send a message /sdk/react native/message/sending messages/send message ." + "path": "/platform-api/meeting/recurring-meetings/list-repeat-meetings", + "title": "List recurring meetings", + "description": "List recurring meeting definitions created by a user.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meetings", + "content": "List recurring meeting definitions created by a user. HTTP request POST API ADDRESS /rtc meeting/list repeat meetings Request body | Parameter | Required | Type | Description | | | | | | | creatorUserID | Yes | string | Series creator. | Response data.repeatMeetings contains RepeatMeetingData /platform api/meeting/overview repeatmeetingdata records. These are recurrence definitions, not individual instances. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/message/managing-messages/clear-all-local-messages", - "title": "Clear all local messages", - "description": "OpenIM React Native SDK guide for clear all local messages.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-local-messages", - "content": "Use deleteAllMsgFromLocal to clear all messages for the current account on the current device. await OpenIMSDK.deleteAllMsgFromLocal ; This account level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, all messages on the current device are cleared; server history remains available." + "path": "/platform-api/meeting/recurring-meetings/list-repeat-meeting-instances", + "title": "List recurring meeting instances", + "description": "List meeting instances generated for a recurring meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting recurring-meetings list-repeat-meeting-instances", + "content": "List individual meeting instances already generated for a recurring meeting. HTTP request POST API ADDRESS /rtc meeting/list repeat meeting instances Request body | Parameter | Required | Type | Description | | | | | | | repeatMeetingID | Yes | string | Recurring meeting ID. | Response data.meetings contains generated MeetingInfoSetting /platform api/meeting/overview meetinginfosetting instances. Permissions and limits Available only in OpenIM Enterprise. Future instances not yet generated are not represented in this array." }, { - "path": "/sdk/react-native/message/managing-messages/clear-all-messages", - "title": "Clear local and server messages", - "description": "OpenIM React Native SDK guide for clear local and server messages.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages clear-all-messages", - "content": "Use deleteAllMsgFromLocalAndSvr to clear all messages saved for the current account locally and on the server. await OpenIMSDK.deleteAllMsgFromLocalAndSvr ; This account level operation cannot be undone. Explain its scope and ask for confirmation before calling it. After the call completes, local and server deletion requests have completed; copies already saved by other conversation members are not affected." + "path": "/platform-api/meeting/meeting-records/get-user-meeting-histories", + "title": "Get a user's meeting history", + "description": "List a user's meeting attendance history by time, status, and pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-user-meeting-histories", + "content": "List a user's meeting attendance history. HTTP request POST API ADDRESS /rtc meeting/get user meeting histories Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Participant user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | | status | Yes | string | Meeting status filters. | Response data.total is the matching count. data.meetingHistories contains UserMeetingHistory /platform api/meeting/overview usermeetinghistory records. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/message/managing-messages/set-message-local-ex", - "title": "Set a local message extension", - "description": "OpenIM React Native SDK guide for set a local message extension.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-messages set-message-local-ex", - "content": "Use setMessageLocalEx to save local extension data for a message on the current device. await OpenIMSDK.setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify expanded: true , ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | Target message ID. | | localEx | string | Yes | Local extension string. It can contain JSON or another format of business extension data. | After the call completes, the local extension data is saved in the message on the current device." + "path": "/platform-api/meeting/meeting-records/get-user-hosted-meetings", + "title": "Get meetings hosted by a user", + "description": "List meetings hosted by a user by time range and pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-user-hosted-meetings", + "content": "List meetings hosted by a user. HTTP request POST API ADDRESS /rtc meeting/get user hosted meetings Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | Host user ID. | | startTime | No | int | Range start in Unix milliseconds. | | endTime | No | int | Range end in Unix milliseconds. | | pagination | No | RequestPagination | Page settings. | Response data.total is the matching count. data.hostedMeetings contains HostedMeeting /platform api/meeting/overview hostedmeeting records. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", - "title": "Report group messages as read", - "description": "OpenIM React Native SDK guide for report group messages as read.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-read-status send-group-read-receipts", - "content": "Use sendGroupMessageReadReceipt to report messages read in a group chat. await OpenIMSDK.sendGroupMessageReadReceipt conversationID, clientMsgIDs, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgIDs | string | Yes | IDs of messages that were read; all must belong to the group conversation. | After the call completes, the read receipt has been reported. To update the conversation unread count, see Mark a conversation as read /sdk/react native/conversation/managing conversations/mark conversation read . Listen for group read status changes When group message read status changes, OnRecvGroupReadReceipt is emitted with GroupMessageReceiptInfo , including conversationID , read and unread counts, and readers for each message. function handleGroupReadReceipt payload // ... // Set the listener OpenIMSDK.on OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; // Remove the listener OpenIMSDK.off OpenIMEvent.OnRecvGroupReadReceipt, handleGroupReadReceipt ; Remove the listener when the component is destroyed, the account signs out, or the account changes." + "path": "/platform-api/meeting/meeting-records/get-meeting-records", + "title": "Get meeting recordings", + "description": "List meeting recordings by host, participant, time range, and pagination.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-records", + "content": "List recordings for meetings hosted or attended by selected users. HTTP request POST API ADDRESS /rtc meeting/get meeting records Request body | Parameter | Required | Type | Description | | | | | | | hostUserID | Yes | string | Host filter. | | joinedUserID | Yes | string | Participant filter. | | startTime | Yes | int | Range start in Unix milliseconds. | | endTime | Yes | int | Range end in Unix milliseconds. | | pagination | Yes | RequestPagination | Page settings. | Response data.total is the matching count. data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries, including files and recording status. Permissions and limits Available only in OpenIM Enterprise. Treat URLs as protected recording resources and apply business authorization before returning them." }, { - "path": "/sdk/react-native/message/managing-read-status/get-group-message-readers", - "title": "Get members who read a group message", - "description": "OpenIM React Native SDK guide for get members who read a group message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message managing-read-status get-group-message-readers", - "content": "Use getGroupMessageReaderList to page through members who have or have not read a group message. const members = await OpenIMSDK.getGroupMessageReaderList conversationID, clientMsgID, filter: GroupMessageReaderFilter.Read, offset: 0, count: 50, ; Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgID | string | Yes | Message ID whose read status is queried. | | filter | GroupMessageReaderFilter | Yes | Member filter. Read returns readers and Unread returns members who have not read the message. | | offset | number | Yes | Pagination offset; use 0 for the first page. | | count | number | Yes | Number of members to retrieve. | The call returns the current page as GroupMemberItem . See Group overview /sdk/react native/group/overview group for member fields; increase offset for subsequent pages." + "path": "/platform-api/meeting/meeting-records/get-records-by-meeting-ids", + "title": "Get recordings by meeting IDs", + "description": "Get recording records for selected meeting IDs.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-records-by-meeting-ids", + "content": "Get recording records for selected meetings. HTTP request POST API ADDRESS /rtc meeting/get meeting records by meeting ids Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User requesting the recordings. | | meetingIDs | Yes | string | Meeting IDs to query. | Response data.meetingRecords contains MeetingRecord /platform api/meeting/overview meetingrecord entries. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every meeting ID." }, { - "path": "/sdk/react-native/file-uploads/upload-file", - "title": "Upload a file", - "description": "Upload a file independently and obtain its remote URL with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native file-uploads upload-file", - "content": "Use uploadFile to upload a local file independently. You can use it for avatars, group avatars, profile attachments, or other business files. const url = await OpenIMSDK.uploadFile name: 'avatar.png', contentType: 'image/png', uuid: 'avatar upload 20260827', cause: 'user avatar', filepath, ; Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | The file name used for the upload. | | contentType | string | Yes | The MIME type of the file. | | uuid | string | Yes | The business identifier for this upload. | | cause | string | No | The business defined reason for the upload. | | filepath | string | Yes | A local file path that the app can read. | When the call completes, it returns the remote resource URL in url . You can use the URL to update an avatar, store a business attachment, or create and send a URL based media message. Listen for upload status UploadOnProgress is triggered during the upload. Its callback parameter includes the uploaded amount in current and the total file size in size . UploadComplete is triggered when the upload completes. Its callback parameter's data includes fileSize , streamSize , and storageSize . function handleUploadProgress current, size // ... function handleUploadComplete data // ... // Register listeners OpenIMSDK.on OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.on OpenIMEvent.UploadComplete, handleUploadComplete ; // Remove listeners OpenIMSDK.off OpenIMEvent.UploadOnProgress, handleUploadProgress ; OpenIMSDK.off OpenIMEvent.UploadComplete, handleUploadComplete ; Remove the listeners when the component is destroyed, the user signs out, or the account changes." + "path": "/platform-api/meeting/meeting-records/get-meeting-attendance", + "title": "Get meeting attendance", + "description": "Get the users who attended or were absent from a meeting.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records get-meeting-attendance", + "content": "Get attendance results for a meeting. HTTP request POST API ADDRESS /rtc meeting/get meeting attendance Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | Response data.joinedUserIDs lists attendees and data.absentUserIDs lists invitees recorded as absent. Permissions and limits Available only in OpenIM Enterprise. Attendance reflects meeting service records, not arbitrary business attendance rules." }, { - "path": "/sdk/react-native/calling/overview-calling", - "title": "Audio and video calling overview", - "description": "OpenIM React Native SDK guide for audio and video calling.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling overview-calling", - "content": "OpenIM React Native SDK provides calling signaling APIs for starting and handling call invitations, querying room information, and synchronizing call state. It handles call business signaling only; it does not capture or play audio and video, connect to media rooms, or render call UI. After starting or accepting a call, the SDK returns room credentials such as roomID , token , and liveURL . The application passes these credentials to a real time audio and video media engine to join the call room, and handles device permissions, media tracks, weak network strategy, and UI state itself. Call flow 1. Call signalingInvite to start a one to one call, or signalingInviteInGroup to start a group call. 2. Invitees receive the call invitation through OnReceiveNewInvitation and choose whether to accept or reject it. 3. After accepting, call signalingAccept and use the returned room credentials to join the call room. 4. During the call, update the call UI based on invitation status, participant status, media stream status, and custom signals. 5. The inviter can cancel an invitation that has not connected; call participants can hang up an established call. Core data | Data | Description | | | | | RtcInvite | Call invitation containing the inviter, invitees, group, room, media type, timeout, and session type. | | RtcInviteResults | The roomID , token , and liveURL returned after starting or accepting a call, or querying room credentials. | | CallingRoomData | Room ID, invitation information, and participant information returned when querying by group. | | OnReceiveNewInvitationPayload | Event parameter for a received call invitation, containing invitation , optional offlinePushInfo , and participant information. | customData and custom signals are both application defined strings. Use JSON or another format required by the application protocol. Call state After calling the start, accept, reject, cancel, or hang up API, update the UI for the current action from the corresponding result. Call state from other users or devices is received through events. Use roomID to distinguish calls; use both roomID and userID to distinguish participant state. For invitation lifecycle, participant room entry and room exit, and media stream listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events . For custom signal listeners, see Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal . Browse by task | Task | Page | | | | | Start a one to one or group call | Start a one to one call /sdk/react native/calling/managing calls/start single call , Start a group call /sdk/react native/calling/managing calls/start group call | | Accept or reject an invitation | Accept a call /sdk/react native/calling/managing calls/accept call , Reject a call /sdk/react native/calling/managing calls/reject call | | Cancel an invitation or hang up a call | Cancel a call invitation /sdk/react native/calling/managing calls/cancel call , Hang up a call /sdk/react native/calling/managing calls/hang up call | | Query a room or restore a pending invitation | Get a group call room /sdk/react native/calling/retrieving call information/get room by group id , Get room credentials /sdk/react native/calling/retrieving call information/get token by room id , Restore a pending invitation /sdk/react native/calling/retrieving call information/restore pending invitation | | Handle events and custom signals | Handle call events /sdk/react native/calling/managing calls/handle call events , Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal |" + "path": "/platform-api/meeting/meeting-records/delete-meeting-records", + "title": "Delete meeting recordings", + "description": "Delete recording records by meeting or real-time room ID.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-records delete-meeting-records", + "content": "Delete recording records for selected meeting or real time room IDs. HTTP request POST API ADDRESS /rtc meeting/delete meeting records Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time room IDs. | Response errCode: 0 means the requested recording records were deleted. Permissions and limits Available only in OpenIM Enterprise. This is destructive. Validate recording ownership and retention policy before calling it." }, { - "path": "/sdk/react-native/calling/managing-calls/start-single-call", - "title": "Start a one-to-one call", - "description": "Start a one-to-one audio or video call with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-single-call", - "content": "Call signalingInvite to start a one to one audio or video call. The call returns room credentials that the app can use to connect a real time audio and video media engine with roomID , token , and liveURL . const roomCredentials = await OpenIMSDK.signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , groupID: '', roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Single, platformID: currentPlatform, , ; Parameters | Parameter | Type | Required | Description | | | | | | | invitation | RtcInvite | Yes | The call invitation. | | invitation.inviterUserID | string | Yes | User ID of the user starting the call. | | invitation.inviteeUserIDList | string | Yes | Invited user IDs. For a one to one call, provide the other user's ID. | | invitation.groupID | string | Yes | Pass an empty string for a one to one call. | | invitation.roomID | string | Yes | Room ID for this call. Subsequent call operations and state handling use this value to identify the call. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Media type, such as audio or video . | | invitation.sessionType | SessionType | Yes | Pass SessionType.Single for a one to one call. | | invitation.platformID | Platform | Yes | Inviter platform. Pass the Platform enum value for the current client. | | invitation.customData | string | No | Application defined extension string sent with the invitation. | | invitation.initiateTime | number | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | | invitation.busyLineUserIDList | string | No | Busy user list. It is usually omitted when starting a new invitation. | | offlinePushInfo | OfflinePush | No | Push content for invited users when they are offline. | | offlinePushInfo.title | string | Conditional | Push title when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string when offlinePushInfo is provided. Pass an empty string when there is no content. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether to update the iOS badge when offlinePushInfo is provided. | Return value The call returns RtcInviteResults : | Field | Type | Description | | | | | | roomID | string | Call room ID. | | token | string | Credential for joining the call room. | | liveURL | string | Room address returned by the calling service. | | busyLineUserIDList | string | IDs of invited users that are currently busy. | The invitee receives OnReceiveNewInvitation with OnReceiveNewInvitationPayload . For acceptance, rejection, cancellation, and hang up events, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/platform-api/meeting/meeting-signaling/get-room-by-group-id", + "title": "Get a call room by group ID", + "description": "Get the active real-time call room and participants associated with a group.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-room-by-group-id", + "content": "Get the active real time call room associated with a group. HTTP request POST API ADDRESS /rtc meeting/signal get room by group id Request body | Parameter | Required | Type | Description | | | | | | | groupID | Yes | string | OpenIM group ID. | Response Returns data.invitation , participant metadata, and data.roomID . Participant metadata combines group, group member, and user information for the active room. Permissions and limits Available only in OpenIM Enterprise. Validate access to the group before returning live room state." }, { - "path": "/sdk/react-native/calling/managing-calls/start-group-call", - "title": "Start a group call", - "description": "Start a group audio or video call with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls start-group-call", - "content": "Call signalingInviteInGroup to start a group audio or video call. groupID identifies the group where the call starts. inviteeUserIDList specifies the members to invite; it does not automatically invite every group member. const roomCredentials = await OpenIMSDK.signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: memberUserIDs, groupID, roomID, timeout: 30, mediaType: 'video', sessionType: SessionType.Group, platformID: currentPlatform, , ; Parameters | Parameter | Type | Required | Description | | | | | | | invitation | RtcInvite | Yes | The call invitation. | | invitation.inviterUserID | string | Yes | User ID of the user starting the call. | | invitation.inviteeUserIDList | string | Yes | User IDs of the group members to invite. | | invitation.groupID | string | Yes | Target group ID. | | invitation.roomID | string | Yes | Room ID for this group call. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Media type, such as audio or video . | | invitation.sessionType | SessionType | Yes | Pass SessionType.Group for a group call. | | invitation.platformID | Platform | Yes | Inviter platform. Pass the Platform enum value for the current client. | | invitation.customData | string | No | Application defined extension string sent with the invitation. | | invitation.initiateTime | number | No | Invitation start time as a Unix timestamp in milliseconds. It is usually managed by the calling flow and does not need to be set manually. | | invitation.busyLineUserIDList | string | No | Busy user list. It is usually omitted when starting a new invitation. | | offlinePushInfo | OfflinePush | No | Push content for invited users when they are offline. | | offlinePushInfo.title | string | Conditional | Push title when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string when offlinePushInfo is provided. Pass an empty string when there is no content. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether to update the iOS badge when offlinePushInfo is provided. | The call returns RtcInviteResults , which includes roomID , token , liveURL , and an optional busyLineUserIDList . For field descriptions, see Start a one to one call /sdk/react native/calling/managing calls/start single call . Invited members receive OnReceiveNewInvitation with OnReceiveNewInvitationPayload . For member acceptance, rejection, and room leave status, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/platform-api/meeting/meeting-signaling/get-signal-rooms", + "title": "Get call rooms", + "description": "Get multiple real-time call rooms by room ID.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-rooms", + "content": "Get multiple real time call rooms and their current invitation and participant state. HTTP request POST API ADDRESS /rtc meeting/signal get rooms Request body | Parameter | Required | Type | Description | | | | | | | roomIDs | Yes | string | Meeting or real time call room IDs. | Response data.roomList contains room records with invitation metadata, participant metadata, and room IDs. Permissions and limits Available only in OpenIM Enterprise. Validate access independently for every room ID." }, { - "path": "/sdk/react-native/calling/managing-calls/accept-call", - "title": "Accept a call", - "description": "Accept a call invitation with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls accept-call", - "content": "After receiving OnReceiveNewInvitation , call signalingAccept to accept the call invitation. const roomCredentials = await OpenIMSDK.signalingAccept opUserID: currentUserID, invitation, ; opUserID is the user ID of the user accepting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback. The call returns RtcInviteResults , which contains the call room's roomID , token , and liveURL . Other participants receive the acceptance through OnInviteeAccepted ; use invitation.roomID in its callback to identify the call. For event listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/platform-api/meeting/meeting-signaling/get-signal-invitation", + "title": "Get a call invitation", + "description": "Get real-time call invitation and offline-push information for a room.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-signal-invitation", + "content": "Get the real time call invitation and associated offline push information for a room. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | Response data.invitationInfo contains InvitationInfo /platform api/meeting/overview invitationinfo . data.offlinePushInfo contains the invitation's offline push configuration. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/calling/managing-calls/reject-call", - "title": "Reject a call", - "description": "Reject a call invitation with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls reject-call", - "content": "After receiving a call invitation, call signalingReject to reject it when the invitation will not be accepted. await OpenIMSDK.signalingReject opUserID: currentUserID, invitation, ; opUserID is the user ID of the user rejecting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback. After the call returns, the rejection request is complete. The inviter receives the result through OnInviteeRejected ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/platform-api/meeting/meeting-signaling/get-startup-invitation", + "title": "Get a startup call invitation", + "description": "Get a call invitation that a user must restore when the application starts.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-signaling get-startup-invitation", + "content": "Get a still relevant real time call invitation that should be restored when a user's application starts. HTTP request POST API ADDRESS /rtc meeting/get signal invitation info start app Request body | Parameter | Required | Type | Description | | | | | | | userID | Yes | string | User whose invitation state is restored. | Response Returns data.invitation and data.offlinePushInfo when a recoverable invitation exists. Permissions and limits Available only in OpenIM Enterprise. Revalidate timeout and room state before presenting the restored invitation." }, { - "path": "/sdk/react-native/calling/managing-calls/cancel-call", - "title": "Cancel a call invitation", - "description": "Cancel a call invitation with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls cancel-call", - "content": "Before the call connects, the inviter can call signalingCancel to cancel the invitation. await OpenIMSDK.signalingCancel opUserID: currentUserID, invitation, ; opUserID is the user ID that cancels the invitation. Use the complete RtcInvite object saved when the call was initiated for invitation . After the call returns, the cancellation request is complete. Invitees receive the cancellation through OnInvitationCancelled ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/platform-api/meeting/meeting-chat/send-meeting-chat", + "title": "Send a meeting chat message", + "description": "Send a broadcast or targeted message within a meeting room.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-chat send-meeting-chat", + "content": "Send a meeting room chat message to all participants or selected users. Meeting chat uses its own message model and is separate from the standard OpenIM message APIs. HTTP request POST API ADDRESS /rtc meeting/send meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | Sender user ID. | | type | Yes | int | Meeting chat business content type. | | payload | Yes | string | Message payload. | | dstUserIDs | Yes | string | Target users; an empty array broadcasts to the room. | | nickname | Yes | string | Sender display name. | | faceURL | Yes | string | Sender avatar URL. | Response data.message contains the created MeetingChatMessage /platform api/meeting/overview meetingchatmessage , including its Seq. Permissions and limits Available only in OpenIM Enterprise." }, { - "path": "/sdk/react-native/calling/managing-calls/hang-up-call", - "title": "Hang up a call", - "description": "Hang up a call with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls hang-up-call", - "content": "After a call connects, call signalingHungUp to hang up. await OpenIMSDK.signalingHungUp opUserID: currentUserID, invitation, ; opUserID is the user ID hanging up the call. Use the complete RtcInvite object for the current call for invitation ; its roomID must match the active call room. After the call returns, the hang up request is complete. Other participants receive call end information through OnHangUp ; use invitation.roomID in its callback to identify the call. For event parameters and listeners, see Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/platform-api/meeting/meeting-chat/pull-meeting-chat", + "title": "Pull meeting chat messages", + "description": "Incrementally pull meeting chat messages by creation time and Seq.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-chat pull-meeting-chat", + "content": "Incrementally pull meeting chat messages using the meeting creation time and the last received Seq. HTTP request POST API ADDRESS /rtc meeting/pull meeting chat Request body | Parameter | Required | Type | Description | | | | | | | meetingID | Yes | string | Meeting ID. | | createTime | Yes | int | Meeting/chat creation time in Unix milliseconds. | | currentSeq | Yes | int | Last meeting chat Seq already received. | | srcUserID | Yes | string | User performing the pull. | Response data.createTime is the returned stream's creation marker. data.messages contains ordered MeetingChatMessage /platform api/meeting/overview meetingchatmessage records. Permissions and limits Available only in OpenIM Enterprise. Persist the highest processed Seq and keep creation time paired with the same meeting." }, { - "path": "/sdk/react-native/calling/managing-calls/handle-call-events", - "title": "Handle call events", - "description": "Listen for call events with OpenIM React Native SDK.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling managing-calls handle-call-events", - "content": "Call events report invitation status, participant status, and media stream status. For invitation events, read room information from invitation in the callback parameter. Media stream events provide roomID directly. To send and receive custom signals, see Send a custom signal /sdk/react native/calling/sending custom signals/send a custom signal . Event parameters | Event | Callback parameter type | Common fields | | | | | | OnReceiveNewInvitation | OnReceiveNewInvitationPayload | invitation , userID , participant , offlinePushInfo . | | OnInviteeAccepted | OnInviteeAcceptedPayload | invitation , userID , participant , opUserPlatformID . | | OnInviteeRejected | OnInviteeRejectedPayload | invitation , userID , participant , opUserPlatformID . | | OnInvitationCancelled | OnInvitationCancelledPayload | invitation , userID , participant , offlinePushInfo . | | OnInvitationTimeout | OnReceiveNewInvitationPayload | invitation , userID , participant , offlinePushInfo . | | OnInviteeAcceptedByOtherDevice | OnInviteeAcceptedPayload | invitation , userID , participant , opUserPlatformID . | | OnInviteeRejectedByOtherDevice | OnInviteeRejectedPayload | invitation , userID , participant , opUserPlatformID . | | OnHangUp | OnHangUpPayload | invitation , userID , offlinePushInfo . | | OnRoomParticipantConnected | OnRoomParticipantConnectedPayload | invitation , groupID , participant . | | OnRoomParticipantDisconnected | OnRoomParticipantDisconnectedPayload | invitation , groupID , participant . | | OnStreamChange | OnStreamChangePayload | roomID , streamType , mute . | Use invitation.roomID or roomID to distinguish calls. Use participant.userInfo.userID to distinguish participants. function handleReceiveNewInvitation payload: OnReceiveNewInvitationPayload // ... function handleInviteeAccepted payload: OnInviteeAcceptedPayload // ... function handleInviteeRejected payload: OnInviteeRejectedPayload // ... function handleInvitationCancelled payload: OnInvitationCancelledPayload // ... function handleInvitationTimeout payload: OnReceiveNewInvitationPayload // ... function handleInviteeAcceptedByOtherDevice payload: OnInviteeAcceptedPayload // ... function handleInviteeRejectedByOtherDevice payload: OnInviteeRejectedPayload // ... function handleHangUp payload: OnHangUpPayload // ... function handleRoomParticipantConnected payload: OnRoomParticipantConnectedPayload, // ... function handleRoomParticipantDisconnected payload: OnRoomParticipantDisconnectedPayload, // ... function handleStreamChange payload: OnStreamChangePayload // ... // Start listening OpenIMSDK.on OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.on OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.on OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.on OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.on OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.on OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice, ; OpenIMSDK.on OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice, ; OpenIMSDK.on OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected, ; OpenIMSDK.on OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected, ; OpenIMSDK.on OpenIMEvent.OnStreamChange, handleStreamChange ; // Stop listening OpenIMSDK.off OpenIMEvent.OnReceiveNewInvitation, handleReceiveNewInvitation ; OpenIMSDK.off OpenIMEvent.OnInviteeAccepted, handleInviteeAccepted ; OpenIMSDK.off OpenIMEvent.OnInviteeRejected, handleInviteeRejected ; OpenIMSDK.off OpenIMEvent.OnInvitationCancelled, handleInvitationCancelled ; OpenIMSDK.off OpenIMEvent.OnInvitationTimeout, handleInvitationTimeout ; OpenIMSDK.off OpenIMEvent.OnInviteeAcceptedByOtherDevice, handleInviteeAcceptedByOtherDevice, ; OpenIMSDK.off OpenIMEvent.OnInviteeRejectedByOtherDevice, handleInviteeRejectedByOtherDevice, ; OpenIMSDK.off OpenIMEvent.OnHangUp, handleHangUp ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantConnected, handleRoomParticipantConnected, ; OpenIMSDK.off OpenIMEvent.OnRoomParticipantDisconnected, handleRoomParticipantDisconnected, ; OpenIMSDK.off OpenIMEvent.OnStreamChange, handleStreamChange ; Stop listening when the component is unmounted, the user signs out, or the account changes." + "path": "/platform-api/meeting/meeting-chat/revoke-meeting-chat", + "title": "Revoke a meeting chat message", + "description": "Revoke a meeting chat message by room and Seq.", + "context": "Platform API", + "keywords": "platform-api v3 platform-api meeting meeting-chat revoke-meeting-chat", + "content": "Revoke a meeting chat message by room ID and Seq. HTTP request POST API ADDRESS /rtc meeting/revoke meeting chat Request body | Parameter | Required | Type | Description | | | | | | | roomID | Yes | string | Meeting or call room ID. | | srcUserID | Yes | string | User performing the revocation. | | seq | Yes | int | Meeting chat message Seq. | | ex | Yes | string | Business extension data. | | sourceMessageSendTime | Yes | int | Original message send time. | | sourceMessageSendID | Yes | string | Original sender ID. | | sourceMessageSenderNickname | Yes | string | Original sender display name. | Response data.message contains the resulting MeetingChatMessage /platform api/meeting/overview meetingchatmessage . Permissions and limits Available only in OpenIM Enterprise. Enforce sender, host, or moderator revocation policy in the business backend." }, { - "path": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", - "title": "Restore a pending invitation", - "description": "Restore a pending call invitation.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information restore-pending-invitation", - "content": "When the app starts or returns to the foreground, call getSignalingInvitationInfoStartApp to get a call invitation that is still pending. const invitation, offlinePushInfo = await OpenIMSDK.getSignalingInvitationInfoStartApp ; Return value | Field | Type | Description | | | | | | invitation | RtcInvite or null | Pending call invitation; null when no invitation is pending. | | offlinePushInfo | OfflinePush | Offline push content included with the invitation. | When invitation is not null , use its invitation information to restore the incoming call UI. Subsequent cancellation, timeout, acceptance, and hang up states are received through Handle call events /sdk/react native/calling/managing calls/handle call events ." + "path": "/sdk/error-codes", + "title": "Client SDK error codes", + "description": "Identify common OpenIMClientSDK error codes, distinguish their source, and apply safe handling guidance.", + "context": "SDKs · Common reference · v4", + "keywords": "sdk v4 sdk error-codes", + "content": "Scope This page lists the common client error codes used by OpenIMClientSDK. The iOS, Android, Flutter, WASM, and Electron SDKs expose failures through different callbacks, exceptions, or rejected promises, but errors returned by OpenIM SDK Core retain the same meaning. Platform wrappers, operating systems, and runtimes can still add errors that are not listed here, so always retain the error message and client SDK version. A client call can also return a business error from OpenIMServer. Do not interpret every failure as a client error; identify its source first. Identify the error source | Code | Source | How to handle it | | | | | | 0 | Common success code | The business operation succeeded. Continue reading the data returned by the API. | | 1 9999 | OpenIMServer | Use the Platform API error code reference /platform api/error codes to diagnose parameters, permissions, tokens, groups, or message state. | | Codes from 10000 through 10401 listed on this page | OpenIMClientSDK | Diagnose client networking, lifecycle state, local data, and operation preconditions. The codes are not contiguous; do not infer meanings for undefined values. | | 20001 29999 | Business server or webhook | These codes are defined by the integrating business system. Maintain their meanings and user facing messages in that backend. | Common and session errors | Code | Meaning | Recommended action | | | | | | 10000 | Network request failed | Check device connectivity, API and WebSocket addresses, TLS certificates, and proxy configuration. Retry after connectivity is restored. | | 10001 | Network request timed out | Check network quality and service health. For a state changing operation, query its actual result before retrying. | | 10002 | Invalid arguments | Check required fields, data types, enum values, and mutually exclusive parameters against the current API page. | | 10003 | The call context timed out or was canceled | Check caller timeouts, page or task lifecycle, and whether login state changed while the call was running. | | 10004 | Resource initialization is incomplete | This code can be returned by client versions that still define it. Wait for initialization and login to finish before calling an API that depends on local resources. | | 10005 | Unrecognized error | Retain the error message, SDK version, and API name. Confirm reproducible steps before upgrading or submitting diagnostic information. | | 10006 | Internal SDK error | Collect client logs and a minimal reproduction, then verify SDK compatibility. Do not display internal details directly to end users. | | 10007 | No update is available | The synchronization or update produced no new data. Keep the current state and decide whether to refresh based on the API's documented behavior. | | 10008 | SDK is not initialized | Complete the platform's SDK initialization flow and wait for success before calling other APIs. | | 10009 | SDK login is incomplete | Wait for login success before calling authenticated APIs, and avoid concurrent or repeated login attempts. | | 10100 | User ID does not exist or is not registered | Confirm that a trusted backend registered the user with OpenIMServer and that the client uses the correct userID . | | 10101 | The user has logged out | Stop authenticated calls and clear session state. Obtain a new token and sign in again if the client should continue. | | 10102 | Repeated login | Do not start another login while the previous attempt is still active. Reuse the current SDK instance, or log out before changing accounts. | Message errors | Code | Meaning | Recommended action | | | | | | 10200 | File not found | Check the local path, temporary file lifetime, and read permissions before recreating or uploading the file message. | | 10201 | Message decompression failed | Verify client and server compatibility and synchronize the message again. Retain logs if the same data continues to fail. | | 10202 | Binary WebSocket message decoding failed | Verify the client and server protocol versions and check whether a proxy is modifying WebSocket data. | | 10203 | Message or binary protocol type is unsupported | Use a message type supported by the current SDK and verify client server version compatibility. | | 10204 | The message cannot be sent again | Only the original failed message can be resent. Create a new message object if an already successful message must be sent again. | | 10205 | Message content type is unsupported | Use a supported type, or implement the corresponding custom message handling on both the client and server. | | 10206 | The message has no server sequence number | The message is not ready for an operation that requires seq . Wait for sending or synchronization to finish and retry with the latest message object. | | 10207 | The message has been deleted | Remove it from UI and business state. Do not continue modifying, revoking, or querying the stale message object. | Conversation and group errors | Code | Meaning | Recommended action | | | | | | 10301 | The current conversation or group type does not support the operation | Check the API's supported conversation and group types, and do not apply it to an unsupported group. | | 10302 | The operation supports only a specific group type | Check the target's groupType and use an API that matches that group type. | | 10303 | The current unread count is already 0 | Refresh the UI from the latest conversation state instead of decrementing or clearing the count again. | | 10400 | Group ID not found | Check the groupID , retrieve the group again, and confirm that it has not been dismissed. | | 10401 | Invalid group type | Use a group type supported by the current SDK and OpenIMServer, and verify the groupType returned during creation or retrieval. | Version compatibility Error definitions evolve with client SDK releases. Code 10004 exists in some released versions, while the current OpenIM SDK Core distinguishes initialization and login readiness with 10008 and 10009 . Applications that support older clients can continue recognizing 10004 ; new handling should distinguish an uninitialized SDK from an incomplete login. Do not automatically classify an integer that is absent from this page as a client error. First determine whether it came from the client, OpenIMServer, or a business webhook, then use the current SDK version's error message and release notes. Handling recommendations 1. Record the code, message, API name, client SDK version, and necessary target identifiers. Redact tokens, full message bodies, and other sensitive data. 2. Correct invalid parameters, session state, or unsupported preconditions instead of retrying automatically. 3. Use backoff for network failures and timeouts. Before retrying messages or other state changes, query or synchronize actual state to avoid duplicate operations. 4. Map technical errors to stable product messages rather than exposing internal details to end users. 5. If 10005 , 10006 , or decoding errors persist, retain complete logs and follow the platform guide for WASM logging /sdk/wasm/logger , iOS logging /sdk/ios/logger , Flutter logging /sdk/flutter/logger , or Electron log upload /sdk/electron/logger/upload logs . This page was migrated from the legacy client error code reference https://github.com/openimsdk/docs/blob/a177b296f1abe53ba2cf7d897acf86467a45e7c6/docs/sdks/errcode.md and verified against the current OpenIM SDK Core definitions https://github.com/openimsdk/openim sdk core/blob/9267a252faab02bbc8ffab6223e6ae2341a0f7c9/pkg/sdkerrs/code.go and the compatibility definitions https://github.com/openimsdk/openim sdk core/blob/514c760dfae502c651e88646c9a7754b2767534d/pkg/sdkerrs/code.go ." }, { - "path": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", - "title": "Get a group call room", - "description": "Get a call room by group ID.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-room-by-group-id", - "content": "Call signalingGetRoomByGroupID to get group call room information by group ID. groupID is the target group ID. const room = await OpenIMSDK.signalingGetRoomByGroupID groupID ; Return value The call returns CallingRoomData : | Field | Type | Description | | | | | | roomID | string | Call room ID. | | invitation | RtcInvite optional | Call invitation information for the room. | | participant | ParticipantInfo optional | Information about current room participants. | userInfo in participant contains user information. In group calls, it can also contain groupMemberInfo and groupInfo . Use the returned roomID to query room credentials or handle the corresponding call state." + "path": "/sdk/wasm/conversation/retrieving-conversations/search-conversations", + "title": "Search conversations", + "description": "Search local conversations by conversation name with the WASM SDK.", + "context": "SDKs · WASM · v4", + "keywords": "sdk wasm v4 sdk wasm conversation retrieving-conversations search-conversations", + "content": "searchConversation performs a partial match against showName in the SDK's local conversation data. Use it for search within a conversation list. The search term must not be empty, and the method does not query the server for conversations that have not been synchronized locally. const data: conversations = await openimsdk.searchConversation searchKeyword.trim ; renderConversationResults conversations ; When the Promise resolves, data contains the matching ConversationItem , ordered by latestMsgSendTime from newest to oldest. The results reflect the conversation data stored locally at the time of the call, and the query itself does not trigger events. To keep visible search results current, listen for the conversation events described in Get the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and update matching results by conversationID ." }, { - "path": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", - "title": "Get room credentials", - "description": "Get call credentials by room ID.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling retrieving-call-information get-token-by-room-id", - "content": "When a call room ID is known and room credentials are needed, call signalingGetTokenByRoomID . roomID is the target call room ID. const roomCredentials = await OpenIMSDK.signalingGetTokenByRoomID roomID ; Return value The call returns RtcInviteResults , including roomID , token , liveURL , and an optional busyLineUserIDList . Provide the returned room credentials to a real time audio and video media engine to join the call room." + "path": "/sdk/wasm/conversation/managing-conversations/mark-all-conversations-read", + "title": "Mark all conversations as read", + "description": "Clear the unread counts of all currently unread conversations with the WASM SDK.", + "context": "SDKs · WASM · v4", + "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations mark-all-conversations-read", + "content": "When the user explicitly chooses a “mark all as read” action, call markAllConversationMessageAsRead to process every unread conversation currently recorded in the local SDK: await openimsdk.markAllConversationMessageAsRead ; When the Promise resolves, the SDK has finished processing the unread conversations found for this operation. It does not mean that the related conversation events have already arrived or that every other client has finished updating its UI. When OnConversationChanged arrives, use conversationID to update each matching conversation, and use OnTotalUnreadMessageCountChanged to update the aggregate unread count. See Get the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and Track the total unread count /sdk/wasm/conversation/managing conversations/get total unread count for the complete listeners. Query both values again when the latest state must be confirmed." }, { - "path": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", - "title": "Send a custom signal", - "description": "Send a custom signal in a call room.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native calling sending-custom-signals send-a-custom-signal", - "content": "Call signalingSendCustomSignal to send an application defined signal to a call room, such as raising a hand or changing the layout. customInfo is a string. To send structured data, pass a JSON string. await OpenIMSDK.signalingSendCustomSignal roomID, customInfo: JSON.stringify type: 'hand raised', , ; Parameters | Parameter | Type | Description | | | | | | roomID | string | Target call room ID. | | customInfo | string | Application defined signal content. | After the call returns, the custom signal request is complete. Receive custom signals When another participant sends a custom signal, OnReceiveCustomSignal is triggered. Its callback parameter is OnReceiveCustomSignalPayload , which contains roomID and customInfo . function handleCustomSignal payload: OnReceiveCustomSignalPayload // ... // Start listening OpenIMSDK.on OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; // Stop listening OpenIMSDK.off OpenIMEvent.OnReceiveCustomSignal, handleCustomSignal ; Stop listening when the component is unmounted, the user signs out, or the account changes. After receiving customInfo , parse and handle its data according to the application protocol." + "path": "/sdk/wasm/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "Hide all conversations from the conversation list on the current device with the WASM SDK.", + "context": "SDKs · WASM · v4", + "keywords": "sdk wasm v4 sdk wasm conversation managing-conversations hide-all-conversations", + "content": "hideAllConversations resets the list state, unread count, latest message summary, and draft of every conversation on the current device so that those conversations no longer appear in the paginated conversation list: await openimsdk.hideAllConversations ; When the Promise resolves, only the local conversation state has been reset. The operation does not delete local message records or server messages, and it does not remove groups, friend relationships, or conversations on other clients. A conversation can appear again after a new message arrives or valid conversation state is established again. After the bulk hide operation, query the conversation list /sdk/wasm/conversation/retrieving conversations/retrieve conversation list and total unread count /sdk/wasm/conversation/managing conversations/get total unread count again, then update the UI with the latest results. Do not treat Promise resolution as a remote state event." } ] From 3d77916170ba931852babdcf57e1ccf51d5de56e Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Fri, 28 Aug 2026 19:33:19 +0800 Subject: [PATCH 09/15] docs(react-native): expose SDK documentation entry and sync support - Show React Native in the platform navigation and SDK selector. - Include React Native in content, route, and audit synchronization workflows. - Support React Native route skeleton detection and add coverage tests. - Update the architecture documentation for React Native content generation. --- docs/ARCHITECTURE.md | 2 +- package.json | 8 ++++---- .../sync-client-sdk-route-skeletons.test.mjs | 20 +++++++++++++++++-- scripts/check-client-sdk-content-audit.mjs | 3 ++- scripts/sync-client-sdk-route-skeletons.mjs | 7 ++++--- src/config/docs.ts | 3 ++- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 6a91689276..ef3e2450db 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -81,7 +81,7 @@ Docker 与普通 Node.js 环境使用 Next.js `standalone` 输出,`scripts/pre `pnpm content:sync` 依次: -1. 从已审核的中文 SDK MDX 构建 WASM、Android、iOS 和 Flutter 中文运行时数据。 +1. 从已审核的中文 SDK MDX 构建 WASM、Android、iOS、Flutter 和 React Native 中文运行时数据。 2. 重建中英文搜索索引。 该命令不会自动修改路由和导航。结构性调整必须显式维护 `routes.json`、`navigation.json` 和审核数据;需要刷新 frontmatter 元数据时,运行 `pnpm content:metadata` 并审查 diff。`pnpm structure:report` 会先执行该元数据同步,确保报告中的发布状态与正文一致。 diff --git a/package.json b/package.json index 646c08822b..116bd36c68 100644 --- a/package.json +++ b/package.json @@ -34,15 +34,15 @@ "content:metadata": "node scripts/sync-content-metadata.mjs", "sdk:zh": "node scripts/build-wasm-sdk-zh-content.mjs", "sdk:zh:check": "node scripts/check-localized-sdk-content.mjs", - "sdk:native:zh": "node scripts/build-client-sdk-zh-content.mjs android ios flutter", - "sdk:native:zh:check": "node scripts/check-localized-sdk-content.mjs android ios flutter", + "sdk:native:zh": "node scripts/build-client-sdk-zh-content.mjs android ios flutter react-native", + "sdk:native:zh:check": "node scripts/check-localized-sdk-content.mjs android ios flutter react-native", "sdk:native:structure:sync": "node scripts/sync-client-sdk-structure.mjs android ios flutter", - "sdk:native:routes:sync": "node scripts/sync-client-sdk-route-skeletons.mjs android ios flutter && node scripts/sync-content-metadata.mjs", + "sdk:native:routes:sync": "node scripts/sync-client-sdk-route-skeletons.mjs android ios flutter react-native && node scripts/sync-content-metadata.mjs", "structure:sync": "node scripts/import-structure.mjs", "structure:report": "pnpm content:metadata && node scripts/structure-report.mjs && prettier --write docs/STRUCTURE_REPORT.md", "check": "eslint . && tsc --noEmit && pnpm test:audit && node scripts/check-content.mjs && node scripts/check-guides-content-audit.mjs && node scripts/check-wasm-content-audit.mjs && node scripts/check-localized-sdk-content.mjs && node scripts/check-client-sdk-content-audit.mjs && node scripts/check-wasm-sdk-examples.mjs && pnpm docsets-sync:lint-openapi && pnpm platform-api:test", "postbuild": "node scripts/prepare-standalone.mjs", - "content:sync": "node scripts/build-wasm-sdk-zh-content.mjs && node scripts/build-client-sdk-zh-content.mjs android ios flutter && node scripts/build-search-index.mjs", + "content:sync": "node scripts/build-wasm-sdk-zh-content.mjs && node scripts/build-client-sdk-zh-content.mjs android ios flutter react-native && node scripts/build-search-index.mjs", "guides:sync": "node scripts/import-openim-guides.mjs", "platform-api:sync": "node scripts/import-openim-platform-api.mjs && node scripts/sync-openim-user-api.mjs && node scripts/sync-openim-friend-api.mjs && node scripts/sync-openim-group-api.mjs && node scripts/sync-openim-auth-api.mjs && node scripts/sync-openim-third-api.mjs && node scripts/sync-openim-msg-api.mjs && node scripts/sync-openim-conversation-api.mjs && node scripts/sync-openim-platform-api-order.mjs && node scripts/sync-openim-platform-api-english.mjs && node scripts/build-search-index.mjs", "user-api:sync": "node scripts/sync-openim-user-api.mjs", diff --git a/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs b/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs index 0d79f9b171..169c981157 100644 --- a/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs +++ b/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs @@ -36,6 +36,16 @@ test('recognizes only generator-owned deferred English skeletons', () => { ), false, ); + assert.equal( + isGeneratedClientSdkSkeleton( + buildClientSdkSkeleton({ + path: '/sdk/react-native/overview', + platformId: 'react-native', + title: 'OpenIM SDK for React Native', + }), + ), + true, + ); }); test('replaces legacy platform route records with the reviewed active tree', () => { @@ -63,13 +73,19 @@ test('replaces legacy platform route records with the reviewed active tree', () test('resolves every active native suffix against the current WASM routes', () => { const routes = readJson('src/generated/routes.json'); - for (const platformId of ['android', 'ios', 'flutter']) { + for (const platformId of ['android', 'ios', 'flutter', 'react-native']) { const sidebar = readJson(`data/structure/${platformId}-sidebar.json`); const resolved = resolveClientSdkSkeletonRoutes({ platformId, sidebar, routes }); assert.equal(resolved.length, getSidebarPathCount(sidebar)); assert.equal(resolved[0].path, `/sdk/${platformId}/overview`); const displayName = - platformId === 'ios' ? 'iOS' : platformId === 'android' ? 'Android' : 'Flutter'; + platformId === 'ios' + ? 'iOS' + : platformId === 'android' + ? 'Android' + : platformId === 'react-native' + ? 'React Native' + : 'Flutter'; assert.equal(resolved[0].title, `OpenIM SDK for ${displayName}`); } }); diff --git a/scripts/check-client-sdk-content-audit.mjs b/scripts/check-client-sdk-content-audit.mjs index c01690a538..2d2b4f8928 100644 --- a/scripts/check-client-sdk-content-audit.mjs +++ b/scripts/check-client-sdk-content-audit.mjs @@ -196,7 +196,8 @@ function extractDartCodeBlocks(source) { async function main() { const requested = process.argv.slice(2).filter((value) => !value.startsWith('-')); - const platformIds = requested.length > 0 ? requested : ['android', 'ios', 'flutter']; + const platformIds = + requested.length > 0 ? requested : ['android', 'ios', 'flutter', 'react-native']; let failed = false; for (const platformId of platformIds) { const platform = getClientSdkPlatform(platformId); diff --git a/scripts/sync-client-sdk-route-skeletons.mjs b/scripts/sync-client-sdk-route-skeletons.mjs index c15bd3dc59..e76bfb42ac 100644 --- a/scripts/sync-client-sdk-route-skeletons.mjs +++ b/scripts/sync-client-sdk-route-skeletons.mjs @@ -139,8 +139,8 @@ export function isGeneratedClientSdkSkeleton(source) { return ( /generatedBy:\s*['"]sync-client-sdk-route-skeletons['"]/.test(source) || (/status:\s*['"]draft['"]/.test(source) && - /context:\s*['"]chat\/sdk\/(?:android|ios|flutter)['"]/.test(source) && - /The English version of this OpenIM (?:Android|iOS|Flutter) SDK guide is deferred/.test( + /context:\s*['"]chat\/sdk\/(?:android|ios|flutter|react-native)['"]/.test(source) && + /The English version of this OpenIM (?:Android|iOS|Flutter|React Native) SDK guide is deferred/.test( source, )) ); @@ -228,7 +228,8 @@ export function replaceClientSdkRouteRecords({ platformId, sidebar, routes }) { async function main() { const requested = process.argv.slice(2).filter((value) => !value.startsWith('-')); - const platformIds = requested.length > 0 ? requested : ['android', 'ios', 'flutter']; + const platformIds = + requested.length > 0 ? requested : ['android', 'ios', 'flutter', 'react-native']; let routes = await readJson('src/generated/routes.json'); for (const platformId of platformIds) { diff --git a/src/config/docs.ts b/src/config/docs.ts index 5910c84e39..de50ee947a 100644 --- a/src/config/docs.ts +++ b/src/config/docs.ts @@ -26,7 +26,7 @@ export const platformLabels: Record = { export const webCompatibleSdkPlatforms = ['wasm', 'electron', 'miniprogram'] as const; /** Temporarily hidden from SDK nav, home cards, and platform switcher. Routes remain. */ -export const hiddenSdkPlatforms = ['uniapp', 'react-native'] as const; +export const hiddenSdkPlatforms = ['uniapp'] as const; export function isSdkPlatformVisible(platform?: string | null): boolean { if (!platform) return true; @@ -54,6 +54,7 @@ export const sdkPlatformSections: SdkPlatformSection[] = [ { label: 'iOS', platform: 'ios', href: '/sdk/ios/overview' }, { label: 'Android', platform: 'android', href: '/sdk/android/overview' }, { label: 'Flutter', platform: 'flutter', href: '/sdk/flutter/overview' }, + { label: 'React Native', platform: 'react-native', href: '/sdk/react-native/overview' }, ], }, { From acf78ead6c46ad05f6786e485324ea30ef95f9b3 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Mon, 31 Aug 2026 12:00:51 +0800 Subject: [PATCH 10/15] fix(react-native): fix `authenticate-and-manage-session` documentation issues - Clarify `LogLevel` usage without listing unstable enum details. - Add the missing `Parameter reference` heading to the initialization section. --- .../authenticate-and-manage-session.mdx | 12 ++++++++---- .../authenticate-and-manage-session.mdx | 10 +++++++--- data/structure/react-native-content-audit.json | 4 ++-- src/generated/react-native-sdk-zh-content.json | 7 ++++++- src/generated/search-index-zh.json | 2 +- src/generated/search-index.json | 2 +- 6 files changed, 25 insertions(+), 12 deletions(-) diff --git a/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx b/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx index 3c098f3143..a8ade35b34 100644 --- a/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx +++ b/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx @@ -5,7 +5,7 @@ product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' status: 'published' -lastUpdated: '2026-08-28' +lastUpdated: '2026-08-31' version: 'v4' platform: 'react-native' sourcePath: '/sdk/react-native/getting-started/authenticate-and-manage-session' @@ -28,6 +28,7 @@ Call `initSDK()` with the server addresses, an application-writable data directo ### React Native CLI ```ts +import OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk'; import RNFS from 'react-native-fs'; const dataDir = RNFS.DocumentDirectoryPath; @@ -37,7 +38,7 @@ await OpenIMSDK.initSDK({ wsAddr: 'ws://your-server-ip:10001', dataDir, logFilePath: dataDir, - logLevel: 5, + logLevel: LogLevel.Info, isLogStandardOutput: true, }); ``` @@ -47,6 +48,7 @@ await OpenIMSDK.initSDK({ Use the application document directory provided by `expo-file-system`. Its URI includes the `file://` prefix, which must be removed before passing it to the SDK: ```ts +import { LogLevel } from '@openim/rn-client-sdk'; import * as FileSystem from "expo-file-system/legacy"; const dataDir = FileSystem.documentDirectory.replace(/^file:\/\//, '').replace(/\/$/, ''); @@ -56,11 +58,13 @@ await OpenIMSDK.initSDK({ wsAddr: 'ws://your-server-ip:10001', dataDir, logFilePath: dataDir, - logLevel: 5, + logLevel: LogLevel.Info, isLogStandardOutput: true, }); ``` +### Parameter reference + `initSDK()` accepts the following parameters: | Parameter | Type | Description | @@ -69,7 +73,7 @@ await OpenIMSDK.initSDK({ | `wsAddr` | `string` | OpenIMServer WebSocket address. | | `dataDir` | `string` | SDK local data directory in an application-writable path. | | `logFilePath` | `string` | SDK log directory in an application-writable path. | -| `logLevel` | `LogLevel` | Log level: `Debug`, `Info`, `Warn`, `Error`, `Fatal`, or `Panic`. | +| `logLevel` | `LogLevel` | Log level configuration. Use the `LogLevel` enum. | | `isLogStandardOutput` | `boolean` | Whether SDK logs are written to the platform standard output. | ## Register connection events diff --git a/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx b/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx index d0ea718730..1b8191d3de 100644 --- a/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx +++ b/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx @@ -21,6 +21,7 @@ sourcePath: '/sdk/react-native/getting-started/authenticate-and-manage-session' ### React Native CLI ```ts +import OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk'; import RNFS from 'react-native-fs'; const dataDir = RNFS.DocumentDirectoryPath; @@ -30,7 +31,7 @@ await OpenIMSDK.initSDK({ wsAddr: 'ws://your-server-ip:10001', dataDir, logFilePath: dataDir, - logLevel: 5, + logLevel: LogLevel.Info, isLogStandardOutput: true, }); ``` @@ -40,6 +41,7 @@ await OpenIMSDK.initSDK({ Expo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀: ```ts +import { LogLevel } from '@openim/rn-client-sdk'; import * as FileSystem from "expo-file-system/legacy"; const dataDir = FileSystem.documentDirectory.replace(/^file:\/\//, '').replace(/\/$/, ''); @@ -49,11 +51,13 @@ await OpenIMSDK.initSDK({ wsAddr: 'ws://your-server-ip:10001', dataDir, logFilePath: dataDir, - logLevel: 5, + logLevel: LogLevel.Info, isLogStandardOutput: true, }); ``` +### 参数说明 + `initSDK()` 的参数如下: | 参数 | 类型 | 说明 | @@ -62,7 +66,7 @@ await OpenIMSDK.initSDK({ | `wsAddr` | `string` | OpenIMServer WebSocket 地址。 | | `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 | | `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 | -| `logLevel` | `LogLevel` | 日志级别,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 | +| `logLevel` | `LogLevel` | 日志级别配置,使用 `LogLevel` 枚举。 | | `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 | ## 注册连接事件 diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index d4ad899c1e..13f86367d7 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -6592,9 +6592,9 @@ "openimSources": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "sdkMethods": ["initSDK", "login", "getLoginStatus", "getLoginUserID", "logout"], "sdkEvents": [], - "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, + "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-31", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-31", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, "redirectTo": null, - "notes": ["2026-08-28:参考 WASM 认证流程,按 React Native SDK 的 initSDK、login、登录状态查询和 logout 声明整理。"] + "notes": ["2026-08-28:参考 WASM 认证流程,按 React Native SDK 的 initSDK、login、登录状态查询和 logout 声明整理。", "2026-08-31:将 initSDK 参数说明调整为与 React Native CLI、Expo 同级的共同章节,并复核中英文页面结构。", "2026-08-31:不在认证页枚举 LogLevel 成员或数值,改为提示使用当前 SDK 版本声明的 LogLevel 值,以兼容各端取值差异。", "2026-08-31:补充认证页示例对 LogLevel 命名导出的导入,并同步中英文正文。", "2026-08-31:重新同步中文正文生成内容和搜索索引,并复核用户更新后的导入示例。"] }, { "currentPath": "/sdk/react-native/getting-started/send-first-message", diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index 6bf959f45a..b53edad257 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -457,7 +457,7 @@ "title": "按 React Native 环境接入" }, "/sdk/react-native/getting-started/authenticate-and-manage-session": { - "body": "开始本页操作前,请先完成[开始之前](/sdk/react-native/getting-started/before-you-start)和[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)中的准备工作。OpenIM React Native SDK 使用 `initSDK()` 初始化 SDK,再使用 `login()` 登录当前用户并建立与服务器的连接。\n\n完整流程如下:\n\n1. 调用 `initSDK()` 初始化 SDK。\n2. 设置 `onConnecting`、`onConnectSuccess` 和 `onConnectFailed` 事件监听。\n3. 调用 `login()` 登录当前用户。\n4. 等待 `onConnectSuccess` 触发,表示登录成功并已连接服务器。\n5. 主动退出或切换账号时调用 `logout()`。\n\n## 初始化 SDK\n\n调用 `initSDK()` 传入服务地址、本地数据目录和日志配置。`dataDir` 和 `logFilePath` 应使用应用可写的持久化目录。\n\n### React Native CLI\n\n```ts\nimport RNFS from 'react-native-fs';\n\nconst dataDir = RNFS.DocumentDirectoryPath;\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: 5,\n isLogStandardOutput: true,\n});\n```\n\n### Expo\n\nExpo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀:\n\n```ts\nimport * as FileSystem from \"expo-file-system/legacy\";\n\nconst dataDir = FileSystem.documentDirectory.replace(/^file:\\/\\//, '').replace(/\\/$/, '');\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: 5,\n isLogStandardOutput: true,\n});\n```\n\n`initSDK()` 的参数如下:\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 |\n| `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 |\n| `logLevel` | `LogLevel` | 日志级别,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 |\n\n## 注册连接事件\n\n调用 `login()` 前设置连接事件监听。可以使用 `OpenIMEvent` 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程:\n\n```ts\nconst handleConnecting = () => {\n console.log(\"onConnecting\")\n};\n\nconst handleConnectSuccess = () => {\n console.log(\"onConnectSuccess\")\n};\n\nconst handleConnectFailed = (error: OpenIMEventBaseErrorType) => {\n console.log(\"onConnectFailed\", error.errCode, error.errMsg)\n};\n\n// 设置监听\nOpenIMSDK.on('onConnecting', handleConnecting);\nOpenIMSDK.on('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.on('onConnectFailed', handleConnectFailed);\n```\n\n## 登录当前用户\n\n调用 `login()` 传入可信后端返回的 `userID` 和 Token:\n\n```ts\nawait OpenIMSDK.login({\n userID,\n token,\n});\n```\n\n调用 `login()` 后等待 `onConnectSuccess` 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。\n\n## 查询登录状态\n\n`getLoginStatus()` 查询当前登录状态:\n\n```ts\nconst loginStatus = await OpenIMSDK.getLoginStatus();\n```\n\n`LoginStatus` 包含以下状态:\n\n| 状态 | 说明 |\n| --- | --- |\n| `LoginStatus.Logout` | 当前 SDK 实例未登录。 |\n| `LoginStatus.Logging` | 登录流程正在进行。 |\n| `LoginStatus.Logged` | 当前 SDK 实例已登录。 |\n\n## 退出登录和切换账号\n\n主动退出或切换账号时调用 `logout()`,并清理应用中保存的当前账号数据:\n\n```ts\nawait OpenIMSDK.logout();\n```\n\n切换账号时先完成旧账号退出,再使用新账号的参数调用 `login()`,无需重复 `initSDK`。不应在旧账号仍处于登录状态时登录新账号。\n\n## 取消事件监听\n\n退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()`:\n\n```ts\n// 取消监听\nOpenIMSDK.off('onConnecting', handleConnecting);\nOpenIMSDK.off('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.off('onConnectFailed', handleConnectFailed);\n```\n\n## 下一步\n\n- [发送第一条消息](/sdk/react-native/getting-started/send-first-message)", + "body": "开始本页操作前,请先完成[开始之前](/sdk/react-native/getting-started/before-you-start)和[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)中的准备工作。OpenIM React Native SDK 使用 `initSDK()` 初始化 SDK,再使用 `login()` 登录当前用户并建立与服务器的连接。\n\n完整流程如下:\n\n1. 调用 `initSDK()` 初始化 SDK。\n2. 设置 `onConnecting`、`onConnectSuccess` 和 `onConnectFailed` 事件监听。\n3. 调用 `login()` 登录当前用户。\n4. 等待 `onConnectSuccess` 触发,表示登录成功并已连接服务器。\n5. 主动退出或切换账号时调用 `logout()`。\n\n## 初始化 SDK\n\n调用 `initSDK()` 传入服务地址、本地数据目录和日志配置。`dataDir` 和 `logFilePath` 应使用应用可写的持久化目录。\n\n### React Native CLI\n\n```ts\nimport OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk';\nimport RNFS from 'react-native-fs';\n\nconst dataDir = RNFS.DocumentDirectoryPath;\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: LogLevel.Info,\n isLogStandardOutput: true,\n});\n```\n\n### Expo\n\nExpo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀:\n\n```ts\nimport { LogLevel } from '@openim/rn-client-sdk';\nimport * as FileSystem from \"expo-file-system/legacy\";\n\nconst dataDir = FileSystem.documentDirectory.replace(/^file:\\/\\//, '').replace(/\\/$/, '');\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: LogLevel.Info,\n isLogStandardOutput: true,\n});\n```\n\n### 参数说明\n\n`initSDK()` 的参数如下:\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 |\n| `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 |\n| `logLevel` | `LogLevel` | 日志级别配置,使用 `LogLevel` 枚举。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 |\n\n## 注册连接事件\n\n调用 `login()` 前设置连接事件监听。可以使用 `OpenIMEvent` 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程:\n\n```ts\nconst handleConnecting = () => {\n console.log(\"onConnecting\")\n};\n\nconst handleConnectSuccess = () => {\n console.log(\"onConnectSuccess\")\n};\n\nconst handleConnectFailed = (error: OpenIMEventBaseErrorType) => {\n console.log(\"onConnectFailed\", error.errCode, error.errMsg)\n};\n\n// 设置监听\nOpenIMSDK.on('onConnecting', handleConnecting);\nOpenIMSDK.on('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.on('onConnectFailed', handleConnectFailed);\n```\n\n## 登录当前用户\n\n调用 `login()` 传入可信后端返回的 `userID` 和 Token:\n\n```ts\nawait OpenIMSDK.login({\n userID,\n token,\n});\n```\n\n调用 `login()` 后等待 `onConnectSuccess` 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。\n\n## 查询登录状态\n\n`getLoginStatus()` 查询当前登录状态:\n\n```ts\nconst loginStatus = await OpenIMSDK.getLoginStatus();\n```\n\n`LoginStatus` 包含以下状态:\n\n| 状态 | 说明 |\n| --- | --- |\n| `LoginStatus.Logout` | 当前 SDK 实例未登录。 |\n| `LoginStatus.Logging` | 登录流程正在进行。 |\n| `LoginStatus.Logged` | 当前 SDK 实例已登录。 |\n\n## 退出登录和切换账号\n\n主动退出或切换账号时调用 `logout()`,并清理应用中保存的当前账号数据:\n\n```ts\nawait OpenIMSDK.logout();\n```\n\n切换账号时先完成旧账号退出,再使用新账号的参数调用 `login()`,无需重复 `initSDK`。不应在旧账号仍处于登录状态时登录新账号。\n\n## 取消事件监听\n\n退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()`:\n\n```ts\n// 取消监听\nOpenIMSDK.off('onConnecting', handleConnecting);\nOpenIMSDK.off('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.off('onConnectFailed', handleConnectFailed);\n```\n\n## 下一步\n\n- [发送第一条消息](/sdk/react-native/getting-started/send-first-message)", "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", "headings": [ { @@ -475,6 +475,11 @@ "title": "Expo", "url": "#expo" }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明" + }, { "depth": 2, "title": "注册连接事件", diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 8503ee8292..a6db0462c9 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -5677,7 +5677,7 @@ "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", - "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别,可选 Debug 、 Info 、 Warn 、 Error 、 Fatal 和 Panic 。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" + "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; 参数说明 initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别配置,使用 LogLevel 枚举。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" }, { "path": "/sdk/react-native/getting-started/send-first-message", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 8b5fec31a6..d21fda7e08 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -5677,7 +5677,7 @@ "description": "Initialize the OpenIM React Native SDK, sign in, check login status, and log out the current account.", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", - "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: 5, isLogStandardOutput: true, ; initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level: Debug , Info , Warn , Error , Fatal , or Panic . | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" + "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Parameter reference initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level configuration. Use the LogLevel enum. | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" }, { "path": "/sdk/react-native/getting-started/send-first-message", From b2686350bcb7b53c52e3bdf2d5a0516d13f5fcce Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Mon, 31 Aug 2026 12:27:25 +0800 Subject: [PATCH 11/15] fix(react-native): clarify logger initialization parameters in `logger` document Remove redundant `initSDK` parameter descriptions from the logger documentation. Keep the page focused on logging-related options and sync Chinese and English content. --- content/docs/chat/sdk/react-native/logger.mdx | 7 ++----- content/zh/docs/chat/sdk/react-native/logger.mdx | 8 +++----- data/structure/react-native-content-audit.json | 6 +++--- src/generated/react-native-sdk-zh-content.json | 2 +- src/generated/search-index-zh.json | 4 ++-- src/generated/search-index.json | 4 ++-- 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/content/docs/chat/sdk/react-native/logger.mdx b/content/docs/chat/sdk/react-native/logger.mdx index 71103da914..a2284d9f7a 100644 --- a/content/docs/chat/sdk/react-native/logger.mdx +++ b/content/docs/chat/sdk/react-native/logger.mdx @@ -5,7 +5,7 @@ product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' status: 'published' -lastUpdated: '2026-08-28' +lastUpdated: '2026-08-31' version: 'v4' platform: 'react-native' sourcePath: '/sdk/react-native/logger' @@ -15,7 +15,7 @@ OpenIM React Native SDK logs help diagnose initialization, connection, and busin ## Configure logging during initialization -Configure the log directory and level when calling `initSDK()`: +Configure the logging options when calling `initSDK()`. For `apiAddr`, `wsAddr`, `dataDir`, and the initialization and sign-in flow, see [Authenticate and manage a session](/sdk/react-native/getting-started/authenticate-and-manage-session). ```ts await OpenIMSDK.initSDK({ @@ -30,9 +30,6 @@ await OpenIMSDK.initSDK({ | Parameter | Type | Description | | --- | --- | --- | -| `apiAddr` | `string` | OpenIMServer API address. | -| `wsAddr` | `string` | OpenIMServer WebSocket address. | -| `dataDir` | `string` | SDK local data directory in an application-writable path. | | `logFilePath` | `string` | SDK log directory in an application-writable path. | | `logLevel` | `LogLevel` | Log verbosity: `Debug`, `Info`, `Warn`, `Error`, `Fatal`, or `Panic`. | | `isLogStandardOutput` | `boolean` | Whether SDK logs are written to the platform standard log. Enable it for development diagnostics. | diff --git a/content/zh/docs/chat/sdk/react-native/logger.mdx b/content/zh/docs/chat/sdk/react-native/logger.mdx index efe786b5e3..da11b614e5 100644 --- a/content/zh/docs/chat/sdk/react-native/logger.mdx +++ b/content/zh/docs/chat/sdk/react-native/logger.mdx @@ -4,7 +4,8 @@ description: '配置 OpenIM React Native SDK 日志,写入应用诊断信息 product: 'sdk' context: 'chat/sdk/react-native' template: 'guide' -status: 'draft' +status: 'published' +lastUpdated: '2026-08-31' version: 'v4' platform: 'react-native' sourcePath: '/sdk/react-native/logger' @@ -14,7 +15,7 @@ OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用 ## 初始化日志配置 -调用 `initSDK()` 时配置日志目录和日志级别: +调用 `initSDK()` 时配置日志相关选项。`apiAddr`、`wsAddr`、`dataDir` 以及初始化和登录流程见[认证与管理登录会话](/sdk/react-native/getting-started/authenticate-and-manage-session)。 ```ts await OpenIMSDK.initSDK({ @@ -29,9 +30,6 @@ await OpenIMSDK.initSDK({ | 参数 | 类型 | 说明 | | --- | --- | --- | -| `apiAddr` | `string` | OpenIM 服务端 API 地址。 | -| `wsAddr` | `string` | OpenIM WebSocket 长连接地址。 | -| `dataDir` | `string` | SDK 本地数据目录,应位于应用可写目录。 | | `logFilePath` | `string` | SDK 日志目录,应位于应用可写目录。 | | `logLevel` | `LogLevel` | 日志详细程度,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 | | `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 | diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index 13f86367d7..eb8af118b8 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -6554,11 +6554,11 @@ "sdkMethods": ["initSDK", "logs", "uploadLogs"], "sdkEvents": [], "locales": { - "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, - "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-28", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } + "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-31", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, + "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-31", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, "redirectTo": null, - "notes": ["2026-08-28:参考 Android 日志页,按 React Native SDK 的 InitOptions、LogsParams 和 UploadLogsParams 声明整理日志配置、写入和上传能力。"] + "notes": ["2026-08-28:参考 Android 日志页,按 React Native SDK 的 InitOptions、LogsParams 和 UploadLogsParams 声明整理日志配置、写入和上传能力。", "2026-08-31:初始化部分仅保留 logFilePath、logLevel 和 isLogStandardOutput 三个日志配置,其他 initSDK 参数及认证流程链接到认证与管理登录会话页面;中英文同步调整并避免枚举成员和数值说明。"] }, { "currentPath": "/sdk/react-native/getting-started/before-you-start", diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index b53edad257..1d3baaae30 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -2898,7 +2898,7 @@ "title": "事件概览" }, "/sdk/react-native/logger": { - "body": "OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。\n\n## 初始化日志配置\n\n调用 `initSDK()` 时配置日志目录和日志级别:\n\n```ts\nawait OpenIMSDK.initSDK({\n apiAddr,\n wsAddr,\n dataDir,\n logFilePath,\n logLevel: LogLevel.Debug,\n isLogStandardOutput: true,\n});\n```\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIM 服务端 API 地址。 |\n| `wsAddr` | `string` | OpenIM WebSocket 长连接地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,应位于应用可写目录。 |\n| `logFilePath` | `string` | SDK 日志目录,应位于应用可写目录。 |\n| `logLevel` | `LogLevel` | 日志详细程度,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 |\n\n开发诊断可使用 `LogLevel.Debug`。生产环境通常使用 `LogLevel.Warn` 或 `LogLevel.Error`,并关闭不必要的标准输出。\n\n## 写入应用日志\n\n调用 `logs()` 将业务诊断信息写入 SDK 日志:\n\n```ts\nawait OpenIMSDK.logs({\n logLevel: LogLevel.Error,\n file: 'chatRepository.ts',\n line: 184,\n msgs: 'send_message_failed',\n err: error.message,\n keyAndValue: [\n 'conversationID',\n conversationID,\n 'clientMsgID',\n clientMsgID,\n ],\n});\n```\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `logLevel` | `number` | 本条日志的级别。 |\n| `file` | `string` | 调用位置所在的文件名或模块名。 |\n| `line` | `number` | 调用位置的行号。 |\n| `msgs` | `string` | 简短的业务动作或诊断描述。 |\n| `err` | `string` | 错误信息;没有错误信息时传空字符串。 |\n| `keyAndValue` | `string[]` | 附加诊断字段,按“键、值”成对传入。 |\n\n`keyAndValue` 只记录排查所需的非敏感标识,例如 `conversationID`、`clientMsgID`、`groupID` 或 `roomID`。\n\n## 上传日志\n\n用户主动提交诊断日志时,调用 `uploadLogs()` 上传客户端日志:\n\n```ts\nawait OpenIMSDK.uploadLogs({\n line: 2000,\n cancelID: 'support-ticket-42',\n ex: 'user-initiated-diagnostics',\n});\n```\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `line` | `number` | 是 | 本次上传读取的日志行数配置。 |\n| `cancelID` | `string` | 否 | 本次上传的标识。 |\n| `ex` | `string` | 否 | 附加诊断说明,不能包含凭据或隐私数据。 |\n\n调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。", + "body": "OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。\n\n## 初始化日志配置\n\n调用 `initSDK()` 时配置日志相关选项。`apiAddr`、`wsAddr`、`dataDir` 以及初始化和登录流程见[认证与管理登录会话](/sdk/react-native/getting-started/authenticate-and-manage-session)。\n\n```ts\nawait OpenIMSDK.initSDK({\n apiAddr,\n wsAddr,\n dataDir,\n logFilePath,\n logLevel: LogLevel.Debug,\n isLogStandardOutput: true,\n});\n```\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `logFilePath` | `string` | SDK 日志目录,应位于应用可写目录。 |\n| `logLevel` | `LogLevel` | 日志详细程度,可选 `Debug`、`Info`、`Warn`、`Error`、`Fatal` 和 `Panic`。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 |\n\n开发诊断可使用 `LogLevel.Debug`。生产环境通常使用 `LogLevel.Warn` 或 `LogLevel.Error`,并关闭不必要的标准输出。\n\n## 写入应用日志\n\n调用 `logs()` 将业务诊断信息写入 SDK 日志:\n\n```ts\nawait OpenIMSDK.logs({\n logLevel: LogLevel.Error,\n file: 'chatRepository.ts',\n line: 184,\n msgs: 'send_message_failed',\n err: error.message,\n keyAndValue: [\n 'conversationID',\n conversationID,\n 'clientMsgID',\n clientMsgID,\n ],\n});\n```\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `logLevel` | `number` | 本条日志的级别。 |\n| `file` | `string` | 调用位置所在的文件名或模块名。 |\n| `line` | `number` | 调用位置的行号。 |\n| `msgs` | `string` | 简短的业务动作或诊断描述。 |\n| `err` | `string` | 错误信息;没有错误信息时传空字符串。 |\n| `keyAndValue` | `string[]` | 附加诊断字段,按“键、值”成对传入。 |\n\n`keyAndValue` 只记录排查所需的非敏感标识,例如 `conversationID`、`clientMsgID`、`groupID` 或 `roomID`。\n\n## 上传日志\n\n用户主动提交诊断日志时,调用 `uploadLogs()` 上传客户端日志:\n\n```ts\nawait OpenIMSDK.uploadLogs({\n line: 2000,\n cancelID: 'support-ticket-42',\n ex: 'user-initiated-diagnostics',\n});\n```\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `line` | `number` | 是 | 本次上传读取的日志行数配置。 |\n| `cancelID` | `string` | 否 | 本次上传的标识。 |\n| `ex` | `string` | 否 | 附加诊断说明,不能包含凭据或隐私数据。 |\n\n调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。", "description": "配置 OpenIM React Native SDK 日志,写入应用诊断信息并上传日志。", "headings": [ { diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index a6db0462c9..cfb623467e 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -5677,7 +5677,7 @@ "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", - "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; 参数说明 initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别配置,使用 LogLevel 枚举。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" + "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; 参数说明 initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别配置,使用 LogLevel 枚举。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" }, { "path": "/sdk/react-native/getting-started/send-first-message", @@ -6933,7 +6933,7 @@ "description": "配置 OpenIM React Native SDK 日志,写入应用诊断信息并上传日志。", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native logger", - "content": "OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。 初始化日志配置 调用 initSDK 时配置日志目录和日志级别: await OpenIMSDK.initSDK apiAddr, wsAddr, dataDir, logFilePath, logLevel: LogLevel.Debug, isLogStandardOutput: true, ; | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIM 服务端 API 地址。 | | wsAddr | string | OpenIM WebSocket 长连接地址。 | | dataDir | string | SDK 本地数据目录,应位于应用可写目录。 | | logFilePath | string | SDK 日志目录,应位于应用可写目录。 | | logLevel | LogLevel | 日志详细程度,可选 Debug 、 Info 、 Warn 、 Error 、 Fatal 和 Panic 。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 | 开发诊断可使用 LogLevel.Debug 。生产环境通常使用 LogLevel.Warn 或 LogLevel.Error ,并关闭不必要的标准输出。 写入应用日志 调用 logs 将业务诊断信息写入 SDK 日志: await OpenIMSDK.logs logLevel: LogLevel.Error, file: 'chatRepository.ts', line: 184, msgs: 'send message failed', err: error.message, keyAndValue: 'conversationID', conversationID, 'clientMsgID', clientMsgID, , ; | 参数 | 类型 | 说明 | | | | | | logLevel | number | 本条日志的级别。 | | file | string | 调用位置所在的文件名或模块名。 | | line | number | 调用位置的行号。 | | msgs | string | 简短的业务动作或诊断描述。 | | err | string | 错误信息;没有错误信息时传空字符串。 | | keyAndValue | string | 附加诊断字段,按“键、值”成对传入。 | keyAndValue 只记录排查所需的非敏感标识,例如 conversationID 、 clientMsgID 、 groupID 或 roomID 。 上传日志 用户主动提交诊断日志时,调用 uploadLogs 上传客户端日志: await OpenIMSDK.uploadLogs line: 2000, cancelID: 'support ticket 42', ex: 'user initiated diagnostics', ; | 参数 | 类型 | 是否必填 | 说明 | | | | | | | line | number | 是 | 本次上传读取的日志行数配置。 | | cancelID | string | 否 | 本次上传的标识。 | | ex | string | 否 | 附加诊断说明,不能包含凭据或隐私数据。 | 调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。" + "content": "OpenIM React Native SDK 日志用于定位初始化、连接和业务 API 调用问题。开发和预发布环境可以输出较详细的日志;生产环境应降低日志级别,并避免记录 Token、完整消息正文、原始文件 URL、通话房间凭据和用户隐私字段。 初始化日志配置 调用 initSDK 时配置日志相关选项。 apiAddr 、 wsAddr 、 dataDir 以及初始化和登录流程见 认证与管理登录会话 /sdk/react native/getting started/authenticate and manage session 。 await OpenIMSDK.initSDK apiAddr, wsAddr, dataDir, logFilePath, logLevel: LogLevel.Debug, isLogStandardOutput: true, ; | 参数 | 类型 | 说明 | | | | | | logFilePath | string | SDK 日志目录,应位于应用可写目录。 | | logLevel | LogLevel | 日志详细程度,可选 Debug 、 Info 、 Warn 、 Error 、 Fatal 和 Panic 。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志;开发诊断时可开启。 | 开发诊断可使用 LogLevel.Debug 。生产环境通常使用 LogLevel.Warn 或 LogLevel.Error ,并关闭不必要的标准输出。 写入应用日志 调用 logs 将业务诊断信息写入 SDK 日志: await OpenIMSDK.logs logLevel: LogLevel.Error, file: 'chatRepository.ts', line: 184, msgs: 'send message failed', err: error.message, keyAndValue: 'conversationID', conversationID, 'clientMsgID', clientMsgID, , ; | 参数 | 类型 | 说明 | | | | | | logLevel | number | 本条日志的级别。 | | file | string | 调用位置所在的文件名或模块名。 | | line | number | 调用位置的行号。 | | msgs | string | 简短的业务动作或诊断描述。 | | err | string | 错误信息;没有错误信息时传空字符串。 | | keyAndValue | string | 附加诊断字段,按“键、值”成对传入。 | keyAndValue 只记录排查所需的非敏感标识,例如 conversationID 、 clientMsgID 、 groupID 或 roomID 。 上传日志 用户主动提交诊断日志时,调用 uploadLogs 上传客户端日志: await OpenIMSDK.uploadLogs line: 2000, cancelID: 'support ticket 42', ex: 'user initiated diagnostics', ; | 参数 | 类型 | 是否必填 | 说明 | | | | | | | line | number | 是 | 本次上传读取的日志行数配置。 | | cancelID | string | 否 | 本次上传的标识。 | | ex | string | 否 | 附加诊断说明,不能包含凭据或隐私数据。 | 调用返回后,日志上传请求已完成。上传前应向用户说明日志收集范围,并按隐私与合规要求处理日志。" }, { "path": "/sdk/electron/getting-started/authenticate-and-init", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index d21fda7e08..e4d16734e1 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -5677,7 +5677,7 @@ "description": "Initialize the OpenIM React Native SDK, sign in, check login status, and log out the current account.", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", - "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Parameter reference initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level configuration. Use the LogLevel enum. | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" + "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Parameter reference initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level configuration. Use the LogLevel enum. | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" }, { "path": "/sdk/react-native/getting-started/send-first-message", @@ -6933,7 +6933,7 @@ "description": "Configure OpenIM React Native SDK logging, write diagnostic information, and upload logs.", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native logger", - "content": "OpenIM React Native SDK logs help diagnose initialization, connection, and business API problems. Development and staging environments can use more detailed logs. Production should reduce the log level and avoid recording tokens, complete message bodies, raw file URLs, call room credentials, or private user fields. Configure logging during initialization Configure the log directory and level when calling initSDK : await OpenIMSDK.initSDK apiAddr, wsAddr, dataDir, logFilePath, logLevel: LogLevel.Debug, isLogStandardOutput: true, ; | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log verbosity: Debug , Info , Warn , Error , Fatal , or Panic . | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard log. Enable it for development diagnostics. | Use LogLevel.Debug for development diagnostics. Production applications usually use LogLevel.Warn or LogLevel.Error and disable unnecessary standard output. Write application logs Call logs to write business diagnostic information to the SDK log: await OpenIMSDK.logs logLevel: LogLevel.Error, file: 'chatRepository.ts', line: 184, msgs: 'send message failed', err: error.message, keyAndValue: 'conversationID', conversationID, 'clientMsgID', clientMsgID, , ; | Parameter | Type | Description | | | | | | logLevel | number | Log level for this entry. | | file | string | File or module name at the call site. | | line | number | Line number at the call site. | | msgs | string | Short business action or diagnostic description. | | err | string | Error information; pass an empty string when there is no error. | | keyAndValue | string | Additional diagnostic fields passed as key and value pairs. | Use keyAndValue only for non sensitive identifiers needed for diagnosis, such as conversationID , clientMsgID , groupID , or roomID . Upload logs When a user actively submits diagnostic logs, call uploadLogs to upload the client logs: await OpenIMSDK.uploadLogs line: 2000, cancelID: 'support ticket 42', ex: 'user initiated diagnostics', ; | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines to read for this upload. | | cancelID | string | No | Identifier for this upload. | | ex | string | No | Additional diagnostic description; it must not contain credentials or private data. | When the call returns, the log upload request has completed. Before uploading, explain the log collection scope to the user and follow privacy and compliance requirements." + "content": "OpenIM React Native SDK logs help diagnose initialization, connection, and business API problems. Development and staging environments can use more detailed logs. Production should reduce the log level and avoid recording tokens, complete message bodies, raw file URLs, call room credentials, or private user fields. Configure logging during initialization Configure the logging options when calling initSDK . For apiAddr , wsAddr , dataDir , and the initialization and sign in flow, see Authenticate and manage a session /sdk/react native/getting started/authenticate and manage session . await OpenIMSDK.initSDK apiAddr, wsAddr, dataDir, logFilePath, logLevel: LogLevel.Debug, isLogStandardOutput: true, ; | Parameter | Type | Description | | | | | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log verbosity: Debug , Info , Warn , Error , Fatal , or Panic . | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard log. Enable it for development diagnostics. | Use LogLevel.Debug for development diagnostics. Production applications usually use LogLevel.Warn or LogLevel.Error and disable unnecessary standard output. Write application logs Call logs to write business diagnostic information to the SDK log: await OpenIMSDK.logs logLevel: LogLevel.Error, file: 'chatRepository.ts', line: 184, msgs: 'send message failed', err: error.message, keyAndValue: 'conversationID', conversationID, 'clientMsgID', clientMsgID, , ; | Parameter | Type | Description | | | | | | logLevel | number | Log level for this entry. | | file | string | File or module name at the call site. | | line | number | Line number at the call site. | | msgs | string | Short business action or diagnostic description. | | err | string | Error information; pass an empty string when there is no error. | | keyAndValue | string | Additional diagnostic fields passed as key and value pairs. | Use keyAndValue only for non sensitive identifiers needed for diagnosis, such as conversationID , clientMsgID , groupID , or roomID . Upload logs When a user actively submits diagnostic logs, call uploadLogs to upload the client logs: await OpenIMSDK.uploadLogs line: 2000, cancelID: 'support ticket 42', ex: 'user initiated diagnostics', ; | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines to read for this upload. | | cancelID | string | No | Identifier for this upload. | | ex | string | No | Additional diagnostic description; it must not contain credentials or private data. | When the call returns, the log upload request has completed. Before uploading, explain the log collection scope to the user and follow privacy and compliance requirements." }, { "path": "/sdk/electron/getting-started/authenticate-and-init", From 3b6b31d62cf2d7beb6b5fcc65fcf8453dc873707 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Mon, 31 Aug 2026 15:42:43 +0800 Subject: [PATCH 12/15] fix(styles): center search dialog horizontally with top offset --- app/globals.css | 1 + 1 file changed, 1 insertion(+) diff --git a/app/globals.css b/app/globals.css index 75e7cc99d5..829be797b9 100644 --- a/app/globals.css +++ b/app/globals.css @@ -2841,6 +2841,7 @@ select { .search-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(680px, calc(100vh - 40px)); + margin: 10vh auto auto; padding: 0; overflow: hidden; border: 1px solid var(--border-strong); From 5a66ec241bf9847670dfc00c0e8d5ebf5d065a46 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Mon, 31 Aug 2026 16:03:19 +0800 Subject: [PATCH 13/15] fix(styles): align pagination arrows with navigation labels --- app/globals.css | 27 ++++++++++++++++----------- src/components/docs/pagination.tsx | 13 +++++++++---- src/components/ui/icons.tsx | 14 ++++++++++++++ 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/app/globals.css b/app/globals.css index 829be797b9..fde0197f78 100644 --- a/app/globals.css +++ b/app/globals.css @@ -2739,6 +2739,20 @@ select { text-transform: uppercase; } +.pagination a .pagination-label { + display: flex; + width: 100%; + align-items: center; + gap: 5px; +} + +.pagination a .pagination-label svg { + width: 15px; + height: 15px; + flex: 0 0 auto; + color: var(--accent); +} + .pagination a strong { min-width: 0; overflow: hidden; @@ -2752,13 +2766,8 @@ select { text-align: right; } -.pagination-next svg { - position: absolute; - right: 11px; - bottom: 10px; - width: 15px; - height: 15px; - color: var(--accent); +.pagination-next .pagination-label { + justify-content: flex-end; } .toc-nav > p { @@ -4641,10 +4650,6 @@ html.dark .guide-markdown a { grid-template-columns: 1fr; } - .pagination-next { - text-align: left; - } - .feedback-card, .site-footer { align-items: flex-start; diff --git a/src/components/docs/pagination.tsx b/src/components/docs/pagination.tsx index e8f9cad975..2b09a0bdd7 100644 --- a/src/components/docs/pagination.tsx +++ b/src/components/docs/pagination.tsx @@ -1,5 +1,5 @@ import Link from 'next/link'; -import { ChevronRightIcon } from '@/src/components/ui/icons'; +import { ChevronLeftIcon, ChevronRightIcon } from '@/src/components/ui/icons'; import type { Locale } from '@/src/lib/i18n'; import { t, toLocalizedPath } from '@/src/lib/i18n'; import type { RouteRecord } from '@/src/types/docs'; @@ -20,7 +20,10 @@ export function Pagination({ diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx index 7b3e205fd0..12affa4ef1 100644 --- a/src/components/ui/icons.tsx +++ b/src/components/ui/icons.tsx @@ -99,6 +99,20 @@ export function ChevronRightIcon(props: IconProps) { ); } +export function ChevronLeftIcon(props: IconProps) { + return ( + + + + ); +} + export function CopyIcon(props: IconProps) { return ( From 3e3482bfe49f85c127764a3e83c19076874886c6 Mon Sep 17 00:00:00 2001 From: chan <1499188352@qq.com> Date: Mon, 31 Aug 2026 17:25:17 +0800 Subject: [PATCH 14/15] fix(styles/code): unify syntax highlighting and code block controls --- app/globals.css | 37 ++++++++++++++------ source.config.ts | 11 +++++- src/components/docs/code-block.tsx | 43 ++++++++++++++++++------ src/components/docs/guides-page.tsx | 37 +++++++++++--------- src/components/docs/markdown-content.tsx | 40 +++++++++++++++------- src/components/mdx-components.tsx | 2 ++ src/lib/code-highlighting.ts | 21 ++++++++++++ 7 files changed, 142 insertions(+), 49 deletions(-) create mode 100644 src/lib/code-highlighting.ts diff --git a/app/globals.css b/app/globals.css index fde0197f78..0921352ede 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1368,7 +1368,7 @@ select { .prose-docs pre { overflow: auto; margin: 20px 0; - padding: 19px 20px; + padding: 20px 5px; border: 1px solid color-mix(in srgb, var(--border) 75%, black); border-radius: 12px; background: var(--code-bg); @@ -1386,7 +1386,7 @@ select { .prose-docs .code-block-shell pre { margin: 0; - padding-top: 48px; + padding: 20px 5px; } .prose-docs .code-block-shell.is-inside-tabs { @@ -1403,17 +1403,16 @@ select { z-index: 1; top: 10px; right: 10px; - display: inline-flex; + display: inline-grid; + width: 30px; + height: 30px; align-items: center; - gap: 6px; - min-height: 30px; - padding: 0 9px; + justify-content: center; + padding: 0; border: 1px solid rgb(255 255 255 / 0.11); border-radius: 7px; background: rgb(255 255 255 / 0.06); color: color-mix(in srgb, var(--code-text) 86%, white); - font-size: 11px; - font-weight: 700; transition: background 150ms ease, border-color 150ms ease, @@ -1427,8 +1426,13 @@ select { } .code-copy-button svg { - width: 15px; - height: 15px; + width: 14px; + height: 14px; +} + +.code-copy-button:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; } .code-tabs { @@ -3946,6 +3950,19 @@ html.dark .guide-markdown a { line-height: 1.65; } +.guide-markdown .code-block-shell { + position: relative; + margin: 20px 0; +} + +.guide-markdown .code-block-shell pre { + max-height: none; + overflow-x: auto; + overflow-y: visible; + margin: 0; + padding: 20px 5px; +} + .guide-markdown blockquote { margin: 0; padding: 14px 16px; diff --git a/source.config.ts b/source.config.ts index 31523071fd..739368ebf7 100644 --- a/source.config.ts +++ b/source.config.ts @@ -22,4 +22,13 @@ export const docs = defineDocs({ }, }); -export default defineConfig(); +export default defineConfig({ + mdxOptions: { + rehypeCodeOptions: { + themes: { + light: 'github-dark', + dark: 'github-dark', + }, + }, + }, +}); diff --git a/src/components/docs/code-block.tsx b/src/components/docs/code-block.tsx index 5b36fc7434..366b4444e2 100644 --- a/src/components/docs/code-block.tsx +++ b/src/components/docs/code-block.tsx @@ -1,12 +1,13 @@ 'use client'; -import { useState } from 'react'; +import { useRef, useState, type ComponentPropsWithoutRef, type ReactNode } from 'react'; import { CheckIcon, CopyIcon } from '@/src/components/ui/icons'; import { writeClipboardText } from '@/src/lib/clipboard'; import type { Locale } from '@/src/lib/i18n'; export type CodeTab = { code: string; + highlightedHtml?: string; language: string; title: string; }; @@ -14,21 +15,28 @@ export type CodeTab = { export function CodeBlock({ code, insideTabs = false, + highlightedHtml, + children, language, locale = 'en', + ...preProps }: { - code: string; + code?: string; insideTabs?: boolean; - language: string; + highlightedHtml?: string; + language?: string; locale?: Locale; -}) { + children?: ReactNode; +} & Omit, 'children'>) { + const codeBlockRef = useRef(null); const [copied, setCopied] = useState(false); const copyLabel = locale === 'zh' ? '复制代码' : 'Copy code'; const copiedLabel = locale === 'zh' ? '已复制' : 'Copied'; async function copyCode() { try { - await writeClipboardText(code); + const renderedCode = codeBlockRef.current?.querySelector('pre')?.textContent; + await writeClipboardText(renderedCode ?? code ?? ''); setCopied(true); window.setTimeout(() => setCopied(false), 1400); } catch { @@ -37,7 +45,7 @@ export function CodeBlock({ } return ( -
+
-
-        {code}
-      
+ {highlightedHtml ? ( +
+ ) : children !== undefined ? ( +
+
{children}
+
+ ) : ( +
+          {code ?? ''}
+        
+ )}
); } @@ -75,7 +90,13 @@ export function CodeTabs({ locale = 'en', tabs }: { locale?: Locale; tabs: CodeT ))}
- +
); } diff --git a/src/components/docs/guides-page.tsx b/src/components/docs/guides-page.tsx index fbe158056c..3ea7847f17 100644 --- a/src/components/docs/guides-page.tsx +++ b/src/components/docs/guides-page.tsx @@ -3,11 +3,13 @@ import { resolve } from 'node:path'; import Link from 'next/link'; import { notFound, redirect } from 'next/navigation'; import { Fragment, type ReactNode } from 'react'; +import { CodeBlock } from '@/src/components/docs/code-block'; import { ArticleHeader } from '@/src/components/docs/article-header'; import type { ContextOption } from '@/src/components/docs/context-picker'; import { DocsShell } from '@/src/components/docs/docs-shell'; import { ChevronRightIcon } from '@/src/components/ui/icons'; import guidesContentData from '@/src/generated/guides-content.json'; +import { highlightCode } from '@/src/lib/code-highlighting'; import { extractMarkdownHeadings } from '@/src/lib/heading-ids'; import type { Locale } from '@/src/lib/i18n'; import { toLocalizedPath } from '@/src/lib/i18n'; @@ -884,7 +886,7 @@ function GuidesBody({ ); } -function GuideMarkdown({ +async function GuideMarkdown({ body, locale, sourceMap, @@ -897,16 +899,18 @@ function GuideMarkdown({ }) { return (
- {parseGuideMarkdown(body).map((block, index) => ( - - ))} + {await Promise.all( + parseGuideMarkdown(body).map((block, index) => ( + + )), + )}
); } @@ -920,7 +924,7 @@ type GuideMarkdownBlock = | { type: 'paragraph'; text: string } | { type: 'table'; rows: string[][] }; -function GuideMarkdownBlock({ +async function GuideMarkdownBlock({ block, index, locale, @@ -964,9 +968,12 @@ function GuideMarkdownBlock({ if (block.type === 'code') { return ( -
-        {block.code}
-      
+ ); } diff --git a/src/components/docs/markdown-content.tsx b/src/components/docs/markdown-content.tsx index 8dbf4a4560..a2f8ceaee9 100644 --- a/src/components/docs/markdown-content.tsx +++ b/src/components/docs/markdown-content.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; import { Fragment, type ReactNode } from 'react'; import { CodeBlock, CodeTabs, type CodeTab } from '@/src/components/docs/code-block'; import { createHeadingIdGenerator } from '@/src/lib/heading-ids'; +import { highlightCode } from '@/src/lib/code-highlighting'; import type { Locale } from '@/src/lib/i18n'; import { t, toLocalizedPath } from '@/src/lib/i18n'; import { matchCommercialSymbol } from '@/src/lib/client-sdk-commercial'; @@ -21,7 +22,7 @@ type InlineRenderOptions = { locale: Locale; }; -export function MarkdownContent({ +export async function MarkdownContent({ body, locale, commercialNames, @@ -34,19 +35,21 @@ export function MarkdownContent({ return ( <> - {parseMarkdown(body).map((block, index) => ( - - ))} + {await Promise.all( + parseMarkdown(body).map((block, index) => ( + + )), + )} ); } -function MarkdownBlockView({ +async function MarkdownBlockView({ block, index, inlineOptions, @@ -81,11 +84,24 @@ function MarkdownBlockView({ } if (block.type === 'code') { - return ; + return ( + + ); } if (block.type === 'codeTabs') { - return ; + const tabs = await Promise.all( + block.tabs.map(async (tab) => ({ + ...tab, + highlightedHtml: await highlightCode(tab.code, tab.language), + })), + ); + return ; } if (block.type === 'list') { diff --git a/src/components/mdx-components.tsx b/src/components/mdx-components.tsx index cf4edb23c9..642a815841 100644 --- a/src/components/mdx-components.tsx +++ b/src/components/mdx-components.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; import type { ComponentPropsWithoutRef } from 'react'; import type { MDXComponents } from 'mdx/types'; import defaultMdxComponents from 'fumadocs-ui/mdx'; +import { CodeBlock } from '@/src/components/docs/code-block'; import { ChatHero, FeaturedSamplesSection, @@ -29,6 +30,7 @@ function SmartLink({ export function getMDXComponents(locale: Locale = 'en', components?: MDXComponents): MDXComponents { return { ...defaultMdxComponents, + pre: (props) => , a: (props) => , ChatHero: (props) => , FeaturedSamplesSection: () => , diff --git a/src/lib/code-highlighting.ts b/src/lib/code-highlighting.ts new file mode 100644 index 0000000000..b0293dfc0c --- /dev/null +++ b/src/lib/code-highlighting.ts @@ -0,0 +1,21 @@ +import { codeToHtml } from 'shiki'; + +const codeTheme = { + light: 'github-dark', + dark: 'github-dark', +} as const; + +/** Render code on the server so custom Markdown uses the same Shiki theme as MDX. */ +export async function highlightCode(code: string, language: string) { + const options = { + defaultColor: false, + lang: language || 'text', + themes: codeTheme, + } as const; + + try { + return await codeToHtml(code, options); + } catch { + return await codeToHtml(code, { ...options, lang: 'text' }); + } +} From 597cb0011366bc5ef3fc3a924e1f192931d0e42e Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Mon, 31 Aug 2026 18:22:04 +0800 Subject: [PATCH 15/15] fix(docs): align React Native public API examples --- .../authenticate-and-manage-session.mdx | 2 +- .../create-targeted-group-message.mdx | 31 ----- .../authenticate-and-manage-session.mdx | 2 +- .../create-targeted-group-message.mdx | 31 ----- data/structure/chat-pages.json | 8 -- .../structure/react-native-content-audit.json | 31 +++-- data/structure/react-native-sidebar.json | 4 - src/generated/navigation.json | 112 ++++++++---------- .../react-native-sdk-zh-content.json | 20 +--- src/generated/routes.json | 102 +++++++--------- src/generated/search-index-zh.json | 10 +- src/generated/search-index.json | 10 +- 12 files changed, 114 insertions(+), 249 deletions(-) delete mode 100644 content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx delete mode 100644 content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx diff --git a/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx b/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx index a8ade35b34..5445c9c6c1 100644 --- a/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx +++ b/content/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx @@ -48,7 +48,7 @@ await OpenIMSDK.initSDK({ Use the application document directory provided by `expo-file-system`. Its URI includes the `file://` prefix, which must be removed before passing it to the SDK: ```ts -import { LogLevel } from '@openim/rn-client-sdk'; +import OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk'; import * as FileSystem from "expo-file-system/legacy"; const dataDir = FileSystem.documentDirectory.replace(/^file:\/\//, '').replace(/\/$/, ''); diff --git a/content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx b/content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx deleted file mode 100644 index 538d7d8d1d..0000000000 --- a/content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: 'Create a targeted group message' -description: 'OpenIM React Native SDK guide for create a targeted group message.' -product: 'sdk' -context: 'chat/sdk/react-native' -template: 'guide' -status: 'draft' -version: 'v4' -platform: 'react-native' -sourcePath: '/sdk/react-native/message/creating-messages/create-targeted-group-message' ---- - -Use `createTargetedGroupMessage()` to create a message object delivered only to selected group members. - -```ts -const textMessage = await OpenIMSDK.createTextMessage('Please review this, relevant members.'); - -const message = await OpenIMSDK.createTargetedGroupMessage({ - message: textMessage, - dstUserIDs: ['user-001', 'user-002'], -}); -``` - -## Parameters - -| Parameter | Type | Required | Description | -| --- | --- | --- | --- | -| `message` | `MessageItem` | Yes | Message object to send selectively. | -| `dstUserIDs` | `string[]` | Yes | User IDs of group members who receive the message. | - -The call returns a `MessageItem` ready to send. Pass the target group in `groupID` and use [Send a message](/sdk/react-native/message/sending-messages/send-message) to deliver it. diff --git a/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx b/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx index 1b8191d3de..2633b87093 100644 --- a/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx +++ b/content/zh/docs/chat/sdk/react-native/getting-started/authenticate-and-manage-session.mdx @@ -41,7 +41,7 @@ await OpenIMSDK.initSDK({ Expo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀: ```ts -import { LogLevel } from '@openim/rn-client-sdk'; +import OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk'; import * as FileSystem from "expo-file-system/legacy"; const dataDir = FileSystem.documentDirectory.replace(/^file:\/\//, '').replace(/\/$/, ''); diff --git a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx b/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx deleted file mode 100644 index e2d3278d6f..0000000000 --- a/content/zh/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: '创建定向群消息' -description: 'OpenIM React Native SDK 创建定向群消息。' -product: 'sdk' -context: 'chat/sdk/react-native' -template: 'guide' -status: 'draft' -version: 'v4' -platform: 'react-native' -sourcePath: '/sdk/react-native/message/creating-messages/create-targeted-group-message' ---- - -使用 `createTargetedGroupMessage()` 创建仅定向投递给指定群成员的消息对象。 - -```ts -const textMessage = await OpenIMSDK.createTextMessage('请相关成员查看。'); - -const message = await OpenIMSDK.createTargetedGroupMessage({ - message: textMessage, - dstUserIDs: ['user-001', 'user-002'], -}); -``` - -## 参数说明 - -| 参数 | 类型 | 是否必填 | 说明 | -| --- | --- | --- | --- | -| `message` | `MessageItem` | 是 | 要定向发送的消息对象。 | -| `dstUserIDs` | `string[]` | 是 | 接收该消息的群成员用户 ID 列表。 | - -调用后返回待发送的 `MessageItem`。发送时在 `groupID` 中指定目标群组,并通过[发送消息](/sdk/react-native/message/sending-messages/send-message)投递。 diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index 4a5b7c106c..7b73f05fe2 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -7615,14 +7615,6 @@ "template": "guide", "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx" }, - { - "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "openimPath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "Create a targeted group message", - "context": "chat/sdk/react-native", - "template": "guide", - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx" - }, { "sourcePath": "/sdk/react-native/message/sending-messages/send-message", "openimPath": "/sdk/react-native/message/sending-messages/send-message", diff --git a/data/structure/react-native-content-audit.json b/data/structure/react-native-content-audit.json index eb8af118b8..5c6fdc8fde 100644 --- a/data/structure/react-native-content-audit.json +++ b/data/structure/react-native-content-audit.json @@ -5054,7 +5054,7 @@ "currentPath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", "targetPath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", "sourceKind": "openim-specific", - "disposition": "adapt", + "disposition": "omit", "openimSources": [ "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs", "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" @@ -5065,26 +5065,22 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "published", + "reviewStatus": "structure-only", "reviewer": "Codex", - "reviewedAt": "2026-08-26", + "reviewedAt": "2026-08-31", "exampleVerification": { - "status": "verified", - "evidence": [ - "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" - ], - "reason": null + "status": "not-applicable", + "evidence": [], + "reason": "定向群消息不纳入公开客户端 SDK 文档。" } }, "en": { - "reviewStatus": "published", - "reviewer": "Codex", - "reviewedAt": "2026-08-27", + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, "exampleVerification": { - "status": "verified", - "evidence": [ - "https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c" - ], + "status": "pending", + "evidence": [], "reason": null } } @@ -5092,7 +5088,8 @@ "redirectTo": null, "notes": [ "2026-08-25:已按 React Native SDK 固定提交核对公开方法、参数、返回结果和页面示例。", - "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration." + "2026-08-27:English page translated from the reviewed Chinese content and verified against the pinned React Native SDK declaration.", + "2026-08-31:定向群消息不纳入公开客户端 SDK 文档,已移除中英文页面和导航入口;保留本记录用于追溯。" ] }, { @@ -6594,7 +6591,7 @@ "sdkEvents": [], "locales": { "zh": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-31", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } }, "en": { "reviewStatus": "published", "reviewer": "Codex", "reviewedAt": "2026-08-31", "exampleVerification": { "status": "verified", "evidence": ["https://github.com/OpenIMSDK/Open-IM-SDK-ReactNative/tree/fa1e4084a374d381bd2b3e45abc43447b296894c"], "reason": null } } }, "redirectTo": null, - "notes": ["2026-08-28:参考 WASM 认证流程,按 React Native SDK 的 initSDK、login、登录状态查询和 logout 声明整理。", "2026-08-31:将 initSDK 参数说明调整为与 React Native CLI、Expo 同级的共同章节,并复核中英文页面结构。", "2026-08-31:不在认证页枚举 LogLevel 成员或数值,改为提示使用当前 SDK 版本声明的 LogLevel 值,以兼容各端取值差异。", "2026-08-31:补充认证页示例对 LogLevel 命名导出的导入,并同步中英文正文。", "2026-08-31:重新同步中文正文生成内容和搜索索引,并复核用户更新后的导入示例。"] + "notes": ["2026-08-28:参考 WASM 认证流程,按 React Native SDK 的 initSDK、login、登录状态查询和 logout 声明整理。", "2026-08-31:将 initSDK 参数说明调整为与 React Native CLI、Expo 同级的共同章节,并复核中英文页面结构。", "2026-08-31:不在认证页枚举 LogLevel 成员或数值,改为提示使用当前 SDK 版本声明的 LogLevel 值,以兼容各端取值差异。", "2026-08-31:补充认证页示例对 LogLevel 命名导出的导入,并同步中英文正文。", "2026-08-31:重新同步中文正文生成内容和搜索索引,并复核用户更新后的导入示例。", "2026-08-31:修正 React Native CLI 与 Expo 初始化示例,确保两处均显式导入 OpenIMSDK 默认导出和 LogLevel 命名导出。"] }, { "currentPath": "/sdk/react-native/getting-started/send-first-message", diff --git a/data/structure/react-native-sidebar.json b/data/structure/react-native-sidebar.json index 19776d9c65..601b1c4665 100644 --- a/data/structure/react-native-sidebar.json +++ b/data/structure/react-native-sidebar.json @@ -607,10 +607,6 @@ { "path": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", "navigationTitle": "Create a rich-text reply" - }, - { - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "navigationTitle": "Create a targeted group message" } ] }, diff --git a/src/generated/navigation.json b/src/generated/navigation.json index f4dd9be66b..af1ae7b7ca 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -11460,16 +11460,6 @@ "children": [], "minIndex": 636, "navigationTitle": "Create a rich-text reply" - }, - { - "id": "message/creating-messages/create-targeted-group-message", - "segment": "create-targeted-group-message", - "title": "Create a targeted group message", - "href": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "type": "page", - "children": [], - "minIndex": 637, - "navigationTitle": "Create a targeted group message" } ], "minIndex": 617 @@ -11488,7 +11478,7 @@ "href": "/sdk/react-native/message/sending-messages/send-message", "type": "page", "children": [], - "minIndex": 638, + "minIndex": 637, "navigationTitle": "Send a message" }, { @@ -11498,11 +11488,11 @@ "href": "/sdk/react-native/message/sending-messages/send-message-not-oss", "type": "page", "children": [], - "minIndex": 639, + "minIndex": 638, "navigationTitle": "Send a message without OSS" } ], - "minIndex": 638 + "minIndex": 637 }, { "id": "message/receiving-messages/receive-messages", @@ -11511,7 +11501,7 @@ "href": "/sdk/react-native/message/receiving-messages/receive-messages", "type": "page", "children": [], - "minIndex": 640 + "minIndex": 639 }, { "id": "message/receiving-messages/receive-custom-business-messages", @@ -11520,7 +11510,7 @@ "href": "/sdk/react-native/message/receiving-messages/receive-custom-business-messages", "type": "page", "children": [], - "minIndex": 641, + "minIndex": 640, "navigationTitle": "Receive custom business messages" }, { @@ -11537,7 +11527,7 @@ "href": "/sdk/react-native/message/retrieving-messages/load-older-messages", "type": "page", "children": [], - "minIndex": 642, + "minIndex": 641, "navigationTitle": "Load older messages" }, { @@ -11547,7 +11537,7 @@ "href": "/sdk/react-native/message/retrieving-messages/load-newer-messages", "type": "page", "children": [], - "minIndex": 643, + "minIndex": 642, "navigationTitle": "Load newer messages" }, { @@ -11557,7 +11547,7 @@ "href": "/sdk/react-native/message/retrieving-messages/find-messages-by-id", "type": "page", "children": [], - "minIndex": 644, + "minIndex": 643, "navigationTitle": "Find messages by ID" }, { @@ -11567,7 +11557,7 @@ "href": "/sdk/react-native/message/retrieving-messages/load-message-context", "type": "page", "children": [], - "minIndex": 645, + "minIndex": 644, "navigationTitle": "Load message context" }, { @@ -11577,10 +11567,10 @@ "href": "/sdk/react-native/message/searching-messages/search-messages", "type": "page", "children": [], - "minIndex": 646 + "minIndex": 645 } ], - "minIndex": 642 + "minIndex": 641 }, { "id": "message/composing-messages", @@ -11596,7 +11586,7 @@ "href": "/sdk/react-native/message/composing-messages/update-typing-status", "type": "page", "children": [], - "minIndex": 647, + "minIndex": 646, "navigationTitle": "Update typing status" }, { @@ -11606,7 +11596,7 @@ "href": "/sdk/react-native/message/composing-messages/get-typing-status", "type": "page", "children": [], - "minIndex": 648, + "minIndex": 647, "navigationTitle": "Get typing status" }, { @@ -11616,7 +11606,7 @@ "href": "/sdk/react-native/message/composing-messages/change-input-states", "type": "page", "children": [], - "minIndex": 649, + "minIndex": 648, "navigationTitle": "Update input states" }, { @@ -11626,7 +11616,7 @@ "href": "/sdk/react-native/message/composing-messages/check-speech-to-text", "type": "page", "children": [], - "minIndex": 650, + "minIndex": 649, "navigationTitle": "Check speech recognition support" }, { @@ -11636,7 +11626,7 @@ "href": "/sdk/react-native/message/composing-messages/transcribe-audio", "type": "page", "children": [], - "minIndex": 651, + "minIndex": 650, "navigationTitle": "Transcribe an audio file" }, { @@ -11646,11 +11636,11 @@ "href": "/sdk/react-native/message/composing-messages/save-local-transcript", "type": "page", "children": [], - "minIndex": 652, + "minIndex": 651, "navigationTitle": "Save a local transcript" } ], - "minIndex": 647 + "minIndex": 646 }, { "id": "message/managing-messages", @@ -11666,7 +11656,7 @@ "href": "/sdk/react-native/message/managing-messages/delete-local-message", "type": "page", "children": [], - "minIndex": 653, + "minIndex": 652, "navigationTitle": "Delete a local message" }, { @@ -11676,7 +11666,7 @@ "href": "/sdk/react-native/message/managing-messages/delete-saved-messages", "type": "page", "children": [], - "minIndex": 654, + "minIndex": 653, "navigationTitle": "Delete saved messages" }, { @@ -11686,7 +11676,7 @@ "href": "/sdk/react-native/message/managing-messages/delete-user-messages", "type": "page", "children": [], - "minIndex": 655, + "minIndex": 654, "navigationTitle": "Delete messages from a user" }, { @@ -11696,7 +11686,7 @@ "href": "/sdk/react-native/message/managing-messages/revoke-a-message", "type": "page", "children": [], - "minIndex": 656 + "minIndex": 655 }, { "id": "message/managing-messages/modify-a-message", @@ -11705,7 +11695,7 @@ "href": "/sdk/react-native/message/managing-messages/modify-a-message", "type": "page", "children": [], - "minIndex": 657 + "minIndex": 656 }, { "id": "message/managing-messages/insert-local-single-message", @@ -11714,7 +11704,7 @@ "href": "/sdk/react-native/message/managing-messages/insert-local-single-message", "type": "page", "children": [], - "minIndex": 658, + "minIndex": 657, "navigationTitle": "Insert a local direct message" }, { @@ -11724,7 +11714,7 @@ "href": "/sdk/react-native/message/managing-messages/insert-local-group-message", "type": "page", "children": [], - "minIndex": 659, + "minIndex": 658, "navigationTitle": "Insert a local group message" }, { @@ -11734,7 +11724,7 @@ "href": "/sdk/react-native/message/managing-messages/clear-all-local-messages", "type": "page", "children": [], - "minIndex": 660, + "minIndex": 659, "navigationTitle": "Clear all local messages" }, { @@ -11744,7 +11734,7 @@ "href": "/sdk/react-native/message/managing-messages/clear-all-messages", "type": "page", "children": [], - "minIndex": 661, + "minIndex": 660, "navigationTitle": "Clear all saved messages" }, { @@ -11754,11 +11744,11 @@ "href": "/sdk/react-native/message/managing-messages/set-message-local-ex", "type": "page", "children": [], - "minIndex": 662, + "minIndex": 661, "navigationTitle": "Set local message extensions" } ], - "minIndex": 653 + "minIndex": 652 }, { "id": "message/group-message-read-status", @@ -11774,7 +11764,7 @@ "href": "/sdk/react-native/message/managing-read-status/send-group-read-receipts", "type": "page", "children": [], - "minIndex": 663, + "minIndex": 662, "navigationTitle": "Send group read receipts" }, { @@ -11784,11 +11774,11 @@ "href": "/sdk/react-native/message/managing-read-status/get-group-message-readers", "type": "page", "children": [], - "minIndex": 664, + "minIndex": 663, "navigationTitle": "View group message readers" } ], - "minIndex": 663 + "minIndex": 662 } ], "minIndex": 616 @@ -11800,7 +11790,7 @@ "href": "/sdk/react-native/file-uploads/upload-file", "type": "page", "children": [], - "minIndex": 665, + "minIndex": 664, "navigationTitle": "Upload a file" }, { @@ -11817,7 +11807,7 @@ "href": "/sdk/react-native/calling/overview-calling", "type": "page", "children": [], - "minIndex": 666 + "minIndex": 665 }, { "id": "calling/managing-calls", @@ -11833,7 +11823,7 @@ "href": "/sdk/react-native/calling/managing-calls/start-single-call", "type": "page", "children": [], - "minIndex": 667, + "minIndex": 666, "navigationTitle": "Start a one-to-one call" }, { @@ -11843,7 +11833,7 @@ "href": "/sdk/react-native/calling/managing-calls/start-group-call", "type": "page", "children": [], - "minIndex": 668, + "minIndex": 667, "navigationTitle": "Start a group call" }, { @@ -11853,7 +11843,7 @@ "href": "/sdk/react-native/calling/managing-calls/accept-call", "type": "page", "children": [], - "minIndex": 669, + "minIndex": 668, "navigationTitle": "Accept a call" }, { @@ -11863,7 +11853,7 @@ "href": "/sdk/react-native/calling/managing-calls/reject-call", "type": "page", "children": [], - "minIndex": 670, + "minIndex": 669, "navigationTitle": "Reject a call" }, { @@ -11873,7 +11863,7 @@ "href": "/sdk/react-native/calling/managing-calls/cancel-call", "type": "page", "children": [], - "minIndex": 671, + "minIndex": 670, "navigationTitle": "Cancel a call invitation" }, { @@ -11883,7 +11873,7 @@ "href": "/sdk/react-native/calling/managing-calls/hang-up-call", "type": "page", "children": [], - "minIndex": 672, + "minIndex": 671, "navigationTitle": "Hang up a call" }, { @@ -11893,11 +11883,11 @@ "href": "/sdk/react-native/calling/managing-calls/handle-call-events", "type": "page", "children": [], - "minIndex": 673, + "minIndex": 672, "navigationTitle": "Handle call events" } ], - "minIndex": 667 + "minIndex": 666 }, { "id": "calling/retrieving-call-information", @@ -11913,7 +11903,7 @@ "href": "/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation", "type": "page", "children": [], - "minIndex": 674, + "minIndex": 673, "navigationTitle": "Restore a pending invitation" }, { @@ -11923,7 +11913,7 @@ "href": "/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id", "type": "page", "children": [], - "minIndex": 675, + "minIndex": 674, "navigationTitle": "Get a group call room" }, { @@ -11933,11 +11923,11 @@ "href": "/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id", "type": "page", "children": [], - "minIndex": 676, + "minIndex": 675, "navigationTitle": "Get room credentials" } ], - "minIndex": 674 + "minIndex": 673 }, { "id": "calling/sending-custom-signals/send-a-custom-signal", @@ -11946,11 +11936,11 @@ "href": "/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal", "type": "page", "children": [], - "minIndex": 677, + "minIndex": 676, "navigationTitle": "Send a custom signal" } ], - "minIndex": 666 + "minIndex": 665 }, { "id": "events/overview-events", @@ -11959,7 +11949,7 @@ "href": "/sdk/react-native/events/overview-events", "type": "page", "children": [], - "minIndex": 678, + "minIndex": 677, "navigationTitle": "Events" }, { @@ -11969,10 +11959,10 @@ "href": "/sdk/react-native/logger", "type": "page", "children": [], - "minIndex": 679 + "minIndex": 678 } ], - "pageCount": 161, + "pageCount": 160, "sidebarExpansion": "active-path" }, { diff --git a/src/generated/react-native-sdk-zh-content.json b/src/generated/react-native-sdk-zh-content.json index 1d3baaae30..ce01e91919 100644 --- a/src/generated/react-native-sdk-zh-content.json +++ b/src/generated/react-native-sdk-zh-content.json @@ -1,8 +1,8 @@ { "sourceContext": "chat/sdk/react-native", "sourceRoot": "content/zh/docs/chat/sdk/react-native", - "pageCount": 161, - "manualPageCount": 161, + "pageCount": 160, + "manualPageCount": 160, "pendingPaths": [], "reviewStates": { "/sdk/react-native/overview": "published", @@ -123,7 +123,6 @@ "/sdk/react-native/message/creating-messages/create-merger-message": "published", "/sdk/react-native/message/creating-messages/create-advanced-text-message": "published", "/sdk/react-native/message/creating-messages/create-advanced-quote-message": "published", - "/sdk/react-native/message/creating-messages/create-targeted-group-message": "published", "/sdk/react-native/message/sending-messages/send-message": "published", "/sdk/react-native/message/sending-messages/send-message-not-oss": "published", "/sdk/react-native/message/receiving-messages/receive-messages": "published", @@ -457,7 +456,7 @@ "title": "按 React Native 环境接入" }, "/sdk/react-native/getting-started/authenticate-and-manage-session": { - "body": "开始本页操作前,请先完成[开始之前](/sdk/react-native/getting-started/before-you-start)和[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)中的准备工作。OpenIM React Native SDK 使用 `initSDK()` 初始化 SDK,再使用 `login()` 登录当前用户并建立与服务器的连接。\n\n完整流程如下:\n\n1. 调用 `initSDK()` 初始化 SDK。\n2. 设置 `onConnecting`、`onConnectSuccess` 和 `onConnectFailed` 事件监听。\n3. 调用 `login()` 登录当前用户。\n4. 等待 `onConnectSuccess` 触发,表示登录成功并已连接服务器。\n5. 主动退出或切换账号时调用 `logout()`。\n\n## 初始化 SDK\n\n调用 `initSDK()` 传入服务地址、本地数据目录和日志配置。`dataDir` 和 `logFilePath` 应使用应用可写的持久化目录。\n\n### React Native CLI\n\n```ts\nimport OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk';\nimport RNFS from 'react-native-fs';\n\nconst dataDir = RNFS.DocumentDirectoryPath;\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: LogLevel.Info,\n isLogStandardOutput: true,\n});\n```\n\n### Expo\n\nExpo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀:\n\n```ts\nimport { LogLevel } from '@openim/rn-client-sdk';\nimport * as FileSystem from \"expo-file-system/legacy\";\n\nconst dataDir = FileSystem.documentDirectory.replace(/^file:\\/\\//, '').replace(/\\/$/, '');\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: LogLevel.Info,\n isLogStandardOutput: true,\n});\n```\n\n### 参数说明\n\n`initSDK()` 的参数如下:\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 |\n| `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 |\n| `logLevel` | `LogLevel` | 日志级别配置,使用 `LogLevel` 枚举。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 |\n\n## 注册连接事件\n\n调用 `login()` 前设置连接事件监听。可以使用 `OpenIMEvent` 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程:\n\n```ts\nconst handleConnecting = () => {\n console.log(\"onConnecting\")\n};\n\nconst handleConnectSuccess = () => {\n console.log(\"onConnectSuccess\")\n};\n\nconst handleConnectFailed = (error: OpenIMEventBaseErrorType) => {\n console.log(\"onConnectFailed\", error.errCode, error.errMsg)\n};\n\n// 设置监听\nOpenIMSDK.on('onConnecting', handleConnecting);\nOpenIMSDK.on('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.on('onConnectFailed', handleConnectFailed);\n```\n\n## 登录当前用户\n\n调用 `login()` 传入可信后端返回的 `userID` 和 Token:\n\n```ts\nawait OpenIMSDK.login({\n userID,\n token,\n});\n```\n\n调用 `login()` 后等待 `onConnectSuccess` 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。\n\n## 查询登录状态\n\n`getLoginStatus()` 查询当前登录状态:\n\n```ts\nconst loginStatus = await OpenIMSDK.getLoginStatus();\n```\n\n`LoginStatus` 包含以下状态:\n\n| 状态 | 说明 |\n| --- | --- |\n| `LoginStatus.Logout` | 当前 SDK 实例未登录。 |\n| `LoginStatus.Logging` | 登录流程正在进行。 |\n| `LoginStatus.Logged` | 当前 SDK 实例已登录。 |\n\n## 退出登录和切换账号\n\n主动退出或切换账号时调用 `logout()`,并清理应用中保存的当前账号数据:\n\n```ts\nawait OpenIMSDK.logout();\n```\n\n切换账号时先完成旧账号退出,再使用新账号的参数调用 `login()`,无需重复 `initSDK`。不应在旧账号仍处于登录状态时登录新账号。\n\n## 取消事件监听\n\n退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()`:\n\n```ts\n// 取消监听\nOpenIMSDK.off('onConnecting', handleConnecting);\nOpenIMSDK.off('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.off('onConnectFailed', handleConnectFailed);\n```\n\n## 下一步\n\n- [发送第一条消息](/sdk/react-native/getting-started/send-first-message)", + "body": "开始本页操作前,请先完成[开始之前](/sdk/react-native/getting-started/before-you-start)和[按 React Native 环境接入](/sdk/react-native/getting-started/environment-specific-implementation)中的准备工作。OpenIM React Native SDK 使用 `initSDK()` 初始化 SDK,再使用 `login()` 登录当前用户并建立与服务器的连接。\n\n完整流程如下:\n\n1. 调用 `initSDK()` 初始化 SDK。\n2. 设置 `onConnecting`、`onConnectSuccess` 和 `onConnectFailed` 事件监听。\n3. 调用 `login()` 登录当前用户。\n4. 等待 `onConnectSuccess` 触发,表示登录成功并已连接服务器。\n5. 主动退出或切换账号时调用 `logout()`。\n\n## 初始化 SDK\n\n调用 `initSDK()` 传入服务地址、本地数据目录和日志配置。`dataDir` 和 `logFilePath` 应使用应用可写的持久化目录。\n\n### React Native CLI\n\n```ts\nimport OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk';\nimport RNFS from 'react-native-fs';\n\nconst dataDir = RNFS.DocumentDirectoryPath;\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: LogLevel.Info,\n isLogStandardOutput: true,\n});\n```\n\n### Expo\n\nExpo 项目使用 `expo-file-system` 提供的应用文档目录,再调用 `initSDK()`。`documentDirectory` 返回的 URI 包含 `file://` 前缀,传给 SDK 前需要移除该前缀:\n\n```ts\nimport OpenIMSDK, { LogLevel } from '@openim/rn-client-sdk';\nimport * as FileSystem from \"expo-file-system/legacy\";\n\nconst dataDir = FileSystem.documentDirectory.replace(/^file:\\/\\//, '').replace(/\\/$/, '');\n\nawait OpenIMSDK.initSDK({\n apiAddr: 'http://your-server-ip:10002',\n wsAddr: 'ws://your-server-ip:10001',\n dataDir,\n logFilePath: dataDir,\n logLevel: LogLevel.Info,\n isLogStandardOutput: true,\n});\n```\n\n### 参数说明\n\n`initSDK()` 的参数如下:\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string` | SDK 本地数据目录,必须位于应用可写路径。 |\n| `logFilePath` | `string` | SDK 日志目录,必须位于应用可写路径。 |\n| `logLevel` | `LogLevel` | 日志级别配置,使用 `LogLevel` 枚举。 |\n| `isLogStandardOutput` | `boolean` | 是否输出 SDK 日志到平台标准日志。 |\n\n## 注册连接事件\n\n调用 `login()` 前设置连接事件监听。可以使用 `OpenIMEvent` 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程:\n\n```ts\nconst handleConnecting = () => {\n console.log(\"onConnecting\")\n};\n\nconst handleConnectSuccess = () => {\n console.log(\"onConnectSuccess\")\n};\n\nconst handleConnectFailed = (error: OpenIMEventBaseErrorType) => {\n console.log(\"onConnectFailed\", error.errCode, error.errMsg)\n};\n\n// 设置监听\nOpenIMSDK.on('onConnecting', handleConnecting);\nOpenIMSDK.on('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.on('onConnectFailed', handleConnectFailed);\n```\n\n## 登录当前用户\n\n调用 `login()` 传入可信后端返回的 `userID` 和 Token:\n\n```ts\nawait OpenIMSDK.login({\n userID,\n token,\n});\n```\n\n调用 `login()` 后等待 `onConnectSuccess` 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。\n\n## 查询登录状态\n\n`getLoginStatus()` 查询当前登录状态:\n\n```ts\nconst loginStatus = await OpenIMSDK.getLoginStatus();\n```\n\n`LoginStatus` 包含以下状态:\n\n| 状态 | 说明 |\n| --- | --- |\n| `LoginStatus.Logout` | 当前 SDK 实例未登录。 |\n| `LoginStatus.Logging` | 登录流程正在进行。 |\n| `LoginStatus.Logged` | 当前 SDK 实例已登录。 |\n\n## 退出登录和切换账号\n\n主动退出或切换账号时调用 `logout()`,并清理应用中保存的当前账号数据:\n\n```ts\nawait OpenIMSDK.logout();\n```\n\n切换账号时先完成旧账号退出,再使用新账号的参数调用 `login()`,无需重复 `initSDK`。不应在旧账号仍处于登录状态时登录新账号。\n\n## 取消事件监听\n\n退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 `off()`:\n\n```ts\n// 取消监听\nOpenIMSDK.off('onConnecting', handleConnecting);\nOpenIMSDK.off('onConnectSuccess', handleConnectSuccess);\nOpenIMSDK.off('onConnectFailed', handleConnectFailed);\n```\n\n## 下一步\n\n- [发送第一条消息](/sdk/react-native/getting-started/send-first-message)", "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", "headings": [ { @@ -2305,19 +2304,6 @@ "sourcePath": "/sdk/react-native/message/creating-messages/create-advanced-quote-message", "title": "创建富文本回复消息" }, - "/sdk/react-native/message/creating-messages/create-targeted-group-message": { - "body": "使用 `createTargetedGroupMessage()` 创建仅定向投递给指定群成员的消息对象。\n\n```ts\nconst textMessage = await OpenIMSDK.createTextMessage('请相关成员查看。');\n\nconst message = await OpenIMSDK.createTargetedGroupMessage({\n message: textMessage,\n dstUserIDs: ['user-001', 'user-002'],\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `message` | `MessageItem` | 是 | 要定向发送的消息对象。 |\n| `dstUserIDs` | `string[]` | 是 | 接收该消息的群成员用户 ID 列表。 |\n\n调用后返回待发送的 `MessageItem`。发送时在 `groupID` 中指定目标群组,并通过[发送消息](/sdk/react-native/message/sending-messages/send-message)投递。", - "description": "OpenIM React Native SDK 创建定向群消息。", - "headings": [ - { - "depth": 2, - "title": "参数说明", - "url": "#参数说明" - } - ], - "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "创建定向群消息" - }, "/sdk/react-native/message/sending-messages/send-message": { "body": "调用 `sendMessage()` 发送由消息创建 API 返回的 `MessageItem`。单聊填写 `recvID`,群聊填写 `groupID`。\n\n使用本地路径创建的图片、音频、视频和文件消息时,SDK 会在发送过程中自动上传资源。对于已通过 URL 创建、已有远端资源的媒体消息,请使用[发送已上传的媒体消息](/sdk/react-native/message/sending-messages/send-message-not-oss)。\n\n```ts\nconst sentMessage = await OpenIMSDK.sendMessage({\n recvID: receiverUserID,\n groupID: '',\n message,\n});\n```\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时传入接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时传入目标群组 ID;单聊时传空字符串。 |\n| `message` | `MessageItem` | 是 | 待发送消息。 |\n| `offlinePushInfo` | `OfflinePush` | 否 | 离线推送配置。 |\n| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递。 |\n\n调用后返回发送完成的 `MessageItem`。\n\n发送过程有进度时会触发 `SendMessageProgress`,回调参数包含 `progress` 和 `message`:\n\n```ts\nfunction handleSendMessageProgress(info) {\n // ...\n}\n\n// 设置监听\nOpenIMSDK.on(OpenIMEvent.SendMessageProgress, handleSendMessageProgress);\n\n// 取消监听\nOpenIMSDK.off(OpenIMEvent.SendMessageProgress, handleSendMessageProgress);\n```\n\n组件销毁、退出登录或切换账号时,取消监听。", "description": "OpenIM React Native SDK 发送消息。", diff --git a/src/generated/routes.json b/src/generated/routes.json index e021814d01..8710cea470 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -14831,24 +14831,6 @@ "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-advanced-quote-message.mdx", "navOrder": 636 }, - { - "id": 2551, - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "relativePath": "sdk/react-native/message/creating-messages/create-targeted-group-message", - "sourcePath": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "Create a targeted group message", - "description": "OpenIM React Native SDK guide for create a targeted group message.", - "product": "sdk", - "version": "v4", - "platform": "react-native", - "contextKey": "chat/sdk/react-native", - "contextTitle": "SDKs · React Native · v4", - "template": "guide", - "status": "draft", - "sourceIndex": 3921, - "contentFile": "content/docs/chat/sdk/react-native/message/creating-messages/create-targeted-group-message.mdx", - "navOrder": 637 - }, { "id": 2552, "path": "/sdk/react-native/message/sending-messages/send-message", @@ -14865,7 +14847,7 @@ "status": "draft", "sourceIndex": 3922, "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message.mdx", - "navOrder": 638 + "navOrder": 637 }, { "id": 2553, @@ -14883,7 +14865,7 @@ "status": "draft", "sourceIndex": 3923, "contentFile": "content/docs/chat/sdk/react-native/message/sending-messages/send-message-not-oss.mdx", - "navOrder": 639 + "navOrder": 638 }, { "id": 2554, @@ -14901,7 +14883,7 @@ "status": "draft", "sourceIndex": 3924, "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-messages.mdx", - "navOrder": 640 + "navOrder": 639 }, { "id": 2555, @@ -14919,7 +14901,7 @@ "status": "draft", "sourceIndex": 3925, "contentFile": "content/docs/chat/sdk/react-native/message/receiving-messages/receive-custom-business-messages.mdx", - "navOrder": 641 + "navOrder": 640 }, { "id": 2556, @@ -14937,7 +14919,7 @@ "status": "draft", "sourceIndex": 3926, "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-older-messages.mdx", - "navOrder": 642 + "navOrder": 641 }, { "id": 2557, @@ -14955,7 +14937,7 @@ "status": "draft", "sourceIndex": 3927, "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-newer-messages.mdx", - "navOrder": 643 + "navOrder": 642 }, { "id": 2558, @@ -14973,7 +14955,7 @@ "status": "draft", "sourceIndex": 3928, "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/find-messages-by-id.mdx", - "navOrder": 644 + "navOrder": 643 }, { "id": 2559, @@ -14991,7 +14973,7 @@ "status": "draft", "sourceIndex": 3929, "contentFile": "content/docs/chat/sdk/react-native/message/retrieving-messages/load-message-context.mdx", - "navOrder": 645 + "navOrder": 644 }, { "id": 2560, @@ -15009,7 +14991,7 @@ "status": "draft", "sourceIndex": 3930, "contentFile": "content/docs/chat/sdk/react-native/message/searching-messages/search-messages.mdx", - "navOrder": 646 + "navOrder": 645 }, { "id": 2561, @@ -15027,7 +15009,7 @@ "status": "draft", "sourceIndex": 3931, "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/update-typing-status.mdx", - "navOrder": 647 + "navOrder": 646 }, { "id": 2562, @@ -15045,7 +15027,7 @@ "status": "draft", "sourceIndex": 3932, "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/get-typing-status.mdx", - "navOrder": 648 + "navOrder": 647 }, { "id": 2563, @@ -15063,7 +15045,7 @@ "status": "draft", "sourceIndex": 3933, "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/change-input-states.mdx", - "navOrder": 649 + "navOrder": 648 }, { "id": 2564, @@ -15081,7 +15063,7 @@ "status": "draft", "sourceIndex": 3934, "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/check-speech-to-text.mdx", - "navOrder": 650 + "navOrder": 649 }, { "id": 2565, @@ -15099,7 +15081,7 @@ "status": "draft", "sourceIndex": 3935, "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/transcribe-audio.mdx", - "navOrder": 651 + "navOrder": 650 }, { "id": 2566, @@ -15117,7 +15099,7 @@ "status": "draft", "sourceIndex": 3936, "contentFile": "content/docs/chat/sdk/react-native/message/composing-messages/save-local-transcript.mdx", - "navOrder": 652 + "navOrder": 651 }, { "id": 2567, @@ -15135,7 +15117,7 @@ "status": "draft", "sourceIndex": 3937, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-local-message.mdx", - "navOrder": 653 + "navOrder": 652 }, { "id": 2568, @@ -15153,7 +15135,7 @@ "status": "draft", "sourceIndex": 3938, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-saved-messages.mdx", - "navOrder": 654 + "navOrder": 653 }, { "id": 2569, @@ -15171,7 +15153,7 @@ "status": "draft", "sourceIndex": 3939, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/delete-user-messages.mdx", - "navOrder": 655 + "navOrder": 654 }, { "id": 2570, @@ -15189,7 +15171,7 @@ "status": "draft", "sourceIndex": 3940, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/revoke-a-message.mdx", - "navOrder": 656 + "navOrder": 655 }, { "id": 2571, @@ -15207,7 +15189,7 @@ "status": "draft", "sourceIndex": 3941, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/modify-a-message.mdx", - "navOrder": 657 + "navOrder": 656 }, { "id": 2572, @@ -15225,7 +15207,7 @@ "status": "draft", "sourceIndex": 3942, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-single-message.mdx", - "navOrder": 658 + "navOrder": 657 }, { "id": 2573, @@ -15243,7 +15225,7 @@ "status": "draft", "sourceIndex": 3943, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/insert-local-group-message.mdx", - "navOrder": 659 + "navOrder": 658 }, { "id": 2574, @@ -15261,7 +15243,7 @@ "status": "draft", "sourceIndex": 3944, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-local-messages.mdx", - "navOrder": 660 + "navOrder": 659 }, { "id": 2575, @@ -15279,7 +15261,7 @@ "status": "draft", "sourceIndex": 3945, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/clear-all-messages.mdx", - "navOrder": 661 + "navOrder": 660 }, { "id": 2576, @@ -15297,7 +15279,7 @@ "status": "draft", "sourceIndex": 3946, "contentFile": "content/docs/chat/sdk/react-native/message/managing-messages/set-message-local-ex.mdx", - "navOrder": 662 + "navOrder": 661 }, { "id": 2577, @@ -15315,7 +15297,7 @@ "status": "draft", "sourceIndex": 3947, "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/send-group-read-receipts.mdx", - "navOrder": 663 + "navOrder": 662 }, { "id": 2578, @@ -15333,7 +15315,7 @@ "status": "draft", "sourceIndex": 3948, "contentFile": "content/docs/chat/sdk/react-native/message/managing-read-status/get-group-message-readers.mdx", - "navOrder": 664 + "navOrder": 663 }, { "id": 2579, @@ -15351,7 +15333,7 @@ "status": "draft", "sourceIndex": 3949, "contentFile": "content/docs/chat/sdk/react-native/file-uploads/upload-file.mdx", - "navOrder": 665 + "navOrder": 664 }, { "id": 2580, @@ -15369,7 +15351,7 @@ "status": "draft", "sourceIndex": 3950, "contentFile": "content/docs/chat/sdk/react-native/calling/overview-calling.mdx", - "navOrder": 666 + "navOrder": 665 }, { "id": 2581, @@ -15387,7 +15369,7 @@ "status": "draft", "sourceIndex": 3951, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-single-call.mdx", - "navOrder": 667 + "navOrder": 666 }, { "id": 2582, @@ -15405,7 +15387,7 @@ "status": "draft", "sourceIndex": 3952, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/start-group-call.mdx", - "navOrder": 668 + "navOrder": 667 }, { "id": 2583, @@ -15423,7 +15405,7 @@ "status": "draft", "sourceIndex": 3953, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/accept-call.mdx", - "navOrder": 669 + "navOrder": 668 }, { "id": 2584, @@ -15441,7 +15423,7 @@ "status": "draft", "sourceIndex": 3954, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/reject-call.mdx", - "navOrder": 670 + "navOrder": 669 }, { "id": 2585, @@ -15459,7 +15441,7 @@ "status": "draft", "sourceIndex": 3955, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/cancel-call.mdx", - "navOrder": 671 + "navOrder": 670 }, { "id": 2586, @@ -15477,7 +15459,7 @@ "status": "draft", "sourceIndex": 3956, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/hang-up-call.mdx", - "navOrder": 672 + "navOrder": 671 }, { "id": 2587, @@ -15495,7 +15477,7 @@ "status": "draft", "sourceIndex": 3957, "contentFile": "content/docs/chat/sdk/react-native/calling/managing-calls/handle-call-events.mdx", - "navOrder": 673 + "navOrder": 672 }, { "id": 2588, @@ -15513,7 +15495,7 @@ "status": "draft", "sourceIndex": 3958, "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/restore-pending-invitation.mdx", - "navOrder": 674 + "navOrder": 673 }, { "id": 2589, @@ -15531,7 +15513,7 @@ "status": "draft", "sourceIndex": 3959, "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-room-by-group-id.mdx", - "navOrder": 675 + "navOrder": 674 }, { "id": 2590, @@ -15549,7 +15531,7 @@ "status": "draft", "sourceIndex": 3960, "contentFile": "content/docs/chat/sdk/react-native/calling/retrieving-call-information/get-token-by-room-id.mdx", - "navOrder": 676 + "navOrder": 675 }, { "id": 2591, @@ -15567,7 +15549,7 @@ "status": "draft", "sourceIndex": 3961, "contentFile": "content/docs/chat/sdk/react-native/calling/sending-custom-signals/send-a-custom-signal.mdx", - "navOrder": 677 + "navOrder": 676 }, { "id": 2592, @@ -15585,7 +15567,7 @@ "status": "draft", "sourceIndex": 3962, "contentFile": "content/docs/chat/sdk/react-native/events/overview-events.mdx", - "navOrder": 678 + "navOrder": 677 }, { "id": 2593, @@ -15603,7 +15585,7 @@ "status": "draft", "sourceIndex": 3963, "contentFile": "content/docs/chat/sdk/react-native/logger.mdx", - "navOrder": 679 + "navOrder": 678 }, { "id": 387, diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index cfb623467e..8a4f63da0c 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -5677,7 +5677,7 @@ "description": "使用 OpenIM React Native SDK 初始化、登录、查询登录状态并退出当前账号。", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", - "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; 参数说明 initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别配置,使用 LogLevel 枚举。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" + "content": "开始本页操作前,请先完成 开始之前 /sdk/react native/getting started/before you start 和 按 React Native 环境接入 /sdk/react native/getting started/environment specific implementation 中的准备工作。OpenIM React Native SDK 使用 initSDK 初始化 SDK,再使用 login 登录当前用户并建立与服务器的连接。 完整流程如下: 1. 调用 initSDK 初始化 SDK。 2. 设置 onConnecting 、 onConnectSuccess 和 onConnectFailed 事件监听。 3. 调用 login 登录当前用户。 4. 等待 onConnectSuccess 触发,表示登录成功并已连接服务器。 5. 主动退出或切换账号时调用 logout 。 初始化 SDK 调用 initSDK 传入服务地址、本地数据目录和日志配置。 dataDir 和 logFilePath 应使用应用可写的持久化目录。 React Native CLI import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Expo 项目使用 expo file system 提供的应用文档目录,再调用 initSDK 。 documentDirectory 返回的 URI 包含 file:// 前缀,传给 SDK 前需要移除该前缀: import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; 参数说明 initSDK 的参数如下: | 参数 | 类型 | 说明 | | | | | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string | SDK 本地数据目录,必须位于应用可写路径。 | | logFilePath | string | SDK 日志目录,必须位于应用可写路径。 | | logLevel | LogLevel | 日志级别配置,使用 LogLevel 枚举。 | | isLogStandardOutput | boolean | 是否输出 SDK 日志到平台标准日志。 | 注册连接事件 调用 login 前设置连接事件监听。可以使用 OpenIMEvent 中的事件枚举值,也可以直接使用事件字符串;这里使用字符串展示登录流程: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // 设置监听 OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; 登录当前用户 调用 login 传入可信后端返回的 userID 和 Token: await OpenIMSDK.login userID, token, ; 调用 login 后等待 onConnectSuccess 事件。该事件触发表示登录成功,SDK 连接服务器成功,业务 API 应在此之后调用。 查询登录状态 getLoginStatus 查询当前登录状态: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus 包含以下状态: | 状态 | 说明 | | | | | LoginStatus.Logout | 当前 SDK 实例未登录。 | | LoginStatus.Logging | 登录流程正在进行。 | | LoginStatus.Logged | 当前 SDK 实例已登录。 | 退出登录和切换账号 主动退出或切换账号时调用 logout ,并清理应用中保存的当前账号数据: await OpenIMSDK.logout ; 切换账号时先完成旧账号退出,再使用新账号的参数调用 login ,无需重复 initSDK 。不应在旧账号仍处于登录状态时登录新账号。 取消事件监听 退出登录、切换账号或销毁相关状态时,使用注册时的同一事件名称和函数引用调用 off : // 取消监听 OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; 下一步 发送第一条消息 /sdk/react native/getting started/send first message" }, { "path": "/sdk/react-native/getting-started/send-first-message", @@ -6591,14 +6591,6 @@ "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", "content": "使用 createAdvancedQuoteMessage 创建包含原消息引用和文本实体的富文本回复消息。 const message = await OpenIMSDK.createAdvancedQuoteMessage text: '我已查看相关链接。', message: originalMessage, ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 回复的原始文本。 | | message | MessageItem | 是 | 被回复的原消息。 | | messageEntityList | MessageEntity | 否 | 文本中的实体列表。 | MessageEntity 使用 type 、 offset 、 length 描述实体,并可按需要传入 url 或 info 。调用后返回待发送的 MessageItem 。" }, - { - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "创建定向群消息", - "description": "OpenIM React Native SDK 创建定向群消息。", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", - "content": "使用 createTargetedGroupMessage 创建仅定向投递给指定群成员的消息对象。 const textMessage = await OpenIMSDK.createTextMessage '请相关成员查看。' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | MessageItem | 是 | 要定向发送的消息对象。 | | dstUserIDs | string | 是 | 接收该消息的群成员用户 ID 列表。 | 调用后返回待发送的 MessageItem 。发送时在 groupID 中指定目标群组,并通过 发送消息 /sdk/react native/message/sending messages/send message 投递。" - }, { "path": "/sdk/react-native/message/sending-messages/send-message", "title": "发送消息", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index e4d16734e1..2dcd0f5f59 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -5677,7 +5677,7 @@ "description": "Initialize the OpenIM React Native SDK, sign in, check login status, and log out the current account.", "context": "SDKs · React Native · v4", "keywords": "sdk react-native v4 sdk react-native getting-started authenticate-and-manage-session", - "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Parameter reference initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level configuration. Use the LogLevel enum. | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" + "content": "Before starting this page, complete the preparation in Before you start /sdk/react native/getting started/before you start and React Native environment integration /sdk/react native/getting started/environment specific implementation . The OpenIM React Native SDK is initialized with initSDK , then login signs in the current user and establishes the server connection. The complete flow is: 1. Call initSDK to initialize the SDK. 2. Register listeners for onConnecting , onConnectSuccess , and onConnectFailed . 3. Call login to sign in the current user. 4. Wait for onConnectSuccess , which indicates that sign in succeeded and the SDK is connected to the server. 5. Call logout when the user actively signs out or switches accounts. Initialize the SDK Call initSDK with the server addresses, an application writable data directory, and logging options. dataDir and logFilePath should use a persistent directory that the application can write to. React Native CLI import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import RNFS from 'react native fs'; const dataDir = RNFS.DocumentDirectoryPath; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Expo Use the application document directory provided by expo file system . Its URI includes the file:// prefix, which must be removed before passing it to the SDK: import OpenIMSDK, LogLevel from '@openim/rn client sdk'; import as FileSystem from \"expo file system/legacy\"; const dataDir = FileSystem.documentDirectory.replace /^file:\\/\\//, '' .replace /\\/$/, '' ; await OpenIMSDK.initSDK apiAddr: 'http://your server ip:10002', wsAddr: 'ws://your server ip:10001', dataDir, logFilePath: dataDir, logLevel: LogLevel.Info, isLogStandardOutput: true, ; Parameter reference initSDK accepts the following parameters: | Parameter | Type | Description | | | | | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string | SDK local data directory in an application writable path. | | logFilePath | string | SDK log directory in an application writable path. | | logLevel | LogLevel | Log level configuration. Use the LogLevel enum. | | isLogStandardOutput | boolean | Whether SDK logs are written to the platform standard output. | Register connection events Register connection listeners before calling login . Event names can use values from OpenIMEvent or the corresponding event strings; this example uses strings to show the login flow: const handleConnecting = = console.log \"onConnecting\" ; const handleConnectSuccess = = console.log \"onConnectSuccess\" ; const handleConnectFailed = error: OpenIMEventBaseErrorType = console.log \"onConnectFailed\", error.errCode, error.errMsg ; // Set listeners OpenIMSDK.on 'onConnecting', handleConnecting ; OpenIMSDK.on 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.on 'onConnectFailed', handleConnectFailed ; Sign in the current user Call login with the userID and token returned by your trusted backend: await OpenIMSDK.login userID, token, ; After calling login , wait for the onConnectSuccess event. This event indicates that sign in succeeded and the SDK connected to the server. Call business APIs after this event. Check login status Use getLoginStatus to query the current login status: const loginStatus = await OpenIMSDK.getLoginStatus ; LoginStatus contains the following states: | State | Description | | | | | LoginStatus.Logout | The SDK instance is not signed in. | | LoginStatus.Logging | The sign in flow is in progress. | | LoginStatus.Logged | The SDK instance is signed in. | Log out and switch accounts Call logout when the user actively signs out or switches accounts, and clear the current account data stored by the application: await OpenIMSDK.logout ; When switching accounts, finish logging out the previous account before calling login with the new account's parameters. There is no need to call initSDK again. Do not sign in to a new account while the previous account is still signed in. Remove event listeners When logging out, switching accounts, or destroying the related state, call off with the same event names and function references used during registration: // Remove listeners OpenIMSDK.off 'onConnecting', handleConnecting ; OpenIMSDK.off 'onConnectSuccess', handleConnectSuccess ; OpenIMSDK.off 'onConnectFailed', handleConnectFailed ; Next step Send your first message /sdk/react native/getting started/send first message" }, { "path": "/sdk/react-native/getting-started/send-first-message", @@ -6591,14 +6591,6 @@ "keywords": "sdk react-native v4 sdk react-native message creating-messages create-advanced-quote-message", "content": "Use createAdvancedQuoteMessage to create a rich text reply with an original message reference and text entities. const message = await OpenIMSDK.createAdvancedQuoteMessage text: 'I have reviewed the related link.', message: originalMessage, ; Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Raw reply text. | | message | MessageItem | Yes | Original message being replied to. | | messageEntityList | MessageEntity | No | Entities in the text. | MessageEntity uses type , offset , and length to describe an entity, with optional url and info . The call returns a MessageItem ready to send." }, - { - "path": "/sdk/react-native/message/creating-messages/create-targeted-group-message", - "title": "Create a targeted group message", - "description": "OpenIM React Native SDK guide for create a targeted group message.", - "context": "SDKs · React Native · v4", - "keywords": "sdk react-native v4 sdk react-native message creating-messages create-targeted-group-message", - "content": "Use createTargetedGroupMessage to create a message object delivered only to selected group members. const textMessage = await OpenIMSDK.createTextMessage 'Please review this, relevant members.' ; const message = await OpenIMSDK.createTargetedGroupMessage message: textMessage, dstUserIDs: 'user 001', 'user 002' , ; Parameters | Parameter | Type | Required | Description | | | | | | | message | MessageItem | Yes | Message object to send selectively. | | dstUserIDs | string | Yes | User IDs of group members who receive the message. | The call returns a MessageItem ready to send. Pass the target group in groupID and use Send a message /sdk/react native/message/sending messages/send message to deliver it." - }, { "path": "/sdk/react-native/message/sending-messages/send-message", "title": "Send a message",