Skip to content

Commit

Permalink
allowPartialを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
adzukimame committed Dec 7, 2024
1 parent 7a39516 commit 5188913
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 27 deletions.
3 changes: 1 addition & 2 deletions packages/backend/src/core/FanoutTimelineEndpointService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type TimelineOptions = {
untilId: string | null,
sinceId: string | null,
limit: number,
allowPartial: boolean,
me?: { id: MiUser['id'] } | undefined | null,
useDbFallback: boolean,
redisTimelines: FanoutTimelineName[],
Expand Down Expand Up @@ -139,7 +138,7 @@ export class FanoutTimelineEndpointService {
redisTimeline.push(...gotFromDb);
lastSuccessfulRate = gotFromDb.length / noteIds.length;

if (ps.allowPartial ? redisTimeline.length !== 0 : redisTimeline.length >= ps.limit) {
if (redisTimeline.length >= ps.limit) {
// 十分Redisからとれた
return redisTimeline.slice(0, ps.limit);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default
},
required: ['channelId'],
} as const;
Expand Down Expand Up @@ -89,7 +88,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
untilId,
sinceId,
limit: ps.limit,
allowPartial: ps.allowPartial,
me,
useDbFallback: true,
redisTimelines: [`channelTimeline:${channel.id}`],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default
includeMyRenotes: { type: 'boolean', default: true },
includeRenotedMyNotes: { type: 'boolean', default: true },
includeLocalRenotes: { type: 'boolean', default: true },
Expand Down Expand Up @@ -147,7 +146,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
untilId,
sinceId,
limit: ps.limit,
allowPartial: ps.allowPartial,
me,
redisTimelines: timelineConfig,
useDbFallback: this.serverSettings.enableFanoutTimelineDbFallback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
},
Expand Down Expand Up @@ -103,7 +102,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
untilId,
sinceId,
limit: ps.limit,
allowPartial: ps.allowPartial,
me,
useDbFallback: this.serverSettings.enableFanoutTimelineDbFallback,
redisTimelines:
Expand Down
2 changes: 0 additions & 2 deletions packages/backend/src/server/api/endpoints/notes/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default
includeMyRenotes: { type: 'boolean', default: true },
includeRenotedMyNotes: { type: 'boolean', default: true },
includeLocalRenotes: { type: 'boolean', default: true },
Expand Down Expand Up @@ -99,7 +98,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
untilId,
sinceId,
limit: ps.limit,
allowPartial: ps.allowPartial,
me,
useDbFallback: this.serverSettings.enableFanoutTimelineDbFallback,
redisTimelines: ps.withFiles ? [`homeTimelineWithFiles:${me.id}`] : [`homeTimeline:${me.id}`],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default
includeMyRenotes: { type: 'boolean', default: true },
includeRenotedMyNotes: { type: 'boolean', default: true },
includeLocalRenotes: { type: 'boolean', default: true },
Expand Down Expand Up @@ -119,7 +118,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
untilId,
sinceId,
limit: ps.limit,
allowPartial: ps.allowPartial,
me,
useDbFallback: this.serverSettings.enableFanoutTimelineDbFallback,
redisTimelines: ps.withFiles ? [`userListTimelineWithFiles:${list.id}`] : [`userListTimeline:${list.id}`],
Expand Down
2 changes: 0 additions & 2 deletions packages/backend/src/server/api/endpoints/users/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default
withFiles: { type: 'boolean', default: false },
},
required: ['userId'],
Expand Down Expand Up @@ -118,7 +117,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
untilId,
sinceId,
limit: ps.limit,
allowPartial: ps.allowPartial,
me,
redisTimelines,
useDbFallback: true,
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ async function init(): Promise<void> {
await misskeyApi<Entity[]>(props.pagination.endpoint, {
...params,
limit: props.pagination.limit ?? 10,
allowPartial: true,
}).then(res => {
if (res.length === 0 || props.pagination.noPaging) {
concatItems(res);
Expand Down
12 changes: 0 additions & 12 deletions packages/misskey-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9222,8 +9222,6 @@ export type operations = {
untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default false */
allowPartial?: boolean;
};
};
};
Expand Down Expand Up @@ -17414,8 +17412,6 @@ export type operations = {
untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default false */
allowPartial?: boolean;
/** @default true */
includeMyRenotes?: boolean;
/** @default true */
Expand Down Expand Up @@ -17492,8 +17488,6 @@ export type operations = {
sinceId?: string;
/** Format: misskey:id */
untilId?: string;
/** @default false */
allowPartial?: boolean;
sinceDate?: number;
untilDate?: number;
};
Expand Down Expand Up @@ -18327,8 +18321,6 @@ export type operations = {
untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default false */
allowPartial?: boolean;
/** @default true */
includeMyRenotes?: boolean;
/** @default true */
Expand Down Expand Up @@ -18521,8 +18513,6 @@ export type operations = {
untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default false */
allowPartial?: boolean;
/** @default true */
includeMyRenotes?: boolean;
/** @default true */
Expand Down Expand Up @@ -20817,8 +20807,6 @@ export type operations = {
sinceDate?: number;
untilDate?: number;
/** @default false */
allowPartial?: boolean;
/** @default false */
withFiles?: boolean;
};
};
Expand Down

0 comments on commit 5188913

Please sign in to comment.