Skip to content

Commit

Permalink
Fix. SendRequest. Excluding event_token from the request
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonV1211 committed Sep 23, 2024
1 parent a874023 commit 274eba8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cleantalkantispam.php
Original file line number Diff line number Diff line change
Expand Up @@ -1123,12 +1123,19 @@ public function onAfterRoute()
if( ! isset( $post_info['comment_type'] ) )
$post_info['comment_type'] = 'feedback_general_contact_form';

if (is_string($message)) {
$message = json_decode($message, true);
}
if (isset($message['ct_bot_detector_event_token'])) {
unset($message['ct_bot_detector_event_token']);
}

$ctResponse = $this->ctSendRequest(
'check_message',
array(
'sender_nickname' => $sender_nickname,
'sender_email' => $sender_email,
'message' => $message,
'message' => json_encode($message),
'post_info' => json_encode($post_info),
)
);
Expand Down

0 comments on commit 274eba8

Please sign in to comment.