Skip to content

Commit

Permalink
通知APIがページ境界で重複する問題の修正 (kokonect-link#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozakura913 authored Oct 18, 2024
1 parent b2eb0bf commit 10e333b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG_YOJO.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ Cherrypick 4.11.1
- Change: `notes/advanced-search``query`が必須ではなくなりました
- Fix: (Opensearch利用時)高度な検索でリプライ除外にするとエラーがでる
- Fix: ノート編集時に3001文字以上の場合編集できない問題を修正

- Fix: 通知APIがページ境界で重複する問題の修正

### Misc

## 1.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // 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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // 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));
Expand Down

0 comments on commit 10e333b

Please sign in to comment.