Fix custom emoji validation (#4528)

This commit is contained in:
MeiMei 2019-03-18 20:02:25 +09:00 committed by syuilo
parent c06deed9df
commit 3493730e25

View file

@ -47,7 +47,7 @@ export async function toDbReaction(reaction: string, enableEmoji = true): Promis
return normalized; return normalized;
} }
const custom = reaction.match(/:([\w+-]+):/); const custom = reaction.match(/^:([\w+-]+):$/);
if (custom) { if (custom) {
const emoji = await Emoji.findOne({ const emoji = await Emoji.findOne({
host: null, host: null,