function hideMembersOnlyContent(attrs, frame) {
    const membersEnabled = labs.isSet('members');
    if (!membersEnabled) {
        return PERMIT_CONTENT;
    }

    const postHasMemberTag = attrs.tags && attrs.tags.find((tag) => {
        return (tag.name === MEMBER_TAG);
    });
    const requestFromMember = frame.original.context.member;
    if (!postHasMemberTag) {
        return PERMIT_CONTENT;
    }
    if (!requestFromMember) {
        return BLOCK_CONTENT;
    }

    const memberHasPlan = !!(frame.original.context.member.plans || []).length;
    if (!membersService.api.isPaymentConfigured()) {
        return PERMIT_CONTENT;
    }
    if (memberHasPlan) {
        return PERMIT_CONTENT;
    }
    return BLOCK_CONTENT;
}
function hideMembersOnlyContent(attrs, frame) {
    const membersEnabled = labs.isSet('members');
    if (!membersEnabled) {
        return PERMIT_CONTENT;
    }

    const postHasMemberTag = attrs.tags && attrs.tags.find((tag) => {
        return (tag.name === MEMBER_TAG);
    });
    const requestFromMember = frame.original.context.member;
    if (!postHasMemberTag) {
        return PERMIT_CONTENT;
    }
    if (!requestFromMember) {
        return BLOCK_CONTENT;
    }

    const memberHasPlan = !!(frame.original.context.member.plans || []).length;
    if (!membersService.api.isPaymentConfigured()) {
        return PERMIT_CONTENT;
    }
    if (memberHasPlan) {
        return PERMIT_CONTENT;
    }
    return BLOCK_CONTENT;
}
function hideMembersOnlyContent ( attrs , frame ) { const membersEnabled = labs . isSet ( 'members' ) ; if ( ! membersEnabled ) { return PERMIT_CONTENT ; } const postHasMemberTag = attrs . tags && attrs . tags . find ( ( tag ) => { return ( tag . name === MEMBER_TAG ) ; } ) ; const requestFromMember = frame . original . context . member ; if ( ! postHasMemberTag ) { return PERMIT_CONTENT ; } if ( ! requestFromMember ) { return BLOCK_CONTENT ; } const memberHasPlan = ! ! ( frame . original . context . member . plans || [ ] ) . length ; if ( ! membersService . api . isPaymentConfigured ( ) ) { return PERMIT_CONTENT ; } if ( memberHasPlan ) { return PERMIT_CONTENT ; } return BLOCK_CONTENT ; }
Checks if request should hide memnbers only content
Checks if request should hide memnbers only content
hide members only content