aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Like.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-27 15:13:02 -0800
committerzotlabs <mike@macgirvin.com>2017-11-27 15:13:02 -0800
commit981631752a7571b22d9d8b3a8d7a6632f0a562a3 (patch)
tree51fb3f6d3a46926e1ea7778d17004f10a288dce7 /Zotlabs/Module/Like.php
parent4471f580d7a50126d42690f05e81a75f7bbf8084 (diff)
parentf3c0e212bf824df4f6b69abf079b5b138565f59c (diff)
downloadvolse-hubzilla-981631752a7571b22d9d8b3a8d7a6632f0a562a3.tar.gz
volse-hubzilla-981631752a7571b22d9d8b3a8d7a6632f0a562a3.tar.bz2
volse-hubzilla-981631752a7571b22d9d8b3a8d7a6632f0a562a3.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Like.php')
-rw-r--r--Zotlabs/Module/Like.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php
index 0abf111e0..b07824363 100644
--- a/Zotlabs/Module/Like.php
+++ b/Zotlabs/Module/Like.php
@@ -258,20 +258,27 @@ class Like extends \Zotlabs\Web\Controller {
// get the item. Allow linked photos (which are normally hidden) to be liked
$r = q("SELECT * FROM item WHERE id = %d
- and (item_type = 0 or item_type = 6) and item_deleted = 0 and item_unpublished = 0
+ and item_type in (0,6,7) and item_deleted = 0 and item_unpublished = 0
and item_delayed = 0 and item_pending_remove = 0 and item_blocked = 0 LIMIT 1",
intval($item_id)
);
+ // if interacting with a pubstream item,
+ // create a copy of the parent in your stream. If not the conversation
+ // parent, copy that as well.
+
+ if($r) {
+ if($r[0]['uid'] === $sys_channel['channel_id'] && local_channel()) {
+ $r = [ copy_of_pubitem(\App::get_channel(), $r[0]['mid']) ];
+ }
+ }
+
if(! $item_id || (! $r)) {
logger('like: no item ' . $item_id);
killme();
}
- // Use the $effective_uid option of xchan_query to sort out comment permission
- // for public stream items
-
- xchan_query($r,true,(($r[0]['uid'] == $sys_channel_id) ? local_channel() : 0));
+ xchan_query($r,true);
$item = $r[0];