aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Messages.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-12 09:03:49 +0000
committerMario <mario@mariovavti.com>2022-12-12 09:03:49 +0000
commite3a19469eb6940249ad87662399d14dbf2a79847 (patch)
treee793f2476b550eb93bb141143876e2019dd44021 /Zotlabs/Widget/Messages.php
parent45f8e43be425b9718aa9ac819256ea407af900f0 (diff)
downloadvolse-hubzilla-e3a19469eb6940249ad87662399d14dbf2a79847.tar.gz
volse-hubzilla-e3a19469eb6940249ad87662399d14dbf2a79847.tar.bz2
volse-hubzilla-e3a19469eb6940249ad87662399d14dbf2a79847.zip
bring back poll and delivery interval
Diffstat (limited to 'Zotlabs/Widget/Messages.php')
-rw-r--r--Zotlabs/Widget/Messages.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index 0f57a8d85..9a3f0fa9c 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -58,7 +58,8 @@ class Messages {
}
$channel = App::get_channel();
- $item_normal = str_replace('item.', 'i.', item_normal());
+ $item_normal_i = str_replace('item.', 'i.', item_normal());
+ $item_normal_c = str_replace('item.', 'c.', item_normal());
$entries = [];
$limit = 30;
$dummy_order_sql = '';
@@ -89,12 +90,12 @@ class Messages {
}
$items = q("SELECT *,
- (SELECT count(*) FROM item c WHERE c.uid = %d AND c.parent = i.parent AND c.item_unseen = 1 AND c.item_thread_top = 0 $vnotify_sql) AS unseen_count
+ (SELECT count(*) FROM item c WHERE c.uid = %d AND c.parent = i.parent AND c.item_unseen = 1 AND c.item_thread_top = 0 $item_normal_c $vnotify_sql) AS unseen_count
FROM item i WHERE i.uid = %d
AND i.created <= '%s'
$type_sql
AND i.item_thread_top = 1
- $item_normal
+ $item_normal_i
ORDER BY i.created DESC $dummy_order_sql
LIMIT $limit OFFSET $offset",
intval(local_channel()),