notifications: only handle item otype notify_ids

This commit is contained in:
Mario Vavti 2017-12-18 12:46:37 +01:00
parent 07b628b667
commit fe960d7c28
2 changed files with 5 additions and 2 deletions

View File

@ -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
);
}

View File

@ -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}}