יצירת התראות דרך ה-API

I’m planning a similar plugin myself, centering my website non-email notifications around Discourse, which you can then subscribe to via MessageBus and have a central push notification configuration.

What I’m planning is just having a custom endpoint for creating custom notifications, after seeing these snippets I think it’s feasible.

For creating a custom notification:

For customizing how the notification item is displayed on the notification list:
https://github.com/discourse/discourse-code-review/blob/master/assets/javascripts/discourse/widgets/code-review-commit-approved-notification-item.js.es6

If there were a core API for creating the notification, I think this notification item widget could be done on a theme component, which would be even simpler.

4 לייקים