unsubscribeUserStatus method
取消订阅用户在线状态
Implementation
void unsubscribeUserStatus(List<String> accountIds) {
if (accountIds.isEmpty) {
return;
}
final option = NIMUnsubscribeUserStatusOption(accountIds: accountIds);
NimCore.instance.subscriptionService
.unsubscribeUserStatus(option)
.then((result) {
if (result.isSuccess) {
_subscriptionUsers.removeAll(accountIds);
///不成功的加回去
if (result.data?.isNotEmpty == true) {
_subscriptionUsers.addAll(result.data!);
}
}
});
}