This commit is contained in:
tamaina 2021-09-12 22:40:18 +09:00
parent 1f82a98384
commit d7488715df

View file

@ -3,14 +3,12 @@ import { EntityRepository, Repository, In, Not } from 'typeorm';
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index';
import config from '@/config/index';
import { SchemaType } from '@/misc/schema';
import { Packed } from '@/misc/schema';
import { awaitAll } from '@/prelude/await-all';
import { populateEmojis } from '@/misc/populate-emojis';
import { getAntennas } from '@/misc/antenna-cache';
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const';
export type PackedUser = SchemaType<typeof packedUserSchema>;
@EntityRepository(User)
export class UserRepository extends Repository<User> {
public async getRelation(me: User['id'], target: User['id']) {
@ -164,7 +162,7 @@ export class UserRepository extends Repository<User> {
detail?: boolean,
includeSecrets?: boolean,
}
): Promise<PackedUser> {
): Promise<Packed<'User'>> {
const opts = Object.assign({
detail: false,
includeSecrets: false