From ca26edbfce9203539bc4f88f1f16a79180fbfbe0 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 30 Jan 2019 15:00:05 +0900 Subject: [PATCH] Rename html-to-mfm to fromHtml --- src/mfm/{html-to-mfm.ts => fromHtml.ts} | 0 src/remote/activitypub/models/note.ts | 4 ++-- src/remote/activitypub/models/person.ts | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/mfm/{html-to-mfm.ts => fromHtml.ts} (100%) diff --git a/src/mfm/html-to-mfm.ts b/src/mfm/fromHtml.ts similarity index 100% rename from src/mfm/html-to-mfm.ts rename to src/mfm/fromHtml.ts diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index dd0083340c..f93e3d4c60 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -9,7 +9,7 @@ import { INote as INoteActivityStreamsObject, IObject } from '../type'; import { resolvePerson, updatePerson } from './person'; import { resolveImage } from './image'; import { IRemoteUser, IUser } from '../../../models/user'; -import htmlToMFM from '../../../mfm/html-to-mfm'; +import fromHtml from '../../../mfm/fromHtml'; import Emoji, { IEmoji } from '../../../models/emoji'; import { ITag } from './tag'; import { toUnicode } from 'punycode'; @@ -110,7 +110,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false const cw = note.summary === '' ? null : note.summary; // テキストのパース - const text = note._misskey_content ? note._misskey_content : htmlToMFM(note.content); + const text = note._misskey_content ? note._misskey_content : fromHtml(note.content); // vote if (reply && reply.poll && text != null) { diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index c7a76b4bd6..192c73c03c 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -9,7 +9,7 @@ import { resolveImage } from './image'; import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type'; import { IDriveFile } from '../../../models/drive-file'; import Meta from '../../../models/meta'; -import htmlToMFM from '../../../mfm/html-to-mfm'; +import fromHtml from '../../../mfm/fromHtml'; import usersChart from '../../../chart/users'; import { URL } from 'url'; import { resolveNote, extractEmojis } from './note'; @@ -150,7 +150,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise