1- import { hasConfig } from "../../../server/api/lib/config" ;
1+ import { hasConfig , getConfig } from "../../../server/api/lib/config" ;
22const Van = require ( "../../../extensions/action-handlers/ngpvan-action" ) ;
33
44export const serverAdministratorInstructions = ( ) => {
@@ -8,19 +8,21 @@ export const serverAdministratorInstructions = () => {
88 if and only if the internal Spoke auto-optout triggers.
99 ` ,
1010 setupInstructions : `
11- This message handler is dependent on the ngpvan-action Action Handler.
12- Follow it's setup instructions.
13- Additionally, "ngpvan-optout" must be adde dot the message handler
11+ This message handler is dependent on the ngpvan-action Action Handler,
12+ and the auto-optout Message Handler.
13+ Follow their setup instructions.
14+ Additionally, "ngpvan-optout" must be added to the message handler
1415 environment variable.
1516 ` ,
1617 environmentVariables : [ ]
1718 } ;
1819}
1920
2021export const available = organization =>
21- ( hasConfig ( "NGP_VAN_API_KEY" , organization ) ||
22+ ( hasConfig ( "NGP_VAN_API_KEY" , organization ) ||
2223 hasConfig ( "NGP_VAN_API_KEY_ENCRYPTED" , organization ) ) &&
23- hasConfig ( "NGP_VAN_APP_NAME" , organization ) ;
24+ hasConfig ( "NGP_VAN_APP_NAME" , organization ) &&
25+ getConfig ( "MESSAGE_HANDLER" ) . inlcudes ( "auto-optout" ) ;
2426//
2527
2628/* Sends a request to VAN to place an opt out tag to an individual.
0 commit comments