aboutsummaryrefslogtreecommitdiff
path: root/src/modules/statuses.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shpuld@gmail.com>2017-08-25 03:19:01 -0400
committerShpuld Shpuldson <shpuld@gmail.com>2017-08-25 03:19:01 -0400
commit87b18da8116bcaf8bb2f154847fb9f0fed58789a (patch)
tree5b1207bfa6f830ee4a91da6aaa08f337ce25a3a6 /src/modules/statuses.js
parent205024ba9dec4b3baf3ae20636fb6c8eb680d11d (diff)
parent5bd6abc13443be68b80be3582c0b39c5b4e09136 (diff)
Merge branch 'fix/pleromabe-follow-notifs' into 'develop'
Add regex for follows from pleromabe See merge request !109
Diffstat (limited to 'src/modules/statuses.js')
-rw-r--r--src/modules/statuses.js4
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 })
}
},