Commit Graph

30 Commits

Author SHA1 Message Date
Stanko K.R. 36ee253a1a Stack notifications everywhere
We had client-side notification stacking in the tray since launch, but now we want to stack notifications in the notifications page, in API responses and in email bundles.
2026-02-12 10:29:50 +01:00
Kevin McConnell bc73cf692d Process notification recipients in consistent order
We've seen some cases of deadlock when processing notifications, because
locks are gathered on the users in different orders. Let's try sticking
to a consistent order instead, which should cause the jobs to serialize
rather than deadlock.
2025-11-20 09:20:48 +00:00
Jorge Manrubia 331fdc05f6 Format 2025-04-24 15:20:08 +02:00
Jorge Manrubia 40368032f2 Split notifiers for comments and cards
This lets us remove the annoying if to check the card
2025-04-24 15:19:42 +02:00
Jorge Manrubia f258b05b23 Delegate target to the notifiable objects 2025-04-23 16:19:50 +02:00
Jorge Manrubia e964c5f9c9 Not used! 2025-04-23 15:31:26 +02:00
Jorge Manrubia 2eae58725a Remove notifications' resource relationship
Is confusing since "source" already captures the origin of the notifications. It's
needed to interpret things at rendering time, so we can query things as needed there.
2025-04-23 13:52:47 +02:00
Jorge Manrubia 2e3ffcfb9d Remove identation 2025-04-23 13:35:08 +02:00
Jorge Manrubia ab54cafd84 Inline event notifiers 2025-04-23 11:06:43 +02:00
Jorge Manrubia 9db675e589 Format 2025-04-22 14:15:40 +02:00
Jorge Manrubia 22df208f9a Render proper content for mentions, don't send mentions to yourself 2025-04-22 14:11:21 +02:00
Jorge Manrubia 8aa99e34b4 Persist notification's creator
Instead of delegating. With a polymorphic relationship, relying on a certain
attribute implies doing things like aliasing "mentioner" to "creator" or similar.
2025-04-22 13:48:43 +02:00
Jorge Manrubia 4f06473405 Notifications for mentions showing up 2025-04-22 12:02:48 +02:00
Jorge Manrubia aa3acfeaa8 Add plain text mentions 2025-04-22 11:26:56 +02:00
Jorge Manrubia 723e6d94f5 Rename bubbles => cards 2025-04-09 14:50:58 +02:00
Kevin McConnell 0820badcc3 Add involvement types to accesses
This provides a way to set the level of involvement that a user has with
a collection, and from which we determine the level of notifications to
send. Users can be access-only, watching, or being notified about
everything.

If you're access-only, you won't get an notifications. If you're
watching, you'll only get notifications for the items you're watching
(which includes the items you've been assigned, have commented on, etc).
If you're set to everything you'll get notifications about all activity
in that collection.

This change replaces our previous concept of subscriptions. Where
previously you'd subscribe to a collection to get notifications in it,
now you'll simply set the notification level on your access.
2025-04-03 16:35:13 +01:00
Kevin McConnell bc5e32e737 Only "published" notifies collection subscribers
The other notifications are only sent to the watchers of the bubble.
2025-03-18 17:46:57 +00:00
Kevin McConnell f22742c431 watched_by? should reflect subscriptions too 2025-02-26 10:53:03 +00:00
Kevin McConnell 59144ad17a Add Watches to track notification preferences 2025-02-26 10:53:03 +00:00
Kevin McConnell 6f1f819ad7 Suppress notifications for system-generated events 2025-02-12 17:40:29 +00:00
Kevin McConnell 39c0a95e1a We'll handle this at the event level 2025-02-11 14:34:39 +00:00
Kevin McConnell 056d853cc8 Don't notify while bubbles are still drafted 2025-01-15 11:42:35 +00:00
Kevin McConnell ab154f2f35 Generate notification content in a helper 2025-01-14 13:08:12 +00:00
Kevin McConnell 30b58f716b Make title a notifier attribute 2025-01-14 10:21:47 +00:00
Kevin McConnell c62e800b08 Notifications are all related to a Bubble 2025-01-13 14:21:47 +00:00
Kevin McConnell 66d0f29d45 Notify on pop as well
And DRY up some duplication.
2025-01-13 14:21:47 +00:00
Kevin McConnell 58ce85ce36 Link comment notifications to the comment 2025-01-13 14:21:47 +00:00
Kevin McConnell af5ac65116 Make notification target polymorphic 2025-01-13 14:21:47 +00:00
Kevin McConnell 6b5e098407 Use a better return value 2025-01-13 14:21:47 +00:00
Kevin McConnell 5a56c16029 Add a factory for creating notifications 2025-01-13 14:21:47 +00:00