diff options
| author | Shpuld Shpuldson <shpuld@gmail.com> | 2017-08-25 03:19:01 -0400 |
|---|---|---|
| committer | Shpuld Shpuldson <shpuld@gmail.com> | 2017-08-25 03:19:01 -0400 |
| commit | 87b18da8116bcaf8bb2f154847fb9f0fed58789a (patch) | |
| tree | 5b1207bfa6f830ee4a91da6aaa08f337ce25a3a6 /src | |
| parent | 205024ba9dec4b3baf3ae20636fb6c8eb680d11d (diff) | |
| parent | 5bd6abc13443be68b80be3582c0b39c5b4e09136 (diff) | |
Merge branch 'fix/pleromabe-follow-notifs' into 'develop'
Add regex for follows from pleromabe
See merge request !109
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/statuses.js | 4 |
1 files changed, 3 insertions, 1 deletions
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 }) } }, |
