updateOwnerUserInfo method

Future<void> updateOwnerUserInfo()

Implementation

Future<void> updateOwnerUserInfo() async {
  final ownerId = roomState.ownerInfo.userId;

  if (ownerId.isEmpty) {
    return;
  }

  try {
    final result = await liveService.getUserInfo(ownerId);
    if (TUIError.success == result.code && result.data != null) {
      roomState.ownerInfo.updateState(result.data!);
    } else {
      ErrorHandler.onError(TUIError.errFailed);
    }
  } catch (error, stackTrace) {
    LiveKitLogger.error('updateOwnerUserInfo Error: $error\n$stackTrace');
  }
}