Drop invalid notifications

This commit is contained in:
Alex Gleason 2022-07-08 17:52:39 -05:00
parent 463c9fc9f5
commit 627e6c574f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ const updateNotifications = (notification: APIEntity) =>
const updateNotificationsQueue = (notification: APIEntity, intlMessages: Record<string, string>, intlLocale: string, curPath: string) =>
(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
const showAlert = getSettings(getState()).getIn(['notifications', 'alerts', notification.type]);