guardian / guardian/dotcom-rendering

Discussion: Fake user comment is displayed even if the comment couldn't be posted

Open
#10,439 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
274
Forks
34
Avg merge
2d 22h
Merged PRs (30d)
121

Description

When a user adds a comment in a discussion, the app immediately adds it to the array of currently shown comments so that the users comment is displayed immediatlely. The reason for this is that there is a fairly long cache otherwise.

However, if the comment fails to be posted (Eg because you rate limit comments to 1 per minute), we still display this comment in the list on comments as if it had been posted.

We should check to see if the post has been successful before displaying it in the list of comments.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.