Follow redirects when getting data. Better CC checking

main
Terence Eden 2024-04-17 11:20:46 +01:00
rodzic 7f2cd763d0
commit cb5d5b7603
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -336,7 +336,11 @@
// Has the user has been specifically CC'd?
if ( isset( $inbox_message["cc"] ) ) {
$reply = in_array( "https://{$server}/{$username}", $inbox_message["cc"] );
if ( is_array( $inbox_message["cc"] ) ) {
$reply = in_array( "https://{$server}/{$username}", $inbox_message["cc"] );
} else {
$reply = ( "https://{$server}/{$username}" === $inbox_message["cc"] );
}
} else {
$reply = false;
}
@ -1256,6 +1260,7 @@ HTML;
// Set cURL options
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );