fix(events): decrement the live like count on un-like #112
No reviewers
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/events-like-count-unlike"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #111. The live like count incremented in real time but un-likes didn't decrement until reload (observed: Bob removes his heart, Alice's count stays).
Cause: the subscription only watched bookmark lists by
#a:[coord]. When someone removes the event, their new (replaceable kind-10003) list no longer contains the coord, so it stops matching the filter and never arrives.Fix: also watch known likers by
authors, and track each author's current set of liked coords — diffing previous vs current on every update so a dropped coord removes that author from the count live.#afilter → discovers new likers.authorsfilter → catches add and remove from anyone already counted (incl. their last un-like).Verified end-to-end against a relay: count
5 → 6on a like, then6 → 5on the same key's updated list with the coord dropped — no reload.🤖 Generated with Claude Code