aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-10 19:17:20 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-10 19:17:20 -0700
commit05e0ed51736a2a49e36b535ef5d669e4172cf786 (patch)
treea16f5bc4935fedb10909c4a295d8f107a761d6d4 /mod
parent9cee52c66882973cc3f906dbe6a0f8280b5929e8 (diff)
downloadvolse-hubzilla-05e0ed51736a2a49e36b535ef5d669e4172cf786.tar.gz
volse-hubzilla-05e0ed51736a2a49e36b535ef5d669e4172cf786.tar.bz2
volse-hubzilla-05e0ed51736a2a49e36b535ef5d669e4172cf786.zip
export likes to clones
Diffstat (limited to 'mod')
-rwxr-xr-xmod/like.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/like.php b/mod/like.php
index 8789b7633..63524823b 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -220,6 +220,9 @@ function like_content(&$a) {
);
if($z) {
+ $z[0]['deleted'] = 1;
+ build_sync_packet($ch[0]['channel_id'],array('likes' => $z));
+
q("delete from likes where id = %d limit 1",
intval($z[0]['id'])
);
@@ -484,7 +487,18 @@ function like_content(&$a) {
dbesc($obj_id),
dbesc(json_encode(($target)?$target:$object))
);
- };
+ $r = q("select * from likes where liker = '%s' and likee = '%s' and i_mid = '%s' and verb = '%s' and target_type = '%s' and target_id = '%s' ",
+ dbesc($observer['xchan_hash']),
+ dbesc($ch[0]['channel_hash']),
+ dbesc($mid),
+ dbesc($activity),
+ dbesc(($tgttype)? $tgttype : $objtype),
+ dbesc($obj_id)
+ );
+ if($r)
+ build_sync_packet($ch[0]['channel_id'],array('likes' => $r));
+
+ }
proc_run('php',"include/notifier.php","like","$post_id");