A reaction toggled twice at once is a no-op, not a 500

FixMediaService
Shipped
August 27, 2026 at 1:59 AM UTC
Author
kamo
Commit
3b3284f

setReaction read, then saved, then caught the constraint violation the read was supposed to prevent — which does not work: the violation surfaces at flush, after the catch, on a transaction that is already rollback-only. Two devices reacting with the same emoji at the same instant would have answered 500 and rolled the reaction back. It now goes through the shared library's ON CONFLICT DO NOTHING upsert, so the second write is a no-op and both callers get the state they asked for.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing