From 3d9d59915b0d201f40f63c149729d9de319388bd Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 21 Aug 2017 23:31:38 +0300 Subject: [PATCH] Add regex to check if you're the one being followed before adding notification. --- src/modules/statuses.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index c7c3d016..0091b736 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -259,7 +259,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us } }, 'follow': (status) => { - addNotification({ type: 'follow', status: status, action: status }) + let re = new RegExp(`started following ${user.name} \\(${user.statusnet_profile_url}\\)`) + if (status.text.match(re)) { + addNotification({ type: 'follow', status: status, action: status }) + } }, 'deletion': (deletion) => { const uri = deletion.uri