dont check limits on self-hosted deployments

This commit is contained in:
Dave Horton
2021-08-04 10:47:46 -04:00
parent 2ec513b1b0
commit 98886cfdbf

View File

@@ -90,7 +90,10 @@ module.exports = (srf, logger, opts) => {
const capacities = await lookupAccountCapacitiesBySid(account_sid);
const limit = capacities.find((c) => c.category == 'voice_call_session');
if (!limit) throw new Error('no account_capacities found');
if (!limit) {
logger.debug('checkLimits: no call limits specified');
return next();
}
const limit_sessions = limit.quantity;
if (calls > limit_sessions) {