refactor: prefix Mi for all entities (misskey-dev#11719) (MisskeyIO#160)
cheery-pick from misskey-dev@792622aeadf3e36d50cddec3c64b2ff0105ea927
This commit is contained in:
parent
651905e08f
commit
58bbff3738
234 changed files with 2061 additions and 2061 deletions
|
@ -8,8 +8,8 @@ import { In } from 'typeorm';
|
|||
import { DI } from '@/di-symbols.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { Note } from '@/models/entities/Note.js';
|
||||
import { User } from '@/models/index.js';
|
||||
import { MiNote } from '@/models/entities/Note.js';
|
||||
import { MiUser } from '@/models/index.js';
|
||||
import type { NotesRepository } from '@/models/index.js';
|
||||
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
|
@ -105,7 +105,7 @@ export class SearchService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async indexNote(note: Note): Promise<void> {
|
||||
public async indexNote(note: MiNote): Promise<void> {
|
||||
if (note.text == null && note.cw == null) return;
|
||||
if (!['home', 'public'].includes(note.visibility)) return;
|
||||
|
||||
|
@ -141,7 +141,7 @@ export class SearchService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async unindexNote(note: Note): Promise<void> {
|
||||
public async unindexNote(note: MiNote): Promise<void> {
|
||||
if (!['home', 'public'].includes(note.visibility)) return;
|
||||
|
||||
if (this.meilisearch) {
|
||||
|
@ -150,15 +150,15 @@ export class SearchService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async searchNote(q: string, me: User | null, opts: {
|
||||
userId?: Note['userId'] | null;
|
||||
channelId?: Note['channelId'] | null;
|
||||
public async searchNote(q: string, me: MiUser | null, opts: {
|
||||
userId?: MiNote['userId'] | null;
|
||||
channelId?: MiNote['channelId'] | null;
|
||||
host?: string | null;
|
||||
}, pagination: {
|
||||
untilId?: Note['id'];
|
||||
sinceId?: Note['id'];
|
||||
untilId?: MiNote['id'];
|
||||
sinceId?: MiNote['id'];
|
||||
limit?: number;
|
||||
}): Promise<Note[]> {
|
||||
}): Promise<MiNote[]> {
|
||||
if (this.meilisearch) {
|
||||
const filter: Q = {
|
||||
op: 'and',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue