Skip to content
v1
文档/Browser JS SDK/好友

@beeworks/imsdk


@beeworks/imsdk / friend / applyAddFriend

applyAddFriend()

applyAddFriend(options): Promise<boolean>

申请添加好友

向指定用户发送好友申请。

Parameters

options

申请参数

friend

{ userId: string; domainId: string; }

目标用户信息

friend.userId

string

friend.domainId

string

intro

string

申请附言(打招呼信息)

Returns

Promise<boolean>

Promise<boolean> - 操作是否成功

Example

typescript
await applyAddFriend({
  friend: { userId: 'target_uid', domainId: 'target_domain' },
  intro: '你好,我是...'
});