Readability issue: Notification.type has two different uses
Something that confused me when working with Nofitication
s in this MR is the dual use of Notification.type
in different contexts
In the logic for sending an email on receiving a notification, we see that Notification.type
is being set as Mention
, or Message
In the logic for creating a notification as a result of a subscription, it's set to creation
, update
or deletion
. The latter is then used by the ActivityQueueService
to prevent duplicate notifications (since these are automatically triggered)
The dual use of this doesn't break anything, but it makes it ambiguous what Notification.type
actually is. In my opinion, we should replace the latter use with a new field, Notification.action