Lets start with a life-like scenario.
User A receives an offensive comment in his inbox from the OP of a question. A then clicks on the notification in order to flag the offending comment. A mod sees the flag and deletes the comment. Shortly after, the question is also deleted. Because A clicked on the notification in the inbox, that notification is still in A's inbox, with the offensive part of the comment still visible.
Edit: The flag was marked helpful because the post was deleted, not because the comment was deleted by a mod.
Please note that although the behaviour of the notifications is as it is supposed to be, this does not fix the possible problem of such notifications "hanging around".
User A can't get rid of that comment in any way, and it may be a long time before it is flushed out by new messages.
This issue is mentioned in Deleted comments persist in the global inbox but it is supposed to be that comments on a post that you own can hang around, not on someone else's post.
To me this seem like an important issue. To have to see an offensive message every time you open your inbox is not a good thing. I can think of two ways in which this problem can be avoided:
- Make sure notifications for deleted comments don't hang around (this I'm sure is the easier option)
- Allow users to delete unwanted notifications (this could be useful, as this would also allow users to remove notifications that they are not interested in, or even just to keep their inbox uncluttered. It would most likely be hard to implement, though.)
What are your thoughts on this?