Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
74 stars 32 forks source link

Fix incorrect notification counts (#233) #236

Closed happy-river closed 4 years ago

happy-river commented 4 years ago

The joins in load_user were producing multiple rows with duplicate Notification.ids and then, fn.Count was counting total rows not unique rows, leading to the multiplication effect. Fix by counting with nested selects instead of joins.