From c682a4b007cc55ce627e7c7331443905e473c4a7 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sun, 12 Nov 2017 23:15:47 +0200 Subject: [PATCH] Don't add notification on self mention, (and fix that pesky pleroma vs gs delete bug) --- src/modules/statuses.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 5f2f8152..403abd23 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -131,7 +131,7 @@ export const statusType = (status) => { return 'favorite' } - if (status.text.match(/deleted notice {{tag/)) { + if (status.text.match(/deleted notice {{tag/) || status.qvitter_delete_notice) { return 'deletion' } @@ -211,8 +211,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us sortTimeline(mentions) } - - addNotification({ type: 'mention', status, action: status }) + // Don't add notification for self-mention + if (status.user.id !== user.id) { + addNotification({ type: 'mention', status, action: status }) + } } }