Commit graph

367 commits

Author SHA1 Message Date
Andreas Nedbal
490a06af27 Allow sharing_custom_url to be empty 2023-02-05 21:54:51 +01:00
Andreas Nedbal
47d1f5ccff Validate format of sharing_custom_url 2023-02-05 21:54:51 +01:00
Andreas Nedbal
a56db2256b Return sharing options when answering a question 2023-02-05 21:54:51 +01:00
Andreas Nedbal
d520755bc2 Remove service model 2023-02-05 21:54:51 +01:00
Andreas Nedbal
a2e45c85bf Add migration to enable sharing for legacy service owners 2023-02-05 21:54:51 +01:00
Karina Kwiatek
40f7f8f525 Eager load notification targets 2023-02-02 11:03:27 +01:00
Karina Kwiatek
ab1b034cfb Add type hints for paginators 2023-01-28 21:18:01 +01:00
Karina Kwiatek
32ba17ac72 Eager load profiles in paginators 2023-01-28 21:18:00 +01:00
Andreas Nedbal
c122652275 Increase allowed comment length to 512 characters 2023-01-22 10:36:23 +01:00
Andreas Nedbal
fc30bf8cac Add more explicit message for format validation errors 2023-01-21 13:20:52 +01:00
Andreas Nedbal
47bccdb0c3 Fix screen_name regex being too lenient 2023-01-21 13:20:52 +01:00
Andreas Nedbal
b72e679a62 Split format and length validation for User screen_name 2023-01-21 13:20:52 +01:00
Karina Kwiatek
3dbbed3ef2 Shorten question text in notifications to short question length 2023-01-13 17:30:37 +01:00
Andreas Nedbal
b66c2b1f36 add long? method and constant to Answer model 2023-01-12 21:03:44 +01:00
Karina Kwiatek
7cdb0e4976 Respect long question setting in frontend 2023-01-08 17:12:46 +01:00
Karina Kwiatek
3a6814b908 Respect allow long questions setting 2023-01-08 14:03:54 +01:00
Karina Kwiatek
e0195654b5 Send notification on 3 push failures 2023-01-02 11:52:00 +01:00
Karina Kwiatek
1cfd3250c0 Track failures on Web Push subscriptions 2023-01-02 11:51:46 +01:00
Karina Kwiatek
22a84ab818 Appease the dog overlords 2023-01-02 11:51:45 +01:00
Karina Kwiatek
2d6f539dfd Use author avatar on notification 2023-01-02 11:50:48 +01:00
Karina Kwiatek
a67c26d985 Fix missing anon names from notification text 2023-01-02 11:50:48 +01:00
Karina Kwiatek
89008364d9 Handle push notifications in Sidekiq job 2023-01-02 11:50:48 +01:00
Karina Kwiatek
185c454da0 Fix incorrect author relationship name 2023-01-02 11:50:48 +01:00
Karina Kwiatek
8c2bfcb452 Use JSON for notification payload 2023-01-02 11:50:48 +01:00
Karina Kwiatek
a04b290067 Appease the dog overlords 2023-01-02 11:50:47 +01:00
Karina Kwiatek
93d4af3f0d Deduplicate notification sending logic and replace placeholder string 2023-01-02 11:50:47 +01:00
Karina Kwiatek
32ab9267ec Add web push subscription model 2023-01-02 11:50:47 +01:00
Karina Kwiatek
4c158066cb Clean up User model 2023-01-02 11:31:27 +01:00
Karina Kwiatek
9d1e77aeba Revoke Twitter connection when the token is revoked 2023-01-01 23:46:10 +01:00
Andreas Nedbal
9b5470cfd3 Appease the dog overlords 2023-01-01 22:43:24 +01:00
Andreas Nedbal
7b0a615193 Validate uniqueness of answers for questions 2023-01-01 22:43:24 +01:00
Andreas Nedbal
6700a52ad1 Remove superfluous require 2023-01-01 22:42:50 +01:00
Andreas Nedbal
6a03d3587a Appease the dog overlords 2023-01-01 22:42:50 +01:00
Andreas Nedbal
55c473e0f5 don't create notifications from muted user 2023-01-01 22:42:50 +01:00
Andreas Nedbal
2a7a17a4c3 wip: don't create notifications from a muted user 2023-01-01 22:42:50 +01:00
Andreas Nedbal
361b8df798 Add mute relationship and user methods 2023-01-01 22:42:50 +01:00
Georg Gadinger
fb07eda972 remove errors 2022-12-29 20:57:28 +01:00
Andreas Nedbal
e7f60acad5 Add target_user field to anonymous blocks 2022-12-28 00:10:59 +01:00
Andreas Nedbal
5a0e42fe66 use has_cached_role? instead of has_role? 2022-12-18 21:47:03 +01:00
Georg Gadinger
e1bdb1324f make the export worker create a *real* notification and add specs for it 2022-12-10 04:25:08 +01:00
Andreas Nedbal
41c43538b5 Fix lints 2022-11-21 20:26:19 +01:00
Karina Kwiatek
40d5dc41dd Ensure mute rules cannot be empty 2022-11-21 20:26:19 +01:00
Andreas Nedbal
049f92e138 Add inbox locking setting to user 2022-11-06 14:59:56 +01:00
Andreas Nedbal
56a1c70fae add admin? shorthand to users 2022-08-21 15:02:49 +02:00
Karina Kwiatek
ae5d8931af Implement frontend for blocking users site-wide 2022-08-20 19:03:05 +02:00
Karina Kwiatek
0bbb435858 Allow anonymous blocks without an owner 2022-08-20 19:02:37 +02:00
Andreas Nedbal
bdb637047b Omit hash value in question methods 2022-07-24 22:27:15 +02:00
Andreas Nedbal
4f4e6c83a1 Do not decrement the question count if the question is direct 2022-07-24 22:25:13 +02:00
Andreas Nedbal
83dbd5d2e3 Don't list direct questions on user profiles 2022-07-24 21:56:03 +02:00
Georg Gadinger
66efa5d4f4 clean up routes
- replace `match` with `get`/`post`/`patch`/`delete`
- format routes.rb
- rename the `show_user_{profile,question,answer}` routes to
  `profile`, `question`, `answer` so `url_for` (used by Rails Admin)
  works fine for these things
