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의 배지(bubble) 숫자가 일치하지 않는다는 점입니다.
파란색 배지(알림)의 경우, 사용자가 Discourse에서 드롭다운을 열면 알림을 실제로 열지 않았더라도 카운터가 0으로 초기화됩니다.
반면, 우리의 다른 웹사이트에서는 해당 알림이 여전히 읽지 않은 상태로 집계됩니다. 따라서 Discourse에서는 카운터가 0으로 초기화된 상태여도, 다른 사이트에서는 여전히 X개의 읽지 않은 알림이 표시될 수 있습니다.
이는 사용자에게 매우 혼란을 줍니다. 읽지 않은 알림의 수가 아니라, Discourse의 파란색 배지에 표시되는 숫자(사용자가 알림 드롭다운을 열면 0으로 설정되는 값)를 가져오는 방법이 있을까요?