Andy02
(Andy)
1
My site spans a few platforms.
I know users can have live browser notifications, and emails.
I’d also like to pull the notifications bubble that appears on discourse user profile and add it to the menu on my other platforms, for continuity.
Just that they have a notification, and ideally how many. Has anyone heard of that being done?
3 个赞
Falco
(Falco)
2
Yeah, this is totally doable.
I did back in 2015 using a direct database connection on the Discourse and querying the notifications table.
You can also use the API.
It’s just a matter of picking what’s best for the underlying tech of the other site.
6 个赞
我们已成功实现从 Discourse 拉取未读通知数量到另一个网站,且运行正常。
目前面临的问题是:另一个网站与 Discourse 上显示的气泡数字不一致。
对于蓝色气泡(通知),一旦用户在 Discourse 中打开下拉菜单,计数器即重置为 0,即使用户并未实际查看通知。
而在我们的另一个网站上,这些通知仍被计为未读。因此,另一个网站可能仍显示“X 条未读通知”,而 Discourse 上的计数器已重置为 0。
这会让用户感到困惑。是否有办法不拉取未读通知的数量,而是拉取 Discourse 上蓝色气泡中显示的数量(该数量在用户打开通知下拉菜单时会被重置为 0)?