I’m running a self-hosted Discourse instance running on pretty basic Docker installation. The forum runs on a subdomain of my main site and it uses main site as SSO host. I’d like to encourage traffic between the main site and forum by showing some kind of unread forum notifications/topics number for a given user on the main site. Problem is, I haven’t figured a good way to get the data.
I tried relaxing same site cookies setting to disabled, but if I query for example
not_logged_in error. The query works fine from browser window (when logged in).
Is there a way to change the Discourse session cookie for the top-level domain, or some other way I could query this data?
There is also possibility to query this from the backend with a Python script and API key if it helps. In any case I would still need at least a semi-decent way of syncing this data so if a user sees 10 notifications on the main site, then goes to the forum and reads/resets them, she should see the updated number on the main site, too.
I just realised that notifications are totally different than unread/new topics. Preferably I would show both for the users on the main site. Say Alice has 2 new topics, 3 unread posts and 2 unread notifications. I’d preferably show a number “7” on the main site notification tab (like on Facebook, for example)
Any tips or ideas would be appreciated