aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-22 16:37:20 +0000
committerMario <mario@mariovavti.com>2020-11-22 16:37:20 +0000
commit451468d1297ba41a6c9ea29709444ceb15185bfb (patch)
treeebdeef7e01541c09dcacb8965304ec3ab3adff57 /Zotlabs/Module/Item.php
parentc0adf31da9a0d8f897dc68ab632c736891318ad5 (diff)
downloadvolse-hubzilla-451468d1297ba41a6c9ea29709444ceb15185bfb.tar.gz
volse-hubzilla-451468d1297ba41a6c9ea29709444ceb15185bfb.tar.bz2
volse-hubzilla-451468d1297ba41a6c9ea29709444ceb15185bfb.zip
fix mod item issue with remote channels
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php28
1 files changed, 12 insertions, 16 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index ce344ee82..c4fac1385 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -300,6 +300,7 @@ class Item extends Controller {
$parent = ((x($_REQUEST,'parent')) ? intval($_REQUEST['parent']) : 0);
$parent_mid = ((x($_REQUEST,'parent_mid')) ? trim($_REQUEST['parent_mid']) : '');
+ $mode = (($_REQUEST['conv_mode'] === 'channel') ? 'channel' : 'network');
$remote_xchan = ((x($_REQUEST,'remote_xchan')) ? trim($_REQUEST['remote_xchan']) : false);
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
@@ -1374,24 +1375,19 @@ class Item extends Controller {
goaway(z_root() . "/" . $return_path);
}
+ if($mode === 'channel')
+ profile_load($owner_xchan['xchan_name']);
- if(local_channel()) {
- $item[] = $datarray;
- $item[0]['owner'] = $owner_xchan;
- $item[0]['author'] = $observer;
- $item[0]['attach'] = json_encode($datarray['attach']);
+ $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
- ];
- }
+ $json = [
+ 'success' => 1,
+ 'id' => $post_id,
+ 'html' => conversation($item,$mode,true,'r_preview'),
+ ];
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
$json['reload'] = z_root() . '/' . $_REQUEST['jsreload'];