defensive programming before reaction insert
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
parent
8d10b6d846
commit
54d38f029f
1 changed files with 4 additions and 0 deletions
|
@ -169,6 +169,10 @@ export class ReactionService {
|
|||
}
|
||||
}
|
||||
|
||||
if (/['\\]/.test(reaction)) {
|
||||
throw new IdentifiableError('cf61d38c-598a-49e2-b75a-6c38671fcc43', 'Invalid reaction.');
|
||||
}
|
||||
|
||||
const record: MiNoteReaction = {
|
||||
id: this.idService.gen(),
|
||||
noteId: note.id,
|
||||
|
|
Loading…
Add table
Reference in a new issue