Browse Source

cleaned up

pull/74/head
Your Name 2 years ago
parent
commit
aba5199f65
  1. 4
      post.php

4
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",

Loading…
Cancel
Save