Rename html-to-mfm to fromHtml
This commit is contained in:
parent
3058e8f354
commit
ca26edbfce
@ -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) {
|
||||
|
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user