Skip to content

Commit

Permalink
feat(background): api/metaで検索可能なノートのスコープを参照できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
tai-cha committed Jul 17, 2024
1 parent be69c3a commit 568e34a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/backend/src/core/entities/MetaEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class MetaEntityService {

mediaProxy: this.config.mediaProxy,
enableUrlPreview: instance.urlPreviewEnabled,
noteSearchableScope: this.config.meilisearch == null || this.config.meilisearch.scope === 'global' ? 'global' : 'local',
};

return packed;
Expand Down
6 changes: 6 additions & 0 deletions packages/backend/src/models/json-schema/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ export const packedMetaLiteSchema = {
optional: false, nullable: false,
ref: 'RolePolicies',
},
noteSearchableScope: {
type: 'string',
enum: ['local', 'global'],
optional: false, nullable: false,
default: 'local',
},
},
} as const;

Expand Down
5 changes: 5 additions & 0 deletions packages/misskey-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4937,6 +4937,11 @@ export type components = {
serverRules: string[];
themeColor: string | null;
policies: components['schemas']['RolePolicies'];
/**
* @default local
* @enum {string}
*/
noteSearchableScope: 'local' | 'global';
};
MetaDetailedOnly: {
features?: {
Expand Down

0 comments on commit 568e34a

Please sign in to comment.