aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-21 22:10:09 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-21 22:10:09 +0100
commitd942818bd9d9e90db7a3083bfe33a54732f6184d (patch)
treee8a91efc272bab533555d97a7a0533c563a00853
parente2814f5d8046329486073294dd1fd588efe5e052 (diff)
downloadvolse-hubzilla-d942818bd9d9e90db7a3083bfe33a54732f6184d.tar.gz
volse-hubzilla-d942818bd9d9e90db7a3083bfe33a54732f6184d.tar.bz2
volse-hubzilla-d942818bd9d9e90db7a3083bfe33a54732f6184d.zip
use item_thread_top = 1 instead of mid = parent_mid and make sure local_channel is intval
-rw-r--r--Zotlabs/Module/Hq.php6
-rw-r--r--view/js/mod_hq.js4
2 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index 71008b6d2..78087c0f9 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -45,11 +45,11 @@ class Hq extends \Zotlabs\Web\Controller {
if(! $item_hash) {
$r = q("SELECT mid FROM item
- WHERE uid = %d
- AND mid = parent_mid
+ WHERE uid = %d
+ AND item_thread_top = 1
ORDER BY created DESC
limit 1",
- local_channel()
+ intval(local_channel())
);
if(!$r[0]['mid']) {
diff --git a/view/js/mod_hq.js b/view/js/mod_hq.js
index cf7ec941c..8bbd5e3ad 100644
--- a/view/js/mod_hq.js
+++ b/view/js/mod_hq.js
@@ -1,4 +1,4 @@
-function hqLiveUpdate(notify_id, b64mid) {
+function hqLiveUpdate(notify_id) {
if(typeof profile_uid === 'undefined') profile_uid = false; /* Should probably be unified with channelId defined in head.tpl */
if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
@@ -65,7 +65,7 @@ function hqLiveUpdate(notify_id, b64mid) {
// else data was valid - reset the recursion counter
liveRecurse = 0;
- if(notify_id !== 'undefined') {
+ if(notify_id !== 'undefined') {
$.post(
"hq",
{