aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlambadalambda <gitgud@rogerbraun.net>2017-08-22 06:18:41 -0400
committerlambadalambda <gitgud@rogerbraun.net>2017-08-22 06:18:41 -0400
commit5a1ad8409244ca7deb224b172ceb2b4acf7b8614 (patch)
tree6466c38285c12d989400c6236d197357fdde44ad /src
parente5d0965ff1996752210dfa4f8c9604d037e06cb4 (diff)
parent3d9d59915b0d201f40f63c149729d9de319388bd (diff)
Merge branch 'fix/check-if-follow-notif-matches-self' into 'develop'
Add regex to check if you're the one being followed before adding notification. See merge request !102
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