Drop invalid notifications
This commit is contained in:
parent
463c9fc9f5
commit
627e6c574f
|
@ -89,6 +89,7 @@ const updateNotifications = (notification: APIEntity) =>
|
||||||
|
|
||||||
const updateNotificationsQueue = (notification: APIEntity, intlMessages: Record<string, string>, intlLocale: string, curPath: string) =>
|
const updateNotificationsQueue = (notification: APIEntity, intlMessages: Record<string, string>, intlLocale: string, curPath: string) =>
|
||||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||||
|
if (!notification.type) return; // drop invalid notifications
|
||||||
if (notification.type === 'pleroma:chat_mention') return; // Drop chat notifications, handle them per-chat
|
if (notification.type === 'pleroma:chat_mention') return; // Drop chat notifications, handle them per-chat
|
||||||
|
|
||||||
const showAlert = getSettings(getState()).getIn(['notifications', 'alerts', notification.type]);
|
const showAlert = getSettings(getState()).getIn(['notifications', 'alerts', notification.type]);
|
||||||
|
|
Loading…
Reference in New Issue