forked from FoundKeyGang/FoundKey
Rename html-to-mfm to fromHtml
This commit is contained in:
parent
3058e8f354
commit
ca26edbfce
3 changed files with 6 additions and 6 deletions
|
@ -9,7 +9,7 @@ import { INote as INoteActivityStreamsObject, IObject } from '../type';
|
||||||
import { resolvePerson, updatePerson } from './person';
|
import { resolvePerson, updatePerson } from './person';
|
||||||
import { resolveImage } from './image';
|
import { resolveImage } from './image';
|
||||||
import { IRemoteUser, IUser } from '../../../models/user';
|
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 Emoji, { IEmoji } from '../../../models/emoji';
|
||||||
import { ITag } from './tag';
|
import { ITag } from './tag';
|
||||||
import { toUnicode } from 'punycode';
|
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 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
|
// vote
|
||||||
if (reply && reply.poll && text != null) {
|
if (reply && reply.poll && text != null) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { resolveImage } from './image';
|
||||||
import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type';
|
import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type';
|
||||||
import { IDriveFile } from '../../../models/drive-file';
|
import { IDriveFile } from '../../../models/drive-file';
|
||||||
import Meta from '../../../models/meta';
|
import Meta from '../../../models/meta';
|
||||||
import htmlToMFM from '../../../mfm/html-to-mfm';
|
import fromHtml from '../../../mfm/fromHtml';
|
||||||
import usersChart from '../../../chart/users';
|
import usersChart from '../../../chart/users';
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
import { resolveNote, extractEmojis } from './note';
|
import { resolveNote, extractEmojis } from './note';
|
||||||
|
@ -150,7 +150,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU
|
||||||
bannerId: null,
|
bannerId: null,
|
||||||
createdAt: Date.parse(person.published) || null,
|
createdAt: Date.parse(person.published) || null,
|
||||||
lastFetchedAt: new Date(),
|
lastFetchedAt: new Date(),
|
||||||
description: htmlToMFM(person.summary),
|
description: fromHtml(person.summary),
|
||||||
followersCount,
|
followersCount,
|
||||||
followingCount,
|
followingCount,
|
||||||
notesCount,
|
notesCount,
|
||||||
|
@ -340,7 +340,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
|
||||||
sharedInbox: person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined),
|
sharedInbox: person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined),
|
||||||
featured: person.featured,
|
featured: person.featured,
|
||||||
emojis: emojiNames,
|
emojis: emojiNames,
|
||||||
description: htmlToMFM(person.summary),
|
description: fromHtml(person.summary),
|
||||||
followersCount,
|
followersCount,
|
||||||
followingCount,
|
followingCount,
|
||||||
notesCount,
|
notesCount,
|
||||||
|
@ -463,7 +463,7 @@ export function analyzeAttachments(attachments: ITag[]) {
|
||||||
else
|
else
|
||||||
fields.push({
|
fields.push({
|
||||||
name: attachment.name,
|
name: attachment.name,
|
||||||
value: htmlToMFM(attachment.value)
|
value: fromHtml(attachment.value)
|
||||||
});
|
});
|
||||||
|
|
||||||
return { fields, services };
|
return { fields, services };
|
||||||
|
|
Loading…
Reference in a new issue