Notifications: drop chat mentions

Prevent streaming API from pushing in unwanted notifications
https://git.pleroma.social/pleroma/pleroma/-/issues/2076
This commit is contained in:
Alex Gleason 2020-08-27 14:35:28 -05:00
parent 859f340716
commit 497a603a88
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -71,6 +71,8 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
export function updateNotificationsQueue(notification, intlMessages, intlLocale, curPath) {
return (dispatch, getState) => {
if (notification.type === 'pleroma:chat_mention') return; // Drop chat notifications, handle them per-chat
const showAlert = getSettings(getState()).getIn(['notifications', 'alerts', notification.type]);
const filters = getFilters(getState(), { contextType: 'notifications' });
const playSound = getSettings(getState()).getIn(['notifications', 'sounds', notification.type]);