Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api/i/notifications-groupedで新着ノートをデフォルトでまとめないように #662

Merged
merged 4 commits into from
Mar 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG_YOJO.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ Misskey 2025.2.0
- エンドポイント:`api/federation/remote-software`
- フロントエンドでは`/about#charts` で確認できます


### Client
- yojo-art アップデートを開くとサーバー設定が更新される問題を修正 [#651](https://github.com/yojo-art/cherrypick/pull/651)
- リアクション付ける前に確認ダイアログを追加するオプション [#657](https://github.com/yojo-art/cherrypick/pull/657)

### Server
- リモートのイベントを表示できるように [#658](https://github.com/yojo-art/cherrypick/pull/658)
- 通常の検索でもOpenSearchを利用できるように [#661](https://github.com/yojo-art/cherrypick/pull/661)
- `api/i/notifications-grouped`で新着ノートをデフォルトでまとめないように[#662](https://github.com/yojo-art/cherrypick/pull/662)

## 1.3.1
Cherrypick 4.13.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const paramDef = {
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
markAsRead: { type: 'boolean', default: true },
groupNote: { type: 'boolean', default: false, description: '新着ノート通知をまとめるか' },
// 後方互換のため、廃止された通知タイプも受け付ける
includeTypes: { type: 'array', items: {
type: 'string', enum: [...groupedNotificationTypes, ...obsoleteNotificationTypes],
Expand Down Expand Up @@ -157,7 +158,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
prevGroupedNotification.id = notification.id;
continue;
}
if (prev.type === 'note' && notification.type === 'note') {
if (prev.type === 'note' && notification.type === 'note' && ps.groupNote) {
if (prevGroupedNotification.type !== 'note:grouped') {
groupedNotifications[groupedNotifications.length - 1] = {
type: 'note:grouped',
Expand Down
5 changes: 5 additions & 0 deletions packages/cherrypick-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20896,6 +20896,11 @@ export type operations = {
untilId?: string;
/** @default true */
markAsRead?: boolean;
/**
* @description 新着ノート通知をまとめるか
* @default false
*/
groupNote?: boolean;
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'groupInvited' | 'roleAssigned' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'scheduleNote' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped' | 'note:grouped' | 'pollVote')[];
excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'groupInvited' | 'roleAssigned' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'scheduleNote' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped' | 'note:grouped' | 'pollVote')[];
};
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/components/MkNotifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const pagination = computed(() => props.notUseGrouped ? {
limit: 20,
params: computed(() => ({
excludeTypes: props.excludeTypes ?? undefined,
groupNote: true,
})),
} : {
endpoint: 'i/notifications' as const,
Expand Down
Loading