- also add `to_param` to the `User` model so that `url_for(some_user)`
  uses the user name
2022-07-23 12:14:06 +02:00
Karina Kwiatek
81b73d5196 Replace options hash with keyword arguments 2022-07-22 16:52:42 +02:00
Karina Kwiatek
b534dc0bb8 Fix CommentSmile notification type not being returned 2022-07-22 16:52:42 +02:00
Karina Kwiatek
6089c57a20 Appease the dog overlords 2022-07-22 16:52:42 +02:00
Karina Kwiatek
691f72d0ce Set notification type for reactions based on what the reaction is attached to 2022-07-22 16:52:42 +02:00
Karina Kwiatek
0992d44aef Filter notifications by target type 2022-07-22 16:52:42 +02:00
Karina Kwiatek
f475cd0a0b Make notifications relation polymorphic 2022-07-22 16:52:42 +02:00
Andreas Nedbal
cbd9106a87 Remove ModerationComment model, relations and methods 2022-07-19 11:17:45 +02:00
Andreas Nedbal
e283648ce0 Remove ModerationVote model, relations and methods 2022-07-18 23:10:07 +02:00
Karina Kwiatek
4f88b82361 Use null-safe navigation for denotify 2022-07-17 21:21:37 +02:00
Karina Kwiatek
5d542161a0 Add tests for question create use case 2022-07-17 10:05:20 +02:00
Karina Kwiatek
d9ff4d5765 Refactor Ajax::QuestionController#create into separate UseCases
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
2022-07-17 10:05:20 +02:00
Andreas Nedbal
47120e8d24 Appease the dog overlords 2022-07-17 09:40:34 +02:00
Andreas Nedbal
a3f80380dd Adjust validations for List 2022-07-17 09:40:34 +02:00
Karina Kwiatek
8005fc8ae6 Skip denotify if recipient doesn't exist 2022-07-16 21:29:20 +02:00
Karina Kwiatek
28240bba27 Properly match notification type 2022-07-09 01:15:31 +02:00
Karina Kwiatek
8a6a9c21ec Appease the dog overlords
These counters are legacy and will later be removed.
2022-07-06 20:58:53 +02:00
Karina Kwiatek
539505eccd Ensure counters only get updated if the record exists 2022-07-06 20:58:53 +02:00
Karina Kwiatek
e2462b1e51 Correct lint errors
(only on lines affected in this PR)
2022-07-06 20:58:53 +02:00
Karina Kwiatek
e7112f0244 Use dependent: :destroy_async instead of DeletionWorker 2022-07-06 20:58:53 +02:00
Karina Kwiatek
0db369a9ae Remove comment_smiles relationship from users 2022-07-06 20:48:50 +02:00
Karina Kwiatek
c0dbc7d501 Always denotify when deleting reactions 2022-07-06 20:43:01 +02:00
Karina Kwiatek
9bcf1a80ad Merge author_name with author_identifier 2022-07-06 19:56:04 +02:00
Karina Kwiatek
561946cab9 Fix issues from bad rebase 2022-07-05 23:23:37 +02:00
Karina Kwiatek
22ec4db349 Remove Smile & CommentSmile 2022-07-05 23:23:37 +02:00
Karina Kwiatek
08e5764bf3 Appease the dog overlords 2022-07-05 23:23:37 +02:00
Karina Kwiatek
5ba3fed56c Replace usage of answer in before_destroy of Reaction with parent 2022-07-05 23:23:37 +02:00
Karina Kwiatek
f9ec11a616 Use .class.name for target_type in Notification#make_notification 2022-07-05 23:23:37 +02:00
Karina Kwiatek
0cfe5ee964 Replace usages of smiles with reaction appendables 2022-07-05 23:23:37 +02:00
Karina Kwiatek
5f0a546353 Refactor smiling answers to using reactions 2022-07-05 23:23:37 +02:00
Karina Kwiatek
1e53f00032 Add migration for converting smiles to reaction appendable 2022-07-05 23:23:37 +02:00
Karina Kwiatek
544e9c8fa6 Create Appendable model 2022-07-05 23:23:37 +02:00
Karina Kwiatek
32865b528d Highlight current ban 2022-07-02 17:08:44 +02:00
Karina Kwiatek
a857887398 Appease the dog overlords 2022-06-26 18:32:18 +02:00
Karina Kwiatek
53361eefdd Move ban-related user methods to own module 2022-06-26 18:32:18 +02:00
Karina Kwiatek
59c4507ec3 Remove unused use case requires from User model 2022-06-26 18:32:18 +02:00
Karina Kwiatek
73274988c1 Add permanently_banned? method to user model 2022-06-26 18:32:18 +02:00
Karina Kwiatek
34c747ebf7 Appease the dog overlords 2022-06-26 18:32:18 +02:00
Karina Kwiatek
3247d1c746 Move ban invalidation to User#unban method 2022-06-26 18:32:18 +02:00
Karina Kwiatek
0c6d79ce0b Add permanent? method to UserBan 2022-06-26 18:32:18 +02:00
Karina Kwiatek
94aec26588 Move ban creation to User#ban method 2022-06-26 18:32:18 +02:00
Karina Kwiatek
483c413796 Remove unused user relationship paginators 2022-06-18 17:50:41 +02:00
Karina Kwiatek
e404b61ec1 Sort relationship lists by relationship IDs rather than user IDs 2022-06-18 17:50:41 +02:00
Karina Kwiatek
cca8795b01 Allow anonymous questions to be returned when the user has disabled anonymous questions
Fixes #267
2022-06-15 17:49:04 +02:00
Karina Kwiatek
e660b731d7 Appease the dog overlords 2022-06-15 14:26:48 +02:00
Karina Kwiatek
4e80b4f9ab Prevent anon questions from being sent while blocked 2022-06-15 14:26:48 +02:00
Karina Kwiatek
1e6243c6ce Create AnonymousBlock model 2022-06-15 14:26:48 +02:00
Karina Kwiatek
b657894576 Prevent errors in User#answer when asking anonymous questions 2022-06-13 19:32:00 +02:00
Karina Kwiatek
14e84fd47c Prevent errors when asking anonymous questions 2022-06-13 16:12:06 +02:00
Karina Kwiatek
e64d4f3ca7 Prevent blocked users from reacting on comments 2022-06-13 11:56:34 +02:00
Karina Kwiatek
04243c2ec8 Appease the dog overlords 2022-06-13 11:56:34 +02:00