Update api.twilio.php

This commit is contained in:
Namhyeon Go 2019-10-07 19:01:11 +09:00 committed by GitHub
parent cb62eef752
commit 16b2bf2186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,10 +22,10 @@ if(!$is_domestic) {
$response = false; $response = false;
// temporary filter // temporary filter (example)
$terms = get_tokenized_text($message); $terms = get_tokenized_text($message);
if(!(in_array("LNCPLIMSDB", $terms) || in_array("LNCPSRMDBDEV", $terms))) { if(!(in_array("fuck", $terms) || in_array("bitch", $terms))) {
exit; $action = "denied";
} }
switch($action) { switch($action) {
@ -41,6 +41,10 @@ switch($action) {
$response = twilio_send_voice($message, $to); $response = twilio_send_voice($message, $to);
break; break;
case "denied":
$response = array("error" => "action is denied");
break;
default: default:
$response = array("error" => "action is required"); $response = array("error" => "action is required");
break; break;