SMF
SMF copied to clipboard
Unread alerts should be deleted when relevant content no longer exists.
Description
Suppose that User A writes a post and has like notifications turned on. Then suppose that User B clicks the like button for that post twice (i.e. liking it and then unliking it). An alert is generated for the like event, but the alert is not removed after the unlike event. So when User A checks their alerts, they see one about receiving a like even though that like no longer exists.
Similar situations happen when:
- an alert is issued about a new reply to a topic, but then that reply is deleted
- an alert is issued about a new moderation report, but then the report is closed
- etc.
Steps to reproduce
- Do one of the things I described above
Environment (complete as necessary)
- Version/Git revision: ae0ab6f
- Database Type: N/A
- Database Version: N/A
- PHP Version: N/A
Additional information/references
See https://www.simplemachines.org/community/index.php?topic=581756.0