diff options
Diffstat (limited to 'Zotlabs/Module/Like.php')
-rw-r--r-- | Zotlabs/Module/Like.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php index ef41faedd..2cf792c8d 100644 --- a/Zotlabs/Module/Like.php +++ b/Zotlabs/Module/Like.php @@ -407,12 +407,20 @@ class Like extends Controller { if (activity_match($rr['verb'], $activity)) $multi_undo = false; + $d = q("select * from item where id = %d", + intval($rr['id']) + ); + if ($d) { + xchan_query($d); + $sync_item = fetch_post_tags($d); + Libsync::build_sync_packet($profile_uid, ['item' => [encode_item($sync_item[0], true)]]); + } + // drop_item was not done interactively, so we need to invoke the notifier // in order to push the changes to connections Master::Summon(array('Notifier', 'drop', $rr['id'])); - } if ($interactive) @@ -562,6 +570,15 @@ class Like extends Controller { call_hooks('post_local_end', $arr); + $r = q("select * from item where id = %d", + intval($post_id) + ); + if ($r) { + xchan_query($r); + $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')", intval($ch[0]['channel_id']), |