diff --git a/.gitignore b/.gitignore
index 239f594ae..2fe61a398 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,3 +77,4 @@ phanpy
# Ignore local-only rspec configuration
.rspec-local
+clutter
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb
index 972731bb2..ecac4c5ba 100644
--- a/app/controllers/auth/sessions_controller.rb
+++ b/app/controllers/auth/sessions_controller.rb
@@ -198,8 +198,4 @@ class Auth::SessionsController < Devise::SessionsController
format.all { super }
end
end
-
- def second_factor_attempts_key(user)
- "2fa_auth_attempts:#{user.id}:#{Time.now.utc.hour}"
- end
end
diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx
index fe7ef3203..8fa20a554 100644
--- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx
+++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx
@@ -132,17 +132,6 @@ class NavigationPanel extends Component {
);
}
- let banner = undefined;
-
- if(transientSingleColumn)
- banner = (
diff --git a/app/javascript/mastodon/locales/si.json b/app/javascript/mastodon/locales/si.json
index 7c6ad6d5c..93ce9dd7e 100644
--- a/app/javascript/mastodon/locales/si.json
+++ b/app/javascript/mastodon/locales/si.json
@@ -212,7 +212,6 @@
"hashtag.column_settings.tag_mode.none": "මේ කිසිවක් නැත",
"hashtag.column_settings.tag_toggle": "මෙම තීරුවේ අමතර ටැග් ඇතුළත් කරන්න",
"home.column_settings.show_replies": "පිළිතුරු පෙන්වන්න",
- "home.explore_prompt.title": "මෙය ඔබගේ මාස්ටඩන් මුල් පිටුවයි.",
"home.hide_announcements": "නිවේදන සඟවන්න",
"home.pending_critical_update.link": "යාවත්කාල බලන්න",
"home.show_announcements": "නිවේදන පෙන්වන්න",
diff --git a/app/lib/link_details_extractor.rb b/app/lib/link_details_extractor.rb
index 925f9a9fe..e4e815c38 100644
--- a/app/lib/link_details_extractor.rb
+++ b/app/lib/link_details_extractor.rb
@@ -302,11 +302,6 @@ class LinkDetailsExtractor
nil
end
- def detect_encoding
- guess = detector.detect(@html, @html_charset)
- guess&.fetch(:confidence, 0).to_i > 60 ? guess&.fetch(:encoding, nil) : nil
- end
-
def detector
@detector ||= CharlockHolmes::EncodingDetector.new.tap do |detector|
detector.strip_tags = true
diff --git a/app/models/concerns/account/interactions.rb b/app/models/concerns/account/interactions.rb
index 00f726a83..fc0a24f62 100644
--- a/app/models/concerns/account/interactions.rb
+++ b/app/models/concerns/account/interactions.rb
@@ -308,8 +308,4 @@ module Account::Interactions
def normalized_domain(domain)
TagManager.instance.normalize_domain(domain)
end
-
- def normalized_domain(domain)
- TagManager.instance.normalize_domain(domain)
- end
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 675a20f47..fa1a275bb 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -128,8 +128,6 @@ class User < ApplicationRecord
scope :matches_ip, ->(value) { left_joins(:ips).where('user_ips.ip <<= ?', value).group('users.id') }
before_validation :sanitize_role
- before_validation :sanitize_time_zone
- before_validation :sanitize_locale
before_create :set_approved
after_commit :send_pending_devise_notifications
after_create_commit :trigger_webhooks
diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb
index ee16cb0b0..133a76487 100644
--- a/app/services/backup_service.rb
+++ b/app/services/backup_service.rb
@@ -19,8 +19,8 @@ class BackupService < BaseService
def build_outbox_json!(file)
skeleton = serialize(collection_presenter, ActivityPub::CollectionSerializer)
- skeleton['@context'] = full_context
- skeleton['orderedItems'] = ['!PLACEHOLDER!']
+ skeleton[:@context] = full_context
+ skeleton[:orderedItems] = ['!PLACEHOLDER!']
skeleton = Oj.dump(skeleton)
prepend, append = skeleton.split('"!PLACEHOLDER!"')
add_comma = false
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index 52f89ae79..7662fc1f2 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -15,9 +15,6 @@ class FetchLinkCardService < BaseService
)
}iox
- # URL size limit to safely store in PosgreSQL's unique indexes
- BYTESIZE_LIMIT = 2692
-
def call(status)
@status = status
@original_url = parse_urls
@@ -94,7 +91,7 @@ class FetchLinkCardService < BaseService
def bad_url?(uri)
# Avoid local instance URLs and invalid URLs
- uri.host.blank? || TagManager.instance.local_url?(uri.to_s) || !%w(http https).include?(uri.scheme) || uri.to_s.bytesize > BYTESIZE_LIMIT
+ uri.host.blank? || TagManager.instance.local_url?(uri.to_s) || !%w(http https).include?(uri.scheme)
end
def mention_link?(anchor)
diff --git a/docker-compose.yml b/docker-compose.yml
index 31b1884ba..1d3af1c0a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -60,10 +60,13 @@ services:
# ports:
# - '127.0.0.1:9200:9200'
- web:
+ mastodon_web:
+ container_name: mastodon_web
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
- # build: .
- image: ghcr.io/mastodon/mastodon:v4.3.3
+ # #build: .
+ #image: ghcr.io/mastodon/mastodon:v4.3.3
+ build: .
+ image: teh_mastodon
restart: always
env_file: .env.production
command: bundle exec puma -C config/puma.rb
@@ -82,12 +85,14 @@ services:
volumes:
- ./public/system:/mastodon/public/system
- streaming:
+ mastodon_streaming:
+ container_name: mastodon_streaming
# You can uncomment the following lines if you want to not use the prebuilt image, for example if you have local code changes
- # build:
- # dockerfile: ./streaming/Dockerfile
- # context: .
- image: ghcr.io/mastodon/mastodon-streaming:v4.3.3
+ build:
+ dockerfile: ./streaming/Dockerfile
+ context: .
+ #image: ghcr.io/mastodon/mastodon-streaming:v4.3.3
+ image: teh_mastodon_streaming
restart: always
env_file: .env.production
command: node ./streaming/index.js
@@ -106,8 +111,10 @@ services:
# https://thomas-leister.de/en/scaling-up-mastodon/
mastodon_sidekiq:
container_name: mastodon_sidekiq
+ #build: .
+ image: teh_mastodon
build: .
- image: ghcr.io/mastodon/mastodon:v4.3.3
+ #image: ghcr.io/mastodon/mastodon:v4.3.3
restart: always
env_file: .env.production
environment:
@@ -127,8 +134,9 @@ services:
mastodon_sidekiq_2:
container_name: mastodon_sidekiq_2
build: .
- #image: ghcr.io/mastodon/mastodon:v4.2.5
image: teh_mastodon
+ #image: ghcr.io/mastodon/mastodon:v4.2.5
+ #image: ghcr.io/mastodon/mastodon:v4.3.3
restart: always
env_file: .env.production
environment:
@@ -162,7 +170,7 @@ services:
# - external_network
# - internal_network
- statsd:
+ mastodon_statsd:
image: prom/statsd-exporter
container_name: mastodon_statsd
restart: always
diff --git a/spec/controllers/oauth/authorized_applications_controller_spec.rb b/spec/controllers/oauth/authorized_applications_controller_spec.rb
index 2986c235f..1cf0984ab 100644
--- a/spec/controllers/oauth/authorized_applications_controller_spec.rb
+++ b/spec/controllers/oauth/authorized_applications_controller_spec.rb
@@ -62,13 +62,5 @@ RSpec.describe Oauth::AuthorizedApplicationsController do
expect(redis_pipeline_stub)
.to have_received(:publish).with("timeline:access_token:#{access_token.id}", '{"event":"kill"}')
end
-
- it 'removes the web_push_subscription' do
- expect { web_push_subscription.reload }.to raise_error(ActiveRecord::RecordNotFound)
- end
-
- it 'sends a session kill payload to the streaming server' do
- expect(redis_pipeline_stub).to have_received(:publish).with("timeline:access_token:#{access_token.id}", '{"event":"kill"}')
- end
end
end
diff --git a/spec/lib/account_statuses_filter_spec.rb b/spec/lib/account_statuses_filter_spec.rb
index d360e0e4a..777458512 100644
--- a/spec/lib/account_statuses_filter_spec.rb
+++ b/spec/lib/account_statuses_filter_spec.rb
@@ -211,20 +211,6 @@ RSpec.describe AccountStatusesFilter do
end
end
- context 'when blocking an unrelated domain' do
- let(:other_account) { Fabricate(:account, domain: nil) }
- let(:reblogging_status) { Fabricate(:status, account: other_account, visibility: 'public') }
- let!(:reblog) { Fabricate(:status, account: account, visibility: 'public', reblog: reblogging_status) }
-
- before do
- current_account.block_domain!('example.com')
- end
-
- it 'returns the reblog from the non-blocked domain' do
- expect(subject.results.pluck(:id)).to include(reblog.id)
- end
- end
-
context 'when muting a reblogged account' do
let(:reblog) { status_with_reblog!('public') }
diff --git a/spec/lib/activitypub/tag_manager_spec.rb b/spec/lib/activitypub/tag_manager_spec.rb
index 3d6196212..05d2609b0 100644
--- a/spec/lib/activitypub/tag_manager_spec.rb
+++ b/spec/lib/activitypub/tag_manager_spec.rb
@@ -134,14 +134,6 @@ RSpec.describe ActivityPub::TagManager do
reblog = Fabricate(:status, visibility: :public, account: alice, reblog: status)
expect(subject.cc(reblog)).to include(subject.uri_for(bob))
end
-
- it 'returns poster of reblogged post, if reblog' do
- bob = Fabricate(:account, username: 'bob', domain: 'example.com', inbox_url: 'http://example.com/bob')
- alice = Fabricate(:account, username: 'alice')
- status = Fabricate(:status, visibility: :public, account: bob)
- reblog = Fabricate(:status, visibility: :public, account: alice, reblog: status)
- expect(subject.cc(reblog)).to include(subject.uri_for(bob))
- end
end
describe '#local_uri?' do
diff --git a/spec/lib/link_details_extractor_spec.rb b/spec/lib/link_details_extractor_spec.rb
index ba8c8969e..d8d9db0ad 100644
--- a/spec/lib/link_details_extractor_spec.rb
+++ b/spec/lib/link_details_extractor_spec.rb
@@ -100,12 +100,6 @@ RSpec.describe LinkDetailsExtractor do
language: eq('en')
)
end
-
- describe '#language' do
- it 'returns the language from structured data' do
- expect(subject.language).to eq 'en'
- end
- end
end
context 'when is wrapped in CDATA tags' do
diff --git a/spec/services/fetch_link_card_service_spec.rb b/spec/services/fetch_link_card_service_spec.rb
index f9d259cf4..1d61e33c0 100644
--- a/spec/services/fetch_link_card_service_spec.rb
+++ b/spec/services/fetch_link_card_service_spec.rb
@@ -199,14 +199,6 @@ RSpec.describe FetchLinkCardService do
end
end
- context 'with a URL of a page in ISO-8859-1 encoding, that charlock_holmes cannot detect' do
- let(:status) { Fabricate(:status, text: 'Check out http://example.com/low_confidence_latin1') }
-
- it 'decodes the HTML' do
- expect(status.preview_card.title).to eq("Tofu á l'orange")
- end
- end
-
context 'with a Japanese path URL' do
let(:status) { Fabricate(:status, text: 'テストhttp://example.com/日本語') }
@@ -243,19 +235,6 @@ RSpec.describe FetchLinkCardService do
end
end
- context 'with an URL too long for PostgreSQL unique indexes' do
- let(:url) { "http://example.com/#{'a' * 2674}" }
- let(:status) { Fabricate(:status, text: url) }
-
- it 'does not fetch the URL' do
- expect(a_request(:get, url)).to_not have_been_made
- end
-
- it 'does not create a preview card' do
- expect(status.preview_card).to be_nil
- end
- end
-
context 'with a URL of a page with oEmbed support' do
let(:html) { '
Hello world' }
let(:status) { Fabricate(:status, text: 'http://example.com/html') }
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb
index f4c40f4fb..26db398d5 100644
--- a/spec/services/post_status_service_spec.rb
+++ b/spec/services/post_status_service_spec.rb
@@ -74,23 +74,6 @@ RSpec.describe PostStatusService do
)
end
end
-
- it 'returns existing status when used twice with idempotency key' do
- account = Fabricate(:account)
- status1 = subject.call(account, text: 'test', idempotency: 'meepmeep', scheduled_at: future)
- status2 = subject.call(account, text: 'test', idempotency: 'meepmeep', scheduled_at: future)
- expect(status2.id).to eq status1.id
- end
-
- context 'when scheduled_at is less than min offset' do
- let(:invalid_scheduled_time) { 4.minutes.from_now }
-
- it 'raises invalid record error' do
- expect do
- subject.call(account, text: 'Hi future!', scheduled_at: invalid_scheduled_time)
- end.to raise_error(ActiveRecord::RecordInvalid)
- end
- end
end
it 'creates response to the original status of boost' do