Support group notifications for favourites/reblogs
This commit is contained in:
parent
9e5bd27cfb
commit
5fb4b498da
3 changed files with 17 additions and 0 deletions
|
@ -43,7 +43,9 @@ const icons: Record<NotificationType, string> = {
|
||||||
follow_request: require('@tabler/icons/user-plus.svg'),
|
follow_request: require('@tabler/icons/user-plus.svg'),
|
||||||
mention: require('@tabler/icons/at.svg'),
|
mention: require('@tabler/icons/at.svg'),
|
||||||
favourite: require('@tabler/icons/heart.svg'),
|
favourite: require('@tabler/icons/heart.svg'),
|
||||||
|
group_favourite: require('@tabler/icons/heart.svg'),
|
||||||
reblog: require('@tabler/icons/repeat.svg'),
|
reblog: require('@tabler/icons/repeat.svg'),
|
||||||
|
group_reblog: require('@tabler/icons/repeat.svg'),
|
||||||
status: require('@tabler/icons/bell-ringing.svg'),
|
status: require('@tabler/icons/bell-ringing.svg'),
|
||||||
poll: require('@tabler/icons/chart-bar.svg'),
|
poll: require('@tabler/icons/chart-bar.svg'),
|
||||||
move: require('@tabler/icons/briefcase.svg'),
|
move: require('@tabler/icons/briefcase.svg'),
|
||||||
|
@ -78,10 +80,18 @@ const messages: Record<NotificationType, MessageDescriptor> = defineMessages({
|
||||||
id: 'notification.favourite',
|
id: 'notification.favourite',
|
||||||
defaultMessage: '{name} liked your post',
|
defaultMessage: '{name} liked your post',
|
||||||
},
|
},
|
||||||
|
group_favourite: {
|
||||||
|
id: 'notification.group_favourite',
|
||||||
|
defaultMessage: '{name} liked your group post',
|
||||||
|
},
|
||||||
reblog: {
|
reblog: {
|
||||||
id: 'notification.reblog',
|
id: 'notification.reblog',
|
||||||
defaultMessage: '{name} reposted your post',
|
defaultMessage: '{name} reposted your post',
|
||||||
},
|
},
|
||||||
|
group_reblog: {
|
||||||
|
id: 'notification.group_reblog',
|
||||||
|
defaultMessage: '{name} reposted your group post',
|
||||||
|
},
|
||||||
status: {
|
status: {
|
||||||
id: 'notification.status',
|
id: 'notification.status',
|
||||||
defaultMessage: '{name} just posted',
|
defaultMessage: '{name} just posted',
|
||||||
|
@ -314,8 +324,10 @@ const Notification: React.FC<INotificaton> = (props) => {
|
||||||
/>
|
/>
|
||||||
) : null;
|
) : null;
|
||||||
case 'favourite':
|
case 'favourite':
|
||||||
|
case 'group_favourite':
|
||||||
case 'mention':
|
case 'mention':
|
||||||
case 'reblog':
|
case 'reblog':
|
||||||
|
case 'group_reblog':
|
||||||
case 'status':
|
case 'status':
|
||||||
case 'poll':
|
case 'poll':
|
||||||
case 'update':
|
case 'update':
|
||||||
|
@ -331,6 +343,7 @@ const Notification: React.FC<INotificaton> = (props) => {
|
||||||
onMoveUp={handleMoveUp}
|
onMoveUp={handleMoveUp}
|
||||||
avatarSize={avatarSize}
|
avatarSize={avatarSize}
|
||||||
contextType='notifications'
|
contextType='notifications'
|
||||||
|
showGroup={false}
|
||||||
/>
|
/>
|
||||||
) : null;
|
) : null;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1051,6 +1051,8 @@
|
||||||
"notification.favourite": "{name} liked your post",
|
"notification.favourite": "{name} liked your post",
|
||||||
"notification.follow": "{name} followed you",
|
"notification.follow": "{name} followed you",
|
||||||
"notification.follow_request": "{name} has requested to follow you",
|
"notification.follow_request": "{name} has requested to follow you",
|
||||||
|
"notification.group_favourite": "{name} liked your group post",
|
||||||
|
"notification.group_reblog": "{name} reposted your group post",
|
||||||
"notification.mention": "{name} mentioned you",
|
"notification.mention": "{name} mentioned you",
|
||||||
"notification.mentioned": "{name} mentioned you",
|
"notification.mentioned": "{name} mentioned you",
|
||||||
"notification.move": "{name} moved to {targetName}",
|
"notification.move": "{name} moved to {targetName}",
|
||||||
|
|
|
@ -5,6 +5,8 @@ const NOTIFICATION_TYPES = [
|
||||||
'mention',
|
'mention',
|
||||||
'reblog',
|
'reblog',
|
||||||
'favourite',
|
'favourite',
|
||||||
|
'group_favourite',
|
||||||
|
'group_reblog',
|
||||||
'poll',
|
'poll',
|
||||||
'status',
|
'status',
|
||||||
'move',
|
'move',
|
||||||
|
|
Loading…
Reference in a new issue