aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-20 09:14:46 +0000
committerMario <mario@mariovavti.com>2020-11-20 09:14:46 +0000
commit011de75706ddd407cadfde89eec891b17db17211 (patch)
tree64b97b6cbb24a6d4cc985dc6ebc79ba2199c5e41 /Zotlabs/Module/Item.php
parent852e456d44d2bffeadd2a22a7d47bb9e2e7f125f (diff)
downloadvolse-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/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php14
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'];