From ebee3e208c0f0bb8c6b84d05a4c9005bf229f054 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 10 Nov 2017 20:30:55 +0100 Subject: revert back to get the mid from enotify - otherwise we can not distinct between posts and likes --- Zotlabs/Lib/Enotify.php | 3 ++- view/js/main.js | 4 ++-- view/tpl/notifications_widget.tpl | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index e82c11a35..21227893c 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -798,7 +798,8 @@ class Enotify { 'url' => $item['author']['xchan_url'], 'photo' => $item['author']['xchan_photo_s'], 'when' => relative_date($item['created']), - 'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'), + 'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'), + 'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])), 'message' => strip_tags(bbcode($itemem_text)) ); diff --git a/view/js/main.js b/view/js/main.js index ffea1b75c..e231dac60 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -959,9 +959,9 @@ function notify_popup_loader(notifyType) { $("." + notifyType + "-update").html(data.notify.length); $(data.notify).each(function() { - html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); + html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid); $("#navbar-" + notifyType + "-menu").append(html); - html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); + html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid); $("#nav-" + notifyType + "-menu").append(html); }); diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 1e752c313..0ece84891 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -29,16 +29,16 @@ {{if $module == 'display'}}