mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-03 14:17:44 +01:00
Use MFM parser for extracting emoji in name
This commit is contained in:
parent
702875a78e
commit
2af028c1d5
1 changed files with 2 additions and 2 deletions
|
@ -198,8 +198,8 @@ export default define(meta, (ps, user, app) => new Promise(async (res, rej) => {
|
|||
let emojis = [] as string[];
|
||||
|
||||
if (updates.name != null) {
|
||||
const match = updates.name.match(/:\w{1,100}:/g) as string[];
|
||||
if (match) emojis = emojis.concat(match.map(m => m.replace(/:(\w+):/, '$1')));
|
||||
const tokens = parse(updates.name, true);
|
||||
emojis = emojis.concat(extractEmojis(tokens));
|
||||
}
|
||||
|
||||
if (updates.description != null) {
|
||||
|
|
Loading…
Reference in a new issue