diff options
| author | lambadalambda <gitgud@rogerbraun.net> | 2017-08-22 06:18:41 -0400 |
|---|---|---|
| committer | lambadalambda <gitgud@rogerbraun.net> | 2017-08-22 06:18:41 -0400 |
| commit | 5a1ad8409244ca7deb224b172ceb2b4acf7b8614 (patch) | |
| tree | 6466c38285c12d989400c6236d197357fdde44ad | |
| parent | e5d0965ff1996752210dfa4f8c9604d037e06cb4 (diff) | |
| parent | 3d9d59915b0d201f40f63c149729d9de319388bd (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
| -rw-r--r-- | src/modules/statuses.js | 5 |
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 |
