def do_add_reaction(user_profile: UserProfile, message: Message, emoji_name: str, emoji_code: str, reaction_type: str) -> None:
    reaction = Reaction(user_profile=user_profile, message=message, emoji_name=emoji_name, emoji_code=emoji_code, reaction_type=reaction_type)
    try:
        reaction.save()
    except django.db.utils.IntegrityError:
        raise JsonableError(_('Reaction already exists.'))
    notify_reaction_update(user_profile, message, reaction, 'add')
def do_add_reaction(user_profile: UserProfile, message: Message, emoji_name: str, emoji_code: str, reaction_type: str) -> None:
    reaction = Reaction(user_profile=user_profile, message=message, emoji_name=emoji_name, emoji_code=emoji_code, reaction_type=reaction_type)
    try:
        reaction.save()
    except django.db.utils.IntegrityError:
        raise JsonableError(_('Reaction already exists.'))
    notify_reaction_update(user_profile, message, reaction, 'add')