Commit graph

1700 commits

Author SHA1 Message Date
Claire 4ef0b48b95
Add in-app notifications for moderation actions/warnings () 2024-04-25 17:26:05 +00:00
Matt Jankowski f4a53f3fb4
Extract constants for column size length validation limits () 2024-04-24 08:56:28 +00:00
Matt Jankowski 11e0049b08
Use enum-generated scopes/queries for BulkImport () 2024-04-18 10:13:35 +00:00
Matt Jankowski 650c548c31
Add not_featured_by scope to Tag () 2024-04-17 10:05:38 +00:00
Claire fc89ecc6ca
Change /api/v1/announcements to return regular Status entities () 2024-04-17 09:06:23 +00:00
Matt Jankowski 6fed108703
Use Rails upsert to generate update_count! query in Counters concern ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-04-17 08:16:51 +00:00
Matt Jankowski caad1e2628
Add scope Status.distributable_visibility () 2024-04-16 13:16:54 +00:00
Matt Jankowski 6b33d3f81b
Add CustomFilter.unexpired scope () 2024-04-16 09:29:34 +00:00
Matt Jankowski 3159c0a547
Add scope Status.list_eligible_visibility () 2024-04-16 09:17:03 +00:00
Matt Jankowski 13bbde2246
Use existing DEFAULT_FIELDS_SIZE constant to limit Account#fields () 2024-04-12 09:04:23 +00:00
Matt Jankowski 285f63c02e
Use composable query in User.active scope () 2024-04-08 13:53:49 +00:00
Claire babbf6017d
Remove caching in cache_collection () 2024-04-08 13:46:13 +00:00
Matt Jankowski c0fe8a9f13
Extract shared callback behaviour to CustomFilterCache concern () 2024-04-05 09:17:58 +00:00
Claire 38b9d31f63
Improve email address validation () 2024-04-05 07:48:45 +00:00
Matt Jankowski f56309f5f0
Add by_latest_used scope, move admin area recent IPs to partial () 2024-04-02 13:51:34 +00:00
Matt Jankowski b016f03637
Pull out constant from AccountWarning.recent scope () 2024-03-27 14:08:04 +00:00
Matt Jankowski 1d0a43f6a3
Use composable query in Status.not_domain_blocked_by_account scope () 2024-03-27 09:59:45 +00:00
Matt Jankowski 32938dadd7
Add not_allowed scope for PreviewCardTrend () 2024-03-26 13:21:20 +00:00
Matt Jankowski cf76380c91
Add AccountStat.by_recent_status, use in Account () 2024-03-26 13:12:09 +00:00
Emelia Smith eb926b7e60
Ensure case-insensitive fields are converted to lowercase in user imports () 2024-03-26 09:30:10 +00:00
Emelia Smith a3e8b78250
Ensure case-insensitive fields are converted to lowercase in Admin Imports () 2024-03-26 09:30:07 +00:00
Claire 37ca59815c
Remove setting for unfollow confirmation modal, and make it unconditional () 2024-03-22 16:24:04 +00:00
Claire 58376eedda
Remove obsolete admin and moderator columns from users table () 2024-03-22 16:22:36 +00:00
Claire d71d26a3c9
Reattribute notification-related records if possible when merging accounts () 2024-03-22 16:21:53 +00:00
Claire dfa43707eb
Change AccountRelationshipSeveranceEvent model to store lost followers and following counts separately () 2024-03-22 15:44:31 +00:00
Matt Jankowski 8c1d29df7e
Use has_many through instead of delegate for ARSE<>SR () 2024-03-22 14:43:35 +00:00
Matt Jankowski 77897cd24c
Use existing SeveredRelationship.about_local_account scope in more places () 2024-03-21 08:36:49 +00:00
Matt Jankowski cdd168f5d3
Update enum away from deprecated () 2024-03-21 08:32:35 +00:00
Claire f4d753aedf
Fix error in severed relationship event serializer () 2024-03-20 17:14:53 +00:00
Claire 98a2bb8be2
Fix issue with severed relationships notifications () 2024-03-20 17:02:09 +00:00
Claire 954b470fbc
Fix error when attempting to delete posts that triggered a notification request () 2024-03-20 16:48:24 +00:00
Claire d4449cc682
Fix account_relationship_severance_events unique indexes () 2024-03-20 16:08:34 +00:00
Claire 44bf7b8128
Add notifications of severed relationships () 2024-03-20 15:37:21 +00:00
Claire 8a1423a474
Allow unblocking email addresses from any matching account () 2024-03-20 14:38:00 +00:00
Matt Jankowski 62e266fbd6
Add BrowserDetection model concern () 2024-03-19 15:39:14 +00:00
Claire d5063072c3
Revert friends-of-friends follow recommendation query to using a CTE () 2024-03-18 12:57:21 +00:00
Matt Jankowski 838b0bdf2d
Remove unused Account::Interactions#endorsed? method () 2024-03-15 09:00:26 +00:00
Matt Jankowski 6c3e718b86
Remove setting of sensitive value (default false, not null) in Status model () 2024-03-14 13:56:59 +00:00
Matt Jankowski 14aa7f1e15
Use Account.activitypub generated scope () 2024-03-14 13:19:20 +00:00
Matt Jankowski 0bc17a3d48
Use enum-generated public_visibility scope on Status () 2024-03-14 09:31:57 +00:00
Matt Jankowski 19cbadfbd6
Use enum-generated scope for IpBlock in CLI () 2024-03-14 09:31:15 +00:00
Matt Jankowski c09b8a7164
Add Account.without_internal scope ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-03-13 14:11:23 +00:00
Claire b43eaa4517
Refactor notification filtering behavior definition () 2024-03-13 10:35:49 +00:00
Matt Jankowski 01b624c4a0
Use normalizes on CustomFilter#context value () 2024-03-13 08:50:21 +00:00
Matt Jankowski d4ed7e466c
Extract by_domain_length scope in DomainNormalizable concern () 2024-03-12 13:09:11 +00:00
Matt Jankowski 216cea1e27
Fix incorrect frequency value in FriendsOfFriendsSource data () 2024-03-12 08:38:32 +00:00
Eugen Rochko c10bbf5fe3
Add notification policies and notification requests in web UI () 2024-03-11 15:02:21 +00:00
Jeong Arm 4a6ddbc9c0
Normalize idna domain before account unblock domain () 2024-03-11 09:28:08 +00:00
Eugen Rochko 5b3a8737d6
Add hints for rules () 2024-03-11 08:57:07 +00:00
Eugen Rochko 50b17f7e10
Add notification policies and notification requests () 2024-03-07 14:53:37 +00:00
Claire ee8d0b9447
Fix follow suggestions potentially including silenced or blocked accounts () 2024-03-04 06:35:20 +00:00
HTeuMeuLeu 934cab7508
New welcome email ()
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2024-03-01 12:16:53 +00:00
Matt Jankowski 3389c41b58
Move nobody position in UserRole magic number to constant () 2024-03-01 11:05:24 +00:00
Matt Jankowski 8429d07454
Add RankedTrend concern for trends classes () 2024-02-26 13:45:39 +00:00
Matt Jankowski 0ef44ee720
Move AccountSuggestions::Source subclasses default limit value to constant () 2024-02-20 09:21:49 +00:00
Matt Jankowski 785e2f9399
Add scope providing_styles to UserRole () 2024-02-20 09:18:05 +00:00
Matt Jankowski 245064bb98
Move "everyone" role and "instance actor" account magic number IDs to constants () 2024-02-19 11:09:43 +00:00
Wolfgang Fournès cfadb87077
Update enum syntax to use the new Rails 7.0 style () 2024-02-16 14:54:23 +00:00
Claire b31af34c97
Merge pull request from GHSA-vm39-j3vx-pch3
* Prevent different identities from a same SSO provider from accessing a same account

