Reactions of deleted message still persist in database
Open
Nobody has claimed this yet.
bug
feature: api 🛠️
feature: reactions 👍
- Dominant language
- PHP
- Stars
- 2.2k
- Forks
- 587
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 350
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Post a message
- Add a reaction to it
- Delete a message
Expected behaviour
Server response should be:
{
"id": 122,
"message": "Message deleted by you",
"messageType": "comment_deleted",
"reactions": {},
},
{
"id": 123,
"message": "Reaction deleted by author",
"parent": {
"id": 122,
}
},
{
"id": 124,
"message": "You deleted a message",
"systemMessage": "message_deleted",
"parent": {
"id": 122,
}
},
Actual behaviour
{
"id": 122,
"message": "Message deleted by you",
"messageType": "comment_deleted",
"reactions": {},
"reactionsSelf": [
"\ud83d\udc4d"
]
},
{
"id": 123,
"message": "\ud83d\udc4d",
"systemMessage": "reaction",
"parent": {
"id": 122,
}
},
{
"id": 124,
"message": "You deleted a message",
"systemMessage": "message_deleted",
"parent": {
"id": 122,
}
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. First reproduce the post, react, and delete sequence, then trace the server handling behind the returned message and reaction records. Done means deleted messages return no persisted reactions or reaction events, matching the expected JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend-api-design, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100