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

Get unhandled friend-request count

Read the unhandled count displayed on the friend-request entry.

Copy
import { getFriendApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk'

const count = await getFriendApplicationUnhandledCount({ offset: 0, count: 100 })
renderApplicationBadge(count ?? 0)

Use pagination limits agreed with the server. A nullable result is not a permanently cacheable zero. Requery after request add, accept, reject, or delete events rather than maintaining only local +1/-1 counters across devices.