-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Describe the bug
Comment count says 1, but no comment appears. This is because the record is pending and our aggregate rows don't take this into account.
To Reproduce
- Revoke access to frontpage at https://bsky.social/account (this is the easiest way to get record writes to fail)
- Make a comment
Now the post has +1 comment count but the comment doesn't show for anyone except the author.
Expected behavior
Comment count to be consistent with comment thread view.
This is pretty hard to do for both the comment author and everyone else (would require keeping track of multiple counts, or discarding our aggregate system altogether for something else). So I suggest we fix by having the count reflective of live comments only, not pending ones.
Screenshots
Additional context
The fix here involves moving the create comment trigger into the receive hook ie. after we receive the record back from the relay. We should move all triggers to the receive hook as this makes more sense architecturally.
