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