Check Notification in window for login feed

This commit is contained in:
Kieran 2023-01-06 15:10:41 +00:00
parent f56a6f73f4
commit c1941754e4
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -51,7 +51,7 @@ export default function useLoginFeed() {
dispatch(setFollows(pTags)); dispatch(setFollows(pTags));
} }
if (Notification.permission === "granted") { if ("Notification" in window && Notification.permission === "granted") {
for (let nx in notifications.filter(a => (a.created_at * 1000) > readNotifications)) { for (let nx in notifications.filter(a => (a.created_at * 1000) > readNotifications)) {
//let n = new Notification(`New reply!`, { body: nx.content, icon: Nostrich }); //let n = new Notification(`New reply!`, { body: nx.content, icon: Nostrich });
//console.log(n); //console.log(n);