diff --git a/packages/backend/src/core/UserFollowingService.ts b/packages/backend/src/core/UserFollowingService.ts index deeecde..2770ecb 100644 --- a/packages/backend/src/core/UserFollowingService.ts +++ b/packages/backend/src/core/UserFollowingService.ts @@ -388,6 +388,7 @@ export class UserFollowingService implements OnModuleInit { this.cacheService.userFollowingsCache.refresh(follower.id); this.decrementFollowing(following.follower, following.followee); + this.notificationService.createNotification(followee.id, 'unfollow', {}, follower.id); if (!silent && this.userEntityService.isLocalUser(follower)) { // Publish unfollow event diff --git a/packages/backend/src/models/Notification.ts b/packages/backend/src/models/Notification.ts index 4ed71a1..0bbd0ca 100644 --- a/packages/backend/src/models/Notification.ts +++ b/packages/backend/src/models/Notification.ts @@ -15,7 +15,7 @@ export type MiNotification = { notifierId: MiUser['id']; noteId: MiNote['id']; } | { - type: 'follow'; + type: 'follow' | 'unfollow'; id: string; createdAt: string; notifierId: MiUser['id']; diff --git a/packages/frontend/src/components/MkNotification.vue b/packages/frontend/src/components/MkNotification.vue index f849e94..9ba8351 100644 --- a/packages/frontend/src/components/MkNotification.vue +++ b/packages/frontend/src/components/MkNotification.vue @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
+ @@ -61,6 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts._notification.achievementEarned }} {{ i18n.ts._notification.testNotification }} + {{ i18n.tsx._notification.likedBySomeUsers({ n: getActualReactedUsersCount(notification) }) }} {{ i18n.tsx._notification.reactedBySomeUsers({ n: getActualReactedUsersCount(notification) }) }} {{ i18n.tsx._notification.renotedBySomeUsers({ n: notification.users.length }) }} @@ -105,6 +107,9 @@ SPDX-License-Identifier: AGPL-3.0-only + {{ i18n.ts.followRequestAccepted }}