diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-06 09:50:41 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-11-06 09:50:41 +0100 |
commit | 0ad919b19257b7d8eb447f7955030927d26cdbe6 (patch) | |
tree | d78bd5ba447da166bb7d97a3df3e6d97902a5cdb /lib | |
parent | 2f8fb49d1314db931385089bc9004a48700161ad (diff) | |
parent | 5187e4e758b0636432d984d1a95a310cac536205 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/mastodon/features/compose/components/poll_form.js`: glitch-soc change because of having changed the default number of available poll options. Applied upstream's changes while keeping glitch-soc's default number of poll options. - `public/oops.png`: We had a minor graphics change, probably not worth diverging from upstream. Took upstream version.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/assets/wordmark.dark.png | bin | 8991 -> 6753 bytes | |||
-rw-r--r-- | lib/assets/wordmark.light.png | bin | 8625 -> 6613 bytes | |||
-rw-r--r-- | lib/mastodon/version.rb | 2 | ||||
-rw-r--r-- | lib/tasks/emojis.rake | 4 | ||||
-rw-r--r-- | lib/tasks/mastodon.rake | 5 | ||||
-rw-r--r-- | lib/tasks/tests.rake | 51 |
6 files changed, 50 insertions, 12 deletions
diff --git a/lib/assets/wordmark.dark.png b/lib/assets/wordmark.dark.png index defe50178..6772b3318 100644 --- a/lib/assets/wordmark.dark.png +++ b/lib/assets/wordmark.dark.png Binary files differdiff --git a/lib/assets/wordmark.light.png b/lib/assets/wordmark.light.png index d4485c0fb..6d95088a4 100644 --- a/lib/assets/wordmark.light.png +++ b/lib/assets/wordmark.light.png Binary files differdiff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index b854b7c31..b11eb5519 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -17,7 +17,7 @@ module Mastodon end def flags - 'rc1' + 'rc2' end def suffix diff --git a/lib/tasks/emojis.rake b/lib/tasks/emojis.rake index d9db79940..473aee9cc 100644 --- a/lib/tasks/emojis.rake +++ b/lib/tasks/emojis.rake @@ -45,7 +45,7 @@ end namespace :emojis do desc 'Generate a unicode to filename mapping' task :generate do - source = 'http://www.unicode.org/Public/emoji/13.1/emoji-test.txt' + source = 'http://www.unicode.org/Public/emoji/14.0/emoji-test.txt' codes = [] dest = Rails.root.join('app', 'javascript', 'mastodon', 'features', 'emoji', 'emoji_map.json') @@ -69,7 +69,7 @@ namespace :emojis do end end - existence_maps = grouped_codes.map { |c| c.index_with { |cc| File.exist?(Rails.root.join('public', 'emoji', codepoints_to_filename(cc) + '.svg')) } } + existence_maps = grouped_codes.map { |c| c.index_with { |cc| File.exist?(Rails.root.join('public', 'emoji', "#{codepoints_to_filename(cc)}.svg")) } } map = {} existence_maps.each do |group| diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 0ccfc9f29..80e1dcf52 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -433,9 +433,12 @@ namespace :mastodon do password = SecureRandom.hex(16) - user = User.new(admin: true, email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true) + owner_role = UserRole.find_by(name: 'Owner') + user = User.new(email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true, role: owner_role) user.save(validate: false) + Setting.site_contact_username = username + prompt.ok "You can login with the password: #{password}" prompt.warn 'You can change your password once you login.' end diff --git a/lib/tasks/tests.rake b/lib/tasks/tests.rake index 65bff6a8e..96d2f7112 100644 --- a/lib/tasks/tests.rake +++ b/lib/tasks/tests.rake @@ -53,6 +53,41 @@ namespace :tests do VALUES (1, 2, 'test', '{ "home", "public" }', true, true, now(), now()), (2, 2, 'take', '{ "home" }', false, false, now(), now()); + + -- Orphaned admin action logs + + INSERT INTO "admin_action_logs" + (account_id, action, target_type, target_id, created_at, updated_at) + VALUES + (1, 'destroy', 'Account', 1312, now(), now()), + (1, 'destroy', 'User', 1312, now(), now()), + (1, 'destroy', 'Report', 1312, now(), now()), + (1, 'destroy', 'DomainBlock', 1312, now(), now()), + (1, 'destroy', 'EmailDomainBlock', 1312, now(), now()), + (1, 'destroy', 'Status', 1312, now(), now()), + (1, 'destroy', 'CustomEmoji', 1312, now(), now()); + + -- Admin action logs with linked objects + + INSERT INTO "domain_blocks" + (id, domain, created_at, updated_at) + VALUES + (1, 'example.org', now(), now()); + + INSERT INTO "email_domain_blocks" + (id, domain, created_at, updated_at) + VALUES + (1, 'example.org', now(), now()); + + INSERT INTO "admin_action_logs" + (account_id, action, target_type, target_id, created_at, updated_at) + VALUES + (1, 'destroy', 'Account', 1, now(), now()), + (1, 'destroy', 'User', 1, now(), now()), + (1, 'destroy', 'DomainBlock', 1312, now(), now()), + (1, 'destroy', 'EmailDomainBlock', 1312, now(), now()), + (1, 'destroy', 'Status', 1, now(), now()), + (1, 'destroy', 'CustomEmoji', 3, now(), now()); SQL end @@ -207,18 +242,18 @@ namespace :tests do -- custom emoji INSERT INTO "custom_emojis" - (shortcode, created_at, updated_at) + (id, shortcode, created_at, updated_at) VALUES - ('test', now(), now()), - ('Test', now(), now()), - ('blobcat', now(), now()); + (1, 'test', now(), now()), + (2, 'Test', now(), now()), + (3, 'blobcat', now(), now()); INSERT INTO "custom_emojis" - (shortcode, domain, uri, created_at, updated_at) + (id, shortcode, domain, uri, created_at, updated_at) VALUES - ('blobcat', 'remote.org', 'https://remote.org/emoji/blobcat', now(), now()), - ('blobcat', 'Remote.org', 'https://remote.org/emoji/blobcat', now(), now()), - ('Blobcat', 'remote.org', 'https://remote.org/emoji/Blobcat', now(), now()); + (4, 'blobcat', 'remote.org', 'https://remote.org/emoji/blobcat', now(), now()), + (5, 'blobcat', 'Remote.org', 'https://remote.org/emoji/blobcat', now(), now()), + (6, 'Blobcat', 'remote.org', 'https://remote.org/emoji/Blobcat', now(), now()); -- favourites |