plugin for getting user notifications?

Plugin Development
  • 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


Suggested Topics


  • 0 Votes
    4 Posts
    551 Views

    Please report this issue on Github.

  • 0 Votes
    1 Posts
    266 Views

    Hello,
    I have begun work on a custom email plugin, and while looking at some others that are available to see how they went about things I noticed that all of the available plugins (at least that I have found so far) already have an entry in the email setup list, regardless of if you have downloaded the associated plugin for that service (ex. Sendgrid, Mailgun, etc).

    So my questions is, if I have a custom email plugin, how exactly would I go about making it selectable / usable by the forum? Does it need to be present in the default email list? Is there a way to have my plugin inject itself into that list of providers or is there a way to override that list so that the forum knows not to use the credentials and settings in there, but instead use the ones in the plugin?

    The only real switch I have found is the "Use an external email server to send emails", which I would imagine that if it is turned off, that would not be much help either.

    If anyone has any insight on how the system works in regards to this and can point me in the right direction, I would appreciate it!

    Thanks,
    -MH

  • 0 Votes
    7 Posts
    2k Views

    Calculations/Evaluations are not part of the lightweight template engine NodeBB uses. (AFAIK)

    I guess the best would be to intercept the filter:post.getPosts hook and add your custom index values...

  • 1 Votes
    20 Posts
    8k Views

    Hello,

    Does anyone know how to show recent cards on custom homepage or any other pages?
    Thanks.

  • 0 Votes
    3 Posts
    2k Views

    https://github.com/justmepzy/nodebb-plugin-aliyun-oss, this plugin doesn't work totally.