Merge branch 'streaming-fix' into 'develop'

Fix streaming notifictaions

Closes #653

See merge request soapbox-pub/soapbox-fe!537
merge-requests/538/head
Alex Gleason 3 years ago
commit 4b790caa72

@ -92,6 +92,7 @@ export function updateNotificationsQueue(notification, intlMessages, intlLocale,
}
// Desktop notifications
try {
if (typeof window.Notification !== 'undefined' && showAlert && !filtered) {
const title = new IntlMessageFormat(intlMessages[`notification.${notification.type}`], intlLocale).format({ name: notification.account.display_name.length > 0 ? notification.account.display_name : notification.account.username });
const body = (notification.status && notification.status.spoiler_text.length > 0) ? notification.status.spoiler_text : unescapeHTML(notification.status ? notification.status.content : '');
@ -103,6 +104,9 @@ export function updateNotificationsQueue(notification, intlMessages, intlLocale,
notify.close();
});
}
} catch(e) {
console.warn(e);
}
if (playSound && !filtered) {
dispatch({

Loading…
Cancel
Save