Skip to content

Commit

Permalink
Removed changes with vanilla
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmaypanpan committed Sep 22, 2023
1 parent e6f52d1 commit f0b127c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/mastodon/reducers/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 0 additions & 6 deletions app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 23 additions & 0 deletions app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 6 additions & 5 deletions app/models/tombstone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 6 in config/initializers/sidekiq.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation. (https://rubystyle.guide#spaces-indentation)

config.server_middleware do |chain|

Check failure on line 8 in config/initializers/sidekiq.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Layout/IndentationConsistency: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
chain.add Mastodon::SidekiqMiddleware
Expand Down

0 comments on commit f0b127c

Please sign in to comment.