use item_thread_top = 1 instead of mid = parent_mid and make sure local_channel is intval

This commit is contained in:
Mario Vavti 2017-11-21 22:10:09 +01:00
parent e2814f5d80
commit d942818bd9
2 changed files with 5 additions and 5 deletions

View File

@ -46,10 +46,10 @@ class Hq extends \Zotlabs\Web\Controller {
$r = q("SELECT mid FROM item $r = q("SELECT mid FROM item
WHERE uid = %d WHERE uid = %d
AND mid = parent_mid AND item_thread_top = 1
ORDER BY created DESC ORDER BY created DESC
limit 1", limit 1",
local_channel() intval(local_channel())
); );
if(!$r[0]['mid']) { if(!$r[0]['mid']) {

View File

@ -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(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; } if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }