fix: show proper notification text for follow request (#2314)
Fixes #1800
This commit is contained in:
parent
040462f5b5
commit
b1dc43a9c9
|
@ -497,6 +497,7 @@ export default {
|
|||
}: {description}`,
|
||||
accountFollowedYou: '{name} followed you, {account}',
|
||||
accountSignedUp: '{name} signed up, {account}',
|
||||
accountRequestedFollow: '{name} requested to follow you, {account}',
|
||||
reblogCountsHidden: 'Boost counts hidden',
|
||||
favoriteCountsHidden: 'Favorite counts hidden',
|
||||
rebloggedTimes: `Boosted {count, plural,
|
||||
|
@ -512,6 +513,7 @@ export default {
|
|||
favoritedYou: 'favorited your toot',
|
||||
followedYou: 'followed you',
|
||||
edited: 'edited their toot',
|
||||
requestedFollow: 'requested to follow you',
|
||||
signedUp: 'signed up',
|
||||
posted: 'posted',
|
||||
pollYouCreatedEnded: 'A poll you created has ended',
|
||||
|
|
|
@ -66,7 +66,7 @@ export async function getTimeline (instanceName, accessToken, timeline, maxId, s
|
|||
}
|
||||
|
||||
if (timeline === 'notifications/mentions') {
|
||||
params.exclude_types = ['follow', 'favourite', 'reblog', 'poll', 'admin.sign_up']
|
||||
params.exclude_types = ['follow', 'favourite', 'reblog', 'poll', 'admin.sign_up', 'update', 'follow_request']
|
||||
}
|
||||
|
||||
url += '?' + paramsString(params)
|
||||
|
|
|
@ -76,6 +76,8 @@
|
|||
}
|
||||
if (notificationType === 'admin.sign_up') {
|
||||
return formatIntl('intl.accountSignedUp', params)
|
||||
} else if (notificationType === 'follow_request') {
|
||||
return formatIntl('intl.accountRequestedFollow', params)
|
||||
} else { // 'follow'
|
||||
return formatIntl('intl.accountFollowedYou', params)
|
||||
}
|
||||
|
|
|
@ -139,6 +139,8 @@
|
|||
return '#fa-user-plus'
|
||||
} else if (notificationType === 'update') {
|
||||
return '#fa-pencil'
|
||||
} else if (notificationType === 'follow_request') {
|
||||
return '#fa-hourglass'
|
||||
}
|
||||
return '#fa-star'
|
||||
},
|
||||
|
@ -163,6 +165,8 @@
|
|||
return 'intl.reblogged'
|
||||
} else if (notificationType === 'update') {
|
||||
return 'intl.edited'
|
||||
} else if (notificationType === 'follow_request') {
|
||||
return 'intl.requestedFollow'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
|
|
@ -215,6 +215,7 @@ async function showRichNotification (data, notification) {
|
|||
|
||||
switch (notification.type) {
|
||||
case 'follow':
|
||||
case 'follow_request':
|
||||
case 'admin.sign_up': {
|
||||
await self.registration.showNotification(data.title, {
|
||||
badge,
|
||||
|
|
Loading…
Reference in New Issue