docs: async function getUsersIdsToNotify(thing, checkValueAccess) {
  	
  	if (!thing)
  		throw new utils.ErrorCustom(httpStatusCodes.INTERNAL_SERVER_ERROR, "Thing can't be null", 26);
  	
  	let UsersIdsToNotify = new Set();
  	
  	for(let r of thing.usersRights) {
  	
  		if (!(
  			((r.userStatus & (thConstants.ThingUserStates.Ok | thConstants.ThingUserStates.WaitForAuth)) != 0) &&
  				((r.userVisibility & thConstants.ThingUserVisibility.Visible) != 0))
  		)
  			continue;
  
  		let userId = r.userId;
  		let username = r.username;
  	
  		if (!userId && !username)
  			throw new utils.ErrorCustom(httpStatusCodes.INTERNAL_SERVER_ERROR, "Both userId and username can't be empty", 27);
  		
  		let user = userId ? await usersManager.findUserById(userId) : await	usersManager.findUserByUsername(username);
  		if (!user)
  			continue;
  
  		if (checkValueAccess) {
  			let thingUserClaims = getThingUserClaims(user, thing, user.isSuperAdministrator);
  			if ((thingUserClaims.change & thConstants.ThingUserChangeClaims.CanChangeValue) == 0)
  				continue;
  		}
  			
  		UsersIdsToNotify.add(userId);
  	}
  	
  	return UsersIdsToNotify;
  }