aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Ping.php4
-rw-r--r--view/tpl/notifications_widget.tpl3
2 files changed, 5 insertions, 2 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index c1bce0d51..a3f6cdfec 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -279,8 +279,8 @@ class Ping extends \Zotlabs\Web\Controller {
'photo' => $tt['photo'],
'when' => relative_date($tt['created']),
'hclass' => (($tt['seen']) ? 'notify-seen' : 'notify-unseen'),
- 'b64mid' => $b64mid,
- 'notify_id' => (($tt['otype'] == 'item') ? $tt['id'] : ''),
+ 'b64mid' => (($tt['otype'] == 'item') ? $b64mid : 'undefined'),
+ 'notify_id' => (($tt['otype'] == 'item') ? $tt['id'] : 'undefined'),
'message' => $message
);
}
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 0974045fe..299c07592 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -28,6 +28,9 @@
var path = $(this)[0].pathname.substr(1,7);
var stateObj = { b64mid: b64mid };
+ if(b64mid === 'undefined' && notify_id === 'undefined')
+ return;
+
{{if $module == 'display'}}
history.pushState(stateObj, '', 'display/' + b64mid);
{{/if}}