logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 5a1ad8409244ca7deb224b172ceb2b4acf7b8614
parent: e5d0965ff1996752210dfa4f8c9604d037e06cb4
Author: lambadalambda <gitgud@rogerbraun.net>
Date:   Tue, 22 Aug 2017 06:18:41 -0400

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:

Msrc/modules/statuses.js5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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