nicolium: support follow_request_accepted notification

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-17 17:18:55 +01:00
parent 8361b59548
commit 9e2f7a24c3
3 changed files with 8 additions and 1 deletions

View File

@ -73,6 +73,7 @@ const buildLink = (
const icons: Partial<Record<NotificationType | 'reply', string>> = {
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<NotificationType | 'reply', MessageDescriptor> = 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<INotification> = ({ onMoveUp, onMoveDown, compact,
switch (type) {
case 'follow':
case 'follow_request_accepted':
return <AccountContainer id={account.id} avatarSize={avatarSize} withRelationship />;
case 'follow_request':
return (

View File

@ -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}}",

View File

@ -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({