From 011de75706ddd407cadfde89eec891b17db17211 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 20 Nov 2020 09:14:46 +0000 Subject: returning the rendered html when posting a comment will make the following update (and its implication in mod pubstream) obsolete --- Zotlabs/Module/Item.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Item.php') diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 922a2ef06..66c18fefd 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1373,8 +1373,18 @@ class Item extends Controller { if($return_path) { goaway(z_root() . "/" . $return_path); } - - $json = array('success' => 1); + + $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(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) $json['reload'] = z_root() . '/' . $_REQUEST['jsreload']; -- cgit v1.2.3