]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/master
authorThibaut Girka <thib@sitedethib.com>
Thu, 19 Dec 2019 12:52:54 +0000 (13:52 +0100)
committerThibaut Girka <thib@sitedethib.com>
Thu, 19 Dec 2019 12:52:54 +0000 (13:52 +0100)
Conflicts:
- `config/locales/en.yml`
  No real conflict, upstream added a translatable string “too close” to
  one specific to glitch-soc
- `lib/mastodon/statuses_cli.rb`
  Fixes made upstream, while changed in glitch-soc to keep bookmarked statuses
- `package.json`
  No real conflict, additional dependency in glitch-soc

19 files changed:
1  2 
Gemfile
Gemfile.lock
app/javascript/core/admin.js
app/javascript/mastodon/features/compose/components/poll_form.js
app/javascript/styles/mastodon/admin.scss
app/javascript/styles/mastodon/components.scss
app/models/form/admin_settings.rb
app/services/backup_service.rb
app/views/admin/reports/show.html.haml
app/views/admin/settings/edit.html.haml
app/views/layouts/admin.html.haml
config/locales/en.yml
config/locales/ja.yml
config/locales/pl.yml
config/settings.yml
db/schema.rb
lib/mastodon/statuses_cli.rb
package.json
yarn.lock

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
Simple merge
index 3398af169d74e0a575c02256e6bfd44f3991f24a,390836f287fae9b79f6f3ae013430d725fc1be5c..84a65686416bef93d071965f9400864dbfd96501
@@@ -16,9 -16,9 +16,10 @@@ class Form::AdminSetting
      open_deletion
      timeline_preview
      show_staff_badge
+     enable_bootstrap_timeline_accounts
      bootstrap_timeline_accounts
 -    theme
 +    flavour
 +    skin
      min_invite_role
      activity_api_enabled
      peers_api_enabled
Simple merge
Simple merge
index c505896e73c2db5622f790942778b1c8f6d10ee8,c7179d304f579a8b09bf2debff14ef9ab6eb7983..43c24fc4e1aaf0e08dcead654eddcc1dabce6c9f
@@@ -453,9 -451,8 +452,11 @@@ en
          users: To logged-in local users
        domain_blocks_rationale:
          title: Show rationale
+       enable_bootstrap_timeline_accounts:
+         title: Enable default follows for new users
 +      enable_keybase:
 +        desc_html: Allow your users to prove their identity via keybase
 +        title: Enable keybase integration
        hero:
          desc_html: Displayed on the frontpage. At least 600x100px recommended. When not set, falls back to server thumbnail
          title: Hero image
Simple merge
Simple merge
Simple merge
diff --cc db/schema.rb
Simple merge
index eeedc026c908216644e5f1f48633aabf83d25f4c,74f15de5f779c332e079d25296f685e1275e706e..875183372649340dbfd6c5392e1e96c53109169f
@@@ -34,18 -35,26 +35,28 @@@ module Mastodo
  
        say('Beginning removal... This might take a while...')
  
-       Status.remote
-             .where('id < ?', max_id)
-             .where(reblog_of_id: nil)                                                                                                                                                                                              # Skip reblogs
-             .where(in_reply_to_id: nil)                                                                                                                                                                                            # Skip replies
-             .where('id NOT IN (SELECT status_pins.status_id FROM status_pins WHERE statuses.id = status_id)')                                                                                                                      # Skip statuses that are pinned on profiles
-             .where('id NOT IN (SELECT mentions.status_id FROM mentions WHERE statuses.id = mentions.status_id AND mentions.account_id IN (SELECT accounts.id FROM accounts WHERE domain IS NULL))')                                # Skip statuses that mention local accounts
-             .where('id NOT IN (SELECT statuses1.in_reply_to_id FROM statuses AS statuses1 WHERE statuses.id = statuses1.in_reply_to_id)')                                                                                          # Skip statuses favourited by local accounts
-             .where('id NOT IN (SELECT bookmarks.status_id FROM bookmarks WHERE statuses.id = bookmarks.status_id)') # Skip statuses bookmarked by local users
-             .where('id NOT IN (SELECT statuses1.reblog_of_id FROM statuses AS statuses1 WHERE statuses.id = statuses1.reblog_of_id AND statuses1.account_id IN (SELECT accounts.id FROM accounts WHERE accounts.domain IS NULL))') # Skip statuses reblogged by local accounts
-             .where('account_id NOT IN (SELECT follows.target_account_id FROM follows WHERE statuses.account_id = follows.target_account_id)')                                                                                      # Skip accounts followed by local accounts
-             .in_batches
-             .delete_all
+       scope = Status.remote.where('id < ?', max_id)
+       # Skip reblogs of local statuses
+       scope = scope.where('reblog_of_id NOT IN (SELECT statuses1.id FROM statuses AS statuses1 WHERE statuses1.id = statuses.reblog_of_id AND (statuses1.uri IS NULL OR statuses1.local))')
+       # Skip statuses that are pinned on profiles
+       scope = scope.where('id NOT IN (SELECT status_pins.status_id FROM status_pins WHERE statuses.id = status_id)')
+       # Skip statuses that mention local accounts
+       scope = scope.where('id NOT IN (SELECT mentions.status_id FROM mentions WHERE statuses.id = mentions.status_id AND mentions.account_id IN (SELECT accounts.id FROM accounts WHERE domain IS NULL))')
+       # Skip statuses which have replies
+       scope = scope.where('id NOT IN (SELECT statuses1.in_reply_to_id FROM statuses AS statuses1 WHERE statuses.id = statuses1.in_reply_to_id)')
+       # Skip statuses reblogged by local accounts or with recent boosts
+       scope = scope.where('id NOT IN (SELECT statuses1.reblog_of_id FROM statuses AS statuses1 WHERE statuses.id = statuses1.reblog_of_id AND (statuses1.uri IS NULL OR statuses1.local OR statuses1.id >= ?))', max_id)
+       # Skip statuses favourited by local users
+       scope = scope.where('id NOT IN (SELECT favourites.status_id FROM favourites WHERE statuses.id = favourites.status_id AND favourites.account_id IN (SELECT accounts.id FROM accounts WHERE domain IS NULL))')
++      # Skip statuses bookmarked by local users
++      scope = scope.where('id NOT IN (SELECT bookmarks.status_id FROM bookmarks WHERE statuses.id = bookmarks.status_id)')
+       unless options[:clean_followed]
+         # Skip accounts followed by local accounts
+         scope = scope.where('account_id NOT IN (SELECT follows.target_account_id FROM follows WHERE statuses.account_id = follows.target_account_id)')
+       end
+       scope.in_batches.delete_all
  
        say('Beginning removal of now-orphaned media attachments to free up disk space...')
  
diff --cc package.json
index 7c364d647cbc24f5abd7b704f3782a2168e51b32,4f1cec6360b80f74e1a0e9323765e9eb7d1ec043..6c059b7a55dbcd38cc1ee3d949187296c90d3e39
@@@ -70,8 -69,7 +70,8 @@@
      "@babel/runtime": "^7.7.6",
      "@gamestdio/websocket": "^0.3.2",
      "@clusterws/cws": "^0.16.0",
-     "array-includes": "^3.0.3",
+     "array-includes": "^3.1.0",
 +    "atrament": "^0.2.3",
      "arrow-key-navigation": "^1.1.0",
      "autoprefixer": "^9.7.3",
      "axios": "^0.19.0",
diff --cc yarn.lock
Simple merge