Commit graph

391 commits

Author SHA1 Message Date
Andreas Nedbal
b160fa21f6 Re-add accessors for singular answer cases
Otherwise rendering fails
2024-03-19 22:45:19 +01:00
Andreas Nedbal
25cbb962dd Use newer validation syntax for uniqueness in Reaction 2024-03-19 22:45:19 +01:00
Andreas Nedbal
a4a2aba13d Remove old attribute accessors from Answer 2024-03-19 22:45:19 +01:00
Andreas Nedbal
b4cfc95c83 Adjust accessors to pull values from attributes if they exist
This has to be done because using multiple queries in a select statement does not automatically map into an ActiveRecord model and the values we want wait in the `self.attributes` hash.
2024-03-19 22:45:19 +01:00
Andreas Nedbal
536d50f53d Add uniqueness validation to Reactions 2024-03-19 22:45:19 +01:00
Andreas Nedbal
b7e8187cd4 Add max question content limit of 32,768 characters 2024-03-10 21:23:14 +01:00
Andreas Nedbal
020b7db712 Remove ordered_inbox method and related paginator 2024-01-27 20:28:45 +01:00
Andreas Nedbal
62ba205d3e Fix rubocop nits 2024-01-27 19:21:07 +01:00
Andreas Nedbal
658cb0442b Rename all occurences of associative inbox entry access 2024-01-27 19:21:07 +01:00
Andreas Nedbal
ba7ba359b4 Rename user/question associations to :inbox_entries 2024-01-27 19:21:07 +01:00
Andreas Nedbal
06b2421f2c Rename all occurences of Inbox class to InboxEntry 2024-01-27 19:21:07 +01:00
Andreas Nedbal
af9cbcdb11 Rename Inbox model to InboxEntry 2024-01-27 19:21:07 +01:00
Andreas Nedbal
b96651fa70 Disallow author and anonymous inbox filter combination 2024-01-25 22:08:37 +01:00
Andreas Nedbal
134c575e40 Add missing expire times to cache keys 2024-01-25 21:23:02 +01:00
Andreas Nedbal
baa1f3f319 Fix rubocop nits 2024-01-25 20:52:19 +01:00
Andreas Nedbal
fa81ef2ba6 Remove legacy report pagination methods 2024-01-25 20:52:19 +01:00
Andreas Nedbal
311fc0812b Add report filtering capabilities 2024-01-25 20:52:19 +01:00
Andreas Nedbal
5a17466999 Fix rubocop nits 2024-01-24 21:08:44 +01:00
Andreas Nedbal
05634ae69d Move target user resolving code into report method 2024-01-24 21:08:44 +01:00
Andreas Nedbal
27a57e304d Set target user in report action 2024-01-24 21:08:44 +01:00
Andreas Nedbal
ab442db40b Add target user to reports 2024-01-24 21:08:44 +01:00
Andreas Nedbal
63922efb1b Fix rubocop nits 2024-01-22 19:51:06 +01:00
Andreas Nedbal
1ac767902b Add more generic implementation of inbox filtering 2024-01-22 19:51:06 +01:00
Andreas Nedbal
d303b5b18e Use attr_accessor for Answer object properties 2024-01-19 22:06:27 +01:00
Andreas Nedbal
9f823b3dd4 Fix rubocop nits 2024-01-14 16:03:38 +01:00
Andreas Nedbal
8b55b2fe81 Fix anonymous block model associations 2024-01-14 16:03:38 +01:00
Karina Kwiatek
539868173c Fix has_reacted and is_subscribed not being set 2023-12-19 13:45:25 +01:00
Karina Kwiatek
13d69cfd43 Fix render error on answer create 2023-12-09 18:05:50 +01:00
Karina J. Kwiatek
3c7940ae1b
Merge pull request #1482 from Retrospring/task/cache-ban-state
Cache ban state
2023-12-09 01:14:10 +01:00
Andreas Nedbal
93958cb9fd Throw error when unsmile target reaction doesn't exist 2023-12-09 00:59:14 +01:00
Karina Kwiatek
8cab7b0dcc Cache ban state 2023-11-27 22:30:10 +01:00
Karina Kwiatek
8facb44af7 Fix lint errors 2023-11-27 22:14:21 +01:00
Karina Kwiatek
b55e6da9a5 Use subqueries to check reaction/subscription state 2023-11-26 19:32:50 +01:00
Andreas Nedbal
1e29d3f86f Rename Appendable::Reaction to Reaction 2023-10-28 02:44:48 +02:00
Karina Kwiatek
65e802f51d Stop eager loading comments and smiles 2023-10-22 21:51:21 +02:00
Karina Kwiatek
491fb359d2 Ensure user profiles and questions are eager loaded 2023-10-22 19:54:51 +02:00
Georg Gadinger
c4da510fe7 fix deletion of notification entries when deleting a user 2023-10-18 22:13:25 +02:00
Georg Gadinger
a85ce45b25 appease the paw patrol 2023-10-18 21:57:09 +02:00
Georg Gadinger
8a26232fe6 bad dog 2023-10-18 21:53:30 +02:00
Georg Gadinger
dc41f15097 fix deletion of inbox entries when deleting an user 2023-10-18 21:52:47 +02:00
Andreas Nedbal
ffcaa5c4d9 Remove superfluous rubocop:disable comments 2023-10-15 10:42:58 +02:00
Andreas Nedbal
f6e26f1751 Remove superfluous rubocop:disable comments 2023-10-15 10:42:58 +02:00
Andreas Nedbal
f3f8e99045 Use length validation instead of presence for MuteRule 2023-10-15 10:16:21 +02:00
Karina Kwiatek
d39f37072d Fix lint errors 2023-08-18 19:43:59 +02:00
Karina Kwiatek
54ac832c91 Ensure inbox caching timestamp gets updated when answering questions and returning to inbox 2023-08-16 21:57:31 +02:00
Karina Kwiatek
ece64669a1 Update caching timestamps in model events 2023-06-16 18:18:40 +02:00
Karina Kwiatek
f1863e5309 Fix notification created_at not being set for comment notifications 2023-05-26 20:39:19 +02:00
Karina Kwiatek
50531d3b6b Cache notifications dropdown based on notifications_updated_at 2023-05-07 12:47:29 +02:00
Karina Kwiatek
4221f8cee9 Fix incorrect user being notified and mutes not being respected 2023-05-05 16:01:48 +02:00
Karina Kwiatek
9c4b2e452a Prevent error when no one is subscribed 2023-05-05 16:01:40 +02:00