#How to get specific message that already sent to specific Feed ?

1 messages · Page 1 of 1 (latest)

onyx ore
#

Hi, i want to use novu to trigger page reload beside the notification feature.
Therefore, we want to seperate message that will show in our customer notifications and that will be consumed in Front end to reload the page

i already set the Novu Provider

import { NovuProvider, useNotifications } from 'novu';

function App() {
return (
<NovuProvider stores={[{ storeId: 'Order', query: { seen: false, read: false, feedIdentifier: ["Order"] } }]}>
<Notifications />
</NovuProvider>
);
}

and use it my component

import {
useNotifications,
} from "@novu/notification-center"

const { data } = useFetchNotifications({
query: {
limit: 1,
seen: false,
read: false,
feedIdentifier: ["Order"],
},
})

but it still get all notifications, moreover i already set the limit to 1, but it still return 10 items.
Can someone guide me please ?

thick valley
#

Hey @onyx ore, thank you for bringing it up.

Something that you can try doing is when all the notifications are being fetched, you can try to present only the notification at index 0 of all the notification lists.

Index 0 will always contain the most recent notification.

onyx ore
#

okay.

#

but i still got the issue, when I set the feedIdentifier to "Order".Then, try to trigger workflow A with feed "Order" and trigger workflow B with feed "Like". Somehow, i get the message from workflow A and workflow B. I want only to listen to workflow A since i already set the feedIdentifier.

#

is that possible to do ?

thick valley
#

@glossy tangle Can you please check this out?

glossy tangle
#

@onyx ore have you enabled feeds and selected one of the feed?