|
@ -394,8 +394,8 @@ function handle_report(){ |
|
|
$reported_post_url = $config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ( $thread['thread'] ? $thread['thread'] : $id ) . ".html"; |
|
|
$reported_post_url = $config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ( $thread['thread'] ? $thread['thread'] : $id ) . ".html"; |
|
|
$post_url = $config['matrix']['host'] . "/_matrix/client/r0/rooms/" . $config['matrix']['room_id'] . "/send/m.room.message?access_token=" . $config['matrix']['access_token']; |
|
|
$post_url = $config['matrix']['host'] . "/_matrix/client/r0/rooms/" . $config['matrix']['room_id'] . "/send/m.room.message?access_token=" . $config['matrix']['access_token']; |
|
|
|
|
|
|
|
|
$trimmed_post = strlen($thread['body_nomarkup']) > 480 ? ' [...]' : ''; |
|
|
$trimmed_post = strlen($thread['body_nomarkup']) > $config['matrix']['max_message_length'] ? ' [...]' : ''; |
|
|
$postcontent = mb_substr($thread['body_nomarkup'], 0, 480) . $trimmed_post; |
|
|
$postcontent = mb_substr($thread['body_nomarkup'], 0, $config['matrix']['max_message_length']) . $trimmed_post; |
|
|
$matrix_message = $reported_post_url . ($thread['thread'] ? '#' . $id : '') . " \nReason:\n" . $reason . " \nPost:\n" . $postcontent . " \n"; |
|
|
$matrix_message = $reported_post_url . ($thread['thread'] ? '#' . $id : '') . " \nReason:\n" . $reason . " \nPost:\n" . $postcontent . " \n"; |
|
|
$post_data = json_encode(array( |
|
|
$post_data = json_encode(array( |
|
|
"msgtype" => "m.text", |
|
|
"msgtype" => "m.text", |
|
|