diff --git a/CHANGELOG_YOJO.md b/CHANGELOG_YOJO.md index de5eb8736b..cbf9136d5e 100644 --- a/CHANGELOG_YOJO.md +++ b/CHANGELOG_YOJO.md @@ -45,7 +45,8 @@ Cherrypick 4.11.1 - Change: `notes/advanced-search`で`query`が必須ではなくなりました - Fix: (Opensearch利用時)高度な検索でリプライ除外にするとエラーがでる - Fix: ノート編集時に3001文字以上の場合編集できない問題を修正 - +- Fix: 通知APIがページ境界で重複する問題の修正 + ### Misc ## 1.0.1 diff --git a/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts b/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts index 833a74fe12..9bf5f0d0b2 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts @@ -97,7 +97,7 @@ export default class extends Endpoint { // eslint- return []; } - let notifications = notificationsRes.map(x => JSON.parse(x[1][1])).filter(x => x.id !== ps.untilId && x !== ps.sinceId) as MiNotification[]; + let notifications = notificationsRes.map(x => JSON.parse(x[1][1])).filter(x => x.id !== ps.untilId && x.id !== ps.sinceId) as MiNotification[]; if (includeTypes && includeTypes.length > 0) { notifications = notifications.filter(notification => includeTypes.includes(notification.type)); diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index 2f619380e9..7bfc0ee3a1 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -110,7 +110,7 @@ export default class extends Endpoint { // eslint- return []; } - notifications = notificationsRes.map(x => JSON.parse(x[1][1])) as MiNotification[]; + notifications = notificationsRes.map(x => JSON.parse(x[1][1])).filter(x => x.id !== ps.untilId && x.id !== ps.sinceId) as MiNotification[]; if (includeTypes && includeTypes.length > 0) { notifications = notifications.filter(notification => includeTypes.includes(notification.type));