def is_allowed(user, update, private=False):
    """Check whether the user is allowed to access this endpoint."""
    if private and update.message.chat.type != 'private':
        update.message.chat.send_message('Please do this in a direct conversation with me.')
        return False

    return True