Browse SDKs · React Native
Platform
SDKsReact Native

Update friend profile

Update friendship attributes such as remark alias, pin status, or custom extension with the OpenIM React Native SDK.

Copy

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

ParameterTypeRequiredDescription
friendUserIDsstring[]YesList of friend user IDs to update.
remarkstringNoNew custom remark alias for the friend.
isPinnedbooleanNoWhether to pin this friend in the friend list.
exstringNoCustom 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.