1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-01 00:08:24 +09:00
This commit is contained in:
syuilo 2022-12-04 10:16:03 +09:00
parent 14221e78b7
commit 22ccb0fa71
93 changed files with 157 additions and 157 deletions

View File

@ -3,10 +3,10 @@ import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import type { User } from '@/models/entities/User.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { RelayService } from '@/core/RelayService.js';
import { ApDeliverManagerService } from '@/core/remote/activitypub/ApDeliverManagerService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
@Injectable()
export class AccountUpdateService {

View File

@ -11,7 +11,7 @@ import { Cache } from '@/misc/cache.js';
import type { Packed } from '@/misc/schema.js';
import { DI } from '@/di-symbols.js';
import type { MutingsRepository, BlockingsRepository, NotesRepository, AntennaNotesRepository, AntennasRepository, UserGroupJoiningsRepository, UserListJoiningsRepository } from '@/models/index.js';
import { UtilityService } from './UtilityService.js';
import { UtilityService } from '@/core/UtilityService.js';
import type { OnApplicationShutdown } from '@nestjs/common';
@Injectable()

View File

@ -2,7 +2,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import { HttpRequestService } from './HttpRequestService.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
type CaptchaResponse = {
success: boolean;

View File

@ -94,25 +94,25 @@ import { UserEntityService } from './entities/UserEntityService.js';
import { UserGroupEntityService } from './entities/UserGroupEntityService.js';
import { UserGroupInvitationEntityService } from './entities/UserGroupInvitationEntityService.js';
import { UserListEntityService } from './entities/UserListEntityService.js';
import { ApAudienceService } from './remote/activitypub/ApAudienceService.js';
import { ApDbResolverService } from './remote/activitypub/ApDbResolverService.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { ApInboxService } from './remote/activitypub/ApInboxService.js';
import { ApLoggerService } from './remote/activitypub/ApLoggerService.js';
import { ApMfmService } from './remote/activitypub/ApMfmService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { ApRequestService } from './remote/activitypub/ApRequestService.js';
import { ApResolverService } from './remote/activitypub/ApResolverService.js';
import { LdSignatureService } from './remote/activitypub/LdSignatureService.js';
import { RemoteLoggerService } from './remote/RemoteLoggerService.js';
import { ResolveUserService } from './remote/ResolveUserService.js';
import { WebfingerService } from './remote/WebfingerService.js';
import { ApImageService } from './remote/activitypub/models/ApImageService.js';
import { ApMentionService } from './remote/activitypub/models/ApMentionService.js';
import { ApNoteService } from './remote/activitypub/models/ApNoteService.js';
import { ApPersonService } from './remote/activitypub/models/ApPersonService.js';
import { ApQuestionService } from './remote/activitypub/models/ApQuestionService.js';
import { QueueModule } from './queue/QueueModule.js';
import { ApAudienceService } from './activitypub/ApAudienceService.js';
import { ApDbResolverService } from './activitypub/ApDbResolverService.js';
import { ApDeliverManagerService } from './activitypub/ApDeliverManagerService.js';
import { ApInboxService } from './activitypub/ApInboxService.js';
import { ApLoggerService } from './activitypub/ApLoggerService.js';
import { ApMfmService } from './activitypub/ApMfmService.js';
import { ApRendererService } from './activitypub/ApRendererService.js';
import { ApRequestService } from './activitypub/ApRequestService.js';
import { ApResolverService } from './activitypub/ApResolverService.js';
import { LdSignatureService } from './activitypub/LdSignatureService.js';
import { RemoteLoggerService } from './RemoteLoggerService.js';
import { RemoteUserResolveService } from './RemoteUserResolveService.js';
import { WebfingerService } from './WebfingerService.js';
import { ApImageService } from './activitypub/models/ApImageService.js';
import { ApMentionService } from './activitypub/models/ApMentionService.js';
import { ApNoteService } from './activitypub/models/ApNoteService.js';
import { ApPersonService } from './activitypub/models/ApPersonService.js';
import { ApQuestionService } from './activitypub/models/ApQuestionService.js';
import { QueueModule } from './QueueModule.js';
import { QueueService } from './QueueService.js';
import { LoggerService } from './LoggerService.js';
import type { Provider } from '@nestjs/common';
@ -226,7 +226,7 @@ const $ApRequestService: Provider = { provide: 'ApRequestService', useExisting:
const $ApResolverService: Provider = { provide: 'ApResolverService', useExisting: ApResolverService };
const $LdSignatureService: Provider = { provide: 'LdSignatureService', useExisting: LdSignatureService };
const $RemoteLoggerService: Provider = { provide: 'RemoteLoggerService', useExisting: RemoteLoggerService };
const $ResolveUserService: Provider = { provide: 'ResolveUserService', useExisting: ResolveUserService };
const $RemoteUserResolveService: Provider = { provide: 'RemoteUserResolveService', useExisting: RemoteUserResolveService };
const $WebfingerService: Provider = { provide: 'WebfingerService', useExisting: WebfingerService };
const $ApImageService: Provider = { provide: 'ApImageService', useExisting: ApImageService };
const $ApMentionService: Provider = { provide: 'ApMentionService', useExisting: ApMentionService };
@ -346,7 +346,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
ApResolverService,
LdSignatureService,
RemoteLoggerService,
ResolveUserService,
RemoteUserResolveService,
WebfingerService,
ApImageService,
ApMentionService,
@ -462,7 +462,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
$ApResolverService,
$LdSignatureService,
$RemoteLoggerService,
$ResolveUserService,
$RemoteUserResolveService,
$WebfingerService,
$ApImageService,
$ApMentionService,
@ -578,7 +578,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
ApResolverService,
LdSignatureService,
RemoteLoggerService,
ResolveUserService,
RemoteUserResolveService,
WebfingerService,
ApImageService,
ApMentionService,
@ -693,7 +693,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
$ApResolverService,
$LdSignatureService,
$RemoteLoggerService,
$ResolveUserService,
$RemoteUserResolveService,
$WebfingerService,
$ApImageService,
$ApMentionService,

View File

@ -5,8 +5,8 @@ import type { Notification } from '@/models/entities/Notification.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
import { NotificationEntityService } from './entities/NotificationEntityService.js';
import { PushNotificationService } from './PushNotificationService.js';
import { NotificationEntityService } from '@/core/entities/NotificationEntityService.js';
import { PushNotificationService } from '@/core/PushNotificationService.js';
@Injectable()
export class CreateNotificationService {

View File

@ -10,8 +10,8 @@ import { Cache } from '@/misc/cache.js';
import { query } from '@/misc/prelude/url.js';
import type { Note } from '@/models/entities/Note.js';
import type { EmojisRepository } from '@/models/index.js';
import { UtilityService } from './UtilityService.js';
import { ReactionService } from './ReactionService.js';
import { UtilityService } from '@/core/UtilityService.js';
import { ReactionService } from '@/core/ReactionService.js';
/**
*

View File

@ -28,9 +28,9 @@ import InstanceChart from '@/core/chart/charts/instance.js';
import { DownloadService } from '@/core/DownloadService.js';
import { S3Service } from '@/core/S3Service.js';
import { InternalStorageService } from '@/core/InternalStorageService.js';
import { DriveFileEntityService } from './entities/DriveFileEntityService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { FileInfoService } from './FileInfoService.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { FileInfoService } from '@/core/FileInfoService.js';
import type S3 from 'aws-sdk/clients/s3.js';
type AddFileArgs = {

View File

@ -4,7 +4,7 @@ import type { Instance } from '@/models/entities/Instance.js';
import { Cache } from '@/misc/cache.js';
import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
import { UtilityService } from './UtilityService.js';
import { UtilityService } from '@/core/UtilityService.js';
@Injectable()
export class FederatedInstanceService {

View File

@ -9,7 +9,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import type Logger from '@/logger.js';
import { DI } from '@/di-symbols.js';
import { LoggerService } from '@/core/LoggerService.js';
import { HttpRequestService } from './HttpRequestService.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
import type { DOMWindow } from 'jsdom';
type NodeInfo = {

View File

@ -6,7 +6,7 @@ import { IdService } from '@/core/IdService.js';
import type { Hashtag } from '@/models/entities/Hashtag.js';
import HashtagChart from '@/core/chart/charts/hashtag.js';
import type { HashtagsRepository, UsersRepository } from '@/models/index.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
@Injectable()
export class HashtagService {

View File

@ -4,7 +4,7 @@ import type { ILocalUser } from '@/models/entities/User.js';
import type { UsersRepository } from '@/models/index.js';
import { Cache } from '@/misc/cache.js';
import { DI } from '@/di-symbols.js';
import { CreateSystemUserService } from './CreateSystemUserService.js';
import { CreateSystemUserService } from '@/core/CreateSystemUserService.js';
const ACTOR_USERNAME = 'instance.actor' as const;

View File

@ -11,12 +11,12 @@ import { QueueService } from '@/core/QueueService.js';
import { toArray } from '@/misc/prelude/array.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
import type { MessagingMessagesRepository, MutingsRepository, UserGroupJoiningsRepository, UsersRepository } from '@/models/index.js';
import { IdService } from './IdService.js';
import { GlobalEventService } from './GlobalEventService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { MessagingMessageEntityService } from './entities/MessagingMessageEntityService.js';
import { PushNotificationService } from './PushNotificationService.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { MessagingMessageEntityService } from '@/core/entities/MessagingMessageEntityService.js';
import { PushNotificationService } from '@/core/PushNotificationService.js';
@Injectable()
export class MessagingService {

View File

@ -34,12 +34,12 @@ import { WebhookService } from '@/core/WebhookService.js';
import { HashtagService } from '@/core/HashtagService.js';
import { AntennaService } from '@/core/AntennaService.js';
import { QueueService } from '@/core/QueueService.js';
import { NoteEntityService } from './entities/NoteEntityService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { NoteReadService } from './NoteReadService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { ResolveUserService } from './remote/ResolveUserService.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
import { NoteReadService } from '@/core/NoteReadService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
const mutedWordsCache = new Cache<{ userId: UserProfile['userId']; mutedWords: UserProfile['mutedWords']; }[]>(1000 * 60 * 5);
@ -179,7 +179,7 @@ export class NoteCreateService {
private hashtagService: HashtagService,
private antennaService: AntennaService,
private webhookService: WebhookService,
private resolveUserService: ResolveUserService,
private remoteUserResolveService: RemoteUserResolveService,
private apDeliverManagerService: ApDeliverManagerService,
private apRendererService: ApRendererService,
private notesChart: NotesChart,
@ -726,7 +726,7 @@ export class NoteCreateService {
const mentions = extractMentions(tokens);
let mentionedUsers = (await Promise.all(mentions.map(m =>
this.resolveUserService.resolveUser(m.username, m.host ?? user.host).catch(() => null),
this.remoteUserResolveService.resolveUser(m.username, m.host ?? user.host).catch(() => null),
))).filter(x => x != null) as User[];
// Drop duplicate users

View File

@ -11,10 +11,10 @@ import NotesChart from '@/core/chart/charts/notes.js';
import PerUserNotesChart from '@/core/chart/charts/per-user-notes.js';
import InstanceChart from '@/core/chart/charts/instance.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { NoteEntityService } from './entities/NoteEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
@Injectable()
export class NoteDeleteService {

View File

@ -8,9 +8,9 @@ import { IdService } from '@/core/IdService.js';
import type { UserNotePining } from '@/models/entities/UserNotePining.js';
import { RelayService } from '@/core/RelayService.js';
import type { Config } from '@/config.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
@Injectable()
export class NotePiningService {

View File

@ -8,7 +8,7 @@ import type { Note } from '@/models/entities/Note.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import type { UsersRepository, NoteUnreadsRepository, MutingsRepository, NoteThreadMutingsRepository, FollowingsRepository, ChannelFollowingsRepository, AntennaNotesRepository } from '@/models/index.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { NotificationService } from './NotificationService.js';
import { AntennaService } from './AntennaService.js';

View File

@ -5,7 +5,7 @@ import type { NotificationsRepository } from '@/models/index.js';
import type { UsersRepository } from '@/models/index.js';
import type { User } from '@/models/entities/User.js';
import type { Notification } from '@/models/entities/Notification.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { GlobalEventService } from './GlobalEventService.js';
import { PushNotificationService } from './PushNotificationService.js';

View File

@ -8,9 +8,9 @@ import type { CacheableUser } from '@/models/entities/User.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { CreateNotificationService } from '@/core/CreateNotificationService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
@Injectable()
export class PollService {

View File

@ -2,7 +2,7 @@ import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository } from '@/models/index.js';
import type { ILocalUser, User } from '@/models/entities/User.js';
import { DI } from '@/di-symbols.js';
import { MetaService } from './MetaService.js';
import { MetaService } from '@/core/MetaService.js';
@Injectable()
export class ProxyAccountService {

View File

@ -5,7 +5,7 @@ import type { Config } from '@/config.js';
import type { Packed } from '@/misc/schema';
import { getNoteSummary } from '@/misc/get-note-summary.js';
import type { SwSubscriptionsRepository } from '@/models/index.js';
import { MetaService } from './MetaService.js';
import { MetaService } from '@/core/MetaService.js';
// Defined also packages/sw/types.ts#L14-L21
type pushNotificationsTypes = {

View File

@ -3,7 +3,7 @@ import Bull from 'bull';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import type { Provider } from '@nestjs/common';
import type { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData, EndedPollNotificationJobData, WebhookDeliverJobData } from '../../queue/types.js';
import type { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData, EndedPollNotificationJobData, WebhookDeliverJobData } from '../queue/types.js';
function q<T>(config: Config, name: string, limitPerSec = -1) {
return new Bull<T>(name, {

View File

@ -1,11 +1,11 @@
import { Inject, Injectable } from '@nestjs/common';
import { v4 as uuid } from 'uuid';
import type { IActivity } from '@/core/remote/activitypub/type.js';
import type { IActivity } from '@/core/activitypub/type.js';
import type { DriveFile } from '@/models/entities/DriveFile.js';
import type { Webhook, webhookEventTypes } from '@/models/entities/Webhook.js';
import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, WebhookDeliverQueue } from './queue/QueueModule.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, WebhookDeliverQueue } from './QueueModule.js';
import type { ThinUser } from '../queue/types.js';
import type httpSignature from '@peertube/http-signature';

View File

@ -12,11 +12,11 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
import { CreateNotificationService } from '@/core/CreateNotificationService.js';
import PerUserReactionsChart from '@/core/chart/charts/per-user-reactions.js';
import { emojiRegex } from '@/misc/emoji-regex.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { NoteEntityService } from './entities/NoteEntityService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { MetaService } from './MetaService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { MetaService } from '@/core/MetaService.js';
import { UtilityService } from './UtilityService.js';
const legacies: Record<string, string> = {

View File

@ -7,7 +7,7 @@ import { Cache } from '@/misc/cache.js';
import type { Relay } from '@/models/entities/Relay.js';
import { QueueService } from '@/core/QueueService.js';
import { CreateSystemUserService } from '@/core/CreateSystemUserService.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { DI } from '@/di-symbols.js';
import { deepClone } from '@/misc/clone.js';

View File

@ -7,13 +7,13 @@ import type { UsersRepository } from '@/models/index.js';
import type { IRemoteUser, User } from '@/models/entities/User.js';
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import { UtilityService } from '../UtilityService.js';
import { WebfingerService } from './WebfingerService.js';
import { RemoteLoggerService } from './RemoteLoggerService.js';
import { ApPersonService } from './activitypub/models/ApPersonService.js';
import { UtilityService } from '@/core/UtilityService.js';
import { WebfingerService } from '@/core/WebfingerService.js';
import { RemoteLoggerService } from '@/core/RemoteLoggerService.js';
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
@Injectable()
export class ResolveUserService {
export class RemoteUserResolveService {
private logger: Logger;
constructor(

View File

@ -4,7 +4,7 @@ import S3 from 'aws-sdk/clients/s3.js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import type { Meta } from '@/models/entities/Meta.js';
import { HttpRequestService } from './HttpRequestService.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
@Injectable()
export class S3Service {

View File

@ -12,7 +12,7 @@ import { UserKeypair } from '@/models/entities/UserKeypair.js';
import { UsedUsername } from '@/models/entities/UsedUsername.js';
import generateUserToken from '@/misc/generate-native-user-token.js';
import UsersChart from './chart/charts/users.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { UtilityService } from './UtilityService.js';
@Injectable()

View File

@ -10,10 +10,10 @@ import { DI } from '@/di-symbols.js';
import logger from '@/logger.js';
import type { UsersRepository, FollowingsRepository, FollowRequestsRepository, BlockingsRepository, UserListsRepository, UserListJoiningsRepository } from '@/models/index.js';
import Logger from '@/logger.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { WebhookService } from './WebhookService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { LoggerService } from './LoggerService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { LoggerService } from '@/core/LoggerService.js';
import { WebhookService } from '@/core/WebhookService.js';
@Injectable()
export class UserBlockingService {

View File

@ -4,7 +4,7 @@ import type { UsersRepository } from '@/models/index.js';
import { Cache } from '@/misc/cache.js';
import type { CacheableLocalUser, CacheableUser, ILocalUser } from '@/models/entities/User.js';
import { DI } from '@/di-symbols.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import type { OnApplicationShutdown } from '@nestjs/common';
@Injectable()

View File

@ -14,8 +14,8 @@ import { CreateNotificationService } from '@/core/CreateNotificationService.js';
import { DI } from '@/di-symbols.js';
import type { BlockingsRepository, FollowingsRepository, FollowRequestsRepository, InstancesRepository, UserProfilesRepository, UsersRepository } from '@/models/index.js';
import Logger from '../logger.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
const logger = new Logger('following/create');

View File

@ -7,8 +7,8 @@ import { IdService } from '@/core/IdService.js';
import { UserFollowingService } from '@/core/UserFollowingService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ProxyAccountService } from './ProxyAccountService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ProxyAccountService } from '@/core/ProxyAccountService.js';
@Injectable()
export class UserListService {

View File

@ -6,8 +6,8 @@ import { QueueService } from '@/core/QueueService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
@Injectable()
export class UserSuspendService {

View File

@ -1,6 +1,6 @@
import { Inject, Injectable } from '@nestjs/common';
import type Logger from '@/logger.js';
import { RemoteLoggerService } from '@/core/remote/RemoteLoggerService.js';
import { RemoteLoggerService } from '@/core/RemoteLoggerService.js';
@Injectable()
export class ApLoggerService {

View File

@ -5,7 +5,7 @@ import type { User } from '@/models/entities/User.js';
import { DI } from '@/di-symbols.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/active-users.js';
import { name, schema } from '@/core/entities/active-users.js';
import type { KVs } from '../core.js';
const week = 1000 * 60 * 60 * 24 * 7;

View File

@ -4,7 +4,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/ap-request.js';
import { name, schema } from '@/core/entities/ap-request.js';
import type { KVs } from '../core.js';
/**

View File

@ -5,7 +5,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/drive.js';
import { name, schema } from '@/core/entities/drive.js';
import type { KVs } from '../core.js';
/**

View File

@ -6,7 +6,7 @@ import { DI } from '@/di-symbols.js';
import { MetaService } from '@/core/MetaService.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/federation.js';
import { name, schema } from '@/core/entities/federation.js';
import type { KVs } from '../core.js';
/**

View File

@ -6,7 +6,7 @@ import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/hashtag.js';
import { name, schema } from '@/core/entities/hashtag.js';
import type { KVs } from '../core.js';
/**

View File

@ -8,7 +8,7 @@ import { DI } from '@/di-symbols.js';
import { UtilityService } from '@/core/UtilityService.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/instance.js';
import { name, schema } from '@/core/entities/instance.js';
import type { KVs } from '../core.js';
/**

View File

@ -6,7 +6,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/notes.js';
import { name, schema } from '@/core/entities/notes.js';
import type { KVs } from '../core.js';
/**

View File

@ -7,7 +7,7 @@ import { DI } from '@/di-symbols.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/per-user-drive.js';
import { name, schema } from '@/core/entities/per-user-drive.js';
import type { KVs } from '../core.js';
/**

View File

@ -7,7 +7,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
import type { FollowingsRepository } from '@/models/index.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/per-user-following.js';
import { name, schema } from '@/core/entities/per-user-following.js';
import type { KVs } from '../core.js';
/**

View File

@ -7,7 +7,7 @@ import { DI } from '@/di-symbols.js';
import type { NotesRepository } from '@/models/index.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/per-user-notes.js';
import { name, schema } from '@/core/entities/per-user-notes.js';
import type { KVs } from '../core.js';
/**

View File

@ -7,7 +7,7 @@ import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/per-user-reactions.js';
import { name, schema } from '@/core/entities/per-user-reactions.js';
import type { KVs } from '../core.js';
/**

View File

@ -4,7 +4,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Logger from '@/logger.js';
import Chart from '../core.js';
import { name, schema } from './entities/test-grouped.js';
import { name, schema } from '@/core/entities/test-grouped.js';
import type { KVs } from '../core.js';
/**

View File

@ -4,7 +4,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Logger from '@/logger.js';
import Chart from '../core.js';
import { name, schema } from './entities/test-intersection.js';
import { name, schema } from '@/core/entities/test-intersection.js';
import type { KVs } from '../core.js';
/**

View File

@ -4,7 +4,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Logger from '@/logger.js';
import Chart from '../core.js';
import { name, schema } from './entities/test-unique.js';
import { name, schema } from '@/core/entities/test-unique.js';
import type { KVs } from '../core.js';
/**

View File

@ -4,7 +4,7 @@ import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import Logger from '@/logger.js';
import Chart from '../core.js';
import { name, schema } from './entities/test.js';
import { name, schema } from '@/core/entities/test.js';
import type { KVs } from '../core.js';
/**

View File

@ -7,7 +7,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
import type { UsersRepository } from '@/models/index.js';
import Chart from '../core.js';
import { ChartLoggerService } from '../ChartLoggerService.js';
import { name, schema } from './entities/users.js';
import { name, schema } from '@/core/entities/users.js';
import type { KVs } from '../core.js';
/**

View File

@ -6,7 +6,7 @@ import type { Packed } from '@/misc/schema.js';
import type { } from '@/models/entities/Blocking.js';
import type { User } from '@/models/entities/User.js';
import type { Instance } from '@/models/entities/Instance.js';
import { MetaService } from '../MetaService.js';
import { MetaService } from '.@/core/MetaService.js';
import { UserEntityService } from './UserEntityService.js';
@Injectable()

View File

@ -5,7 +5,7 @@ import type { DriveFilesRepository, InstancesRepository } from '@/models/index.j
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import { MetaService } from '@/core/MetaService.js';
import { ApRequestService } from '@/core/remote/activitypub/ApRequestService.js';
import { ApRequestService } from '@/core/activitypub/ApRequestService.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataService.js';
import { Cache } from '@/misc/cache.js';

View File

@ -5,7 +5,7 @@ import type { UsersRepository, BlockingsRepository, DriveFilesRepository } from
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import * as Acct from '@/misc/acct.js';
import { ResolveUserService } from '@/core/remote/ResolveUserService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
import { UserBlockingService } from '@/core/UserBlockingService.js';
import { DownloadService } from '@/core/DownloadService.js';
import { UtilityService } from '@/core/UtilityService.js';
@ -32,7 +32,7 @@ export class ImportBlockingProcessorService {
private utilityService: UtilityService,
private userBlockingService: UserBlockingService,
private resolveUserService: ResolveUserService,
private remoteUserResolveService: RemoteUserResolveService,
private downloadService: DownloadService,
private queueLoggerService: QueueLoggerService,
) {
@ -78,7 +78,7 @@ export class ImportBlockingProcessorService {
if (host == null && target == null) continue;
if (target == null) {
target = await this.resolveUserService.resolveUser(username, host);
target = await this.remoteUserResolveService.resolveUser(username, host);
}
if (target == null) {

View File

@ -5,7 +5,7 @@ import type { UsersRepository, DriveFilesRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import * as Acct from '@/misc/acct.js';
import { ResolveUserService } from '@/core/remote/ResolveUserService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
import { DownloadService } from '@/core/DownloadService.js';
import { UserFollowingService } from '@/core/UserFollowingService.js';
import { UtilityService } from '@/core/UtilityService.js';
@ -29,7 +29,7 @@ export class ImportFollowingProcessorService {
private utilityService: UtilityService,
private userFollowingService: UserFollowingService,
private resolveUserService: ResolveUserService,
private remoteUserResolveService: RemoteUserResolveService,
private downloadService: DownloadService,
private queueLoggerService: QueueLoggerService,
) {
@ -75,7 +75,7 @@ export class ImportFollowingProcessorService {
if (host == null && target == null) continue;
if (target == null) {
target = await this.resolveUserService.resolveUser(username, host);
target = await this.remoteUserResolveService.resolveUser(username, host);
}
if (target == null) {

View File

@ -5,7 +5,7 @@ import type { UsersRepository, DriveFilesRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import * as Acct from '@/misc/acct.js';
import { ResolveUserService } from '@/core/remote/ResolveUserService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
import { DownloadService } from '@/core/DownloadService.js';
import { UserMutingService } from '@/core/UserMutingService.js';
import { UtilityService } from '@/core/UtilityService.js';
@ -29,7 +29,7 @@ export class ImportMutingProcessorService {
private utilityService: UtilityService,
private userMutingService: UserMutingService,
private resolveUserService: ResolveUserService,
private remoteUserResolveService: RemoteUserResolveService,
private downloadService: DownloadService,
private queueLoggerService: QueueLoggerService,
) {
@ -75,7 +75,7 @@ export class ImportMutingProcessorService {
if (host == null && target == null) continue;
if (target == null) {
target = await this.resolveUserService.resolveUser(username, host);
target = await this.remoteUserResolveService.resolveUser(username, host);
}
if (target == null) {

View File

@ -5,7 +5,7 @@ import type { UsersRepository, DriveFilesRepository, UserListJoiningsRepository,
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import * as Acct from '@/misc/acct.js';
import { ResolveUserService } from '@/core/remote/ResolveUserService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
import { DownloadService } from '@/core/DownloadService.js';
import { UserListService } from '@/core/UserListService.js';
import { IdService } from '@/core/IdService.js';
@ -37,7 +37,7 @@ export class ImportUserListsProcessorService {
private utilityService: UtilityService,
private idService: IdService,
private userListService: UserListService,
private resolveUserService: ResolveUserService,
private remoteUserResolveService: RemoteUserResolveService,
private downloadService: DownloadService,
private queueLoggerService: QueueLoggerService,
) {
@ -95,7 +95,7 @@ export class ImportUserListsProcessorService {
});
if (target == null) {
target = await this.resolveUserService.resolveUser(username, host);
target = await this.remoteUserResolveService.resolveUser(username, host);
}
if (await this.userListJoiningsRepository.findOneBy({ userListId: list!.id, userId: target.id }) != null) continue;

View File

@ -7,7 +7,7 @@ import type { InstancesRepository, DriveFilesRepository } from '@/models/index.j
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import { MetaService } from '@/core/MetaService.js';
import { ApRequestService } from '@/core/remote/activitypub/ApRequestService.js';
import { ApRequestService } from '@/core/activitypub/ApRequestService.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataService.js';
import { Cache } from '@/misc/cache.js';
@ -15,15 +15,15 @@ import type { Instance } from '@/models/entities/Instance.js';
import InstanceChart from '@/core/chart/charts/instance.js';
import ApRequestChart from '@/core/chart/charts/ap-request.js';
import FederationChart from '@/core/chart/charts/federation.js';
import { getApId } from '@/core/remote/activitypub/type.js';
import { getApId } from '@/core/activitypub/type.js';
import type { CacheableRemoteUser } from '@/models/entities/User.js';
import type { UserPublickey } from '@/models/entities/UserPublickey.js';
import { ApDbResolverService } from '@/core/remote/activitypub/ApDbResolverService.js';
import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js';
import { StatusError } from '@/misc/status-error.js';
import { UtilityService } from '@/core/UtilityService.js';
import { ApPersonService } from '@/core/remote/activitypub/models/ApPersonService.js';
import { LdSignatureService } from '@/core/remote/activitypub/LdSignatureService.js';
import { ApInboxService } from '@/core/remote/activitypub/ApInboxService.js';
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
import { LdSignatureService } from '@/core/activitypub/LdSignatureService.js';
import { ApInboxService } from '@/core/activitypub/ApInboxService.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type Bull from 'bull';
import type { DeliverJobData, InboxJobData } from '../types.js';

View File

@ -2,7 +2,7 @@ import type { DriveFile } from '@/models/entities/DriveFile.js';
import type { Note } from '@/models/entities/Note.js';
import type { User } from '@/models/entities/User.js';
import type { Webhook } from '@/models/entities/Webhook.js';
import type { IActivity } from '@/core/remote/activitypub/type.js';
import type { IActivity } from '@/core/activitypub/type.js';
import type httpSignature from '@peertube/http-signature';
export type DeliverJobData = {

View File

@ -8,7 +8,7 @@ import { DI } from '@/di-symbols.js';
import type { FollowingsRepository, NotesRepository, EmojisRepository, NoteReactionsRepository, UserProfilesRepository, UserNotePiningsRepository, UsersRepository } from '@/models/index.js';
import * as url from '@/misc/prelude/url.js';
import type { Config } from '@/config.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { QueueService } from '@/core/QueueService.js';
import type { ILocalUser, User } from '@/models/entities/User.js';
import { UserKeypairStoreService } from '@/core/UserKeypairStoreService.js';

View File

@ -1,7 +1,7 @@
import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { DeliverQueue } from '@/core/queue/QueueModule.js';
import type { DeliverQueue } from '@/core/QueueModule.js';
export const meta = {
tags: ['admin'],

View File

@ -1,7 +1,7 @@
import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { InboxQueue } from '@/core/queue/QueueModule.js';
import type { InboxQueue } from '@/core/QueueModule.js';
export const meta = {
tags: ['admin'],

View File

@ -1,6 +1,6 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, WebhookDeliverQueue } from '@/core/queue/QueueModule.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, WebhookDeliverQueue } from '@/core/QueueModule.js';
export const meta = {
tags: ['admin'],

View File

@ -3,7 +3,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository, AbuseUserReportsRepository } from '@/models/index.js';
import { InstanceActorService } from '@/core/InstanceActorService.js';
import { QueueService } from '@/core/QueueService.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { DI } from '@/di-symbols.js';
export const meta = {

View File

@ -1,7 +1,7 @@
import { Inject, Injectable } from '@nestjs/common';
import ms from 'ms';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { ApResolverService } from '@/core/remote/activitypub/ApResolverService.js';
import { ApResolverService } from '@/core/activitypub/ApResolverService.js';
import { ApiError } from '../../error.js';
export const meta = {

View File

@ -4,13 +4,13 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository, NotesRepository } from '@/models/index.js';
import type { Note } from '@/models/entities/Note.js';
import type { CacheableLocalUser, User } from '@/models/entities/User.js';
import { isActor, isPost, getApId } from '@/core/remote/activitypub/type.js';
import { isActor, isPost, getApId } from '@/core/activitypub/type.js';
import type { SchemaType } from '@/misc/schema.js';
import { ApResolverService } from '@/core/remote/activitypub/ApResolverService.js';
import { ApDbResolverService } from '@/core/remote/activitypub/ApDbResolverService.js';
import { ApResolverService } from '@/core/activitypub/ApResolverService.js';
import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js';
import { MetaService } from '@/core/MetaService.js';
import { ApPersonService } from '@/core/remote/activitypub/models/ApPersonService.js';
import { ApNoteService } from '@/core/remote/activitypub/models/ApNoteService.js';
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
import { ApNoteService } from '@/core/activitypub/models/ApNoteService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { UtilityService } from '@/core/UtilityService.js';

View File

@ -1,6 +1,6 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { ApPersonService } from '@/core/remote/activitypub/models/ApPersonService.js';
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
import { GetterService } from '@/server/api/GetterService.js';
export const meta = {

View File

@ -7,7 +7,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import { GetterService } from '@/server/api/GetterService.js';
import { QueueService } from '@/core/QueueService.js';
import { PollService } from '@/core/PollService.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { CreateNotificationService } from '@/core/CreateNotificationService.js';
import { DI } from '@/di-symbols.js';

View File

@ -4,7 +4,7 @@ import type { UsersRepository } from '@/models/index.js';
import type { User } from '@/models/entities/User.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ResolveUserService } from '@/core/remote/ResolveUserService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
import { DI } from '@/di-symbols.js';
import { ApiError } from '../../error.js';
import { ApiLoggerService } from '../../ApiLoggerService.js';
@ -89,7 +89,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
private usersRepository: UsersRepository,
private userEntityService: UserEntityService,
private resolveUserService: ResolveUserService,
private remoteUserResolveService: RemoteUserResolveService,
private apiLoggerService: ApiLoggerService,
) {
super(meta, paramDef, async (ps, me) => {
@ -121,7 +121,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
} else {
// Lookup user
if (typeof ps.host === 'string' && typeof ps.username === 'string') {
user = await this.resolveUserService.resolveUser(ps.username, ps.host).catch(err => {
user = await this.remoteUserResolveService.resolveUser(ps.username, ps.host).catch(err => {
this.apiLoggerService.logger.warn(`failed to resolve remote user: ${err}`);
throw new ApiError(meta.errors.failedToResolveRemoteUser);
});

View File

@ -14,7 +14,7 @@ import { getNoteSummary } from '@/misc/get-note-summary.js';
import { DI } from '@/di-symbols.js';
import * as Acct from '@/misc/acct.js';
import { MetaService } from '@/core/MetaService.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, WebhookDeliverQueue } from '@/core/queue/QueueModule.js';
import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, ObjectStorageQueue, SystemQueue, WebhookDeliverQueue } from '@/core/QueueModule.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { PageEntityService } from '@/core/entities/PageEntityService.js';

View File

@ -1,5 +1,5 @@
import Resolver from '../../src/remote/activitypub/resolver.js';
import { IObject } from '../../src/remote/activitypub/type.js';
import Resolver from '../../src/activitypub/resolver.js';
import { IObject } from '../../src/activitypub/type.js';
type MockResponse = {
type: string;

View File

@ -29,7 +29,7 @@ describe('ActivityPub', () => {
it('Minimum Actor', async () => {
const { MockResolver } = await import('../misc/mock-resolver.js');
const { createPerson } = await import('../../src/remote/activitypub/models/person.js');
const { createPerson } = await import('../../src/activitypub/models/person.js');
const resolver = new MockResolver();
resolver._register(actor.id, actor);
@ -43,7 +43,7 @@ describe('ActivityPub', () => {
it('Minimum Note', async () => {
const { MockResolver } = await import('../misc/mock-resolver.js');
const { createNote } = await import('../../src/remote/activitypub/models/note.js');
const { createNote } = await import('../../src/activitypub/models/note.js');
const resolver = new MockResolver();
resolver._register(actor.id, actor);
@ -76,7 +76,7 @@ describe('ActivityPub', () => {
it('Actor', async () => {
const { MockResolver } = await import('../misc/mock-resolver.js');
const { createPerson } = await import('../../src/remote/activitypub/models/person.js');
const { createPerson } = await import('../../src/activitypub/models/person.js');
const resolver = new MockResolver();
resolver._register(actor.id, actor);

View File

@ -1,7 +1,7 @@
import * as assert from 'assert';
import httpSignature from '@peertube/http-signature';
import { genRsaKeyPair } from '../../src/misc/gen-key-pair.js';
import { createSignedPost, createSignedGet } from '../../src/remote/activitypub/ap-request.js';
import { createSignedPost, createSignedGet } from '../../src/activitypub/ap-request.js';
export const buildParsedSignature = (signingString: string, signature: string, algorithm: string) => {
return {

View File

@ -5,7 +5,7 @@ import { ModuleMocker } from 'jest-mock';
import { Test } from '@nestjs/testing';
import { GlobalModule } from '@/GlobalModule.js';
import { RelayService } from '@/core/RelayService.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { CreateSystemUserService } from '@/core/CreateSystemUserService.js';
import { QueueService } from '@/core/QueueService.js';
import { IdService } from '@/core/IdService.js';