Browse SDKs · uni-app / uni-app x
SDKsuni-app

List sent friend requests

Read friend requests sent by the current account.

Copy

getFriendApplicationListAsApplicant() queries friend applications sent by the current account and returns OpenIMFriendApplicationListResult or null.

Parameters

The parameter object can be omitted. To request an explicit page, use:

ParameterTypeRequiredDescription
offsetnumber or nullNoPagination offset; use 0 for the first page.
countnumber or nullNoNumber of applications requested.
import { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'

const result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 })
renderSentApplications(result?.applications ?? [])

After Promise success, applications contains the current page of sent OpenIMFriendApplicationItem[]. See Get received friend applications for the fields. This query does not trigger an application event.

Pagination can change while it is loading. Merge events by fromUserID:toUserID instead of array position. If an event arrives during paging, reset pagination and requery when necessary. Complete friend-application listeners live on the received-applications page. Rebuild this snapshot after App restoration, re-login, or any period in which events may have been missed.