Gibt es eine Möglichkeit, bestimmte Benachrichtigungen aus der Benachrichtigungs-API auszublenden?

Hi,

I want to know if there’s a way to disable specific notifications—for example, badge notifications or trust level notifications—so they don’t appear in the list returned by the notifications API:

{host}/notifications.json?filter=all

My goal is to retrieve only post or chat notifications.

If it’s not possible via the API, is there a way to prevent Discourse from inserting certain notifications into the notifications list in the first place?

Thanks!

What is the problem that you are solving? What are you doing? Why not just ignore the data you don’t want?

There is no built-in way to prevent specific notification types (like badge or trust level changes) from being included in the notifications API on retrieval. The best workaround is to fetch all notifications with the API and then filter on your application by the notification_type you care about.

Notification types code

1 „Gefällt mir“