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
This commit is contained in:
lambadalambda 2017-08-22 06:18:41 -04:00
commit 5a1ad84092

View file

@ -259,7 +259,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
} }
}, },
'follow': (status) => { '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) => { 'deletion': (deletion) => {
const uri = deletion.uri const uri = deletion.uri