diff --git a/packages/client/src/components/MkNotificationFolded.vue b/packages/client/src/components/MkNotificationFolded.vue
index 11b6e5814b..c7a2730cd3 100644
--- a/packages/client/src/components/MkNotificationFolded.vue
+++ b/packages/client/src/components/MkNotificationFolded.vue
@@ -12,6 +12,10 @@
v-if="notification.type === 'renote'"
:class="icon('ph-rocket-launch', false)"
>
+
0) {
res = i18n.t("_notification.andCountUsers", {
diff --git a/packages/client/src/scripts/fold.ts b/packages/client/src/scripts/fold.ts
index f693b7526b..fe98ecb50f 100644
--- a/packages/client/src/scripts/fold.ts
+++ b/packages/client/src/scripts/fold.ts
@@ -68,6 +68,8 @@ export function foldNotifications(ns: entities.Notification[]) {
return `renote-${n.note.renote.id}`;
case "reaction":
return `reaction-${n.reaction}-of-${n.note.id}`;
+ case "pollVote":
+ return `pollVote-${n.note.id}`;
default: {
return `${n.id}`;
}
@@ -78,7 +80,11 @@ export function foldNotifications(ns: entities.Notification[]) {
function check(
ns: entities.Notification[],
): ns is FoldableNotification[] {
- return represent.type === "renote" || represent.type === "reaction";
+ return (
+ represent.type === "renote" ||
+ represent.type === "reaction" ||
+ represent.type === "pollVote"
+ );
}
if (!check(ns)) {
return represent;
diff --git a/packages/client/src/types/notification.ts b/packages/client/src/types/notification.ts
index 0b7090ae6b..8501c4c625 100644
--- a/packages/client/src/types/notification.ts
+++ b/packages/client/src/types/notification.ts
@@ -2,7 +2,8 @@ import type { entities } from "firefish-js";
export type FoldableNotification =
| entities.RenoteNotification
- | entities.ReactionNotification;
+ | entities.ReactionNotification
+ | entities.PollVoteNotification;
interface Fold {
id: string;
@@ -21,11 +22,16 @@ export type ReactionNotificationFolded = Fold & {
reaction: string;
};
+export type PollVotedNotificationFolded = Fold;
+
export type GetNotificationFoldedType =
T["type"] extends "renote"
? RenoteNotificationFolded
- : ReactionNotificationFolded;
+ : T["type"] extends "reaction"
+ ? ReactionNotificationFolded
+ : PollVotedNotificationFolded;
export type NotificationFolded =
| RenoteNotificationFolded
- | ReactionNotificationFolded;
+ | ReactionNotificationFolded
+ | PollVotedNotificationFolded;