aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Share.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Share.php')
-rw-r--r--Zotlabs/Module/Share.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php
index ea9313fa8..4fefdb4ef 100644
--- a/Zotlabs/Module/Share.php
+++ b/Zotlabs/Module/Share.php
@@ -94,6 +94,12 @@ class Share extends \Zotlabs\Web\Controller {
else
killme();
+ $object = Activity::fetch_item([ 'id' => $item['mid'] ]);
+
+ if (!$object) {
+ killme();
+ }
+
$arr['aid'] = $item['aid'];
$arr['uid'] = $item['uid'];
@@ -121,7 +127,7 @@ class Share extends \Zotlabs\Web\Controller {
$arr['owner_xchan'] = $item['author_xchan'];
$arr['source_xchan'] = '';
- $arr['obj'] = $item['obj'];
+ $arr['obj'] = $object;
$arr['obj_type'] = $item['obj_type'];
$arr['verb'] = ACTIVITY_SHARE;
@@ -130,6 +136,7 @@ class Share extends \Zotlabs\Web\Controller {
$post = item_store($arr);
$post_id = $post['item_id'];
+ $approval_id = $post['approval_id'] ?? 0;
$arr['id'] = $post_id;
@@ -137,6 +144,7 @@ class Share extends \Zotlabs\Web\Controller {
// info( t('Post repeated') . EOL);
+/*
$r = q("select * from item where id = %d",
intval($post_id)
);
@@ -145,8 +153,12 @@ class Share extends \Zotlabs\Web\Controller {
$sync_item = fetch_post_tags($r);
Libsync::build_sync_packet($channel['channel_id'], [ 'item' => [ encode_item($sync_item[0],true) ] ]);
}
+*/
Master::Summon([ 'Notifier', 'like', $post_id ]);
+ if ($approval_id) {
+ Master::Summon(['Notifier', 'like', $approval_id]);
+ }
killme();