diff --git a/post.php b/post.php index c9631d5f..7996cedb 100644 --- a/post.php +++ b/post.php @@ -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"; $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 ? ' [...]' : ''; - $postcontent = mb_substr($thread['body_nomarkup'], 0, 480) . $trimmed_post; + $trimmed_post = strlen($thread['body_nomarkup']) > $config['matrix']['max_message_length'] ? ' [...]' : ''; + $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"; $post_data = json_encode(array( "msgtype" => "m.text",