getFriendApplications method
收到的好友申请。sentByMe 为 true 时返回自己发出的申请。
Implementation
Future<List<SyImFriendApplication>> getFriendApplications({
bool sentByMe = false,
}) async {
return _call('getFriendApplications', () async {
final list = sentByMe
? await OpenIM.iMManager.friendshipManager
.getFriendApplicationListAsApplicant()
: await OpenIM.iMManager.friendshipManager
.getFriendApplicationListAsRecipient();
return list
.map(
(a) => SyImFriendApplication(
fromUserId: a.fromUserID ?? '',
toUserId: a.toUserID ?? '',
fromNickname: a.fromNickname,
reqMsg: a.reqMsg,
handleResult: a.handleResult ?? 0,
),
)
.toList();
});
}