diff --git a/app/javascript/mastodon/features/compose/containers/compose_form_container.js b/app/javascript/mastodon/features/compose/containers/compose_form_container.js index 9a1d087895df07..ba20698bac8c5c 100644 --- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js +++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js @@ -11,7 +11,6 @@ import { uploadCompose, } from '../../../actions/compose'; import ComposeForm from '../components/compose_form'; -import { enableAlwaysShowSpoiler } from '../../../initial_state'; const mapStateToProps = state => ({ text: state.getIn(['compose', 'text']), diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index c826e1df3afea1..9cdf952c67e5e0 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -512,7 +512,7 @@ "poll_button.remove_poll": "Remove poll", "privacy.change": "Change post privacy", "privacy.direct.long": "Private message to mentioned users", - "privacy.direct.short": "Direct", + "privacy.direct.short": "Mentioned people only", "privacy.private.long": "Restrict to followers only, no boosting", "privacy.private.short": "Followers Only", "privacy.public.long": "Broadcast to all public timelines", diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index d9de5124dfa922..e6b2509f66d2e5 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -51,8 +51,8 @@ import { COMPOSE_FOCUS, } from '../actions/compose'; import { REDRAFT } from '../actions/statuses'; -import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable'; -import uuid from '../uuid'; +import { STORE_HYDRATE } from '../actions/store'; +import { TIMELINE_DELETE } from '../actions/timelines'; import { me } from '../initial_state'; import { unescapeHTML } from '../utils/html'; import { uuid } from '../uuid'; diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 69fd84be01353d..35f0b5fee18a9a 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -20,10 +20,4 @@ def set_autoreply_headers! headers['X-Auto-Response-Suppress'] = 'All' headers['Auto-Submitted'] = 'auto-generated' end - - def set_autoreply_headers! - headers['Precedence'] = 'list' - headers['X-Auto-Response-Suppress'] = 'All' - headers['Auto-Submitted'] = 'auto-generated' - end end diff --git a/app/models/status.rb b/app/models/status.rb index 89163a590bd001..1c41ef1d5290ce 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -120,6 +120,29 @@ class Status < ApplicationRecord where('NOT EXISTS (SELECT * FROM statuses_tags forbidden WHERE forbidden.status_id = statuses.id AND forbidden.tag_id IN (?))', tag_ids) } + after_create_commit :trigger_create_webhooks + after_update_commit :trigger_update_webhooks + + after_create_commit :increment_counter_caches + after_destroy_commit :decrement_counter_caches + + after_create_commit :store_uri, if: :local? + after_create_commit :update_statistics, if: :local? + + before_validation :prepare_contents, if: :local? + before_validation :set_reblog + before_validation :set_visibility + before_validation :set_conversation + before_validation :set_local + + around_create Mastodon::Snowflake::Callbacks + + after_create :set_poll_id + + # The `prepend: true` option below ensures this runs before + # the `dependent: destroy` callbacks remove relevant records + before_destroy :unlink_from_conversations!, prepend: true + cache_associated :application, :media_attachments, :conversation, diff --git a/app/models/tombstone.rb b/app/models/tombstone.rb index 997bb65fd068c4..bf666c43ac1993 100644 --- a/app/models/tombstone.rb +++ b/app/models/tombstone.rb @@ -4,11 +4,12 @@ # # Table name: tombstones # -# id :bigint(8) not null, primary key -# account_id :bigint(8) -# uri :string not null -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint(8) not null, primary key +# account_id :bigint(8) +# uri :string not null +# created_at :datetime not null +# updated_at :datetime not null +# by_moderator :boolean # class Tombstone < ApplicationRecord diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index b847e654692d16..16c80b03d1d3c3 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -3,12 +3,7 @@ require_relative '../../lib/mastodon/sidekiq_middleware' Sidekiq.configure_server do |config| - if Rails.configuration.database_configuration.dig('production', 'adapter') == 'postgresql_makara' - STDERR.puts 'ERROR: Database replication is not currently supported in Sidekiq workers. Check your configuration.' - exit 1 - end - - config.redis = REDIS_SIDEKIQ_PARAMS + config.redis = REDIS_SIDEKIQ_PARAMS config.server_middleware do |chain| chain.add Mastodon::SidekiqMiddleware