jointakahe / takahe

An ActivityPub/Fediverse server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support API notification subscription

andrewgodwin opened this issue · comments

We need a way to support the ability for clients to subscribe to push notifications. Rough thoughts:

  • API tokens are already tied to Identity, which is good. Tokens can have max one subscription each, which we can do in a column on their table.
  • Whenever a relevant event happens on an Identity, a new FanOut type for it needs to be made. Unclear if we need just one new FanOut type for "push notification", or multiple, one for each kind of notification. It's possible we could also just do this in-line for current FanOut handlers for most things.
  • The FanOut goes through all the identity's tokens and dispatches an event if the token has an endpoint