Add regex to check if you're the one being followed before adding notification.

This commit is contained in:
Shpuld Shpuldson 2017-08-21 23:31:38 +03:00
parent cbe652f2d9
commit 3d9d59915b
1 changed files with 4 additions and 1 deletions

View File

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