Reputation: 150
I've been working with getstream.io for a while and currently I'm facing an issue with the notifications.
To start using notifications I thought it was easier to implement in reactions due to having the targetFeeds property, but I'm facing an access error. I'm trying achieve it doing the next.
UserA commenting in UserB publication
// Client is initialized with UserA info
const comment = await client.reactions.add('comment', activity.id, { data }, { targetFeeds: [`notifications:UserB.ID`] });
My question is how to send a notification to UserB notification feed.
The result I expect is userB receiving a notification like "userA has commented in your publication" or alike.
Upvotes: 1
Views: 334
Reputation: 150
The issue as first pointed by Sanchaz was that I was using notifications
as slug for the notification feed instead of notification
, I thought that wasn't the case because I created the notification feed with notifications
slug.
StreamIO support stated that if the notification feed doesn't match notification
slug, the default permissions doesn't apply, therefore the solution was to rename the slug from notifications
to notification
.
Upvotes: 0
Reputation: 133
I believe the default feed for notifications is 'notification' (no s.)
Also I'm not fully aware of what you are tying to accomplish, but just a heads up there is also the TO field for targeting.
https://getstream.io/docs/targeting/?language=js
Upvotes: 1