* Lock auth provider changes behind `ALLOW_UNSAFE_AUTH_PROVIDER_REATTACH=true`

* Rename methods to avoid confusion between OAuth and OmniAuth
2024-02-14 15:16:07 +01:00
Emelia Smith 68eaa804c9
Merge pull request from GHSA-7w3c-p9j8-mq3x
* Ensure destruction of OAuth Applications notifies streaming

Due to doorkeeper using a dependent: delete_all relationship, the destroy of an OAuth Application bypassed the existing AccessTokenExtension callbacks for announcing destructing of access tokens.

* Ensure password resets revoke access to Streaming API

* Improve performance of deleting OAuth tokens

---------

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-02-14 15:15:34 +01:00
Emelia Smith e8b66a0525
Ignore legacy moderator and admin columns on User model () 2024-02-13 17:14:49 +00:00
Claire 7ee93b7431
Change source attribute of Suggestion entity in /api/v2/suggestions back to a string () 2024-02-06 17:10:17 +00:00
Claire 66dda7c762
Fix already-invalid reports failing to resolve () 2024-02-06 09:35:27 +00:00
Matt Jankowski 86500e3312
Extract scenic view model common methods to concern () 2024-02-06 09:08:07 +00:00
Eugen Rochko fa0ba67753
Change materialized views to be refreshed concurrently to avoid locks () 2024-01-30 18:21:30 +00:00
Eugen Rochko c4af668e5c
Fix follow recommendations for less used languages () 2024-01-30 17:24:40 +00:00
Matt Jankowski 42ab855b23
Add specs for Instance model scopes and add with_domain_follows scope () 2024-01-25 15:28:27 +00:00
Matt Jankowski 6b6586f5d0
Add CustomFilterKeyword#to_regex method () 2024-01-25 13:00:34 +00:00
Matt Jankowski 38f7f8b909
Tidy up association declaration in Instance model () 2024-01-24 17:30:28 +00:00
Matt Jankowski 7a1f087659
Add created_before and updated_before scopes to MediaAttachment () 2024-01-24 10:32:54 +00:00
Matt Jankowski 9d413cbaf8
Fix Rails/WhereExists cop in app/models () 2024-01-24 09:57:49 +00:00
Matt Jankowski 599bc69503
Simplify AccountSummary.filtered query generation () 2024-01-24 09:57:32 +00:00
Eugen Rochko 5b1eb09d54
Add annual reports for accounts () 2024-01-24 09:38:10 +00:00
Matt Jankowski c0e8e457ab
Eager loading fixes for api/ controllers () 2024-01-23 11:41:54 +00:00
Matt Jankowski b0207d7757
Add coverage for Tag.recently_used scope () 2024-01-23 09:10:11 +00:00
Matt Jankowski 18004bf227
Add Account.matches_uri_prefix scope and use in activitypub/followers_synchronizations controller () 2024-01-22 13:55:37 +00:00
Matt Jankowski 5fc4ae7c5f
Move privacy policy into markdown file () 2024-01-19 11:22:23 +00:00
Matt Jankowski 1480573c83
Add Account.auditable scope, fix N+1 in admin/action_logs#index () 2024-01-19 01:39:30 +00:00
Matt Jankowski f866413e72
Extract shared tagged statuses method in FeaturedTag () 2024-01-18 16:14:15 +00:00
Matt Jankowski d0b3bc23d7
Remove unused matches_domain scopes on Account, DomainAllow, DomainBlock () 2024-01-18 16:11:04 +00:00
Matt Jankowski 0b853678a4
Add coverage for api/v1/peers/search endpoint and extract controller query to Instance scope () 2024-01-18 15:57:10 +00:00
Matt Jankowski 9fb9ef418a
Fix Rails/WhereExists cop in User model () 2024-01-18 13:55:44 +00:00
Matt Jankowski aaa6f2e930
Group common class_name options in associations () 2024-01-18 12:29:41 +00:00
Matt Jankowski da31792ac7
Fix Rails/WhereExists cop in FeaturedTag model () 2024-01-18 12:22:12 +00:00
Matt Jankowski 89c9a4502d
Fix Rails/WhereExists cop in account/interactions concern () 2024-01-18 09:36:16 +00:00
Matt Jankowski 1b0cb3b54d
Announcement reactions query spec improvement and refactor () 2024-01-17 09:18:13 +00:00
Claire 98b5f85f10
Rename and refactor User#confirm! to User#mark_email_as_confirmed! () 2024-01-15 18:04:58 +00:00
Claire e621c1c44c
Fix registrations not checking MX records for email domain blocks requiring approval () 2024-01-15 17:10:57 +00:00
Matt Jankowski a2f02a0775
Disable Rails/SkipsModelValidations cop () 2024-01-15 13:46:47 +00:00
Claire 8cb4825c8b
Fix sign-up restrictions based on email addresses not being enforced () 2024-01-15 11:06:48 +00:00
Matt Jankowski a90c134850
Move followable by logic to suggestion class () 2024-01-12 13:09:33 +00:00
Matt Jankowski 543d7890fd
Use normalizes to prepare User values ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-01-10 13:36:06 +00:00
Claire 10203bd57a
Clean up Setting model and remove dead code () 2024-01-09 14:01:53 +00:00
Jean Boussier 1781849884
Inline what remains of the rails-settings-cached gem ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-01-09 11:50:21 +00:00
Matt Jankowski cd4b4d4734
Replace unused by_recent_sign_in scope () 2024-01-08 15:31:13 +00:00
Matt Jankowski e677eb164c
Remove unused Announcement#time_range? () 2024-01-08 15:26:30 +00:00
Matt Jankowski 3e43cd095c
Remove unused scope Announcement.without_muted () 2024-01-08 15:26:14 +00:00
Matt Jankowski 9322396e58
Use normalizes to prepare Account#username value () 2024-01-08 13:48:31 +00:00
Matt Jankowski cd58e37b25
Remove unused DomainBlock#affected_accounts_count method () 2024-01-08 13:38:52 +00:00
Matt Jankowski 4ccba94489
Remove unused *_silenced_accounts scopes on Status () 2024-01-08 13:35:53 +00:00
Matt Jankowski c52a593a30
Remove unused scope User.emailable () 2024-01-08 13:33:45 +00:00
Matt Jankowski e827c4692c
Use Arel matches method in CustomEmoji search () 2024-01-08 13:26:12 +00:00
Matt Jankowski 1bc5a52139
Extract SQL heredoc method for Announcement scopes () 2024-01-08 11:22:16 +00:00
Matt Jankowski aa6d07dbd9
Use normalizes to prepare CustomEmoji domain value () 2024-01-08 11:20:59 +00:00
Matt Jankowski 202951e6d9
Use Arel in_order_of method to generate CASE for DomainBlock.by_severity () 2024-01-08 11:15:36 +00:00
Matt Jankowski 57f49c8191
Use Arel nulls_first method in ordering CustomEmojiFilter scope () 2024-01-08 11:09:50 +00:00
Jean Boussier 5a6d533c53
Enable Rails 7.1 Marshalling format () 2024-01-05 21:57:47 +00:00
Matt Jankowski 12bed81187
Add validation specs to CustomFilter model () 2024-01-05 15:13:59 +00:00
Claire dfdadb92e8
Add ability to require approval when users sign up using specific email domains () 2024-01-04 09:07:05 +00:00
Michael Stanclift 195b89d336
Fix .opus file uploads being misidentified by Paperclip () 2024-01-03 19:02:53 +00:00
Claire fcfdeadc04
Fix random NoMethodError errors on cached CustomFilter objects () 2023-12-29 16:23:07 +00:00
Matt Jankowski ba5f659bb3
Use shorter attribute query methods in Announcement () 2023-12-29 10:55:50 +00:00
Matt Jankowski 128c5b7db3
Fix Performance/StringIdentifierArgument cop () 2023-12-29 10:23:30 +00:00
Claire 2bf84b93d4
Fix media attachment order of remote posts () 2023-12-22 15:10:39 +00:00
Claire d29b1cca2e
Fix friends_of_friends sometimes suggesting already-followed accounts () 2023-12-20 14:35:59 +00:00
Eugen Rochko b5ac61b2c5
Change algorithm of follow recommendations ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-12-19 10:59:43 +00:00
Claire 7d9b209fe8
Fix call to inefficient delete_matched cache method in domain blocks () 2023-12-18 16:14:43 +00:00
Matt Jankowski 1820bad646
Fix Performance/StringIdentifierArgument cop () 2023-12-18 10:26:09 +00:00
Matt Jankowski 0e5b8fc46b
Fix Style/RedundantReturn cop () 2023-12-18 09:50:51 +00:00
Matt Jankowski b1dec09d20
Fix Style/InverseMethods cop () 2023-12-15 15:52:00 +00:00
Claire dcc24db793
Fix N+1s because of association preloaders not actually getting called () 2023-12-13 07:47:32 +00:00
Matt Jankowski 3918dc68c7
Use composite primary key for PreviewCardsStatus model () 2023-12-07 14:49:05 +00:00
Matt Jankowski 5631f139c1
Fix Lint/SymbolConversion cop () 2023-12-01 15:53:35 +00:00
Matt Jankowski d83d01eb1e
Fix Lint/RedundantSafeNavigation cop () 2023-12-01 15:52:56 +00:00
Matt Jankowski f70f39dd04
Add explicit dependent: nil to associations () 2023-12-01 15:52:47 +00:00
Matt Jankowski 440b80b2e7
Model concerns organization into module namespaces () 2023-12-01 11:00:41 +00:00
Claire 963354978a
Add Account#unavailable? and Account#permanently_unavailable? aliases () 2023-11-30 15:43:26 +00:00
Matt Jankowski bb0efe16e6
Remove default_scope from MediaAttachment class () 2023-11-30 13:30:35 +00:00
Matt Jankowski e48ecd2929
Remove default_scope from Admin::ActionLog () 2023-11-29 10:39:59 +00:00
Matt Jankowski 186895fc88
Refactor, lint fix, and bug fix on admin/roles/form partial () 2023-11-29 10:00:52 +00:00
Claire 3a24754229
Change GIF max matrix size error to explicitly mention GIF files () 2023-11-24 09:31:28 +00:00
Matt Jankowski 4be12791e6
Remove default_scope from StatusEdit class () 2023-11-23 09:26:11 +00:00
Eugen Rochko cdc57c74b7
Fix unsupported time zone or locale preventing sign-up ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-11-22 11:38:07 +00:00
Matt Jankowski d2aacea8da
Reduce .times usage in AccountSearch spec, use constant for default limit () 2023-11-20 09:08:22 +00:00
ppnplus 2b038b4f89
Added Thai diacritics and tone marks in HASHTAG_INVALID_CHARS_RE () 2023-11-14 15:33:59 +00:00
Matt Jankowski b7807f3d84
Use normalizes to prepare Webhook#events value () 2023-11-13 22:47:44 +00:00
Eugen Rochko 0d14fcebae
Change link previews to keep original URL from the status () 2023-11-13 09:58:28 +00:00
Matt Jankowski 45770c9306
Fix Performance/MapMethodChain cop () 2023-11-07 13:01:09 +00:00
Matt Jankowski bbad5b6456
Remove false positive cop detection () 2023-11-07 10:44:15 +00:00
Claire 6c52f8286b
Fix posts from force-sensitized accounts being able to trend () 2023-10-30 22:32:25 +00:00
Claire 93e4cdc31b
Fix hashtag matching pattern matching some URLs () 2023-10-27 14:04:51 +00:00
Matt Jankowski 12550a6a28
Use Rails.env.local? shorthand method to check env () 2023-10-26 21:20:41 +00:00
Matt Jankowski 714e3ae5b5
Use Rails 7.1 normalizes feature () 2023-10-24 10:06:10 +00:00
Matt Jankowski e93a75f1a1
Rails 7.1 update () 2023-10-23 17:58:29 +00:00
Claire 8b770ce811
Add warnings to report action logs () 2023-10-23 14:30:46 +02:00
Claire bcae744275
Fix some link anchors being recognized as hashtags () 2023-10-23 14:19:38 +02:00
Matt Jankowski b0213472df
Validate allowed schemes on preview card URLs () 2023-10-23 09:50:02 +02:00
Matt Jankowski 63a2a4b074
Fix Performance/DeletePrefix cop () 2023-10-18 10:32:09 +02:00
Matt Jankowski 08a376cbcb
Fix Style/CombinableLoops cop () 2023-10-16 16:36:28 +02:00
Claire 340c390849
Fix crash when filtering for “dormant” relationships () 2023-10-06 12:58:16 +02:00