N
Novu3y ago
Nexen

topic filter

Hello, if i have
await novu.trigger('<REPLACE_WITH_EVENT_NAME_FROM_ADMIN_PANEL>', {
to: [{ type: TriggerRecipientsTypeEnum.TOPIC, topicKey: topicKey }],
payload: {
"NOT": ["a","b"]
},
});
await novu.trigger('<REPLACE_WITH_EVENT_NAME_FROM_ADMIN_PANEL>', {
to: [{ type: TriggerRecipientsTypeEnum.TOPIC, topicKey: topicKey }],
payload: {
"NOT": ["a","b"]
},
});
how can i can send trigger to a topic, where subscriber id is not String[] ?
8 Replies
Support
Support3y ago
Thanks for posting, one of the @Moderator or @Support will address the matter as soon as possible 🙇‍♂️
Pawan Jain
Pawan Jain3y ago
Hi @the_nexen You will first have to add subscribers into topic https://docs.novu.co/platform/topics/#subscribers-management-in-a-topic
--
--3y ago
Can you clarify what do you mean a bit? Do you mean to send notification to a topic and to an individual subscriber?
Nexen
NexenOP3y ago
I want to send message to all in that topic and do not send it to particular targeted subIds
--
--3y ago
It is not possible now. The approach for that would be to remove those targeted subscriber IDs from the topic.
Nexen
NexenOP3y ago
Oh wow.. my usecase is about comments: when comment is sent, it has to be verified by owner of post.. if its verified, then i wanted the topic usecase.. dont send the notification to owner of post and send special notification to owner of comment and then send notification to all except owner of post and owner of comment (since new comment would not be clear for owner of comment and owner of post knows there is new comment, since its verified) to make it clear: new comment -> send push to owner of post post verified -> send push to owner of comment -> send topic except to subs[owner of post, owner of comment]
--
--3y ago
Understand the use case and it makes totally sense as you wouldn't want to remove subscribers from the topic for certain simple actions. Would you mind to open a GitHub feature request for filtering out subscribers when triggering a topic notification?
Nexen
NexenOP3y ago
@pablo.fernandez.otero done I hope its going to be implemented soon, this kinda stops our development hehe

Did you find this page helpful?