From ef21993199a37d447fb2110a467f676858a89124 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Apr 2018 16:05:50 +0900 Subject: [PATCH] Refactor --- src/queue/processors/http/process-inbox.ts | 2 +- src/remote/activitypub/kernel/announce/note.ts | 2 +- src/remote/activitypub/kernel/create/image.ts | 2 +- src/remote/activitypub/kernel/create/note.ts | 2 +- src/remote/activitypub/{objects => models}/image.ts | 0 src/remote/activitypub/{objects => models}/note.ts | 0 src/remote/activitypub/{objects => models}/person.ts | 0 src/remote/resolve-user.ts | 2 +- 8 files changed, 5 insertions(+), 5 deletions(-) rename src/remote/activitypub/{objects => models}/image.ts (100%) rename src/remote/activitypub/{objects => models}/note.ts (100%) rename src/remote/activitypub/{objects => models}/person.ts (100%) diff --git a/src/queue/processors/http/process-inbox.ts b/src/queue/processors/http/process-inbox.ts index 2c49a67b6..75ff5918f 100644 --- a/src/queue/processors/http/process-inbox.ts +++ b/src/queue/processors/http/process-inbox.ts @@ -5,7 +5,7 @@ const httpSignature = require('http-signature'); import parseAcct from '../../../acct/parse'; import User, { IRemoteUser } from '../../../models/user'; import perform from '../../../remote/activitypub/perform'; -import { resolvePerson } from '../../../remote/activitypub/objects/person'; +import { resolvePerson } from '../../../remote/activitypub/models/person'; const log = debug('misskey:queue:inbox'); diff --git a/src/remote/activitypub/kernel/announce/note.ts b/src/remote/activitypub/kernel/announce/note.ts index 68fb23c97..a288dd499 100644 --- a/src/remote/activitypub/kernel/announce/note.ts +++ b/src/remote/activitypub/kernel/announce/note.ts @@ -4,7 +4,7 @@ import Resolver from '../../resolver'; import post from '../../../../services/note/create'; import { IRemoteUser } from '../../../../models/user'; import { IAnnounce, INote } from '../../type'; -import { fetchNote, resolveNote } from '../../objects/note'; +import { fetchNote, resolveNote } from '../../models/note'; const log = debug('misskey:activitypub'); diff --git a/src/remote/activitypub/kernel/create/image.ts b/src/remote/activitypub/kernel/create/image.ts index ea36545f0..2a5552222 100644 --- a/src/remote/activitypub/kernel/create/image.ts +++ b/src/remote/activitypub/kernel/create/image.ts @@ -1,5 +1,5 @@ import { IRemoteUser } from '../../../../models/user'; -import { createImage } from '../../objects/image'; +import { createImage } from '../../models/image'; export default async function(actor: IRemoteUser, image): Promise { await createImage(image.url, actor); diff --git a/src/remote/activitypub/kernel/create/note.ts b/src/remote/activitypub/kernel/create/note.ts index 530cf6483..ed9fb6e54 100644 --- a/src/remote/activitypub/kernel/create/note.ts +++ b/src/remote/activitypub/kernel/create/note.ts @@ -1,6 +1,6 @@ import Resolver from '../../resolver'; import { IRemoteUser } from '../../../../models/user'; -import { createNote, fetchNote } from '../../objects/note'; +import { createNote, fetchNote } from '../../models/note'; /** * 投稿作成アクティビティを捌きます diff --git a/src/remote/activitypub/objects/image.ts b/src/remote/activitypub/models/image.ts similarity index 100% rename from src/remote/activitypub/objects/image.ts rename to src/remote/activitypub/models/image.ts diff --git a/src/remote/activitypub/objects/note.ts b/src/remote/activitypub/models/note.ts similarity index 100% rename from src/remote/activitypub/objects/note.ts rename to src/remote/activitypub/models/note.ts diff --git a/src/remote/activitypub/objects/person.ts b/src/remote/activitypub/models/person.ts similarity index 100% rename from src/remote/activitypub/objects/person.ts rename to src/remote/activitypub/models/person.ts diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index 5cb35cade..b6048842b 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -2,7 +2,7 @@ import { toUnicode, toASCII } from 'punycode'; import User from '../models/user'; import webFinger from './webfinger'; import config from '../config'; -import { createPerson } from './activitypub/objects/person'; +import { createPerson } from './activitypub/models/person'; export default async (username, _host, option) => { const usernameLower = username.toLowerCase();