aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-08-24 21:53:31 +0300
committereal <eal@waifu.club>2017-08-24 21:53:31 +0300
commit5bd6abc13443be68b80be3582c0b39c5b4e09136 (patch)
tree270e6414281005ef599e6802d3404244cad216bd /src
parent8778270381c6f2fffdf1c6a5eb09448a787aebd7 (diff)
Add regex for follows from pleromabe
Diffstat (limited to 'src')
-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 })
}
},