SDKsReact Native
Update friend profile
Update friendship attributes such as remark alias, pin status, or custom extension with the OpenIM React Native SDK.
Modify friendship attributes—including custom remark alias, pin-to-top status, or custom extensions—for specified friends:
await OpenIMSDK.updateFriends({
friendUserIDs: [friendUserID],
remark: remark,
isPinned: true,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
friendUserIDs | string[] | Yes | List of friend user IDs to update. |
remark | string | No | New custom remark alias for the friend. |
isPinned | boolean | No | Whether to pin this friend in the friend list. |
ex | string | No | Custom extension string. |
Provide at least one attribute to update alongside friendUserIDs. If different friends require distinct values, call this method separately for each user.
Return value
A resolved Promise confirms that the friend information was updated on the server.
Updates trigger the OnFriendInfoChanged event. Use userID to locate the friend entry in your local cache and reconcile remark, pin, or extension attributes. For event listeners, see Get friend list by page.
Was this page helpful?