1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-29 23:38:55 +09:00

Rename html-to-mfm to fromHtml

This commit is contained in:
Aya Morisawa 2019-01-30 15:00:05 +09:00
parent 3058e8f354
commit ca26edbfce
No known key found for this signature in database
GPG Key ID: 3E64865D70D579F2
3 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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<IU
bannerId: null,
createdAt: Date.parse(person.published) || null,
lastFetchedAt: new Date(),
description: htmlToMFM(person.summary),
description: fromHtml(person.summary),
followersCount,
followingCount,
notesCount,
@ -340,7 +340,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
sharedInbox: person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined),
featured: person.featured,
emojis: emojiNames,
description: htmlToMFM(person.summary),
description: fromHtml(person.summary),
followersCount,
followingCount,
notesCount,
@ -463,7 +463,7 @@ export function analyzeAttachments(attachments: ITag[]) {
else
fields.push({
name: attachment.name,
value: htmlToMFM(attachment.value)
value: fromHtml(attachment.value)
});
return { fields, services };