fix PUT requests

main
lub 2 weeks ago
parent 10671935b8
commit cbadf5f201

@ -44,7 +44,7 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) {
# send admin message # send admin message
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, SYNAPSE_URL.'/_matrix/client/v3/rooms/'.ROOM_ID.'/send/m.room.message/'.filter_var($_POST['nonce'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)); curl_setopt($ch, CURLOPT_URL, SYNAPSE_URL.'/_matrix/client/v3/rooms/'.ROOM_ID.'/send/m.room.message/'.filter_var($_POST['nonce'], FILTER_SANITIZE_FULL_SPECIAL_CHARS));
curl_setopt($ch, CURLOPT_PUT, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'body' => '@'.$username.':imninja.net just registered', 'body' => '@'.$username.':imninja.net just registered',
'msgtype' => 'm.text' 'msgtype' => 'm.text'

Loading…
Cancel
Save