diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-04-14 16:39:53 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-04-14 16:39:53 +0900 |
| commit | 449dc17df8fe3b6cc220aaabd576b0f04f6028da (patch) | |
| tree | 33e5c4da1b43f1bba0a02501150c760623fc9798 /src/server/api/endpoints/i/update.ts | |
| parent | Merge branch 'develop' (diff) | |
| parent | 12.76.0 (diff) | |
| download | misskey-449dc17df8fe3b6cc220aaabd576b0f04f6028da.tar.gz misskey-449dc17df8fe3b6cc220aaabd576b0f04f6028da.tar.bz2 misskey-449dc17df8fe3b6cc220aaabd576b0f04f6028da.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/server/api/endpoints/i/update.ts')
| -rw-r--r-- | src/server/api/endpoints/i/update.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 0554fe76fb..c0ffd75e23 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; +import * as mfm from 'mfm-js'; import { ID } from '@/misc/cafy-id'; import { publishMainStream, publishUserEvent } from '../../../../services/stream'; import acceptAllFollowRequests from '../../../../services/following/requests/accept-all'; import { publishToFollowers } from '../../../../services/i/update'; import define from '../../define'; -import { parse, parsePlain } from '../../../../mfm/parse'; -import extractEmojis from '@/misc/extract-emojis'; -import extractHashtags from '@/misc/extract-hashtags'; +import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm'; +import { extractHashtags } from '@/misc/extract-hashtags'; import * as langmap from 'langmap'; import { updateUsertags } from '../../../../services/update-hashtag'; import { ApiError } from '../../error'; @@ -291,13 +291,13 @@ export default define(meta, async (ps, _user, token) => { const newDescription = profileUpdates.description === undefined ? profile.description : profileUpdates.description; if (newName != null) { - const tokens = parsePlain(newName); - emojis = emojis.concat(extractEmojis(tokens!)); + const tokens = mfm.parsePlain(newName); + emojis = emojis.concat(extractCustomEmojisFromMfm(tokens!)); } if (newDescription != null) { - const tokens = parse(newDescription); - emojis = emojis.concat(extractEmojis(tokens!)); + const tokens = mfm.parse(newDescription); + emojis = emojis.concat(extractCustomEmojisFromMfm(tokens!)); tags = extractHashtags(tokens!).map(tag => normalizeForSearch(tag)).splice(0, 32); } |