From 7639157a4907e9dbdffe6dd24f4f687f4cce6f01 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 21 Nov 2020 20:15:05 +0000 Subject: restrict returned html usage to local_channel() until some issues will be worked out --- Zotlabs/Module/Item.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'Zotlabs/Module/Item.php') diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 66c18fefd..ce344ee82 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1374,16 +1374,24 @@ class Item extends Controller { goaway(z_root() . "/" . $return_path); } - $item[] = $datarray; - $item[0]['owner'] = $owner_xchan; - $item[0]['author'] = $observer; - $item[0]['attach'] = json_encode($datarray['attach']); - - $json = [ - 'success' => 1, - 'id' => $post_id, - 'html' => conversation($item,'network',true,'r_preview'), - ]; + + if(local_channel()) { + $item[] = $datarray; + $item[0]['owner'] = $owner_xchan; + $item[0]['author'] = $observer; + $item[0]['attach'] = json_encode($datarray['attach']); + + $json = [ + 'success' => 1, + 'id' => $post_id, + 'html' => conversation($item,'network',true,'r_preview'), + ]; + } + else { + $json = [ + 'success' => 1 + ]; + } if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) $json['reload'] = z_root() . '/' . $_REQUEST['jsreload']; -- cgit v1.2.3