N
Novu2mo ago
SubsKeepr

Disabling a channel for subscription tier

I know I can set enabled to false, but then that still alows the user to renable it. Is there a way to completely disable them unless they subscribe to a tier on my app that allows it?
6 Replies
Pawan Jain
Pawan Jain2mo ago
@SubsKeepr To be clear, you are looking to hide the specific channel from notification center/Inbox channel preference page untill the user (subscriber) is part of specific tier or above
SubsKeepr
SubsKeeprOP2mo ago
That is correct
Pawan Jain
Pawan Jain2mo ago
@SubsKeepr Apologies for delay in response. Currently, this is not supported. We have preferencesFilter prop which filters the workflows based on tags
import { Inbox, Preferences } from '@novu/react';

function Novu() {
return (
<Inbox
applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
subscriberId="YOUR_SUBSCRIBER_ID"
preferencesFilter={{ tags: ['general', 'admin', 'security'] }}
/>
);
}
import { Inbox, Preferences } from '@novu/react';

function Novu() {
return (
<Inbox
applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
subscriberId="YOUR_SUBSCRIBER_ID"
preferencesFilter={{ tags: ['general', 'admin', 'security'] }}
/>
);
}
As per your usecase, you are looking to show/hide channels, not workflows. What do you think, if we add support of custom callback function with this prop?
SubsKeepr
SubsKeeprOP2mo ago
Sure, anything that will allow my use case.
Pawan Jain
Pawan Jain2mo ago
@SubsKeepr What do you use for styling? Can styling be changed via code based on tier?
SubsKeepr
SubsKeeprOP2mo ago
sorry for very late reply, never get notifications. I could never get react-email to work in studio so using inline in body. But yes, I could do that if i needed to I suppose.

Did you find this page helpful?