aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Like.php4
-rw-r--r--Zotlabs/Module/React.php3
-rw-r--r--Zotlabs/Module/Share.php6
-rw-r--r--Zotlabs/Module/Subthread.php2
-rw-r--r--Zotlabs/Module/Vote.php8
5 files changed, 18 insertions, 5 deletions
diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php
index 1308beef7..eb92645ba 100644
--- a/Zotlabs/Module/Like.php
+++ b/Zotlabs/Module/Like.php
@@ -575,6 +575,7 @@ class Like extends Controller {
}
+/* Item sync is now done in item_store()
$r = q("select * from item where id = %d",
intval($post_id)
);
@@ -583,7 +584,7 @@ class Like extends Controller {
$sync_item = fetch_post_tags($r);
Libsync::build_sync_packet($profile_uid, ['item' => [encode_item($sync_item[0], true)]]);
}
-
+*/
if ($extended_like) {
$r = q("insert into likes (channel_id,liker,likee,iid,i_mid,verb,target_type,target_id,target) values (%d,'%s','%s',%d,'%s','%s','%s','%s','%s')",
@@ -615,7 +616,6 @@ class Like extends Controller {
Master::Summon(['Notifier', 'like', $approval_id]);
}
-
if ($interactive) {
notice(t('Action completed.') . EOL);
$o .= t('Thank you.');
diff --git a/Zotlabs/Module/React.php b/Zotlabs/Module/React.php
index e04b9b257..e1abd242e 100644
--- a/Zotlabs/Module/React.php
+++ b/Zotlabs/Module/React.php
@@ -91,6 +91,9 @@ class React extends Controller {
if ($x['success']) {
$nid = $x['item_id'];
Master::Summon(['Notifier', 'like', $nid]);
+ if (!empty($x['approval_id'])) {
+ Master::Summon(['Notifier', 'like', $x['approval_id']]);
+ }
}
}
diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php
index db0acb6f5..4fefdb4ef 100644
--- a/Zotlabs/Module/Share.php
+++ b/Zotlabs/Module/Share.php
@@ -136,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;
@@ -143,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)
);
@@ -151,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();
diff --git a/Zotlabs/Module/Subthread.php b/Zotlabs/Module/Subthread.php
index b927ee480..baabee78f 100644
--- a/Zotlabs/Module/Subthread.php
+++ b/Zotlabs/Module/Subthread.php
@@ -159,7 +159,7 @@ class Subthread extends \Zotlabs\Web\Controller {
$arr['deny_cid'] = $item['deny_cid'];
$arr['deny_gid'] = $item['deny_gid'];
- $post = item_store($arr);
+ $post = item_store($arr, deliver: false, addAndSync: false);
$post_id = $post['item_id'];
$arr['id'] = $post_id;
diff --git a/Zotlabs/Module/Vote.php b/Zotlabs/Module/Vote.php
index 06c47f91f..d288426e9 100644
--- a/Zotlabs/Module/Vote.php
+++ b/Zotlabs/Module/Vote.php
@@ -108,9 +108,12 @@ class Vote extends Controller {
if($x['success']) {
$itemid = $x['item_id'];
- Master::Summon( [ 'Notifier', 'like', $itemid ] );
+ Master::Summon( ['Notifier', 'like', $itemid ] );
+ if (!empty($x['approval_id'])) {
+ Master::Summon(['Notifier', 'like', $x['approval_id']]);
+ }
}
-
+/*
$r = q("select * from item where id = %d",
intval($itemid)
);
@@ -119,6 +122,7 @@ class Vote extends Controller {
$sync_item = fetch_post_tags($r);
Libsync::build_sync_packet($channel['channel_id'], [ 'item' => [ encode_item($sync_item[0],true) ] ]);
}
+*/
}
$ret['success'] = true;