diff --git a/packages/nicolium/src/features/notifications/components/notification.tsx b/packages/nicolium/src/features/notifications/components/notification.tsx index 106a86114..a3b276cd1 100644 --- a/packages/nicolium/src/features/notifications/components/notification.tsx +++ b/packages/nicolium/src/features/notifications/components/notification.tsx @@ -73,6 +73,7 @@ const buildLink = ( const icons: Partial> = { follow: require('@phosphor-icons/core/regular/user-plus.svg'), follow_request: require('@phosphor-icons/core/regular/user-plus.svg'), + follow_request_accepted: require('@phosphor-icons/core/regular/user-plus.svg'), mention: require('@phosphor-icons/core/regular/at.svg'), favourite: require('@phosphor-icons/core/regular/star.svg'), reblog: require('@phosphor-icons/core/regular/repeat.svg'), @@ -109,6 +110,10 @@ const messages: Record = defineMe id: 'notification.follow_request', defaultMessage: '{name} has requested to follow you', }, + follow_request_accepted: { + id: 'notification.follow_request_accepted', + defaultMessage: '{name} accepted your follow request', + }, mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you', @@ -458,6 +463,7 @@ const Notification: React.FC = ({ onMoveUp, onMoveDown, compact, switch (type) { case 'follow': + case 'follow_request_accepted': return ; case 'follow_request': return ( diff --git a/packages/nicolium/src/locales/en.json b/packages/nicolium/src/locales/en.json index 84d5d629d..797d0b036 100644 --- a/packages/nicolium/src/locales/en.json +++ b/packages/nicolium/src/locales/en.json @@ -1522,6 +1522,7 @@ "notification.favourite": "{name} liked your post", "notification.follow": "{name} followed you", "notification.follow_request": "{name} has requested to follow you", + "notification.follow_request_accepted": "{name} accepted your follow request", "notification.mention": "{name} mentioned you", "notification.moderation_warning": "You have received a moderation warning", "notification.more": "{count, plural, one {# other} other {# others}}", diff --git a/packages/pl-api/lib/entities/notification.ts b/packages/pl-api/lib/entities/notification.ts index 2b5c67c6c..01d8c81e1 100644 --- a/packages/pl-api/lib/entities/notification.ts +++ b/packages/pl-api/lib/entities/notification.ts @@ -23,7 +23,7 @@ const baseNotificationSchema = v.object({ const accountNotificationSchema = v.object({ ...baseNotificationSchema.entries, - type: v.picklist(['follow', 'follow_request', 'admin.sign_up']), + type: v.picklist(['follow', 'follow_request', 'follow_request_accepted', 'admin.sign_up']), }); const mentionNotificationSchema = v.object({