diff options
author | Mario <mario@mariovavti.com> | 2020-11-20 09:14:46 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-11-20 09:14:46 +0000 |
commit | 011de75706ddd407cadfde89eec891b17db17211 (patch) | |
tree | 64b97b6cbb24a6d4cc985dc6ebc79ba2199c5e41 /Zotlabs | |
parent | 852e456d44d2bffeadd2a22a7d47bb9e2e7f125f (diff) | |
download | volse-hubzilla-011de75706ddd407cadfde89eec891b17db17211.tar.gz volse-hubzilla-011de75706ddd407cadfde89eec891b17db17211.tar.bz2 volse-hubzilla-011de75706ddd407cadfde89eec891b17db17211.zip |
returning the rendered html when posting a comment will make the following update (and its implication in mod pubstream) obsolete
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Item.php | 14 |
1 files changed, 12 insertions, 2 deletions
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']; |