plugin for getting user notifications?
-
Hi, I'm new to NodeBB. Before I dive in and start writing my own plugin, I wanted to first ask if one already exists for what I need. I'm trying to get the the user's notification count and display it in our app next to a link to our nodebb forum. Is there a plugin that already does this that I can use? Thanks!
-
@Nick-Harmon Could be you don't need a plugin for something that simple... if the user is already logged in on the forum, then your app could really just
GET /api/notifications
to see the notifications.Of course, if they're not logged in then you'd just get an error.
If you want to get their notification count if they're logged into your app but not on the forum, then it gets a little harder, because then you have to associate their NodeBB account with your app and make server-side calls, etc. etc... lmk if the simple solution helps.
-
@julian Thanks for getting back to me quickly. Other priorities pulled me away from this, but after looking at your response, it seems like what I'm actually after are "unread" counts, not just notifications. The simple GET solution returned notifications, but not every "unread". Our app is using the session sharing plugin, and we are associating NodeBB accounts with our app accounts. Would I be able to leverage some of the session sharing functionality to get an unread count for users on our app based on their NodeBB account? Thanks