This is mostly a brain-dump right now, putting it here in case someone has comments.
I've come to the realisation that the notification part of the app is like a stream or pipeline starting with the Pusher stream and ending in Notification Center. After a bit of notepaper scribbling, I ended up with something like this for the stream:
BuildEventStream emits BuildEvent objects from the Pusher stream.
EventFilter consumes these, filters according to a FilterPreferences object and emits BuildEvent objects
EventConverter consumes the filtered BuildEvent objects and emits Notification objects
UserNotifier consumes the Notification objects and shows the notifications to the user through Notification Center
I'm working on the code for this now, and I'll convert this issue into a pull request once I have something that works.
This is mostly a brain-dump right now, putting it here in case someone has comments.
I've come to the realisation that the notification part of the app is like a stream or pipeline starting with the Pusher stream and ending in Notification Center. After a bit of notepaper scribbling, I ended up with something like this for the stream:
BuildEventStream
emitsBuildEvent
objects from the Pusher stream.EventFilter
consumes these, filters according to aFilterPreferences
object and emitsBuildEvent
objectsEventConverter
consumes the filteredBuildEvent
objects and emitsNotification
objectsUserNotifier
consumes theNotification
objects and shows the notifications to the user through Notification CenterI'm working on the code for this now, and I'll convert this issue into a pull request once I have something that works.