aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index f451358f8..2ee870c2f 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2423,9 +2423,14 @@ function send_status_notifications($post_id,$item) {
$unfollowed = false;
$parent = 0;
+ $is_reaction = false;
+
+ $type = ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT);
if(array_key_exists('verb',$item) && (activity_match($item['verb'], ACTIVITY_LIKE) || activity_match($item['verb'], ACTIVITY_DISLIKE))) {
+ $type = NOTIFY_LIKE;
+
$r = q("select id from item where mid = '%s' and uid = %d limit 1",
dbesc($item['thr_parent']),
intval($item['uid'])
@@ -2494,7 +2499,7 @@ function send_status_notifications($post_id,$item) {
Enotify::submit(array(
- 'type' => ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT),
+ 'type' => $type,
'from_xchan' => $item['author_xchan'],
'to_xchan' => $r[0]['channel_hash'],
'item' => $item,
@@ -4212,6 +4217,9 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$item_uids = " item.uid = " . intval($uid) . " ";
}
+ if($arr['top'])
+ $sql_options .= " and item_thread_top = 1 ";
+
if($arr['star'])
$sql_options .= " and item_starred = 1 ";
@@ -4367,7 +4375,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
if ($arr['total']) {
$items = dbq("SELECT count(item.id) AS total FROM item
WHERE $item_uids $item_restrict
- $simple_update
+ $simple_update $sql_options
$sql_extra $sql_nets $sql_extra3"
);
if ($items) {
@@ -4378,7 +4386,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$items = dbq("SELECT item.*, item.id AS item_id FROM item
WHERE $item_uids $item_restrict
- $simple_update
+ $simple_update $sql_options
$sql_extra $sql_nets $sql_extra3
ORDER BY item.received DESC $pager_sql"
);