Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Aug 16, 2023
1 parent 36c7c63 commit c1c13b3
Show file tree
Hide file tree
Showing 389 changed files with 1,130 additions and 1,130 deletions.
14 changes: 7 additions & 7 deletions packages/backend/src/core/AccountMoveService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IsNull, In, MoreThan, Not } from 'typeorm';
import { bindThis } from '@/decorators.js';
import { DI } from '@/di-symbols.js';
import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
import type { BlockingsRepository, FollowingsRepository, InstancesRepository, MutingsRepository, UserListJoiningsRepository, UsersRepository } from '@/models/index.js';
import type { MiBlockingsRepository, MiFollowingsRepository, MiInstancesRepository, MiMutingsRepository, MiUserListJoiningsRepository, MiUsersRepository } from '@/models/index.js';
import type { RelationshipJobData, ThinUser } from '@/queue/types.js';

import { IdService } from '@/core/IdService.js';
Expand All @@ -31,22 +31,22 @@ import PerUserFollowingChart from '@/core/chart/charts/per-user-following.js';
export class AccountMoveService {
constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

@Inject(DI.followingsRepository)
private followingsRepository: FollowingsRepository,
private followingsRepository: MiFollowingsRepository,

@Inject(DI.blockingsRepository)
private blockingsRepository: BlockingsRepository,
private blockingsRepository: MiBlockingsRepository,

@Inject(DI.mutingsRepository)
private mutingsRepository: MutingsRepository,
private mutingsRepository: MiMutingsRepository,

@Inject(DI.userListJoiningsRepository)
private userListJoiningsRepository: UserListJoiningsRepository,
private userListJoiningsRepository: MiUserListJoiningsRepository,

@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,
private instancesRepository: MiInstancesRepository,

private userEntityService: UserEntityService,
private idService: IdService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/AccountUpdateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/index.js';
import type { MiUsersRepository } from '@/models/index.js';
import type { MiUser } from '@/models/entities/User.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { RelayService } from '@/core/RelayService.js';
Expand All @@ -17,7 +17,7 @@ import { bindThis } from '@/decorators.js';
export class AccountUpdateService {
constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

private userEntityService: UserEntityService,
private apRendererService: ApRendererService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/AchievementService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { Inject, Injectable } from '@nestjs/common';
import type { UserProfilesRepository } from '@/models/index.js';
import type { MiUserProfilesRepository } from '@/models/index.js';
import type { MiUser } from '@/models/entities/User.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
Expand Down Expand Up @@ -91,7 +91,7 @@ export const ACHIEVEMENT_TYPES = [
export class AchievementService {
constructor(
@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private userProfilesRepository: MiUserProfilesRepository,

private notificationService: NotificationService,
) {
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/core/AnnouncementService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { Brackets } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { MiUser } from '@/models/entities/User.js';
import type { AnnouncementReadsRepository, AnnouncementsRepository, MiAnnouncement, MiAnnouncementRead } from '@/models/index.js';
import type { MiAnnouncementReadsRepository, MiAnnouncementsRepository, MiAnnouncement, MiAnnouncementRead } from '@/models/index.js';
import { bindThis } from '@/decorators.js';
import { Packed } from '@/misc/json-schema.js';
import { IdService } from '@/core/IdService.js';
Expand All @@ -17,10 +17,10 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
export class AnnouncementService {
constructor(
@Inject(DI.announcementsRepository)
private announcementsRepository: AnnouncementsRepository,
private announcementsRepository: MiAnnouncementsRepository,

@Inject(DI.announcementReadsRepository)
private announcementReadsRepository: AnnouncementReadsRepository,
private announcementReadsRepository: MiAnnouncementReadsRepository,

private idService: IdService,
private globalEventService: GlobalEventService,
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/core/AntennaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
import * as Acct from '@/misc/acct.js';
import type { Packed } from '@/misc/json-schema.js';
import { DI } from '@/di-symbols.js';
import type { AntennasRepository, UserListJoiningsRepository } from '@/models/index.js';
import type { MiAntennasRepository, MiUserListJoiningsRepository } from '@/models/index.js';
import { UtilityService } from '@/core/UtilityService.js';
import { bindThis } from '@/decorators.js';
import { StreamMessages } from '@/server/api/stream/types.js';
Expand All @@ -31,10 +31,10 @@ export class AntennaService implements OnApplicationShutdown {
private redisForSub: Redis.Redis,

@Inject(DI.antennasRepository)
private antennasRepository: AntennasRepository,
private antennasRepository: MiAntennasRepository,

@Inject(DI.userListJoiningsRepository)
private userListJoiningsRepository: UserListJoiningsRepository,
private userListJoiningsRepository: MiUserListJoiningsRepository,

private utilityService: UtilityService,
private globalEventService: GlobalEventService,
Expand Down
16 changes: 8 additions & 8 deletions packages/backend/src/core/CacheService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
import type { BlockingsRepository, ChannelFollowingsRepository, FollowingsRepository, MutingsRepository, RenoteMutingsRepository, MiUserProfile, UserProfilesRepository, UsersRepository } from '@/models/index.js';
import type { MiBlockingsRepository, MiChannelFollowingsRepository, MiFollowingsRepository, MiMutingsRepository, MiRenoteMutingsRepository, MiUserProfile, MiUserProfilesRepository, MiUsersRepository } from '@/models/index.js';
import { MemoryKVCache, RedisKVCache } from '@/misc/cache.js';
import type { MiLocalUser, MiUser } from '@/models/entities/User.js';
import { DI } from '@/di-symbols.js';
Expand Down Expand Up @@ -36,25 +36,25 @@ export class CacheService implements OnApplicationShutdown {
private redisForSub: Redis.Redis,

@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private userProfilesRepository: MiUserProfilesRepository,

@Inject(DI.mutingsRepository)
private mutingsRepository: MutingsRepository,
private mutingsRepository: MiMutingsRepository,

@Inject(DI.blockingsRepository)
private blockingsRepository: BlockingsRepository,
private blockingsRepository: MiBlockingsRepository,

@Inject(DI.renoteMutingsRepository)
private renoteMutingsRepository: RenoteMutingsRepository,
private renoteMutingsRepository: MiRenoteMutingsRepository,

@Inject(DI.followingsRepository)
private followingsRepository: FollowingsRepository,
private followingsRepository: MiFollowingsRepository,

@Inject(DI.channelFollowingsRepository)
private channelFollowingsRepository: ChannelFollowingsRepository,
private channelFollowingsRepository: MiChannelFollowingsRepository,

private userEntityService: UserEntityService,
) {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/CustomEmojiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import type { MiDriveFile } from '@/models/entities/DriveFile.js';
import type { MiEmoji } from '@/models/entities/Emoji.js';
import type { EmojisRepository, MiRole } from '@/models/index.js';
import type { MiEmojisRepository, MiRole } from '@/models/index.js';
import { bindThis } from '@/decorators.js';
import { MemoryKVCache, RedisSingleCache } from '@/misc/cache.js';
import { UtilityService } from '@/core/UtilityService.js';
Expand All @@ -31,7 +31,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
private redisClient: Redis.Redis,

@Inject(DI.emojisRepository)
private emojisRepository: EmojisRepository,
private emojisRepository: MiEmojisRepository,

private utilityService: UtilityService,
private idService: IdService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/DeleteAccountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository } from '@/models/index.js';
import type { MiUsersRepository } from '@/models/index.js';
import { QueueService } from '@/core/QueueService.js';
import { UserSuspendService } from '@/core/UserSuspendService.js';
import { DI } from '@/di-symbols.js';
Expand All @@ -14,7 +14,7 @@ import { bindThis } from '@/decorators.js';
export class DeleteAccountService {
constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

private userSuspendService: UserSuspendService,
private queueService: QueueService,
Expand Down
10 changes: 5 additions & 5 deletions packages/backend/src/core/DriveService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { sharpBmp } from 'sharp-read-bmp';
import { IsNull } from 'typeorm';
import { DeleteObjectCommandInput, PutObjectCommandInput, NoSuchKey } from '@aws-sdk/client-s3';
import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, UsersRepository, DriveFoldersRepository, UserProfilesRepository } from '@/models/index.js';
import type { MiDriveFilesRepository, MiUsersRepository, MiDriveFoldersRepository, MiUserProfilesRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import Logger from '@/logger.js';
import type { MiRemoteUser, MiUser } from '@/models/entities/User.js';
Expand Down Expand Up @@ -95,16 +95,16 @@ export class DriveService {
private config: Config,

@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private userProfilesRepository: MiUserProfilesRepository,

@Inject(DI.driveFilesRepository)
private driveFilesRepository: DriveFilesRepository,
private driveFilesRepository: MiDriveFilesRepository,

@Inject(DI.driveFoldersRepository)
private driveFoldersRepository: DriveFoldersRepository,
private driveFoldersRepository: MiDriveFoldersRepository,

private fileInfoService: FileInfoService,
private userEntityService: UserEntityService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/EmailService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MetaService } from '@/core/MetaService.js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import type { UserProfilesRepository } from '@/models/index.js';
import type { MiUserProfilesRepository } from '@/models/index.js';
import { LoggerService } from '@/core/LoggerService.js';
import { bindThis } from '@/decorators.js';

Expand All @@ -23,7 +23,7 @@ export class EmailService {
private config: Config,

@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private userProfilesRepository: MiUserProfilesRepository,

private metaService: MetaService,
private loggerService: LoggerService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/FederatedInstanceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import * as Redis from 'ioredis';
import type { InstancesRepository } from '@/models/index.js';
import type { MiInstancesRepository } from '@/models/index.js';
import type { MiInstance } from '@/models/entities/Instance.js';
import { MemoryKVCache, RedisKVCache } from '@/misc/cache.js';
import { IdService } from '@/core/IdService.js';
Expand All @@ -22,7 +22,7 @@ export class FederatedInstanceService implements OnApplicationShutdown {
private redisClient: Redis.Redis,

@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,
private instancesRepository: MiInstancesRepository,

private utilityService: UtilityService,
private idService: IdService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/HashtagService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import type { MiUser } from '@/models/entities/User.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { IdService } from '@/core/IdService.js';
import type { MiHashtag } from '@/models/entities/Hashtag.js';
import type { HashtagsRepository } from '@/models/index.js';
import type { MiHashtagsRepository } from '@/models/index.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';

@Injectable()
export class HashtagService {
constructor(
@Inject(DI.hashtagsRepository)
private hashtagsRepository: HashtagsRepository,
private hashtagsRepository: MiHashtagsRepository,

private userEntityService: UserEntityService,
private idService: IdService,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/InstanceActorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { IsNull } from 'typeorm';
import type { MiLocalUser } from '@/models/entities/User.js';
import type { UsersRepository } from '@/models/index.js';
import type { MiUsersRepository } from '@/models/index.js';
import { MemorySingleCache } from '@/misc/cache.js';
import { DI } from '@/di-symbols.js';
import { CreateSystemUserService } from '@/core/CreateSystemUserService.js';
Expand All @@ -20,7 +20,7 @@ export class InstanceActorService {

constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

private createSystemUserService: CreateSystemUserService,
) {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/ModerationLogService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { ModerationLogsRepository } from '@/models/index.js';
import type { MiModerationLogsRepository } from '@/models/index.js';
import type { MiUser } from '@/models/entities/User.js';
import { IdService } from '@/core/IdService.js';
import { bindThis } from '@/decorators.js';
Expand All @@ -14,7 +14,7 @@ import { bindThis } from '@/decorators.js';
export class ModerationLogService {
constructor(
@Inject(DI.moderationLogsRepository)
private moderationLogsRepository: ModerationLogsRepository,
private moderationLogsRepository: MiModerationLogsRepository,

private idService: IdService,
) {
Expand Down
20 changes: 10 additions & 10 deletions packages/backend/src/core/NoteCreateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mf
import { extractHashtags } from '@/misc/extract-hashtags.js';
import type { IMentionedRemoteUsers } from '@/models/entities/Note.js';
import { MiNote } from '@/models/entities/Note.js';
import type { ChannelsRepository, InstancesRepository, MutedNotesRepository, MutingsRepository, NotesRepository, NoteThreadMutingsRepository, UserProfilesRepository, UsersRepository } from '@/models/index.js';
import type { MiChannelsRepository, MiInstancesRepository, MiMutedNotesRepository, MiMutingsRepository, MiNotesRepository, MiNoteThreadMutingsRepository, MiUserProfilesRepository, MiUsersRepository } from '@/models/index.js';
import type { MiDriveFile } from '@/models/entities/DriveFile.js';
import type { MiApp } from '@/models/entities/App.js';
import { concat } from '@/misc/prelude/array.js';
Expand Down Expand Up @@ -67,7 +67,7 @@ class NotificationManager {
}[];

constructor(
private mutingsRepository: MutingsRepository,
private mutingsRepository: MiMutingsRepository,
private notificationService: NotificationService,
notifier: { id: MiUser['id']; },
note: MiNote,
Expand Down Expand Up @@ -162,28 +162,28 @@ export class NoteCreateService implements OnApplicationShutdown {
private redisClient: Redis.Redis,

@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

@Inject(DI.notesRepository)
private notesRepository: NotesRepository,
private notesRepository: MiNotesRepository,

@Inject(DI.mutingsRepository)
private mutingsRepository: MutingsRepository,
private mutingsRepository: MiMutingsRepository,

@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,
private instancesRepository: MiInstancesRepository,

@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private userProfilesRepository: MiUserProfilesRepository,

@Inject(DI.mutedNotesRepository)
private mutedNotesRepository: MutedNotesRepository,
private mutedNotesRepository: MiMutedNotesRepository,

@Inject(DI.channelsRepository)
private channelsRepository: ChannelsRepository,
private channelsRepository: MiChannelsRepository,

@Inject(DI.noteThreadMutingsRepository)
private noteThreadMutingsRepository: NoteThreadMutingsRepository,
private noteThreadMutingsRepository: MiNoteThreadMutingsRepository,

private userEntityService: UserEntityService,
private noteEntityService: NoteEntityService,
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/core/NoteDeleteService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Brackets, In } from 'typeorm';
import { Injectable, Inject } from '@nestjs/common';
import type { MiUser, MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
import type { MiNote, IMentionedRemoteUsers } from '@/models/entities/Note.js';
import type { InstancesRepository, NotesRepository, UsersRepository } from '@/models/index.js';
import type { MiInstancesRepository, MiNotesRepository, MiUsersRepository } from '@/models/index.js';
import { RelayService } from '@/core/RelayService.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import { DI } from '@/di-symbols.js';
Expand All @@ -31,13 +31,13 @@ export class NoteDeleteService {
private config: Config,

@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private usersRepository: MiUsersRepository,

@Inject(DI.notesRepository)
private notesRepository: NotesRepository,
private notesRepository: MiNotesRepository,

@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,
private instancesRepository: MiInstancesRepository,

private userEntityService: UserEntityService,
private noteEntityService: NoteEntityService,
Expand Down
Loading

0 comments on commit c1c13b3

Please sign in to comment.