@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
How to get the website url
-
Im currently using the bellow but it seems that .url is not verry reliable as even if the user dosent set it correctly the site just works anyway. Does Nodebb have a function somewhere i cant find?
var siteConfig = module.parent.require('../config.json'); siteConfig.url
-
You can use the
nconf
dependency (to be listed aspeerDependency
).var nconf = require("nconf"); nconf.get("url")
However, it's just as unreliable; There is no current solution to save the user from mis-configured
url
property. I get issues/questions regarding this on a regular basis. -
@frissdiegurke im new to node in general is their not something in express or node have something similar to PHP's
$_SERVER['HTTP_HOST']
?