From 5bd6abc13443be68b80be3582c0b39c5b4e09136 Mon Sep 17 00:00:00 2001 From: eal Date: Thu, 24 Aug 2017 21:53:31 +0300 Subject: [PATCH] Add regex for follows from pleromabe --- src/modules/statuses.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 586e6ec9..6c760eed 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -121,6 +121,7 @@ export const statusType = (status) => { return 'deletion' } + // TODO change to status.activity_type === 'follow' when gs supports it if (status.text.match(/started following/)) { return 'follow' } @@ -275,7 +276,8 @@ 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)) { + let repleroma = new RegExp(`started following ${user.screen_name}$`) + if (status.text.match(re) || status.text.match(repleroma)) { addNotification({ type: 'follow', status: status, action: status }) } },