diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-10 19:18:12 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-10 19:18:12 -0700 |
commit | 4abfd4053a955a70c461290b7220145d2ce1a861 (patch) | |
tree | b56495087c6d2cd6f6813210911e8b6e0e34aad7 /mod/like.php | |
parent | 00b480527a13d64299401292f2b6b1bb416f11c1 (diff) | |
download | volse-hubzilla-4abfd4053a955a70c461290b7220145d2ce1a861.tar.gz volse-hubzilla-4abfd4053a955a70c461290b7220145d2ce1a861.tar.bz2 volse-hubzilla-4abfd4053a955a70c461290b7220145d2ce1a861.zip |
sync likes
Diffstat (limited to 'mod/like.php')
-rwxr-xr-x | mod/like.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/like.php b/mod/like.php index 87f012874..ce8bc3063 100755 --- a/mod/like.php +++ b/mod/like.php @@ -219,6 +219,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']) ); @@ -497,7 +500,18 @@ function like_content(&$a) { dbesc($obj_id), dbesc(($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"); |