aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpuldson <shpuld@gmail.com>2017-08-21 23:31:38 +0300
committerShpuld Shpuldson <shpuld@gmail.com>2017-08-21 23:31:38 +0300
commit3d9d59915b0d201f40f63c149729d9de319388bd (patch)
treef21a740432be4f24f283503929e124a3c3f5cc19 /src
parentcbe652f2d94d81fa54a37378b7ff014c4391ca5e (diff)
Add regex to check if you're the one being followed before adding notification.
Diffstat (limited to 'src')
-rw-r--r--src/modules/statuses.js5
1 files changed, 4 insertions, 1 deletions
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