Merge pull request 'Allow for searching unicode emoji via inputting emoji (#163 & #227)' (#230) from Mergan/pleroma-fe:beefox-emoji-search into develop

Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/230
This commit is contained in:
floatingghost 2022-11-21 10:11:19 +00:00
commit 70ea9e772c

View file

@ -138,7 +138,7 @@ const EmojiPicker = {
if (this.keyword === '') return list if (this.keyword === '') return list
const regex = new RegExp(escapeRegExp(trim(this.keyword)), 'i') const regex = new RegExp(escapeRegExp(trim(this.keyword)), 'i')
return list.filter(emoji => { return list.filter(emoji => {
return regex.test(emoji.displayText) return (regex.test(emoji.displayText) || (!emoji.imageUrl && emoji.replacement === this.keyword))
}) })
} }
}, },