- when a user updates a post, we should not override every property in
our database with the new params, since we have read-only properties
like createdAt that we don't want to go deleting aimlessly.
I think it makes more sense to update an existing notification in place.
Ie. if there was already a notification, just mark it as unread so it
ends up in the recipient's notification list again.
Note that we don't create duplicate notifications. I made use of the behaviour
of XSS-middleware: It removes all css classes from `<a>` anchors. Because
notifications rely on a css class `mention` which gets removed in a later
middleware, this gives us a nice behaviour for re-notifications without creating
duplicates. The downside is that it creates dependencies between middlewares and
it's not that obvious at all.
cc @mattwr18 @ulfgebhardt @appinteractive @Tirokk