diff --git a/.circleci/config.yml b/.circleci/config.yml
index a373d685e..bddfd2d27 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,8 +1,8 @@
version: 2.1
orbs:
- ruby: circleci/ruby@2.0.0
- node: circleci/node@5.0.3
+ ruby: circleci/ruby@1.4.1
+ node: circleci/node@5.0.1
executors:
default:
@@ -19,11 +19,11 @@ executors:
DB_USER: root
DISABLE_SIMPLECOV: true
RAILS_ENV: test
- - image: cimg/postgres:14.5
+ - image: cimg/postgres:14.0
environment:
POSTGRES_USER: root
POSTGRES_HOST_AUTH_METHOD: trust
- - image: cimg/redis:7.0
+ - image: cimg/redis:6.2
commands:
install-system-dependencies:
@@ -45,7 +45,7 @@ commands:
bundle config without 'development production'
name: Set bundler settings
- ruby/install-deps:
- bundler-version: '2.3.26'
+ bundler-version: '2.3.8'
key: ruby<< parameters.ruby-version >>-gems-v1
wait-db:
steps:
@@ -221,5 +221,5 @@ workflows:
pkg-manager: yarn
requires:
- build
- version: '16.18'
+ version: lts
yarn-run: test:jest
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 425b86a6b..ac495e1c9 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -9,7 +9,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
# The value is a comma-separated list of allowed domains
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"
-# [Choice] Node.js version: lts/*, 18, 16, 14
+# [Choice] Node.js version: lts/*, 16, 14, 12, 10
ARG NODE_VERSION="lts/*"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 01941a9d3..47497794f 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -2,7 +2,7 @@
"name": "Mastodon",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
- "workspaceFolder": "/mastodon",
+ "workspaceFolder": "/workspaces/mastodon",
// Set *default* container specific settings.json values on container create.
"settings": {},
@@ -20,7 +20,7 @@
"forwardPorts": [3000, 4000],
// Use 'postCreateCommand' to run commands after the container is created.
- "postCreateCommand": ".devcontainer/post-create.sh",
+ "postCreateCommand": "bundle install --path vendor/bundle && yarn install && git checkout -- Gemfile.lock && ./bin/rails db:setup",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index 95f401379..46f42c454 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -11,9 +11,9 @@ services:
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: '3.0-bullseye'
# Optional Node.js version to install
- NODE_VERSION: '16'
+ NODE_VERSION: '14'
volumes:
- - ..:/mastodon:cached
+ - ..:/workspaces/mastodon:cached
environment:
RAILS_ENV: development
NODE_ENV: development
diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh
deleted file mode 100755
index 02f488f12..000000000
--- a/.devcontainer/post-create.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-set -e # Fail the whole script on first error
-
-# Fetch Ruby gem dependencies
-bundle install --path vendor/bundle --with='development test'
-
-# Fetch Javascript dependencies
-yarn install
-
-# Make Gemfile.lock pristine again
-git checkout -- Gemfile.lock
-
-# [re]create, migrate, and seed the test database
-RAILS_ENV=test ./bin/rails db:setup
-
-# Precompile assets for development
-RAILS_ENV=development ./bin/rails assets:precompile
-
-# Precompile assets for test
-RAILS_ENV=test NODE_ENV=tests ./bin/rails assets:precompile
diff --git a/.env.production.sample b/.env.production.sample
index 0bf01bdc3..5eecb8bde 100644
--- a/.env.production.sample
+++ b/.env.production.sample
@@ -54,7 +54,7 @@ VAPID_PUBLIC_KEY=
# Sending mail
# ------------
-SMTP_SERVER=
+SMTP_SERVER=smtp.mailgun.org
SMTP_PORT=587
SMTP_LOGIN=
SMTP_PASSWORD=
diff --git a/.eslintrc.js b/.eslintrc.js
index 03af2975b..e4ada6fe0 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,10 +1,6 @@
module.exports = {
root: true,
- extends: [
- 'eslint:recommended',
- ],
-
env: {
browser: true,
node: true,
@@ -68,8 +64,8 @@ module.exports = {
eqeqeq: 'error',
indent: ['warn', 2],
'jsx-quotes': ['error', 'prefer-single'],
- 'no-case-declarations': 'off',
'no-catch-shadow': 'error',
+ 'no-cond-assign': 'error',
'no-console': [
'warn',
{
@@ -79,16 +75,18 @@ module.exports = {
],
},
],
- 'no-empty': 'off',
+ 'no-fallthrough': 'error',
+ 'no-irregular-whitespace': 'error',
+ 'no-mixed-spaces-and-tabs': 'warn',
'no-nested-ternary': 'warn',
- 'no-prototype-builtins': 'off',
'no-restricted-properties': [
'error',
{ property: 'substring', message: 'Use .slice instead of .substring.' },
{ property: 'substr', message: 'Use .slice instead of .substr.' },
],
- 'no-self-assign': 'off',
'no-trailing-spaces': 'warn',
+ 'no-undef': 'error',
+ 'no-unreachable': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': [
'error',
@@ -98,7 +96,6 @@ module.exports = {
ignoreRestSiblings: true,
},
],
- 'no-useless-escape': 'off',
'object-curly-spacing': ['error', 'always'],
'padded-blocks': [
'error',
@@ -108,6 +105,7 @@ module.exports = {
],
quotes: ['error', 'single'],
semi: 'error',
+ strict: 'off',
'valid-typeof': 'error',
'react/jsx-boolean-value': 'error',
diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml
index c161cbf3d..6c12bd073 100644
--- a/.github/workflows/build-image.yml
+++ b/.github/workflows/build-image.yml
@@ -18,7 +18,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - uses: hadolint/hadolint-action@v3.0.0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
deleted file mode 100644
index 8534501d4..000000000
--- a/.github/workflows/codeql.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-name: 'CodeQL'
-
-on:
- push:
- branches: ['main']
- pull_request:
- # The branches below must be a subset of the branches above
- branches: ['main']
- schedule:
- - cron: '22 6 * * 1'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: ['javascript', 'ruby']
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
-
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
- # queries: security-extended,security-and-quality
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
- # If the Autobuild fails above, remove it and uncomment the following three lines.
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
- # - run: |
- # echo "Run, Build Application using script"
- # ./location_of_script_within_repo/buildscript.sh
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
- with:
- category: '/language:${{matrix.language}}'
diff --git a/.nvmrc b/.nvmrc
index b6a7d89c6..8351c1939 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-16
+14
diff --git a/.rubocop.yml b/.rubocop.yml
index 3c9223470..aec11b030 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,18 +1,12 @@
require:
- rubocop-rails
- - rubocop-rspec
- - rubocop-performance
AllCops:
TargetRubyVersion: 2.7
- DisplayCopNames: true
- DisplayStyleGuide: true
- ExtraDetails: true
- UseCache: true
- CacheRootDirectory: tmp
- NewCops: enable
+ NewCops: disable
Exclude:
- - db/schema.rb
+ - 'spec/**/*'
+ - 'db/**/*'
- 'app/views/**/*'
- 'config/**/*'
- 'bin/*'
@@ -73,57 +67,15 @@ Lint/UselessAccessModifier:
- class_methods
Metrics/AbcSize:
- Max: 34 # RuboCop default 17
+ Max: 115
Exclude:
- - 'lib/**/*cli*.rb'
- - db/*migrate/**/*
- - lib/paperclip/color_extractor.rb
- - app/workers/scheduler/follow_recommendations_scheduler.rb
- - app/services/activitypub/fetch*_service.rb
- - lib/paperclip/**/*
- CountRepeatedAttributes: false
- AllowedMethods:
- - update_media_attachments!
- - account_link_to
- - attempt_oembed
- - build_crutches
- - calculate_scores
- - cc
- - dump_actor!
- - filter_from_home?
- - hydrate
- - import_bookmarks!
- - import_relationships!
- - initialize
- - link_to_mention
- - log_target
- - matches_time_window?
- - parse_metadata
- - perform_statuses_search!
- - privatize_media_attachments!
- - process_update
- - publish_media_attachments!
- - remotable_attachment
- - render_initial_state
- - render_with_cache
- - searchable_by
- - self.cached_filters_for
- - set_fetchable_attributes!
- - signed_request_actor
- - statuses_to_delete
- - update_poll!
+ - 'lib/mastodon/*_cli.rb'
Metrics/BlockLength:
Max: 55
Exclude:
+ - 'lib/tasks/**/*'
- 'lib/mastodon/*_cli.rb'
- CountComments: false
- CountAsOne: [array, heredoc]
- AllowedMethods:
- - task
- - namespace
- - class_methods
- - included
Metrics/BlockNesting:
Max: 3
@@ -133,144 +85,34 @@ Metrics/BlockNesting:
Metrics/ClassLength:
CountComments: false
Max: 500
- CountAsOne: [array, heredoc]
Exclude:
- 'lib/mastodon/*_cli.rb'
Metrics/CyclomaticComplexity:
- Max: 12
+ Max: 25
Exclude:
- - lib/mastodon/*cli*.rb
- - db/*migrate/**/*
- AllowedMethods:
- - attempt_oembed
- - blocked?
- - build_crutches
- - calculate_scores
- - cc
- - discover_endpoint!
- - filter_from_home?
- - hydrate
- - klass
- - link_to_mention
- - log_target
- - matches_time_window?
- - patch_for_forwarding!
- - preprocess_attributes!
- - process_update
- - remotable_attachment
- - scan_text!
- - self.cached_filters_for
- - set_fetchable_attributes!
- - setup_redis_env_url
- - update_media_attachments!
+ - 'lib/mastodon/*_cli.rb'
Layout/LineLength:
- Max: 140 # RuboCop default 120
- AllowHeredoc: true
AllowURI: true
- IgnoreCopDirectives: true
- AllowedPatterns:
- # Allow comments to be long lines
- - !ruby/regexp / \# .*$/
- - !ruby/regexp /^\# .*$/
- Exclude:
- - lib/**/*cli*.rb
- - db/*migrate/**/*
- - db/seeds/**/*
+ Enabled: false
Metrics/MethodLength:
CountComments: false
- CountAsOne: [array, heredoc]
- Max: 25 # RuboCop default 10
+ Max: 65
Exclude:
- 'lib/mastodon/*_cli.rb'
- AllowedMethods:
- - account_link_to
- - attempt_oembed
- - body_with_limit
- - build_crutches
- - cached_filters_for
- - calculate_scores
- - check_webfinger!
- - clean_feeds!
- - collection_items
- - collection_presenter
- - copy_account_notes!
- - deduplicate_accounts!
- - deduplicate_conversations!
- - deduplicate_local_accounts!
- - deduplicate_statuses!
- - deduplicate_tags!
- - deduplicate_users!
- - discover_endpoint!
- - extract_extra_uris_with_indices
- - extract_hashtags_with_indices
- - extract_mentions_or_lists_with_indices
- - filter_from_home?
- - from_elasticsearch
- - handle_explicit_update!
- - handle_mark_as_sensitive!
- - hsl_to_rgb
- - import_bookmarks!
- - import_domain_blocks!
- - import_relationships!
- - ldap_options
- - matches_time_window?
- - outbox_presenter
- - pam_get_user
- - parallelize_with_progress
- - parse_and_transform
- - patch_for_forwarding!
- - populate_home
- - post_process_style
- - preload_cache_collection_target_statuses
- - privatize_media_attachments!
- - provides_callback_for
- - publish_media_attachments!
- - relevant_account_timestamp
- - remotable_attachment
- - rgb_to_hsl
- - rss_status_content_format
- - set_fetchable_attributes!
- - setup_redis_env_url
- - signed_request_actor
- - to_preview_card_attributes
- - upgrade_storage_filesystem
- - upgrade_storage_s3
- - user_settings_params
- - hydrate
- - cc
- - self_destruct
Metrics/ModuleLength:
CountComments: false
Max: 200
- CountAsOne: [array, heredoc]
Metrics/ParameterLists:
- Max: 5 # RuboCop default 5
- CountKeywordArgs: true # RuboCop default true
- MaxOptionalParameters: 3 # RuboCop default 3
- Exclude:
- - app/models/concerns/account_interactions.rb
- - app/services/activitypub/fetch_remote_account_service.rb
- - app/services/activitypub/fetch_remote_actor_service.rb
+ Max: 5
+ CountKeywordArgs: true
Metrics/PerceivedComplexity:
- Max: 16 # RuboCop default 8
- AllowedMethods:
- - attempt_oembed
- - build_crutches
- - calculate_scores
- - deduplicate_users!
- - discover_endpoint!
- - filter_from_home?
- - hydrate
- - patch_for_forwarding!
- - process_update
- - remove_orphans
- - update_media_attachments!
+ Max: 25
Naming/MemoizedInstanceVariableName:
Enabled: false
@@ -425,6 +267,9 @@ Style/PercentLiteralDelimiters:
Style/PerlBackrefs:
AutoCorrect: false
+Style/RedundantAssignment:
+ Enabled: false
+
Style/RedundantFetchBlock:
Enabled: true
@@ -447,7 +292,7 @@ Style/RegexpLiteral:
Enabled: false
Style/RescueStandardError:
- Enabled: true
+ Enabled: false
Style/SignalException:
Enabled: false
@@ -466,14 +311,3 @@ Style/TrailingCommaInHashLiteral:
Style/UnpackFirst:
Enabled: false
-
-RSpec/ScatteredSetup:
- Enabled: false
-RSpec/ImplicitExpect:
- Enabled: false
-RSpec/NamedSubject:
- Enabled: false
-RSpec/DescribeClass:
- Enabled: false
-RSpec/LetSetup:
- Enabled: false
diff --git a/Aptfile b/Aptfile
index 8f5bb72a2..a52eef4e1 100644
--- a/Aptfile
+++ b/Aptfile
@@ -1,4 +1,26 @@
ffmpeg
+libicu[0-9][0-9]
+libicu-dev
+libidn12
+libidn-dev
libpq-dev
libxdamage1
libxfixes3
+zlib1g-dev
+libcairo2
+libcroco3
+libdatrie1
+libgdk-pixbuf2.0-0
+libgraphite2-3
+libharfbuzz0b
+libpango-1.0-0
+libpangocairo-1.0-0
+libpangoft2-1.0-0
+libpixman-1-0
+librsvg2-2
+libthai-data
+libthai0
+libvpx[5-9]
+libxcb-render0
+libxcb-shm0
+libxrender1
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index ea5f64b0b..7cec57180 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
## Attribution
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-[homepage]: https://contributor-covenant.org
-[version]: https://contributor-covenant.org/version/1/4/
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/Dockerfile b/Dockerfile
index ce7f4d718..1a97965ac 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,8 +15,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /opt/mastodon
COPY Gemfile* package.json yarn.lock /opt/mastodon/
-# hadolint ignore=DL3008
-RUN apt-get update && \
+RUN apt update && \
apt-get install -y --no-install-recommends build-essential \
ca-certificates \
git \
@@ -51,12 +50,10 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND="noninteractive" \
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
-# Ignoreing these here since we don't want to pin any versions and the Debian image removes apt-get content after use
-# hadolint ignore=DL3008,DL3009
RUN apt-get update && \
echo "Etc/UTC" > /etc/localtime && \
groupadd -g "${GID}" mastodon && \
- useradd -l -u "$UID" -g "${GID}" -m -d /opt/mastodon mastodon && \
+ useradd -u "$UID" -g "${GID}" -m -d /opt/mastodon mastodon && \
apt-get -y --no-install-recommends install whois \
wget \
procps \
diff --git a/Gemfile b/Gemfile
index bfbb14f08..a399f5102 100644
--- a/Gemfile
+++ b/Gemfile
@@ -19,7 +19,7 @@ gem 'pghero', '~> 2.8'
gem 'dotenv-rails', '~> 2.8'
gem 'aws-sdk-s3', '~> 1.117', require: false
-gem 'fog-core', '<= 2.4.0'
+gem 'fog-core', '<= 2.1.0'
gem 'fog-openstack', '~> 0.3', require: false
gem 'kt-paperclip', '~> 7.1'
gem 'blurhash', '~> 0.1'
@@ -67,7 +67,7 @@ gem 'ox', '~> 2.14'
gem 'parslet'
gem 'posix-spawn'
gem 'public_suffix', '~> 5.0'
-gem 'pundit', '~> 2.3'
+gem 'pundit', '~> 2.2'
gem 'premailer-rails'
gem 'rack-attack', '~> 6.6'
gem 'rack-cors', '~> 1.1', require: 'rack/cors'
@@ -79,7 +79,7 @@ gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
gem 'rqrcode', '~> 2.1'
gem 'ruby-progressbar', '~> 1.11'
gem 'sanitize', '~> 6.0'
-gem 'scenic', '~> 1.7'
+gem 'scenic', '~> 1.6'
gem 'sidekiq', '~> 6.5'
gem 'sidekiq-scheduler', '~> 4.0'
gem 'sidekiq-unique-jobs', '~> 7.1'
@@ -107,10 +107,6 @@ group :development, :test do
gem 'pry-byebug', '~> 3.10'
gem 'pry-rails', '~> 0.3'
gem 'rspec-rails', '~> 5.1'
- gem 'rubocop-performance', require: false
- gem 'rubocop-rails', require: false
- gem 'rubocop-rspec', require: false
- gem 'rubocop', require: false
end
group :production, :test do
@@ -121,14 +117,13 @@ group :test do
gem 'capybara', '~> 3.38'
gem 'climate_control', '~> 0.2'
gem 'faker', '~> 3.0'
- gem 'json-schema', '~> 3.0'
gem 'microformats', '~> 4.4'
- gem 'rack-test', '~> 2.0'
gem 'rails-controller-testing', '~> 1.0'
- gem 'rspec_junit_formatter', '~> 0.6'
gem 'rspec-sidekiq', '~> 3.1'
gem 'simplecov', '~> 0.21', require: false
gem 'webmock', '~> 3.18'
+ gem 'rspec_junit_formatter', '~> 0.6'
+ gem 'rack-test', '~> 2.0'
end
group :development do
@@ -140,6 +135,8 @@ group :development do
gem 'letter_opener', '~> 1.8'
gem 'letter_opener_web', '~> 2.0'
gem 'memory_profiler'
+ gem 'rubocop', '~> 1.30', require: false
+ gem 'rubocop-rails', '~> 2.15', require: false
gem 'brakeman', '~> 5.4', require: false
gem 'bundler-audit', '~> 0.9', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 00e8dcfd9..578a88436 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -226,7 +226,7 @@ GEM
erubi (1.11.0)
et-orbi (1.2.7)
tzinfo
- excon (0.95.0)
+ excon (0.76.0)
fabrication (2.30.0)
faker (3.0.0)
i18n (>= 1.8.11, < 2)
@@ -271,7 +271,7 @@ GEM
fog-core (>= 1.45, <= 2.1.0)
fog-json (>= 1.0)
ipaddress (>= 0.8)
- formatador (0.3.0)
+ formatador (0.2.5)
fugit (1.7.1)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
@@ -299,7 +299,7 @@ GEM
hiredis (0.6.3)
hkdf (0.3.0)
htmlentities (4.3.4)
- http (5.1.1)
+ http (5.1.0)
addressable (~> 2.8)
http-cookie (~> 1.0)
http-form_data (~> 2.2)
@@ -344,8 +344,6 @@ GEM
json-ld-preloaded (3.2.2)
json-ld (~> 3.2)
rdf (~> 3.2)
- json-schema (3.0.0)
- addressable (>= 2.8)
jsonapi-renderer (0.2.2)
jwt (2.4.1)
kaminari (1.2.2)
@@ -486,7 +484,7 @@ GEM
public_suffix (5.0.1)
puma (5.6.5)
nio4r (~> 2.0)
- pundit (2.3.0)
+ pundit (2.2.0)
activesupport (>= 3.0.0)
raabro (1.4.0)
racc (1.6.1)
@@ -587,27 +585,21 @@ GEM
rspec-support (3.11.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
- rubocop (1.39.0)
- json (~> 2.3)
+ rubocop (1.30.1)
parallel (~> 1.10)
- parser (>= 3.1.2.1)
+ parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
- rubocop-ast (>= 1.23.0, < 2.0)
+ rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
- rubocop-ast (1.23.0)
+ rubocop-ast (1.18.0)
parser (>= 3.1.1.0)
- rubocop-performance (1.15.1)
- rubocop (>= 1.7.0, < 2.0)
- rubocop-ast (>= 0.4.0)
- rubocop-rails (2.17.2)
+ rubocop-rails (2.15.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
- rubocop (>= 1.33.0, < 2.0)
- rubocop-rspec (2.15.0)
- rubocop (~> 1.33)
+ rubocop (>= 1.7.0, < 2.0)
ruby-progressbar (1.11.0)
ruby-saml (1.13.0)
nokogiri (>= 1.10.5)
@@ -620,7 +612,7 @@ GEM
sanitize (6.0.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
- scenic (1.7.0)
+ scenic (1.6.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
semantic_range (3.0.0)
@@ -785,7 +777,7 @@ DEPENDENCIES
faker (~> 3.0)
fast_blank (~> 1.0)
fastimage
- fog-core (<= 2.4.0)
+ fog-core (<= 2.1.0)
fog-openstack (~> 0.3)
fuubar (~> 2.5)
gitlab-omniauth-openid-connect (~> 0.10.0)
@@ -799,7 +791,6 @@ DEPENDENCIES
idn-ruby
json-ld
json-ld-preloaded (~> 3.2)
- json-schema (~> 3.0)
kaminari (~> 1.2)
kt-paperclip (~> 7.1)
letter_opener (~> 1.8)
@@ -831,7 +822,7 @@ DEPENDENCIES
pry-rails (~> 0.3)
public_suffix (~> 5.0)
puma (~> 5.6)
- pundit (~> 2.3)
+ pundit (~> 2.2)
rack (~> 2.2.4)
rack-attack (~> 6.6)
rack-cors (~> 1.1)
@@ -849,13 +840,11 @@ DEPENDENCIES
rspec-rails (~> 5.1)
rspec-sidekiq (~> 3.1)
rspec_junit_formatter (~> 0.6)
- rubocop
- rubocop-performance
- rubocop-rails
- rubocop-rspec
+ rubocop (~> 1.30)
+ rubocop-rails (~> 2.15)
ruby-progressbar (~> 1.11)
sanitize (~> 6.0)
- scenic (~> 1.7)
+ scenic (~> 1.6)
sidekiq (~> 6.5)
sidekiq-bulk (~> 0.2.0)
sidekiq-scheduler (~> 4.0)
@@ -877,9 +866,3 @@ DEPENDENCIES
webpacker (~> 5.4)
webpush!
xorcist (~> 1.1)
-
-RUBY VERSION
- ruby 3.0.4p208
-
-BUNDLED WITH
- 2.2.33
diff --git a/README.md b/README.md
index ddd5e2c64..277ae0cc1 100644
--- a/README.md
+++ b/README.md
@@ -73,7 +73,7 @@ Mastodon acts as an OAuth2 provider, so 3rd party apps can use the REST and Stre
- **PostgreSQL** 9.5+
- **Redis** 4+
- **Ruby** 2.7+
-- **Node.js** 16+
+- **Node.js** 14+
The repository includes deployment configurations for **Docker and docker-compose** as well as specific platforms like **Heroku**, **Scalingo**, and **Nanobox**. The [**standalone** installation guide](https://docs.joinmastodon.org/admin/install/) is available in the documentation.
diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb
index 74764640b..e79f7a43e 100644
--- a/app/controllers/admin/domain_blocks_controller.rb
+++ b/app/controllers/admin/domain_blocks_controller.rb
@@ -55,8 +55,12 @@ module Admin
def update
authorize :domain_block, :update?
- if @domain_block.update(update_params)
- DomainBlockWorker.perform_async(@domain_block.id, @domain_block.severity_previously_changed?)
+ @domain_block.update(update_params)
+
+ severity_changed = @domain_block.severity_changed?
+
+ if @domain_block.save
+ DomainBlockWorker.perform_async(@domain_block.id, severity_changed)
log_action :update, @domain_block
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
else
diff --git a/app/controllers/admin/relays_controller.rb b/app/controllers/admin/relays_controller.rb
index c1297c8b9..6fbb6e063 100644
--- a/app/controllers/admin/relays_controller.rb
+++ b/app/controllers/admin/relays_controller.rb
@@ -3,7 +3,7 @@
module Admin
class RelaysController < BaseController
before_action :set_relay, except: [:index, :new, :create]
- before_action :warn_signatures_not_enabled!, only: [:new, :create, :enable]
+ before_action :require_signatures_enabled!, only: [:new, :create, :enable]
def index
authorize :relay, :update?
@@ -56,8 +56,8 @@ module Admin
params.require(:relay).permit(:inbox_url)
end
- def warn_signatures_not_enabled!
- flash.now[:error] = I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
+ def require_signatures_enabled!
+ redirect_to admin_relays_path, alert: I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
end
end
end
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb
index 41f3ce2ee..defef0656 100644
--- a/app/controllers/api/base_controller.rb
+++ b/app/controllers/api/base_controller.rb
@@ -16,26 +16,6 @@ class Api::BaseController < ApplicationController
protect_from_forgery with: :null_session
- content_security_policy do |p|
- # Set every directive that does not have a fallback
- p.default_src :none
- p.frame_ancestors :none
- p.form_action :none
-
- # Disable every directive with a fallback to cut on response size
- p.base_uri false
- p.font_src false
- p.img_src false
- p.style_src false
- p.media_src false
- p.frame_src false
- p.manifest_src false
- p.connect_src false
- p.script_src false
- p.child_src false
- p.worker_src false
- end
-
rescue_from ActiveRecord::RecordInvalid, Mastodon::ValidationError do |e|
render json: { error: e.to_s }, status: 422
end
diff --git a/app/controllers/api/v1/admin/domain_blocks_controller.rb b/app/controllers/api/v1/admin/domain_blocks_controller.rb
index 8b77e9717..df5b1b3fc 100644
--- a/app/controllers/api/v1/admin/domain_blocks_controller.rb
+++ b/app/controllers/api/v1/admin/domain_blocks_controller.rb
@@ -40,8 +40,10 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
def update
authorize @domain_block, :update?
- @domain_block.update!(domain_block_params)
- DomainBlockWorker.perform_async(@domain_block.id, @domain_block.severity_previously_changed?)
+ @domain_block.update(domain_block_params)
+ severity_changed = @domain_block.severity_changed?
+ @domain_block.save!
+ DomainBlockWorker.perform_async(@domain_block.id, severity_changed)
log_action :update, @domain_block
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
end
diff --git a/app/controllers/api/v1/notifications_controller.rb b/app/controllers/api/v1/notifications_controller.rb
index 7b1cfe264..6d464997e 100644
--- a/app/controllers/api/v1/notifications_controller.rb
+++ b/app/controllers/api/v1/notifications_controller.rb
@@ -31,7 +31,7 @@ class Api::V1::NotificationsController < Api::BaseController
private
def load_notifications
- notifications = browserable_account_notifications.includes(from_account: [:account_stat, :user]).to_a_paginated_by_id(
+ notifications = browserable_account_notifications.includes(from_account: :account_stat).to_a_paginated_by_id(
limit_param(DEFAULT_NOTIFICATIONS_LIMIT),
params_slice(:max_id, :since_id, :min_id)
)
diff --git a/app/controllers/auth/passwords_controller.rb b/app/controllers/auth/passwords_controller.rb
index a8ad66929..2996c0431 100644
--- a/app/controllers/auth/passwords_controller.rb
+++ b/app/controllers/auth/passwords_controller.rb
@@ -10,8 +10,6 @@ class Auth::PasswordsController < Devise::PasswordsController
super do |resource|
if resource.errors.empty?
resource.session_activations.destroy_all
-
- resource.revoke_access!
end
end
end
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb
index 71c0cd827..cd1c546b8 100644
--- a/app/controllers/auth/registrations_controller.rb
+++ b/app/controllers/auth/registrations_controller.rb
@@ -56,8 +56,8 @@ class Auth::RegistrationsController < Devise::RegistrationsController
end
def configure_sign_up_params
- devise_parameter_sanitizer.permit(:sign_up) do |user_params|
- user_params.permit({ account_attributes: [:username, :display_name], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code, :agreement, :website, :confirm_password)
+ devise_parameter_sanitizer.permit(:sign_up) do |u|
+ u.permit({ account_attributes: [:username, :display_name], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code, :agreement, :website, :confirm_password)
end
end
diff --git a/app/controllers/concerns/rate_limit_headers.rb b/app/controllers/concerns/rate_limit_headers.rb
index b8696df73..86fe58a71 100644
--- a/app/controllers/concerns/rate_limit_headers.rb
+++ b/app/controllers/concerns/rate_limit_headers.rb
@@ -58,7 +58,7 @@ module RateLimitHeaders
end
def api_throttle_data
- most_limited_type, = request.env['rack.attack.throttle_data'].min_by { |_key, value| value[:limit] - value[:count] }
+ most_limited_type, = request.env['rack.attack.throttle_data'].min_by { |_, v| v[:limit] - v[:count] }
request.env['rack.attack.throttle_data'][most_limited_type]
end
diff --git a/app/controllers/concerns/signature_verification.rb b/app/controllers/concerns/signature_verification.rb
index 4502da698..2394574b3 100644
--- a/app/controllers/concerns/signature_verification.rb
+++ b/app/controllers/concerns/signature_verification.rb
@@ -28,8 +28,8 @@ module SignatureVerification
end
class SignatureParamsTransformer < Parslet::Transform
- rule(params: subtree(:param)) do
- (param.is_a?(Array) ? param : [param]).each_with_object({}) { |(key, value), hash| hash[key] = value }
+ rule(params: subtree(:p)) do
+ (p.is_a?(Array) ? p : [p]).each_with_object({}) { |(key, val), h| h[key] = val }
end
rule(param: { key: simple(:key), value: simple(:val) }) do
diff --git a/app/controllers/follower_accounts_controller.rb b/app/controllers/follower_accounts_controller.rb
index 9ced18449..e4d8cc495 100644
--- a/app/controllers/follower_accounts_controller.rb
+++ b/app/controllers/follower_accounts_controller.rb
@@ -63,7 +63,7 @@ class FollowerAccountsController < ApplicationController
id: account_followers_url(@account, page: params.fetch(:page, 1)),
type: :ordered,
size: @account.followers_count,
- items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.account) },
+ items: follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.account) },
part_of: account_followers_url(@account),
next: next_page_url,
prev: prev_page_url
diff --git a/app/controllers/following_accounts_controller.rb b/app/controllers/following_accounts_controller.rb
index febd13c97..f84dca1e5 100644
--- a/app/controllers/following_accounts_controller.rb
+++ b/app/controllers/following_accounts_controller.rb
@@ -66,7 +66,7 @@ class FollowingAccountsController < ApplicationController
id: account_following_index_url(@account, page: params.fetch(:page, 1)),
type: :ordered,
size: @account.following_count,
- items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.target_account) },
+ items: follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.target_account) },
part_of: account_following_index_url(@account),
next: next_page_url,
prev: prev_page_url
diff --git a/app/controllers/media_controller.rb b/app/controllers/media_controller.rb
index 3cdd97f06..ee82625a0 100644
--- a/app/controllers/media_controller.rb
+++ b/app/controllers/media_controller.rb
@@ -12,8 +12,8 @@ class MediaController < ApplicationController
before_action :check_playable, only: :player
before_action :allow_iframing, only: :player
- content_security_policy only: :player do |policy|
- policy.frame_ancestors(false)
+ content_security_policy only: :player do |p|
+ p.frame_ancestors(false)
end
def show
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index 0e0783b4b..9eb7ad691 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -17,8 +17,8 @@ class StatusesController < ApplicationController
skip_around_action :set_locale, if: -> { request.format == :json }
skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
- content_security_policy only: :embed do |policy|
- policy.frame_ancestors(false)
+ content_security_policy only: :embed do |p|
+ p.frame_ancestors(false)
end
def show
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 65017acba..f0a099350 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -65,7 +65,7 @@ class TagsController < ApplicationController
id: tag_url(@tag),
type: :ordered,
size: @tag.statuses.count,
- items: @statuses.map { |status| ActivityPub::TagManager.instance.uri_for(status) }
+ items: @statuses.map { |s| ActivityPub::TagManager.instance.uri_for(s) }
)
end
end
diff --git a/app/helpers/formatting_helper.rb b/app/helpers/formatting_helper.rb
index c70931489..a9d2f9651 100644
--- a/app/helpers/formatting_helper.rb
+++ b/app/helpers/formatting_helper.rb
@@ -23,28 +23,19 @@ module FormattingHelper
before_html = begin
if status.spoiler_text?
- tag.p do
- tag.strong do
- I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)
- end
-
- status.spoiler_text
- end + tag.hr
+ "
#{I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)} #{h(status.spoiler_text)}
"
+ else
+ ''
end
- end
+ end.html_safe # rubocop:disable Rails/OutputSafety
after_html = begin
if status.preloadable_poll
- tag.p do
- safe_join(
- status.preloadable_poll.options.map do |o|
- tag.send(status.preloadable_poll.multiple? ? 'checkbox' : 'radio', o, disabled: true)
- end,
- tag.br
- )
- end
+ "#{status.preloadable_poll.options.map { |o| " #{h(o)}" }.join('
')}
"
+ else
+ ''
end
- end
+ end.html_safe # rubocop:disable Rails/OutputSafety
prerender_custom_emojis(
safe_join([before_html, html, after_html]),
diff --git a/app/helpers/languages_helper.rb b/app/helpers/languages_helper.rb
index bb87dd596..fff073ced 100644
--- a/app/helpers/languages_helper.rb
+++ b/app/helpers/languages_helper.rb
@@ -190,15 +190,12 @@ module LanguagesHelper
ISO_639_3 = {
ast: ['Asturian', 'Asturianu'].freeze,
ckb: ['Sorani (Kurdish)', 'سۆرانی'].freeze,
- cnr: ['Montenegrin', 'crnogorski'].freeze,
jbo: ['Lojban', 'la .lojban.'].freeze,
kab: ['Kabyle', 'Taqbaylit'].freeze,
kmr: ['Kurmanji (Kurdish)', 'Kurmancî'].freeze,
ldn: ['Láadan', 'Láadan'].freeze,
lfn: ['Lingua Franca Nova', 'lingua franca nova'].freeze,
sco: ['Scots', 'Scots'].freeze,
- sma: ['Southern Sami', 'Åarjelsaemien Gïele'].freeze,
- smj: ['Lule Sami', 'Julevsámegiella'].freeze,
tok: ['Toki Pona', 'toki pona'].freeze,
zba: ['Balaibalan', 'باليبلن'].freeze,
zgh: ['Standard Moroccan Tamazight', 'ⵜⴰⵎⴰⵣⵉⵖⵜ'].freeze,
diff --git a/app/helpers/statuses_helper.rb b/app/helpers/statuses_helper.rb
index d1e3fddaf..488eabeec 100644
--- a/app/helpers/statuses_helper.rb
+++ b/app/helpers/statuses_helper.rb
@@ -21,7 +21,7 @@ module StatusesHelper
def media_summary(status)
attachments = { image: 0, video: 0, audio: 0 }
- status.ordered_media_attachments.each do |media|
+ status.media_attachments.each do |media|
if media.video?
attachments[:video] += 1
elsif media.audio?
diff --git a/app/javascript/images/logo-symbol-icon.svg b/app/javascript/images/logo-symbol-icon.svg
index c4c14f098..56cf03921 100644
--- a/app/javascript/images/logo-symbol-icon.svg
+++ b/app/javascript/images/logo-symbol-icon.svg
@@ -1,2 +1,2 @@
-
+
diff --git a/app/javascript/images/logo-symbol-wordmark.svg b/app/javascript/images/logo-symbol-wordmark.svg
index ee0b636d9..7e7f7b087 100644
--- a/app/javascript/images/logo-symbol-wordmark.svg
+++ b/app/javascript/images/logo-symbol-wordmark.svg
@@ -7,5 +7,5 @@
-
+
diff --git a/app/javascript/mastodon/actions/account_notes.js b/app/javascript/mastodon/actions/account_notes.js
index 72b943300..d17441000 100644
--- a/app/javascript/mastodon/actions/account_notes.js
+++ b/app/javascript/mastodon/actions/account_notes.js
@@ -14,24 +14,24 @@ export function submitAccountNote(id, value) {
dispatch(submitAccountNoteSuccess(response.data));
}).catch(error => dispatch(submitAccountNoteFail(error)));
};
-}
+};
export function submitAccountNoteRequest() {
return {
type: ACCOUNT_NOTE_SUBMIT_REQUEST,
};
-}
+};
export function submitAccountNoteSuccess(relationship) {
return {
type: ACCOUNT_NOTE_SUBMIT_SUCCESS,
relationship,
};
-}
+};
export function submitAccountNoteFail(error) {
return {
type: ACCOUNT_NOTE_SUBMIT_FAIL,
error,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/accounts.js b/app/javascript/mastodon/actions/accounts.js
index 88407ae6c..f61f06e40 100644
--- a/app/javascript/mastodon/actions/accounts.js
+++ b/app/javascript/mastodon/actions/accounts.js
@@ -91,7 +91,7 @@ export function fetchAccount(id) {
dispatch(fetchAccountFail(id, error));
});
};
-}
+};
export const lookupAccount = acct => (dispatch, getState) => {
dispatch(lookupAccountRequest(acct));
@@ -126,13 +126,13 @@ export function fetchAccountRequest(id) {
type: ACCOUNT_FETCH_REQUEST,
id,
};
-}
+};
export function fetchAccountSuccess() {
return {
type: ACCOUNT_FETCH_SUCCESS,
};
-}
+};
export function fetchAccountFail(id, error) {
return {
@@ -141,7 +141,7 @@ export function fetchAccountFail(id, error) {
error,
skipAlert: true,
};
-}
+};
export function followAccount(id, options = { reblogs: true }) {
return (dispatch, getState) => {
@@ -156,7 +156,7 @@ export function followAccount(id, options = { reblogs: true }) {
dispatch(followAccountFail(error, locked));
});
};
-}
+};
export function unfollowAccount(id) {
return (dispatch, getState) => {
@@ -168,7 +168,7 @@ export function unfollowAccount(id) {
dispatch(unfollowAccountFail(error));
});
};
-}
+};
export function followAccountRequest(id, locked) {
return {
@@ -177,7 +177,7 @@ export function followAccountRequest(id, locked) {
locked,
skipLoading: true,
};
-}
+};
export function followAccountSuccess(relationship, alreadyFollowing) {
return {
@@ -186,7 +186,7 @@ export function followAccountSuccess(relationship, alreadyFollowing) {
alreadyFollowing,
skipLoading: true,
};
-}
+};
export function followAccountFail(error, locked) {
return {
@@ -195,7 +195,7 @@ export function followAccountFail(error, locked) {
locked,
skipLoading: true,
};
-}
+};
export function unfollowAccountRequest(id) {
return {
@@ -203,7 +203,7 @@ export function unfollowAccountRequest(id) {
id,
skipLoading: true,
};
-}
+};
export function unfollowAccountSuccess(relationship, statuses) {
return {
@@ -212,7 +212,7 @@ export function unfollowAccountSuccess(relationship, statuses) {
statuses,
skipLoading: true,
};
-}
+};
export function unfollowAccountFail(error) {
return {
@@ -220,7 +220,7 @@ export function unfollowAccountFail(error) {
error,
skipLoading: true,
};
-}
+};
export function blockAccount(id) {
return (dispatch, getState) => {
@@ -233,7 +233,7 @@ export function blockAccount(id) {
dispatch(blockAccountFail(id, error));
});
};
-}
+};
export function unblockAccount(id) {
return (dispatch, getState) => {
@@ -245,14 +245,14 @@ export function unblockAccount(id) {
dispatch(unblockAccountFail(id, error));
});
};
-}
+};
export function blockAccountRequest(id) {
return {
type: ACCOUNT_BLOCK_REQUEST,
id,
};
-}
+};
export function blockAccountSuccess(relationship, statuses) {
return {
@@ -260,35 +260,35 @@ export function blockAccountSuccess(relationship, statuses) {
relationship,
statuses,
};
-}
+};
export function blockAccountFail(error) {
return {
type: ACCOUNT_BLOCK_FAIL,
error,
};
-}
+};
export function unblockAccountRequest(id) {
return {
type: ACCOUNT_UNBLOCK_REQUEST,
id,
};
-}
+};
export function unblockAccountSuccess(relationship) {
return {
type: ACCOUNT_UNBLOCK_SUCCESS,
relationship,
};
-}
+};
export function unblockAccountFail(error) {
return {
type: ACCOUNT_UNBLOCK_FAIL,
error,
};
-}
+};
export function muteAccount(id, notifications, duration=0) {
@@ -302,7 +302,7 @@ export function muteAccount(id, notifications, duration=0) {
dispatch(muteAccountFail(id, error));
});
};
-}
+};
export function unmuteAccount(id) {
return (dispatch, getState) => {
@@ -314,14 +314,14 @@ export function unmuteAccount(id) {
dispatch(unmuteAccountFail(id, error));
});
};
-}
+};
export function muteAccountRequest(id) {
return {
type: ACCOUNT_MUTE_REQUEST,
id,
};
-}
+};
export function muteAccountSuccess(relationship, statuses) {
return {
@@ -329,35 +329,35 @@ export function muteAccountSuccess(relationship, statuses) {
relationship,
statuses,
};
-}
+};
export function muteAccountFail(error) {
return {
type: ACCOUNT_MUTE_FAIL,
error,
};
-}
+};
export function unmuteAccountRequest(id) {
return {
type: ACCOUNT_UNMUTE_REQUEST,
id,
};
-}
+};
export function unmuteAccountSuccess(relationship) {
return {
type: ACCOUNT_UNMUTE_SUCCESS,
relationship,
};
-}
+};
export function unmuteAccountFail(error) {
return {
type: ACCOUNT_UNMUTE_FAIL,
error,
};
-}
+};
export function fetchFollowers(id) {
@@ -374,14 +374,14 @@ export function fetchFollowers(id) {
dispatch(fetchFollowersFail(id, error));
});
};
-}
+};
export function fetchFollowersRequest(id) {
return {
type: FOLLOWERS_FETCH_REQUEST,
id,
};
-}
+};
export function fetchFollowersSuccess(id, accounts, next) {
return {
@@ -390,7 +390,7 @@ export function fetchFollowersSuccess(id, accounts, next) {
accounts,
next,
};
-}
+};
export function fetchFollowersFail(id, error) {
return {
@@ -399,7 +399,7 @@ export function fetchFollowersFail(id, error) {
error,
skipNotFound: true,
};
-}
+};
export function expandFollowers(id) {
return (dispatch, getState) => {
@@ -421,14 +421,14 @@ export function expandFollowers(id) {
dispatch(expandFollowersFail(id, error));
});
};
-}
+};
export function expandFollowersRequest(id) {
return {
type: FOLLOWERS_EXPAND_REQUEST,
id,
};
-}
+};
export function expandFollowersSuccess(id, accounts, next) {
return {
@@ -437,7 +437,7 @@ export function expandFollowersSuccess(id, accounts, next) {
accounts,
next,
};
-}
+};
export function expandFollowersFail(id, error) {
return {
@@ -445,7 +445,7 @@ export function expandFollowersFail(id, error) {
id,
error,
};
-}
+};
export function fetchFollowing(id) {
return (dispatch, getState) => {
@@ -461,14 +461,14 @@ export function fetchFollowing(id) {
dispatch(fetchFollowingFail(id, error));
});
};
-}
+};
export function fetchFollowingRequest(id) {
return {
type: FOLLOWING_FETCH_REQUEST,
id,
};
-}
+};
export function fetchFollowingSuccess(id, accounts, next) {
return {
@@ -477,7 +477,7 @@ export function fetchFollowingSuccess(id, accounts, next) {
accounts,
next,
};
-}
+};
export function fetchFollowingFail(id, error) {
return {
@@ -486,7 +486,7 @@ export function fetchFollowingFail(id, error) {
error,
skipNotFound: true,
};
-}
+};
export function expandFollowing(id) {
return (dispatch, getState) => {
@@ -508,14 +508,14 @@ export function expandFollowing(id) {
dispatch(expandFollowingFail(id, error));
});
};
-}
+};
export function expandFollowingRequest(id) {
return {
type: FOLLOWING_EXPAND_REQUEST,
id,
};
-}
+};
export function expandFollowingSuccess(id, accounts, next) {
return {
@@ -524,7 +524,7 @@ export function expandFollowingSuccess(id, accounts, next) {
accounts,
next,
};
-}
+};
export function expandFollowingFail(id, error) {
return {
@@ -532,7 +532,7 @@ export function expandFollowingFail(id, error) {
id,
error,
};
-}
+};
export function fetchRelationships(accountIds) {
return (dispatch, getState) => {
@@ -553,7 +553,7 @@ export function fetchRelationships(accountIds) {
dispatch(fetchRelationshipsFail(error));
});
};
-}
+};
export function fetchRelationshipsRequest(ids) {
return {
@@ -561,7 +561,7 @@ export function fetchRelationshipsRequest(ids) {
ids,
skipLoading: true,
};
-}
+};
export function fetchRelationshipsSuccess(relationships) {
return {
@@ -569,7 +569,7 @@ export function fetchRelationshipsSuccess(relationships) {
relationships,
skipLoading: true,
};
-}
+};
export function fetchRelationshipsFail(error) {
return {
@@ -578,7 +578,7 @@ export function fetchRelationshipsFail(error) {
skipLoading: true,
skipNotFound: true,
};
-}
+};
export function fetchFollowRequests() {
return (dispatch, getState) => {
@@ -590,13 +590,13 @@ export function fetchFollowRequests() {
dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null));
}).catch(error => dispatch(fetchFollowRequestsFail(error)));
};
-}
+};
export function fetchFollowRequestsRequest() {
return {
type: FOLLOW_REQUESTS_FETCH_REQUEST,
};
-}
+};
export function fetchFollowRequestsSuccess(accounts, next) {
return {
@@ -604,14 +604,14 @@ export function fetchFollowRequestsSuccess(accounts, next) {
accounts,
next,
};
-}
+};
export function fetchFollowRequestsFail(error) {
return {
type: FOLLOW_REQUESTS_FETCH_FAIL,
error,
};
-}
+};
export function expandFollowRequests() {
return (dispatch, getState) => {
@@ -629,13 +629,13 @@ export function expandFollowRequests() {
dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null));
}).catch(error => dispatch(expandFollowRequestsFail(error)));
};
-}
+};
export function expandFollowRequestsRequest() {
return {
type: FOLLOW_REQUESTS_EXPAND_REQUEST,
};
-}
+};
export function expandFollowRequestsSuccess(accounts, next) {
return {
@@ -643,14 +643,14 @@ export function expandFollowRequestsSuccess(accounts, next) {
accounts,
next,
};
-}
+};
export function expandFollowRequestsFail(error) {
return {
type: FOLLOW_REQUESTS_EXPAND_FAIL,
error,
};
-}
+};
export function authorizeFollowRequest(id) {
return (dispatch, getState) => {
@@ -661,21 +661,21 @@ export function authorizeFollowRequest(id) {
.then(() => dispatch(authorizeFollowRequestSuccess(id)))
.catch(error => dispatch(authorizeFollowRequestFail(id, error)));
};
-}
+};
export function authorizeFollowRequestRequest(id) {
return {
type: FOLLOW_REQUEST_AUTHORIZE_REQUEST,
id,
};
-}
+};
export function authorizeFollowRequestSuccess(id) {
return {
type: FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
id,
};
-}
+};
export function authorizeFollowRequestFail(id, error) {
return {
@@ -683,7 +683,7 @@ export function authorizeFollowRequestFail(id, error) {
id,
error,
};
-}
+};
export function rejectFollowRequest(id) {
@@ -695,21 +695,21 @@ export function rejectFollowRequest(id) {
.then(() => dispatch(rejectFollowRequestSuccess(id)))
.catch(error => dispatch(rejectFollowRequestFail(id, error)));
};
-}
+};
export function rejectFollowRequestRequest(id) {
return {
type: FOLLOW_REQUEST_REJECT_REQUEST,
id,
};
-}
+};
export function rejectFollowRequestSuccess(id) {
return {
type: FOLLOW_REQUEST_REJECT_SUCCESS,
id,
};
-}
+};
export function rejectFollowRequestFail(id, error) {
return {
@@ -717,7 +717,7 @@ export function rejectFollowRequestFail(id, error) {
id,
error,
};
-}
+};
export function pinAccount(id) {
return (dispatch, getState) => {
@@ -729,7 +729,7 @@ export function pinAccount(id) {
dispatch(pinAccountFail(error));
});
};
-}
+};
export function unpinAccount(id) {
return (dispatch, getState) => {
@@ -741,49 +741,49 @@ export function unpinAccount(id) {
dispatch(unpinAccountFail(error));
});
};
-}
+};
export function pinAccountRequest(id) {
return {
type: ACCOUNT_PIN_REQUEST,
id,
};
-}
+};
export function pinAccountSuccess(relationship) {
return {
type: ACCOUNT_PIN_SUCCESS,
relationship,
};
-}
+};
export function pinAccountFail(error) {
return {
type: ACCOUNT_PIN_FAIL,
error,
};
-}
+};
export function unpinAccountRequest(id) {
return {
type: ACCOUNT_UNPIN_REQUEST,
id,
};
-}
+};
export function unpinAccountSuccess(relationship) {
return {
type: ACCOUNT_UNPIN_SUCCESS,
relationship,
};
-}
+};
export function unpinAccountFail(error) {
return {
type: ACCOUNT_UNPIN_FAIL,
error,
};
-}
+};
export const revealAccount = id => ({
type: ACCOUNT_REVEAL,
diff --git a/app/javascript/mastodon/actions/alerts.js b/app/javascript/mastodon/actions/alerts.js
index 0220b0af5..1670f9c10 100644
--- a/app/javascript/mastodon/actions/alerts.js
+++ b/app/javascript/mastodon/actions/alerts.js
@@ -17,13 +17,13 @@ export function dismissAlert(alert) {
type: ALERT_DISMISS,
alert,
};
-}
+};
export function clearAlert() {
return {
type: ALERT_CLEAR,
};
-}
+};
export function showAlert(title = messages.unexpectedTitle, message = messages.unexpectedMessage, message_values = undefined) {
return {
@@ -32,7 +32,7 @@ export function showAlert(title = messages.unexpectedTitle, message = messages.u
message,
message_values,
};
-}
+};
export function showAlertForError(error, skipNotFound = false) {
if (error.response) {
diff --git a/app/javascript/mastodon/actions/announcements.js b/app/javascript/mastodon/actions/announcements.js
index 586dcfd33..1bdea909f 100644
--- a/app/javascript/mastodon/actions/announcements.js
+++ b/app/javascript/mastodon/actions/announcements.js
@@ -102,7 +102,7 @@ export const addReaction = (announcementId, name) => (dispatch, getState) => {
dispatch(addReactionRequest(announcementId, name, alreadyAdded));
}
- api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => {
+ api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${name}`).then(() => {
dispatch(addReactionSuccess(announcementId, name, alreadyAdded));
}).catch(err => {
if (!alreadyAdded) {
@@ -136,7 +136,7 @@ export const addReactionFail = (announcementId, name, error) => ({
export const removeReaction = (announcementId, name) => (dispatch, getState) => {
dispatch(removeReactionRequest(announcementId, name));
- api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => {
+ api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${name}`).then(() => {
dispatch(removeReactionSuccess(announcementId, name));
}).catch(err => {
dispatch(removeReactionFail(announcementId, name, err));
diff --git a/app/javascript/mastodon/actions/blocks.js b/app/javascript/mastodon/actions/blocks.js
index 192aa3ce4..fd9881302 100644
--- a/app/javascript/mastodon/actions/blocks.js
+++ b/app/javascript/mastodon/actions/blocks.js
@@ -24,13 +24,13 @@ export function fetchBlocks() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(fetchBlocksFail(error)));
};
-}
+};
export function fetchBlocksRequest() {
return {
type: BLOCKS_FETCH_REQUEST,
};
-}
+};
export function fetchBlocksSuccess(accounts, next) {
return {
@@ -38,14 +38,14 @@ export function fetchBlocksSuccess(accounts, next) {
accounts,
next,
};
-}
+};
export function fetchBlocksFail(error) {
return {
type: BLOCKS_FETCH_FAIL,
error,
};
-}
+};
export function expandBlocks() {
return (dispatch, getState) => {
@@ -64,13 +64,13 @@ export function expandBlocks() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(expandBlocksFail(error)));
};
-}
+};
export function expandBlocksRequest() {
return {
type: BLOCKS_EXPAND_REQUEST,
};
-}
+};
export function expandBlocksSuccess(accounts, next) {
return {
@@ -78,14 +78,14 @@ export function expandBlocksSuccess(accounts, next) {
accounts,
next,
};
-}
+};
export function expandBlocksFail(error) {
return {
type: BLOCKS_EXPAND_FAIL,
error,
};
-}
+};
export function initBlockModal(account) {
return dispatch => {
diff --git a/app/javascript/mastodon/actions/bookmarks.js b/app/javascript/mastodon/actions/bookmarks.js
index 3c8eec546..544ed2ff2 100644
--- a/app/javascript/mastodon/actions/bookmarks.js
+++ b/app/javascript/mastodon/actions/bookmarks.js
@@ -25,13 +25,13 @@ export function fetchBookmarkedStatuses() {
dispatch(fetchBookmarkedStatusesFail(error));
});
};
-}
+};
export function fetchBookmarkedStatusesRequest() {
return {
type: BOOKMARKED_STATUSES_FETCH_REQUEST,
};
-}
+};
export function fetchBookmarkedStatusesSuccess(statuses, next) {
return {
@@ -39,14 +39,14 @@ export function fetchBookmarkedStatusesSuccess(statuses, next) {
statuses,
next,
};
-}
+};
export function fetchBookmarkedStatusesFail(error) {
return {
type: BOOKMARKED_STATUSES_FETCH_FAIL,
error,
};
-}
+};
export function expandBookmarkedStatuses() {
return (dispatch, getState) => {
@@ -66,13 +66,13 @@ export function expandBookmarkedStatuses() {
dispatch(expandBookmarkedStatusesFail(error));
});
};
-}
+};
export function expandBookmarkedStatusesRequest() {
return {
type: BOOKMARKED_STATUSES_EXPAND_REQUEST,
};
-}
+};
export function expandBookmarkedStatusesSuccess(statuses, next) {
return {
@@ -80,11 +80,11 @@ export function expandBookmarkedStatusesSuccess(statuses, next) {
statuses,
next,
};
-}
+};
export function expandBookmarkedStatusesFail(error) {
return {
type: BOOKMARKED_STATUSES_EXPAND_FAIL,
error,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/columns.js b/app/javascript/mastodon/actions/columns.js
index 302c3f0f9..9b87415fb 100644
--- a/app/javascript/mastodon/actions/columns.js
+++ b/app/javascript/mastodon/actions/columns.js
@@ -15,7 +15,7 @@ export function addColumn(id, params) {
dispatch(saveSettings());
};
-}
+};
export function removeColumn(uuid) {
return dispatch => {
@@ -26,7 +26,7 @@ export function removeColumn(uuid) {
dispatch(saveSettings());
};
-}
+};
export function moveColumn(uuid, direction) {
return dispatch => {
@@ -38,7 +38,7 @@ export function moveColumn(uuid, direction) {
dispatch(saveSettings());
};
-}
+};
export function changeColumnParams(uuid, path, value) {
return dispatch => {
diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js
index 531a5eb2b..a9b7efc4a 100644
--- a/app/javascript/mastodon/actions/compose.js
+++ b/app/javascript/mastodon/actions/compose.js
@@ -94,14 +94,14 @@ export function setComposeToStatus(status, text, spoiler_text) {
text,
spoiler_text,
};
-}
+};
export function changeCompose(text) {
return {
type: COMPOSE_CHANGE,
text: text,
};
-}
+};
export function replyCompose(status, routerHistory) {
return (dispatch, getState) => {
@@ -112,19 +112,19 @@ export function replyCompose(status, routerHistory) {
ensureComposeIsVisible(getState, routerHistory);
};
-}
+};
export function cancelReplyCompose() {
return {
type: COMPOSE_REPLY_CANCEL,
};
-}
+};
export function resetCompose() {
return {
type: COMPOSE_RESET,
};
-}
+};
export function mentionCompose(account, routerHistory) {
return (dispatch, getState) => {
@@ -135,7 +135,7 @@ export function mentionCompose(account, routerHistory) {
ensureComposeIsVisible(getState, routerHistory);
};
-}
+};
export function directCompose(account, routerHistory) {
return (dispatch, getState) => {
@@ -146,7 +146,7 @@ export function directCompose(account, routerHistory) {
ensureComposeIsVisible(getState, routerHistory);
};
-}
+};
export function submitCompose(routerHistory) {
return function (dispatch, getState) {
@@ -211,27 +211,27 @@ export function submitCompose(routerHistory) {
dispatch(submitComposeFail(error));
});
};
-}
+};
export function submitComposeRequest() {
return {
type: COMPOSE_SUBMIT_REQUEST,
};
-}
+};
export function submitComposeSuccess(status) {
return {
type: COMPOSE_SUBMIT_SUCCESS,
status: status,
};
-}
+};
export function submitComposeFail(error) {
return {
type: COMPOSE_SUBMIT_FAIL,
error: error,
};
-}
+};
export function uploadCompose(files) {
return function (dispatch, getState) {
@@ -294,9 +294,9 @@ export function uploadCompose(files) {
}
});
}).catch(error => dispatch(uploadComposeFail(error)));
- }
+ };
};
-}
+};
export const uploadComposeProcessing = () => ({
type: COMPOSE_UPLOAD_PROCESSING,
@@ -354,14 +354,14 @@ export function initMediaEditModal(id) {
dispatch(openModal('FOCAL_POINT', { id }));
};
-}
+};
export function onChangeMediaDescription(description) {
return {
type: COMPOSE_CHANGE_MEDIA_DESCRIPTION,
description,
};
-}
+};
export function onChangeMediaFocus(focusX, focusY) {
return {
@@ -369,7 +369,7 @@ export function onChangeMediaFocus(focusX, focusY) {
focusX,
focusY,
};
-}
+};
export function changeUploadCompose(id, params) {
return (dispatch, getState) => {
@@ -381,14 +381,14 @@ export function changeUploadCompose(id, params) {
dispatch(changeUploadComposeFail(id, error));
});
};
-}
+};
export function changeUploadComposeRequest() {
return {
type: COMPOSE_UPLOAD_CHANGE_REQUEST,
skipLoading: true,
};
-}
+};
export function changeUploadComposeSuccess(media) {
return {
@@ -396,7 +396,7 @@ export function changeUploadComposeSuccess(media) {
media: media,
skipLoading: true,
};
-}
+};
export function changeUploadComposeFail(error) {
return {
@@ -404,14 +404,14 @@ export function changeUploadComposeFail(error) {
error: error,
skipLoading: true,
};
-}
+};
export function uploadComposeRequest() {
return {
type: COMPOSE_UPLOAD_REQUEST,
skipLoading: true,
};
-}
+};
export function uploadComposeProgress(loaded, total) {
return {
@@ -419,7 +419,7 @@ export function uploadComposeProgress(loaded, total) {
loaded: loaded,
total: total,
};
-}
+};
export function uploadComposeSuccess(media, file) {
return {
@@ -428,7 +428,7 @@ export function uploadComposeSuccess(media, file) {
file: file,
skipLoading: true,
};
-}
+};
export function uploadComposeFail(error) {
return {
@@ -436,14 +436,14 @@ export function uploadComposeFail(error) {
error: error,
skipLoading: true,
};
-}
+};
export function undoUploadCompose(media_id) {
return {
type: COMPOSE_UPLOAD_UNDO,
media_id: media_id,
};
-}
+};
export function clearComposeSuggestions() {
if (fetchComposeSuggestionsAccountsController) {
@@ -452,7 +452,7 @@ export function clearComposeSuggestions() {
return {
type: COMPOSE_SUGGESTIONS_CLEAR,
};
-}
+};
const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => {
if (fetchComposeSuggestionsAccountsController) {
@@ -530,7 +530,7 @@ export function fetchComposeSuggestions(token) {
break;
}
};
-}
+};
export function readyComposeSuggestionsEmojis(token, emojis) {
return {
@@ -538,7 +538,7 @@ export function readyComposeSuggestionsEmojis(token, emojis) {
token,
emojis,
};
-}
+};
export function readyComposeSuggestionsAccounts(token, accounts) {
return {
@@ -546,7 +546,7 @@ export function readyComposeSuggestionsAccounts(token, accounts) {
token,
accounts,
};
-}
+};
export const readyComposeSuggestionsTags = (token, tags) => ({
type: COMPOSE_SUGGESTIONS_READY,
@@ -591,7 +591,7 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
});
}
};
-}
+};
export function updateSuggestionTags(token) {
return {
@@ -652,19 +652,19 @@ export function mountCompose() {
return {
type: COMPOSE_MOUNT,
};
-}
+};
export function unmountCompose() {
return {
type: COMPOSE_UNMOUNT,
};
-}
+};
export function changeComposeSensitivity() {
return {
type: COMPOSE_SENSITIVITY_CHANGE,
};
-}
+};
export const changeComposeLanguage = language => ({
type: COMPOSE_LANGUAGE_CHANGE,
@@ -675,21 +675,21 @@ export function changeComposeSpoilerness() {
return {
type: COMPOSE_SPOILERNESS_CHANGE,
};
-}
+};
export function changeComposeSpoilerText(text) {
return {
type: COMPOSE_SPOILER_TEXT_CHANGE,
text,
};
-}
+};
export function changeComposeVisibility(value) {
return {
type: COMPOSE_VISIBILITY_CHANGE,
value,
};
-}
+};
export function insertEmojiCompose(position, emoji, needsSpace) {
return {
@@ -698,33 +698,33 @@ export function insertEmojiCompose(position, emoji, needsSpace) {
emoji,
needsSpace,
};
-}
+};
export function changeComposing(value) {
return {
type: COMPOSE_COMPOSING_CHANGE,
value,
};
-}
+};
export function addPoll() {
return {
type: COMPOSE_POLL_ADD,
};
-}
+};
export function removePoll() {
return {
type: COMPOSE_POLL_REMOVE,
};
-}
+};
export function addPollOption(title) {
return {
type: COMPOSE_POLL_OPTION_ADD,
title,
};
-}
+};
export function changePollOption(index, title) {
return {
@@ -732,14 +732,14 @@ export function changePollOption(index, title) {
index,
title,
};
-}
+};
export function removePollOption(index) {
return {
type: COMPOSE_POLL_OPTION_REMOVE,
index,
};
-}
+};
export function changePollSettings(expiresIn, isMultiple) {
return {
@@ -747,4 +747,4 @@ export function changePollSettings(expiresIn, isMultiple) {
expiresIn,
isMultiple,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/custom_emojis.js b/app/javascript/mastodon/actions/custom_emojis.js
index 9ec8156b1..7b7d0091b 100644
--- a/app/javascript/mastodon/actions/custom_emojis.js
+++ b/app/javascript/mastodon/actions/custom_emojis.js
@@ -14,14 +14,14 @@ export function fetchCustomEmojis() {
dispatch(fetchCustomEmojisFail(error));
});
};
-}
+};
export function fetchCustomEmojisRequest() {
return {
type: CUSTOM_EMOJIS_FETCH_REQUEST,
skipLoading: true,
};
-}
+};
export function fetchCustomEmojisSuccess(custom_emojis) {
return {
@@ -29,7 +29,7 @@ export function fetchCustomEmojisSuccess(custom_emojis) {
custom_emojis,
skipLoading: true,
};
-}
+};
export function fetchCustomEmojisFail(error) {
return {
@@ -37,4 +37,4 @@ export function fetchCustomEmojisFail(error) {
error,
skipLoading: true,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/domain_blocks.js b/app/javascript/mastodon/actions/domain_blocks.js
index d06de20a2..34a33a654 100644
--- a/app/javascript/mastodon/actions/domain_blocks.js
+++ b/app/javascript/mastodon/actions/domain_blocks.js
@@ -29,14 +29,14 @@ export function blockDomain(domain) {
dispatch(blockDomainFail(domain, err));
});
};
-}
+};
export function blockDomainRequest(domain) {
return {
type: DOMAIN_BLOCK_REQUEST,
domain,
};
-}
+};
export function blockDomainSuccess(domain, accounts) {
return {
@@ -44,7 +44,7 @@ export function blockDomainSuccess(domain, accounts) {
domain,
accounts,
};
-}
+};
export function blockDomainFail(domain, error) {
return {
@@ -52,7 +52,7 @@ export function blockDomainFail(domain, error) {
domain,
error,
};
-}
+};
export function unblockDomain(domain) {
return (dispatch, getState) => {
@@ -66,14 +66,14 @@ export function unblockDomain(domain) {
dispatch(unblockDomainFail(domain, err));
});
};
-}
+};
export function unblockDomainRequest(domain) {
return {
type: DOMAIN_UNBLOCK_REQUEST,
domain,
};
-}
+};
export function unblockDomainSuccess(domain, accounts) {
return {
@@ -81,7 +81,7 @@ export function unblockDomainSuccess(domain, accounts) {
domain,
accounts,
};
-}
+};
export function unblockDomainFail(domain, error) {
return {
@@ -89,7 +89,7 @@ export function unblockDomainFail(domain, error) {
domain,
error,
};
-}
+};
export function fetchDomainBlocks() {
return (dispatch, getState) => {
@@ -102,13 +102,13 @@ export function fetchDomainBlocks() {
dispatch(fetchDomainBlocksFail(err));
});
};
-}
+};
export function fetchDomainBlocksRequest() {
return {
type: DOMAIN_BLOCKS_FETCH_REQUEST,
};
-}
+};
export function fetchDomainBlocksSuccess(domains, next) {
return {
@@ -116,14 +116,14 @@ export function fetchDomainBlocksSuccess(domains, next) {
domains,
next,
};
-}
+};
export function fetchDomainBlocksFail(error) {
return {
type: DOMAIN_BLOCKS_FETCH_FAIL,
error,
};
-}
+};
export function expandDomainBlocks() {
return (dispatch, getState) => {
@@ -142,13 +142,13 @@ export function expandDomainBlocks() {
dispatch(expandDomainBlocksFail(err));
});
};
-}
+};
export function expandDomainBlocksRequest() {
return {
type: DOMAIN_BLOCKS_EXPAND_REQUEST,
};
-}
+};
export function expandDomainBlocksSuccess(domains, next) {
return {
@@ -156,11 +156,11 @@ export function expandDomainBlocksSuccess(domains, next) {
domains,
next,
};
-}
+};
export function expandDomainBlocksFail(error) {
return {
type: DOMAIN_BLOCKS_EXPAND_FAIL,
error,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/emojis.js b/app/javascript/mastodon/actions/emojis.js
index 3b5d53996..7cd9d4b7b 100644
--- a/app/javascript/mastodon/actions/emojis.js
+++ b/app/javascript/mastodon/actions/emojis.js
@@ -11,4 +11,4 @@ export function useEmoji(emoji) {
dispatch(saveSettings());
};
-}
+};
diff --git a/app/javascript/mastodon/actions/favourites.js b/app/javascript/mastodon/actions/favourites.js
index 7388e0c58..9448b1efe 100644
--- a/app/javascript/mastodon/actions/favourites.js
+++ b/app/javascript/mastodon/actions/favourites.js
@@ -25,14 +25,14 @@ export function fetchFavouritedStatuses() {
dispatch(fetchFavouritedStatusesFail(error));
});
};
-}
+};
export function fetchFavouritedStatusesRequest() {
return {
type: FAVOURITED_STATUSES_FETCH_REQUEST,
skipLoading: true,
};
-}
+};
export function fetchFavouritedStatusesSuccess(statuses, next) {
return {
@@ -41,7 +41,7 @@ export function fetchFavouritedStatusesSuccess(statuses, next) {
next,
skipLoading: true,
};
-}
+};
export function fetchFavouritedStatusesFail(error) {
return {
@@ -49,7 +49,7 @@ export function fetchFavouritedStatusesFail(error) {
error,
skipLoading: true,
};
-}
+};
export function expandFavouritedStatuses() {
return (dispatch, getState) => {
@@ -69,13 +69,13 @@ export function expandFavouritedStatuses() {
dispatch(expandFavouritedStatusesFail(error));
});
};
-}
+};
export function expandFavouritedStatusesRequest() {
return {
type: FAVOURITED_STATUSES_EXPAND_REQUEST,
};
-}
+};
export function expandFavouritedStatusesSuccess(statuses, next) {
return {
@@ -83,11 +83,11 @@ export function expandFavouritedStatusesSuccess(statuses, next) {
statuses,
next,
};
-}
+};
export function expandFavouritedStatusesFail(error) {
return {
type: FAVOURITED_STATUSES_EXPAND_FAIL,
error,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/height_cache.js b/app/javascript/mastodon/actions/height_cache.js
index a8645410c..4c752993f 100644
--- a/app/javascript/mastodon/actions/height_cache.js
+++ b/app/javascript/mastodon/actions/height_cache.js
@@ -8,10 +8,10 @@ export function setHeight (key, id, height) {
id,
height,
};
-}
+};
export function clearHeight () {
return {
type: HEIGHT_CACHE_CLEAR,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/interactions.js b/app/javascript/mastodon/actions/interactions.js
index bc35736ff..d60ccc1fb 100644
--- a/app/javascript/mastodon/actions/interactions.js
+++ b/app/javascript/mastodon/actions/interactions.js
@@ -54,7 +54,7 @@ export function reblog(status, visibility) {
dispatch(reblogFail(status, error));
});
};
-}
+};
export function unreblog(status) {
return (dispatch, getState) => {
@@ -67,7 +67,7 @@ export function unreblog(status) {
dispatch(unreblogFail(status, error));
});
};
-}
+};
export function reblogRequest(status) {
return {
@@ -75,7 +75,7 @@ export function reblogRequest(status) {
status: status,
skipLoading: true,
};
-}
+};
export function reblogSuccess(status) {
return {
@@ -83,7 +83,7 @@ export function reblogSuccess(status) {
status: status,
skipLoading: true,
};
-}
+};
export function reblogFail(status, error) {
return {
@@ -92,7 +92,7 @@ export function reblogFail(status, error) {
error: error,
skipLoading: true,
};
-}
+};
export function unreblogRequest(status) {
return {
@@ -100,7 +100,7 @@ export function unreblogRequest(status) {
status: status,
skipLoading: true,
};
-}
+};
export function unreblogSuccess(status) {
return {
@@ -108,7 +108,7 @@ export function unreblogSuccess(status) {
status: status,
skipLoading: true,
};
-}
+};
export function unreblogFail(status, error) {
return {
@@ -117,7 +117,7 @@ export function unreblogFail(status, error) {
error: error,
skipLoading: true,
};
-}
+};
export function favourite(status) {
return function (dispatch, getState) {
@@ -130,7 +130,7 @@ export function favourite(status) {
dispatch(favouriteFail(status, error));
});
};
-}
+};
export function unfavourite(status) {
return (dispatch, getState) => {
@@ -143,7 +143,7 @@ export function unfavourite(status) {
dispatch(unfavouriteFail(status, error));
});
};
-}
+};
export function favouriteRequest(status) {
return {
@@ -151,7 +151,7 @@ export function favouriteRequest(status) {
status: status,
skipLoading: true,
};
-}
+};
export function favouriteSuccess(status) {
return {
@@ -159,7 +159,7 @@ export function favouriteSuccess(status) {
status: status,
skipLoading: true,
};
-}
+};
export function favouriteFail(status, error) {
return {
@@ -168,7 +168,7 @@ export function favouriteFail(status, error) {
error: error,
skipLoading: true,
};
-}
+};
export function unfavouriteRequest(status) {
return {
@@ -176,7 +176,7 @@ export function unfavouriteRequest(status) {
status: status,
skipLoading: true,
};
-}
+};
export function unfavouriteSuccess(status) {
return {
@@ -184,7 +184,7 @@ export function unfavouriteSuccess(status) {
status: status,
skipLoading: true,
};
-}
+};
export function unfavouriteFail(status, error) {
return {
@@ -193,7 +193,7 @@ export function unfavouriteFail(status, error) {
error: error,
skipLoading: true,
};
-}
+};
export function bookmark(status) {
return function (dispatch, getState) {
@@ -206,7 +206,7 @@ export function bookmark(status) {
dispatch(bookmarkFail(status, error));
});
};
-}
+};
export function unbookmark(status) {
return (dispatch, getState) => {
@@ -219,14 +219,14 @@ export function unbookmark(status) {
dispatch(unbookmarkFail(status, error));
});
};
-}
+};
export function bookmarkRequest(status) {
return {
type: BOOKMARK_REQUEST,
status: status,
};
-}
+};
export function bookmarkSuccess(status, response) {
return {
@@ -234,7 +234,7 @@ export function bookmarkSuccess(status, response) {
status: status,
response: response,
};
-}
+};
export function bookmarkFail(status, error) {
return {
@@ -242,14 +242,14 @@ export function bookmarkFail(status, error) {
status: status,
error: error,
};
-}
+};
export function unbookmarkRequest(status) {
return {
type: UNBOOKMARK_REQUEST,
status: status,
};
-}
+};
export function unbookmarkSuccess(status, response) {
return {
@@ -257,7 +257,7 @@ export function unbookmarkSuccess(status, response) {
status: status,
response: response,
};
-}
+};
export function unbookmarkFail(status, error) {
return {
@@ -265,7 +265,7 @@ export function unbookmarkFail(status, error) {
status: status,
error: error,
};
-}
+};
export function fetchReblogs(id) {
return (dispatch, getState) => {
@@ -278,14 +278,14 @@ export function fetchReblogs(id) {
dispatch(fetchReblogsFail(id, error));
});
};
-}
+};
export function fetchReblogsRequest(id) {
return {
type: REBLOGS_FETCH_REQUEST,
id,
};
-}
+};
export function fetchReblogsSuccess(id, accounts) {
return {
@@ -293,14 +293,14 @@ export function fetchReblogsSuccess(id, accounts) {
id,
accounts,
};
-}
+};
export function fetchReblogsFail(id, error) {
return {
type: REBLOGS_FETCH_FAIL,
error,
};
-}
+};
export function fetchFavourites(id) {
return (dispatch, getState) => {
@@ -313,14 +313,14 @@ export function fetchFavourites(id) {
dispatch(fetchFavouritesFail(id, error));
});
};
-}
+};
export function fetchFavouritesRequest(id) {
return {
type: FAVOURITES_FETCH_REQUEST,
id,
};
-}
+};
export function fetchFavouritesSuccess(id, accounts) {
return {
@@ -328,14 +328,14 @@ export function fetchFavouritesSuccess(id, accounts) {
id,
accounts,
};
-}
+};
export function fetchFavouritesFail(id, error) {
return {
type: FAVOURITES_FETCH_FAIL,
error,
};
-}
+};
export function pin(status) {
return (dispatch, getState) => {
@@ -348,7 +348,7 @@ export function pin(status) {
dispatch(pinFail(status, error));
});
};
-}
+};
export function pinRequest(status) {
return {
@@ -356,7 +356,7 @@ export function pinRequest(status) {
status,
skipLoading: true,
};
-}
+};
export function pinSuccess(status) {
return {
@@ -364,7 +364,7 @@ export function pinSuccess(status) {
status,
skipLoading: true,
};
-}
+};
export function pinFail(status, error) {
return {
@@ -373,7 +373,7 @@ export function pinFail(status, error) {
error,
skipLoading: true,
};
-}
+};
export function unpin (status) {
return (dispatch, getState) => {
@@ -386,7 +386,7 @@ export function unpin (status) {
dispatch(unpinFail(status, error));
});
};
-}
+};
export function unpinRequest(status) {
return {
@@ -394,7 +394,7 @@ export function unpinRequest(status) {
status,
skipLoading: true,
};
-}
+};
export function unpinSuccess(status) {
return {
@@ -402,7 +402,7 @@ export function unpinSuccess(status) {
status,
skipLoading: true,
};
-}
+};
export function unpinFail(status, error) {
return {
@@ -411,4 +411,4 @@ export function unpinFail(status, error) {
error,
skipLoading: true,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/markers.js b/app/javascript/mastodon/actions/markers.js
index 16ec7fe77..b7f406cb8 100644
--- a/app/javascript/mastodon/actions/markers.js
+++ b/app/javascript/mastodon/actions/markers.js
@@ -101,7 +101,7 @@ export function submitMarkersSuccess({ home, notifications }) {
home: (home || {}).last_read_id,
notifications: (notifications || {}).last_read_id,
};
-}
+};
export function submitMarkers(params = {}) {
const result = (dispatch, getState) => debouncedSubmitMarkers(dispatch, getState);
@@ -111,7 +111,7 @@ export function submitMarkers(params = {}) {
}
return result;
-}
+};
export const fetchMarkers = () => (dispatch, getState) => {
const params = { timeline: ['notifications'] };
@@ -130,7 +130,7 @@ export function fetchMarkersRequest() {
type: MARKERS_FETCH_REQUEST,
skipLoading: true,
};
-}
+};
export function fetchMarkersSuccess(markers) {
return {
@@ -138,7 +138,7 @@ export function fetchMarkersSuccess(markers) {
markers,
skipLoading: true,
};
-}
+};
export function fetchMarkersFail(error) {
return {
@@ -147,4 +147,4 @@ export function fetchMarkersFail(error) {
skipLoading: true,
skipAlert: true,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/modal.js b/app/javascript/mastodon/actions/modal.js
index ef2ae0e4c..3e576fab8 100644
--- a/app/javascript/mastodon/actions/modal.js
+++ b/app/javascript/mastodon/actions/modal.js
@@ -7,7 +7,7 @@ export function openModal(type, props) {
modalType: type,
modalProps: props,
};
-}
+};
export function closeModal(type, options = { ignoreFocus: false }) {
return {
@@ -15,4 +15,4 @@ export function closeModal(type, options = { ignoreFocus: false }) {
modalType: type,
ignoreFocus: options.ignoreFocus,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/mutes.js b/app/javascript/mastodon/actions/mutes.js
index cbc42a67e..d8874f353 100644
--- a/app/javascript/mastodon/actions/mutes.js
+++ b/app/javascript/mastodon/actions/mutes.js
@@ -26,13 +26,13 @@ export function fetchMutes() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(fetchMutesFail(error)));
};
-}
+};
export function fetchMutesRequest() {
return {
type: MUTES_FETCH_REQUEST,
};
-}
+};
export function fetchMutesSuccess(accounts, next) {
return {
@@ -40,14 +40,14 @@ export function fetchMutesSuccess(accounts, next) {
accounts,
next,
};
-}
+};
export function fetchMutesFail(error) {
return {
type: MUTES_FETCH_FAIL,
error,
};
-}
+};
export function expandMutes() {
return (dispatch, getState) => {
@@ -66,13 +66,13 @@ export function expandMutes() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(expandMutesFail(error)));
};
-}
+};
export function expandMutesRequest() {
return {
type: MUTES_EXPAND_REQUEST,
};
-}
+};
export function expandMutesSuccess(accounts, next) {
return {
@@ -80,14 +80,14 @@ export function expandMutesSuccess(accounts, next) {
accounts,
next,
};
-}
+};
export function expandMutesFail(error) {
return {
type: MUTES_EXPAND_FAIL,
error,
};
-}
+};
export function initMuteModal(account) {
return dispatch => {
diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js
index 93588d3c0..d4588db2c 100644
--- a/app/javascript/mastodon/actions/notifications.js
+++ b/app/javascript/mastodon/actions/notifications.js
@@ -118,7 +118,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
});
}
};
-}
+};
const excludeTypesFromSettings = state => state.getIn(['settings', 'notifications', 'shows']).filter(enabled => !enabled).keySeq().toJS();
@@ -197,14 +197,14 @@ export function expandNotifications({ maxId, forceLoad } = {}, done = noOp) {
done();
});
};
-}
+};
export function expandNotificationsRequest(isLoadingMore) {
return {
type: NOTIFICATIONS_EXPAND_REQUEST,
skipLoading: !isLoadingMore,
};
-}
+};
export function expandNotificationsSuccess(notifications, next, isLoadingMore, isLoadingRecent, usePendingItems) {
return {
@@ -215,7 +215,7 @@ export function expandNotificationsSuccess(notifications, next, isLoadingMore, i
usePendingItems,
skipLoading: !isLoadingMore,
};
-}
+};
export function expandNotificationsFail(error, isLoadingMore) {
return {
@@ -224,7 +224,7 @@ export function expandNotificationsFail(error, isLoadingMore) {
skipLoading: !isLoadingMore,
skipAlert: !isLoadingMore || error.name === 'AbortError',
};
-}
+};
export function clearNotifications() {
return (dispatch, getState) => {
@@ -234,14 +234,14 @@ export function clearNotifications() {
api(getState).post('/api/v1/notifications/clear');
};
-}
+};
export function scrollTopNotifications(top) {
return {
type: NOTIFICATIONS_SCROLL_TOP,
top,
};
-}
+};
export function setFilter (filterType) {
return dispatch => {
@@ -253,7 +253,7 @@ export function setFilter (filterType) {
dispatch(expandNotifications({ forceLoad: true }));
dispatch(saveSettings());
};
-}
+};
export const mountNotifications = () => ({
type: NOTIFICATIONS_MOUNT,
@@ -291,7 +291,7 @@ export function requestBrowserPermission(callback = noOp) {
callback(permission);
});
};
-}
+};
export function setBrowserSupport (value) {
return {
diff --git a/app/javascript/mastodon/actions/pin_statuses.js b/app/javascript/mastodon/actions/pin_statuses.js
index e2de98ca9..77abba7b5 100644
--- a/app/javascript/mastodon/actions/pin_statuses.js
+++ b/app/javascript/mastodon/actions/pin_statuses.js
@@ -18,13 +18,13 @@ export function fetchPinnedStatuses() {
dispatch(fetchPinnedStatusesFail(error));
});
};
-}
+};
export function fetchPinnedStatusesRequest() {
return {
type: PINNED_STATUSES_FETCH_REQUEST,
};
-}
+};
export function fetchPinnedStatusesSuccess(statuses, next) {
return {
@@ -32,11 +32,11 @@ export function fetchPinnedStatusesSuccess(statuses, next) {
statuses,
next,
};
-}
+};
export function fetchPinnedStatusesFail(error) {
return {
type: PINNED_STATUSES_FETCH_FAIL,
error,
};
-}
+};
diff --git a/app/javascript/mastodon/actions/search.js b/app/javascript/mastodon/actions/search.js
index 666c6c223..e333c0ea7 100644
--- a/app/javascript/mastodon/actions/search.js
+++ b/app/javascript/mastodon/actions/search.js
@@ -19,13 +19,13 @@ export function changeSearch(value) {
type: SEARCH_CHANGE,
value,
};
-}
+};
export function clearSearch() {
return {
type: SEARCH_CLEAR,
};
-}
+};
export function submitSearch() {
return (dispatch, getState) => {
@@ -60,13 +60,13 @@ export function submitSearch() {
dispatch(fetchSearchFail(error));
});
};
-}
+};
export function fetchSearchRequest() {
return {
type: SEARCH_FETCH_REQUEST,
};
-}
+};
export function fetchSearchSuccess(results, searchTerm) {
return {
@@ -74,14 +74,14 @@ export function fetchSearchSuccess(results, searchTerm) {
results,
searchTerm,
};
-}
+};
export function fetchSearchFail(error) {
return {
type: SEARCH_FETCH_FAIL,
error,
};
-}
+};
export const expandSearch = type => (dispatch, getState) => {
const value = getState().getIn(['search', 'value']);
diff --git a/app/javascript/mastodon/actions/settings.js b/app/javascript/mastodon/actions/settings.js
index 6ae001b6f..6bf85e464 100644
--- a/app/javascript/mastodon/actions/settings.js
+++ b/app/javascript/mastodon/actions/settings.js
@@ -15,7 +15,7 @@ export function changeSetting(path, value) {
dispatch(saveSettings());
};
-}
+};
const debouncedSave = debounce((dispatch, getState) => {
if (getState().getIn(['settings', 'saved'])) {
@@ -31,4 +31,4 @@ const debouncedSave = debounce((dispatch, getState) => {
export function saveSettings() {
return (dispatch, getState) => debouncedSave(dispatch, getState);
-}
+};
diff --git a/app/javascript/mastodon/actions/statuses.js b/app/javascript/mastodon/actions/statuses.js
index 275280a53..4ae1b21e0 100644
--- a/app/javascript/mastodon/actions/statuses.js
+++ b/app/javascript/mastodon/actions/statuses.js
@@ -45,7 +45,7 @@ export function fetchStatusRequest(id, skipLoading) {
id,
skipLoading,
};
-}
+};
export function fetchStatus(id, forceFetch = false) {
return (dispatch, getState) => {
@@ -66,14 +66,14 @@ export function fetchStatus(id, forceFetch = false) {
dispatch(fetchStatusFail(id, error, skipLoading));
});
};
-}
+};
export function fetchStatusSuccess(skipLoading) {
return {
type: STATUS_FETCH_SUCCESS,
skipLoading,
};
-}
+};
export function fetchStatusFail(id, error, skipLoading) {
return {
@@ -83,7 +83,7 @@ export function fetchStatusFail(id, error, skipLoading) {
skipLoading,
skipAlert: true,
};
-}
+};
export function redraft(status, raw_text) {
return {
@@ -91,7 +91,7 @@ export function redraft(status, raw_text) {
status,
raw_text,
};
-}
+};
export const editStatus = (id, routerHistory) => (dispatch, getState) => {
let status = getState().getIn(['statuses', id]);
@@ -147,21 +147,21 @@ export function deleteStatus(id, routerHistory, withRedraft = false) {
dispatch(deleteStatusFail(id, error));
});
};
-}
+};
export function deleteStatusRequest(id) {
return {
type: STATUS_DELETE_REQUEST,
id: id,
};
-}
+};
export function deleteStatusSuccess(id) {
return {
type: STATUS_DELETE_SUCCESS,
id: id,
};
-}
+};
export function deleteStatusFail(id, error) {
return {
@@ -169,7 +169,7 @@ export function deleteStatusFail(id, error) {
id: id,
error: error,
};
-}
+};
export const updateStatus = status => dispatch =>
dispatch(importFetchedStatus(status));
@@ -190,14 +190,14 @@ export function fetchContext(id) {
dispatch(fetchContextFail(id, error));
});
};
-}
+};
export function fetchContextRequest(id) {
return {
type: CONTEXT_FETCH_REQUEST,
id,
};
-}
+};
export function fetchContextSuccess(id, ancestors, descendants) {
return {
@@ -207,7 +207,7 @@ export function fetchContextSuccess(id, ancestors, descendants) {
descendants,
statuses: ancestors.concat(descendants),
};
-}
+};
export function fetchContextFail(id, error) {
return {
@@ -216,7 +216,7 @@ export function fetchContextFail(id, error) {
error,
skipAlert: true,
};
-}
+};
export function muteStatus(id) {
return (dispatch, getState) => {
@@ -228,21 +228,21 @@ export function muteStatus(id) {
dispatch(muteStatusFail(id, error));
});
};
-}
+};
export function muteStatusRequest(id) {
return {
type: STATUS_MUTE_REQUEST,
id,
};
-}
+};
export function muteStatusSuccess(id) {
return {
type: STATUS_MUTE_SUCCESS,
id,
};
-}
+};
export function muteStatusFail(id, error) {
return {
@@ -250,7 +250,7 @@ export function muteStatusFail(id, error) {
id,
error,
};
-}
+};
export function unmuteStatus(id) {
return (dispatch, getState) => {
@@ -262,21 +262,21 @@ export function unmuteStatus(id) {
dispatch(unmuteStatusFail(id, error));
});
};
-}
+};
export function unmuteStatusRequest(id) {
return {
type: STATUS_UNMUTE_REQUEST,
id,
};
-}
+};
export function unmuteStatusSuccess(id) {
return {
type: STATUS_UNMUTE_SUCCESS,
id,
};
-}
+};
export function unmuteStatusFail(id, error) {
return {
@@ -284,7 +284,7 @@ export function unmuteStatusFail(id, error) {
id,
error,
};
-}
+};
export function hideStatus(ids) {
if (!Array.isArray(ids)) {
@@ -295,7 +295,7 @@ export function hideStatus(ids) {
type: STATUS_HIDE,
ids,
};
-}
+};
export function revealStatus(ids) {
if (!Array.isArray(ids)) {
@@ -306,7 +306,7 @@ export function revealStatus(ids) {
type: STATUS_REVEAL,
ids,
};
-}
+};
export function toggleStatusCollapse(id, isCollapsed) {
return {
@@ -314,7 +314,7 @@ export function toggleStatusCollapse(id, isCollapsed) {
id,
isCollapsed,
};
-}
+};
export const translateStatus = id => (dispatch, getState) => {
dispatch(translateStatusRequest(id));
diff --git a/app/javascript/mastodon/actions/store.js b/app/javascript/mastodon/actions/store.js
index b3030467b..34dcafc51 100644
--- a/app/javascript/mastodon/actions/store.js
+++ b/app/javascript/mastodon/actions/store.js
@@ -21,4 +21,4 @@ export function hydrateStore(rawState) {
dispatch(hydrateCompose());
dispatch(importFetchedAccounts(Object.values(rawState.accounts)));
};
-}
+};
diff --git a/app/javascript/mastodon/actions/suggestions.js b/app/javascript/mastodon/actions/suggestions.js
index 9e8cd1ea4..1f1116e75 100644
--- a/app/javascript/mastodon/actions/suggestions.js
+++ b/app/javascript/mastodon/actions/suggestions.js
@@ -21,14 +21,14 @@ export function fetchSuggestions(withRelationships = false) {
}
}).catch(error => dispatch(fetchSuggestionsFail(error)));
};
-}
+};
export function fetchSuggestionsRequest() {
return {
type: SUGGESTIONS_FETCH_REQUEST,
skipLoading: true,
};
-}
+};
export function fetchSuggestionsSuccess(suggestions) {
return {
@@ -36,7 +36,7 @@ export function fetchSuggestionsSuccess(suggestions) {
suggestions,
skipLoading: true,
};
-}
+};
export function fetchSuggestionsFail(error) {
return {
@@ -45,7 +45,7 @@ export function fetchSuggestionsFail(error) {
skipLoading: true,
skipAlert: true,
};
-}
+};
export const dismissSuggestion = accountId => (dispatch, getState) => {
dispatch({
diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js
index 4f772a55f..a3434908f 100644
--- a/app/javascript/mastodon/actions/timelines.js
+++ b/app/javascript/mastodon/actions/timelines.js
@@ -51,7 +51,7 @@ export function updateTimeline(timeline, status, accept) {
dispatch(submitMarkers());
}
};
-}
+};
export function deleteFromTimelines(id) {
return (dispatch, getState) => {
@@ -67,13 +67,13 @@ export function deleteFromTimelines(id) {
reblogOf,
});
};
-}
+};
export function clearTimeline(timeline) {
return (dispatch) => {
dispatch({ type: TIMELINE_CLEAR, timeline });
};
-}
+};
const noOp = () => {};
@@ -122,7 +122,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
done();
});
};
-}
+};
export function fillTimelineGaps(timelineId, path, params = {}, done = noOp) {
return (dispatch, getState) => {
@@ -168,7 +168,7 @@ export function expandTimelineRequest(timeline, isLoadingMore) {
timeline,
skipLoading: !isLoadingMore,
};
-}
+};
export function expandTimelineSuccess(timeline, statuses, next, partial, isLoadingRecent, isLoadingMore, usePendingItems) {
return {
@@ -181,7 +181,7 @@ export function expandTimelineSuccess(timeline, statuses, next, partial, isLoadi
usePendingItems,
skipLoading: !isLoadingMore,
};
-}
+};
export function expandTimelineFail(timeline, error, isLoadingMore) {
return {
@@ -191,7 +191,7 @@ export function expandTimelineFail(timeline, error, isLoadingMore) {
skipLoading: !isLoadingMore,
skipNotFound: timeline.startsWith('account:'),
};
-}
+};
export function scrollTopTimeline(timeline, top) {
return {
@@ -199,7 +199,7 @@ export function scrollTopTimeline(timeline, top) {
timeline,
top,
};
-}
+};
export function connectTimeline(timeline) {
return {
@@ -207,7 +207,7 @@ export function connectTimeline(timeline) {
timeline,
usePendingItems: preferPendingItems,
};
-}
+};
export const disconnectTimeline = timeline => ({
type: TIMELINE_DISCONNECT,
diff --git a/app/javascript/mastodon/common.js b/app/javascript/mastodon/common.js
index 8f3505303..6818aa5d5 100644
--- a/app/javascript/mastodon/common.js
+++ b/app/javascript/mastodon/common.js
@@ -9,4 +9,4 @@ export function start() {
} catch (e) {
// If called twice
}
-}
+};
diff --git a/app/javascript/mastodon/compare_id.js b/app/javascript/mastodon/compare_id.js
index d2bd74f44..66cf51c4b 100644
--- a/app/javascript/mastodon/compare_id.js
+++ b/app/javascript/mastodon/compare_id.js
@@ -8,4 +8,4 @@ export default function compareId (id1, id2) {
} else {
return id1.length > id2.length ? 1 : -1;
}
-}
+};
diff --git a/app/javascript/mastodon/components/admin/Retention.js b/app/javascript/mastodon/components/admin/Retention.js
index f312a45eb..47c9e7151 100644
--- a/app/javascript/mastodon/components/admin/Retention.js
+++ b/app/javascript/mastodon/components/admin/Retention.js
@@ -137,7 +137,7 @@ export default class Retention extends React.PureComponent {
break;
default:
title = ;
- }
+ };
return (
diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js
index 40c86afdf..2a1fedb93 100644
--- a/app/javascript/mastodon/components/status_action_bar.js
+++ b/app/javascript/mastodon/components/status_action_bar.js
@@ -246,13 +246,12 @@ class StatusActionBar extends ImmutablePureComponent {
menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen });
- if (publicStatus && isRemote) {
- menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') });
- }
-
- menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
-
if (publicStatus) {
+ if (isRemote) {
+ menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') });
+ }
+
+ menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
}
diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js
index 002b71e93..724719f74 100644
--- a/app/javascript/mastodon/containers/mastodon.js
+++ b/app/javascript/mastodon/containers/mastodon.js
@@ -23,9 +23,7 @@ export const store = configureStore();
const hydrateAction = hydrateStore(initialState);
store.dispatch(hydrateAction);
-if (initialState.meta.me) {
- store.dispatch(fetchCustomEmojis());
-}
+store.dispatch(fetchCustomEmojis());
const createIdentityContext = state => ({
signedIn: !!state.meta.me,
diff --git a/app/javascript/mastodon/features/account/components/follow_request_note.js b/app/javascript/mastodon/features/account/components/follow_request_note.js
deleted file mode 100644
index 300ae4266..000000000
--- a/app/javascript/mastodon/features/account/components/follow_request_note.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import Icon from 'mastodon/components/icon';
-
-export default class FollowRequestNote extends ImmutablePureComponent {
-
- static propTypes = {
- account: ImmutablePropTypes.map.isRequired,
- };
-
- render () {
- const { account, onAuthorize, onReject } = this.props;
-
- return (
-
-
- }} />
-
-
-
-
-
-
-
-
- );
- }
-
-}
diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js
index dddbf4dd4..f117412be 100644
--- a/app/javascript/mastodon/features/account/components/header.js
+++ b/app/javascript/mastodon/features/account/components/header.js
@@ -14,7 +14,6 @@ import ShortNumber from 'mastodon/components/short_number';
import { NavLink } from 'react-router-dom';
import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';
import AccountNoteContainer from '../containers/account_note_container';
-import FollowRequestNoteContainer from '../containers/follow_request_note_container';
import { PERMISSION_MANAGE_USERS } from 'mastodon/permissions';
import { Helmet } from 'react-helmet';
@@ -312,8 +311,6 @@ class Header extends ImmutablePureComponent {
return (
- {!(suspended || hidden || account.get('moved')) && account.getIn(['relationship', 'requested_by']) &&
}
-
{!suspended && info}
diff --git a/app/javascript/mastodon/features/account/containers/follow_request_note_container.js b/app/javascript/mastodon/features/account/containers/follow_request_note_container.js
deleted file mode 100644
index c33c3de59..000000000
--- a/app/javascript/mastodon/features/account/containers/follow_request_note_container.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { connect } from 'react-redux';
-import FollowRequestNote from '../components/follow_request_note';
-import { authorizeFollowRequest, rejectFollowRequest } from 'mastodon/actions/accounts';
-
-const mapDispatchToProps = (dispatch, { account }) => ({
- onAuthorize () {
- dispatch(authorizeFollowRequest(account.get('id')));
- },
-
- onReject () {
- dispatch(rejectFollowRequest(account.get('id')));
- },
-});
-
-export default connect(null, mapDispatchToProps)(FollowRequestNote);
diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.js b/app/javascript/mastodon/features/account_gallery/components/media_item.js
index 13fd7fe03..f16fe07f1 100644
--- a/app/javascript/mastodon/features/account_gallery/components/media_item.js
+++ b/app/javascript/mastodon/features/account_gallery/components/media_item.js
@@ -104,7 +104,6 @@ export default class MediaItem extends ImmutablePureComponent {