Filtering feed using templateIdentifier

I am using https://docs.novu.co/cookbook/introduction#fetch-subscriber-feed in my App. Is it possible to filter the notifications using templateIdentifier which can be found in the response data ? It is similar to the Workflow filter in the Activity feed, but with the template slug instead of the ID
11 Replies
Lionel Mandine
Lionel MandineOP15mo ago
Here is the parameter i am talking about. Is it possible to use something that would look like this :
const { data: inAppMessages } =
await novu.subscribers.getNotificationsFeed(currentUser.id, {
page,
limit,
payload: {templateIdentifier: 'mention-in-a-comment'}
})
const { data: inAppMessages } =
await novu.subscribers.getNotificationsFeed(currentUser.id, {
page,
limit,
payload: {templateIdentifier: 'mention-in-a-comment'}
})
Lionel Mandine
Lionel MandineOP15mo ago
No description
Pawan Jain
Pawan Jain15mo ago
Yes if you send templateIdentifier also in payload
Lionel Mandine
Lionel MandineOP15mo ago
Ok thanks @Pawan Jain
Lionel Mandine
Lionel MandineOP15mo ago
Hi @Pawan Jain here is an update. I had this error which i could locate in the code :
No description
Lionel Mandine
Lionel MandineOP15mo ago
Here is where it sends me in the lib code :
No description
Lionel Mandine
Lionel MandineOP15mo ago
To be complete, this is my code : novu.subscribers.getNotificationsFeed(currentUserID, { page, limit, read, payload: { templateIdentifier: "dislike-post" } })
Novu_Bot
Novu_Bot15mo ago
@Lionel M, you just advanced to level 1!
Lionel Mandine
Lionel MandineOP15mo ago
I may use this the wrong, should i use feedIdentifier in my payload ?
Pawan Jain
Pawan Jain15mo ago
@Paweł T. Do you have any idea about this Buffer issue? No, feedIdentifier is different
Paweł T.
Paweł T.15mo ago
hi @Lionel M 👋 it looks like you are trying to use the @novu/node library inside the browser environment... if you would like to build the custom notification center experience you need to use @novu/notification-center package
Want results from more Discord servers?
Add your server