Skip to content

Commit

Permalink
missed adding the userFunctions into the alert checking functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jodrell2000 committed Aug 18, 2021
1 parent 5167ce9 commit 1650163
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/videoModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const videoFunctions = () => {
}
}

function alertIfRegionsNotAllowed ( restrictions, notifier ) {
function alertIfRegionsNotAllowed ( restrictions, userFunctions, notifier ) {
let missingRegions = setDifference(
regionsWeCareAbout,
restrictions.allowed
Expand All @@ -47,7 +47,7 @@ const videoFunctions = () => {
}
}

function alertIfRegionsBlocked ( restrictions, notifier ) {
function alertIfRegionsBlocked ( restrictions, userFunctions, notifier ) {
let blockedRegions = setIntersection(
regionsWeCareAbout,
restrictions.blocked
Expand Down Expand Up @@ -133,11 +133,11 @@ const videoFunctions = () => {
.then( ( restrictions ) => {
if ( restrictions !== undefined ) {
if ( restrictions.allowed !== undefined ) {
alertIfRegionsNotAllowed( restrictions, ( msg ) =>
alertIfRegionsNotAllowed( restrictions, userFunctions, ( msg ) =>
chatFunctions.botSpeak( data, msg )
);
} else if ( restrictions.blocked !== undefined ) {
alertIfRegionsBlocked( restrictions, ( msg ) =>
alertIfRegionsBlocked( restrictions, userFunctions, ( msg ) =>
chatFunctions.botSpeak( data, msg )
);
}
Expand Down

0 comments on commit 1650163

Please sign in to comment.