Upvote Notifications

Plugin Development

Suggested Topics

  • 0 Votes
    1 Posts

    A new question concerning the development of my Backblaze B2 storage plugin:

    I kind of have it working now, where files are uploaded and filenames returned properly, though it's lacking the sophisticated ways of setting host, bucket and credentials as the old s3 plugins (I'm still struggling figuring out what the hooks and functions are available to a plugin developer, since the documentation doesn't seem to be very updated and detailed).

    I noticed there is this button to export personal data, including uploaded files. How should I possibly integrate this functionality into my plugin?


  • 0 Votes
    3 Posts

    @josef Thank you. I'll give it a try.

  • 0 Votes
    9 Posts

    @eeeee Probably local to the user computer 🙂

    You can generally use non-http URIs for launching different applications. If you were ever redirected from a desktop or mobile app to a browser to log in you've probably seen this in action. Windows actually uses some internally and usually transparently for the user (for example, to abuse their monopoly, MS started using microsoft-edge: scheme instead of https: in some links in Windows to only allow opening them in Edge. They didn't have to build some highly custom mechanism, just restrict other apps from registering this scheme), but usually can be just registered by applications you install. What they do also depends on the application - for example, I think calculator: only launches the calculator app (or at least the obvious way to write math doesn't work), but others can launch specific actions and even pass some information (for example, authentication token for the web login use case I mentioned). For example Spotify allows linking to artists, playlists, albums etc. via spotify: scheme and steam supports doing a ton of things via URI, including launching and even installing/uninstalling games.

    All you need is an <a> tag with the right href= set. So yeah, you can put that kind of a link in a widget, but if they wanted to have it be an action under a post, especially if it was supposed to include some information from the post, it wouldn't be that simple.
    (side note: NodeBB doesn't allow links using non-standard schemes in markdown, so you can't just put something like this in a post or signature)

  • 0 Votes
    16 Posts

    Hello @jalathpc_demo

    I tried to create a patch:

    I no longer have a NodeBB instance, so let me know if it works (I am honestly not sure, as /logout should be allowed as you are logged in.

    It would be interesting to check if req.loggedIn is correctly set when using SSO. This could be why the plugin is not working as you need.

    NPM link: https://www.npmjs.com/package/nodebb-plugin-private-forum/v/1.3.1

  • 0 Votes
    3 Posts

    @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