fix merge conflict due to "toot" in locale
This commit is contained in:
commit
6dcb18ea80
|
@ -1,8 +1,8 @@
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
orbs:
|
orbs:
|
||||||
ruby: circleci/ruby@1.4.1
|
ruby: circleci/ruby@2.0.0
|
||||||
node: circleci/node@5.0.1
|
node: circleci/node@5.0.3
|
||||||
|
|
||||||
executors:
|
executors:
|
||||||
default:
|
default:
|
||||||
|
@ -19,11 +19,11 @@ executors:
|
||||||
DB_USER: root
|
DB_USER: root
|
||||||
DISABLE_SIMPLECOV: true
|
DISABLE_SIMPLECOV: true
|
||||||
RAILS_ENV: test
|
RAILS_ENV: test
|
||||||
- image: cimg/postgres:14.0
|
- image: cimg/postgres:14.5
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: root
|
POSTGRES_USER: root
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
- image: cimg/redis:6.2
|
- image: cimg/redis:7.0
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
install-system-dependencies:
|
install-system-dependencies:
|
||||||
|
@ -45,7 +45,7 @@ commands:
|
||||||
bundle config without 'development production'
|
bundle config without 'development production'
|
||||||
name: Set bundler settings
|
name: Set bundler settings
|
||||||
- ruby/install-deps:
|
- ruby/install-deps:
|
||||||
bundler-version: '2.3.8'
|
bundler-version: '2.3.26'
|
||||||
key: ruby<< parameters.ruby-version >>-gems-v1
|
key: ruby<< parameters.ruby-version >>-gems-v1
|
||||||
wait-db:
|
wait-db:
|
||||||
steps:
|
steps:
|
||||||
|
@ -68,7 +68,9 @@ jobs:
|
||||||
cache-version: v1
|
cache-version: v1
|
||||||
pkg-manager: yarn
|
pkg-manager: yarn
|
||||||
- run:
|
- run:
|
||||||
command: ./bin/rails assets:precompile
|
command: |
|
||||||
|
export NODE_OPTIONS=--openssl-legacy-provider
|
||||||
|
./bin/rails assets:precompile
|
||||||
name: Precompile assets
|
name: Precompile assets
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
paths:
|
paths:
|
||||||
|
@ -219,5 +221,5 @@ workflows:
|
||||||
pkg-manager: yarn
|
pkg-manager: yarn
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
version: lts
|
version: '16.19'
|
||||||
yarn-run: test:jest
|
yarn-run: test:jest
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
version = 1
|
|
||||||
|
|
||||||
test_patterns = ["app/javascript/mastodon/**/__tests__/**"]
|
|
||||||
|
|
||||||
exclude_patterns = [
|
|
||||||
"db/migrate/**",
|
|
||||||
"db/post_migrate/**"
|
|
||||||
]
|
|
||||||
|
|
||||||
[[analyzers]]
|
|
||||||
name = "ruby"
|
|
||||||
enabled = true
|
|
||||||
|
|
||||||
[[analyzers]]
|
|
||||||
name = "javascript"
|
|
||||||
enabled = true
|
|
||||||
|
|
||||||
[analyzers.meta]
|
|
||||||
environment = [
|
|
||||||
"browser",
|
|
||||||
"jest",
|
|
||||||
"nodejs"
|
|
||||||
]
|
|
|
@ -9,7 +9,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
|
||||||
# The value is a comma-separated list of allowed domains
|
# The value is a comma-separated list of allowed domains
|
||||||
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"
|
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"
|
||||||
|
|
||||||
# [Choice] Node.js version: lts/*, 16, 14, 12, 10
|
# [Choice] Node.js version: lts/*, 18, 16, 14
|
||||||
ARG NODE_VERSION="lts/*"
|
ARG NODE_VERSION="lts/*"
|
||||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "Mastodon",
|
"name": "Mastodon",
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "app",
|
"service": "app",
|
||||||
"workspaceFolder": "/workspaces/mastodon",
|
"workspaceFolder": "/mastodon",
|
||||||
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
// Set *default* container specific settings.json values on container create.
|
||||||
"settings": {},
|
"settings": {},
|
||||||
|
@ -15,12 +15,18 @@
|
||||||
"webben.browserslist"
|
"webben.browserslist"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/sshd:1": {
|
||||||
|
"version": "latest"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// This can be used to network with other containers or the host.
|
// This can be used to network with other containers or the host.
|
||||||
"forwardPorts": [3000, 4000],
|
"forwardPorts": [3000, 4000],
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
"postCreateCommand": "bundle install --path vendor/bundle && yarn install && git checkout -- Gemfile.lock && ./bin/rails db:setup",
|
"postCreateCommand": ".devcontainer/post-create.sh",
|
||||||
|
|
||||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||||
"remoteUser": "vscode"
|
"remoteUser": "vscode"
|
||||||
|
|
|
@ -11,9 +11,9 @@ services:
|
||||||
# Use -bullseye variants on local arm64/Apple Silicon.
|
# Use -bullseye variants on local arm64/Apple Silicon.
|
||||||
VARIANT: '3.0-bullseye'
|
VARIANT: '3.0-bullseye'
|
||||||
# Optional Node.js version to install
|
# Optional Node.js version to install
|
||||||
NODE_VERSION: '14'
|
NODE_VERSION: '16'
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/workspaces/mastodon:cached
|
- ..:/mastodon:cached
|
||||||
environment:
|
environment:
|
||||||
RAILS_ENV: development
|
RAILS_ENV: development
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/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
|
|
@ -10,3 +10,4 @@ insert_final_newline = true
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
|
@ -103,7 +103,7 @@ VAPID_PUBLIC_KEY=
|
||||||
|
|
||||||
# Sending mail
|
# Sending mail
|
||||||
# ------------
|
# ------------
|
||||||
SMTP_SERVER=smtp.mailgun.org
|
SMTP_SERVER=
|
||||||
SMTP_PORT=587
|
SMTP_PORT=587
|
||||||
SMTP_LOGIN=
|
SMTP_LOGIN=
|
||||||
SMTP_PASSWORD=
|
SMTP_PASSWORD=
|
||||||
|
|
103
.eslintrc.js
103
.eslintrc.js
|
@ -1,6 +1,13 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
|
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:react/recommended',
|
||||||
|
'plugin:jsx-a11y/recommended',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
],
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true,
|
node: true,
|
||||||
|
@ -64,8 +71,8 @@ module.exports = {
|
||||||
eqeqeq: 'error',
|
eqeqeq: 'error',
|
||||||
indent: ['warn', 2],
|
indent: ['warn', 2],
|
||||||
'jsx-quotes': ['error', 'prefer-single'],
|
'jsx-quotes': ['error', 'prefer-single'],
|
||||||
|
'no-case-declarations': 'off',
|
||||||
'no-catch-shadow': 'error',
|
'no-catch-shadow': 'error',
|
||||||
'no-cond-assign': 'error',
|
|
||||||
'no-console': [
|
'no-console': [
|
||||||
'warn',
|
'warn',
|
||||||
{
|
{
|
||||||
|
@ -75,18 +82,14 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'no-fallthrough': 'error',
|
'no-empty': 'off',
|
||||||
'no-irregular-whitespace': 'error',
|
|
||||||
'no-mixed-spaces-and-tabs': 'warn',
|
|
||||||
'no-nested-ternary': 'warn',
|
|
||||||
'no-restricted-properties': [
|
'no-restricted-properties': [
|
||||||
'error',
|
'error',
|
||||||
{ property: 'substring', message: 'Use .slice instead of .substring.' },
|
{ property: 'substring', message: 'Use .slice instead of .substring.' },
|
||||||
{ property: 'substr', message: 'Use .slice instead of .substr.' },
|
{ property: 'substr', message: 'Use .slice instead of .substr.' },
|
||||||
],
|
],
|
||||||
|
'no-self-assign': 'off',
|
||||||
'no-trailing-spaces': 'warn',
|
'no-trailing-spaces': 'warn',
|
||||||
'no-undef': 'error',
|
|
||||||
'no-unreachable': 'error',
|
|
||||||
'no-unused-expressions': 'error',
|
'no-unused-expressions': 'error',
|
||||||
'no-unused-vars': [
|
'no-unused-vars': [
|
||||||
'error',
|
'error',
|
||||||
|
@ -105,61 +108,47 @@ module.exports = {
|
||||||
],
|
],
|
||||||
quotes: ['error', 'single'],
|
quotes: ['error', 'single'],
|
||||||
semi: 'error',
|
semi: 'error',
|
||||||
strict: 'off',
|
|
||||||
'valid-typeof': 'error',
|
'valid-typeof': 'error',
|
||||||
|
|
||||||
'react/jsx-boolean-value': 'error',
|
'react/jsx-boolean-value': 'error',
|
||||||
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
|
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
|
||||||
'react/jsx-curly-spacing': 'error',
|
'react/jsx-curly-spacing': 'error',
|
||||||
|
'react/display-name': 'off',
|
||||||
'react/jsx-equals-spacing': 'error',
|
'react/jsx-equals-spacing': 'error',
|
||||||
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
|
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
|
||||||
'react/jsx-indent': ['error', 2],
|
'react/jsx-indent': ['error', 2],
|
||||||
'react/jsx-no-bind': 'error',
|
'react/jsx-no-bind': 'error',
|
||||||
'react/jsx-no-duplicate-props': 'error',
|
'react/jsx-no-target-blank': 'off',
|
||||||
'react/jsx-no-undef': 'error',
|
|
||||||
'react/jsx-tag-spacing': 'error',
|
'react/jsx-tag-spacing': 'error',
|
||||||
'react/jsx-uses-react': 'error',
|
|
||||||
'react/jsx-uses-vars': 'error',
|
|
||||||
'react/jsx-wrap-multilines': 'error',
|
'react/jsx-wrap-multilines': 'error',
|
||||||
'react/no-multi-comp': 'off',
|
'react/no-deprecated': 'off',
|
||||||
'react/no-string-refs': 'error',
|
'react/no-unknown-property': 'off',
|
||||||
'react/prop-types': 'error',
|
|
||||||
'react/self-closing-comp': 'error',
|
'react/self-closing-comp': 'error',
|
||||||
|
|
||||||
|
// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js
|
||||||
'jsx-a11y/accessible-emoji': 'warn',
|
'jsx-a11y/accessible-emoji': 'warn',
|
||||||
'jsx-a11y/alt-text': 'warn',
|
'jsx-a11y/click-events-have-key-events': 'off',
|
||||||
'jsx-a11y/anchor-has-content': 'warn',
|
'jsx-a11y/label-has-associated-control': 'off',
|
||||||
'jsx-a11y/anchor-is-valid': [
|
'jsx-a11y/media-has-caption': 'off',
|
||||||
'warn',
|
'jsx-a11y/no-autofocus': 'off',
|
||||||
{
|
// recommended rule is:
|
||||||
components: [
|
// 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
||||||
'Link',
|
// 'error',
|
||||||
'NavLink',
|
// {
|
||||||
],
|
// tr: ['none', 'presentation'],
|
||||||
specialLink: [
|
// canvas: ['img'],
|
||||||
'to',
|
// },
|
||||||
],
|
// ],
|
||||||
aspect: [
|
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'off',
|
||||||
'noHref',
|
// recommended rule is:
|
||||||
'invalidHref',
|
// 'jsx-a11y/no-noninteractive-element-interactions': [
|
||||||
'preferButton',
|
// 'error',
|
||||||
],
|
// {
|
||||||
},
|
// body: ['onError', 'onLoad'],
|
||||||
],
|
// iframe: ['onError', 'onLoad'],
|
||||||
'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',
|
// img: ['onError', 'onLoad'],
|
||||||
'jsx-a11y/aria-props': 'warn',
|
// },
|
||||||
'jsx-a11y/aria-proptypes': 'warn',
|
// ],
|
||||||
'jsx-a11y/aria-role': 'warn',
|
|
||||||
'jsx-a11y/aria-unsupported-elements': 'warn',
|
|
||||||
'jsx-a11y/heading-has-content': 'warn',
|
|
||||||
'jsx-a11y/html-has-lang': 'warn',
|
|
||||||
'jsx-a11y/iframe-has-title': 'warn',
|
|
||||||
'jsx-a11y/img-redundant-alt': 'warn',
|
|
||||||
'jsx-a11y/interactive-supports-focus': 'warn',
|
|
||||||
'jsx-a11y/label-has-for': 'off',
|
|
||||||
'jsx-a11y/mouse-events-have-key-events': 'warn',
|
|
||||||
'jsx-a11y/no-access-key': 'warn',
|
|
||||||
'jsx-a11y/no-distracting-elements': 'warn',
|
|
||||||
'jsx-a11y/no-noninteractive-element-interactions': [
|
'jsx-a11y/no-noninteractive-element-interactions': [
|
||||||
'warn',
|
'warn',
|
||||||
{
|
{
|
||||||
|
@ -168,8 +157,18 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
// recommended rule is:
|
||||||
|
// 'jsx-a11y/no-noninteractive-tabindex': [
|
||||||
|
// 'error',
|
||||||
|
// {
|
||||||
|
// tags: [],
|
||||||
|
// roles: ['tabpanel'],
|
||||||
|
// allowExpressionValues: true,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
'jsx-a11y/no-noninteractive-tabindex': 'off',
|
||||||
'jsx-a11y/no-onchange': 'warn',
|
'jsx-a11y/no-onchange': 'warn',
|
||||||
'jsx-a11y/no-redundant-roles': 'warn',
|
// recommended is full 'error'
|
||||||
'jsx-a11y/no-static-element-interactions': [
|
'jsx-a11y/no-static-element-interactions': [
|
||||||
'warn',
|
'warn',
|
||||||
{
|
{
|
||||||
|
@ -178,11 +177,8 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'jsx-a11y/role-has-required-aria-props': 'warn',
|
|
||||||
'jsx-a11y/role-supports-aria-props': 'off',
|
|
||||||
'jsx-a11y/scope': 'warn',
|
|
||||||
'jsx-a11y/tabindex-no-positive': 'warn',
|
|
||||||
|
|
||||||
|
// See https://github.com/import-js/eslint-plugin-import/blob/main/config/recommended.js
|
||||||
'import/extensions': [
|
'import/extensions': [
|
||||||
'error',
|
'error',
|
||||||
'always',
|
'always',
|
||||||
|
@ -201,7 +197,6 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'import/no-unresolved': 'error',
|
|
||||||
'import/no-webpack-loader-syntax': 'error',
|
'import/no-webpack-loader-syntax': 'error',
|
||||||
|
|
||||||
'promise/catch-or-return': [
|
'promise/catch-or-return': [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: Bug Report
|
name: Bug Report
|
||||||
description: If something isn't working as expected
|
description: If something isn't working as expected
|
||||||
labels: bug
|
labels: [bug]
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: Feature Request
|
name: Feature Request
|
||||||
description: I have a suggestion
|
description: I have a suggestion
|
||||||
labels: suggestion
|
labels: [suggestion]
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
|
|
|
@ -4,8 +4,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/build-image.yml
|
- .github/workflows/build-image.yml
|
||||||
|
@ -17,8 +15,14 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
build-image:
|
build-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: hadolint/hadolint-action@v3.1.0
|
||||||
- uses: docker/setup-qemu-action@v2
|
- uses: docker/setup-qemu-action@v2
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
- uses: docker/login-action@v2
|
- uses: docker/login-action@v2
|
||||||
|
@ -31,18 +35,17 @@ jobs:
|
||||||
id: meta
|
id: meta
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository_owner }}/mastodon
|
images: ghcr.io/${{ github.repository_owner }}/mastodon
|
||||||
flavor: |
|
|
||||||
latest=auto
|
|
||||||
tags: |
|
tags: |
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
type=edge,branch=main
|
type=edge,branch=main
|
||||||
type=pep440,pattern={{raw}}
|
type=sha,prefix=,format=long
|
||||||
type=pep440,pattern=v{{major}}.{{minor}}
|
- uses: docker/build-push-action@v4
|
||||||
type=ref,event=pr
|
|
||||||
- uses: docker/build-push-action@v3
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
provenance: false
|
||||||
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/mastodon:edge
|
cache-from: type=gha
|
||||||
cache-to: type=inline
|
cache-to: type=gha,mode=max
|
||||||
|
|
|
@ -25,12 +25,12 @@ jobs:
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.0'
|
ruby-version: .ruby-version
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
- name: Check locale file normalization
|
- name: Check locale file normalization
|
||||||
run: bundle exec i18n-tasks check-normalized
|
run: bundle exec i18n-tasks check-normalized
|
||||||
- name: Check for unused strings
|
- name: Check for unused strings
|
||||||
run: bundle exec i18n-tasks unused -l en
|
run: bundle exec i18n-tasks unused
|
||||||
- name: Check for wrong string interpolations
|
- name: Check for wrong string interpolations
|
||||||
run: bundle exec i18n-tasks check-consistent-interpolations
|
run: bundle exec i18n-tasks check-consistent-interpolations
|
||||||
- name: Check that all required locale files exist
|
- name: Check that all required locale files exist
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
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}}'
|
|
@ -0,0 +1,48 @@
|
||||||
|
name: CSS Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- 'stylelint.config.js'
|
||||||
|
- '**/*.css'
|
||||||
|
- '**/*.scss'
|
||||||
|
- '.github/workflows/lint-css.yml'
|
||||||
|
- '.github/stylelint-matcher.json'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- 'stylelint.config.js'
|
||||||
|
- '**/*.css'
|
||||||
|
- '**/*.scss'
|
||||||
|
- '.github/workflows/lint-css.yml'
|
||||||
|
- '.github/stylelint-matcher.json'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- uses: xt0rted/stylelint-problem-matcher@v1
|
||||||
|
|
||||||
|
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
||||||
|
|
||||||
|
- name: Stylelint
|
||||||
|
run: yarn test:lint:sass
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: JavaScript Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- '.eslint*'
|
||||||
|
- '**/*.js'
|
||||||
|
- '.github/workflows/lint-js.yml'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- '.eslint*'
|
||||||
|
- '**/*.js'
|
||||||
|
- '.github/workflows/lint-js.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: ESLint
|
||||||
|
run: yarn test:lint:js
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: JSON Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- '**/*.json'
|
||||||
|
- '.github/workflows/lint-json.yml'
|
||||||
|
- '!app/javascript/mastodon/locales/*.json'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- '**/*.json'
|
||||||
|
- '.github/workflows/lint-json.yml'
|
||||||
|
- '!app/javascript/mastodon/locales/*.json'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Prettier
|
||||||
|
run: yarn prettier --check "**/*.json"
|
|
@ -0,0 +1,41 @@
|
||||||
|
name: Ruby Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
paths:
|
||||||
|
- 'Gemfile*'
|
||||||
|
- '.rubocop.yml'
|
||||||
|
- '**/*.rb'
|
||||||
|
- '**/*.rake'
|
||||||
|
- '.github/workflows/lint-ruby.yml'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'Gemfile*'
|
||||||
|
- '.rubocop.yml'
|
||||||
|
- '**/*.rb'
|
||||||
|
- '**/*.rake'
|
||||||
|
- '.github/workflows/lint-ruby.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set-up RuboCop Problem Mathcher
|
||||||
|
uses: r7kamura/rubocop-problem-matchers-action@v1
|
||||||
|
|
||||||
|
- name: Run rubocop
|
||||||
|
uses: github/super-linter@v4
|
||||||
|
env:
|
||||||
|
DEFAULT_BRANCH: main
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
LINTER_RULES_PATH: .
|
||||||
|
RUBY_CONFIG_FILE: .rubocop.yml
|
||||||
|
VALIDATE_ALL_CODEBASE: false
|
||||||
|
VALIDATE_RUBY: true
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: YML Linting
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'dependabot/**'
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- '**/*.yaml'
|
||||||
|
- '**/*.yml'
|
||||||
|
- '.github/workflows/lint-yml.yml'
|
||||||
|
- '!config/locales/*.yml'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- '.prettier*'
|
||||||
|
- '**/*.yaml'
|
||||||
|
- '**/*.yml'
|
||||||
|
- '.github/workflows/lint-yml.yml'
|
||||||
|
- '!config/locales/*.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Install all yarn packages
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Prettier
|
||||||
|
run: yarn prettier --check "**/*.{yml,yaml}"
|
|
@ -1,83 +0,0 @@
|
||||||
---
|
|
||||||
#################################
|
|
||||||
#################################
|
|
||||||
## Super Linter GitHub Actions ##
|
|
||||||
#################################
|
|
||||||
#################################
|
|
||||||
name: Lint Code Base
|
|
||||||
|
|
||||||
#
|
|
||||||
# Documentation:
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
|
||||||
#
|
|
||||||
|
|
||||||
#############################
|
|
||||||
# Start the job on all push #
|
|
||||||
#############################
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore: [main]
|
|
||||||
# Remove the line above to run when pushing to master
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Set the Job #
|
|
||||||
###############
|
|
||||||
permissions:
|
|
||||||
checks: write
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
statuses: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
# Name the Job
|
|
||||||
name: Lint Code Base
|
|
||||||
# Set the agent to run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
##################
|
|
||||||
# Load all steps #
|
|
||||||
##################
|
|
||||||
steps:
|
|
||||||
##########################
|
|
||||||
# Checkout the code base #
|
|
||||||
##########################
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
# Full git history is needed to get a proper list of changed files within `super-linter`
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set-up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16.x
|
|
||||||
cache: yarn
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile
|
|
||||||
- name: Set-up RuboCop Problem Mathcher
|
|
||||||
uses: r7kamura/rubocop-problem-matchers-action@v1
|
|
||||||
- name: Set-up Stylelint Problem Matcher
|
|
||||||
uses: xt0rted/stylelint-problem-matcher@v1
|
|
||||||
# https://github.com/xt0rted/stylelint-problem-matcher/issues/360
|
|
||||||
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
|
||||||
|
|
||||||
################################
|
|
||||||
# Run Linter against code base #
|
|
||||||
################################
|
|
||||||
- name: Lint Code Base
|
|
||||||
uses: github/super-linter@v4
|
|
||||||
env:
|
|
||||||
CSS_FILE_NAME: stylelint.config.js
|
|
||||||
DEFAULT_BRANCH: main
|
|
||||||
NO_COLOR: 1 # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
|
|
||||||
LINTER_RULES_PATH: .
|
|
||||||
RUBY_CONFIG_FILE: .rubocop.yml
|
|
||||||
VALIDATE_ALL_CODEBASE: false
|
|
||||||
VALIDATE_CSS: true
|
|
||||||
VALIDATE_JAVASCRIPT_ES: true
|
|
||||||
VALIDATE_RUBY: true
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
name: PR Needs Rebase
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request_target:
|
||||||
|
types: [synchronize]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label-rebase-needed:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check for merge conflicts
|
||||||
|
uses: eps1lon/actions-label-merge-conflict@releases/2.x
|
||||||
|
with:
|
||||||
|
dirtyLabel: 'rebase needed :construction:'
|
||||||
|
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged.
|
|
@ -1,138 +0,0 @@
|
||||||
# This is a GitHub workflow defining a set of jobs with a set of steps.
|
|
||||||
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
|
||||||
#
|
|
||||||
name: Test chart
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "chart/**"
|
|
||||||
- "!**.md"
|
|
||||||
- ".github/workflows/test-chart.yml"
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- "chart/**"
|
|
||||||
- "!**.md"
|
|
||||||
- ".github/workflows/test-chart.yml"
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: chart
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-templates:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
|
|
||||||
- name: Install dependencies (yamllint)
|
|
||||||
run: pip install yamllint
|
|
||||||
|
|
||||||
- run: helm dependency update
|
|
||||||
|
|
||||||
- name: helm lint
|
|
||||||
run: |
|
|
||||||
helm lint . \
|
|
||||||
--values dev-values.yaml
|
|
||||||
|
|
||||||
- name: helm template
|
|
||||||
run: |
|
|
||||||
helm template . \
|
|
||||||
--values dev-values.yaml \
|
|
||||||
--output-dir rendered-templates
|
|
||||||
|
|
||||||
- name: yamllint (only on templates we manage)
|
|
||||||
run: |
|
|
||||||
rm -rf rendered-templates/mastodon/charts
|
|
||||||
|
|
||||||
yamllint rendered-templates \
|
|
||||||
--config-data "{rules: {indentation: {spaces: 2}, line-length: disable}}"
|
|
||||||
|
|
||||||
# This job helps us validate that rendered templates are valid k8s resources
|
|
||||||
# against a k8s api-server, via "helm template --validate", but also that a
|
|
||||||
# basic configuration can be used to successfully startup mastodon.
|
|
||||||
#
|
|
||||||
test-install:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
timeout-minutes: 15
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# k3s-channel reference: https://update.k3s.io/v1-release/channels
|
|
||||||
- k3s-channel: latest
|
|
||||||
- k3s-channel: stable
|
|
||||||
|
|
||||||
# This represents the oldest configuration we test against.
|
|
||||||
#
|
|
||||||
# The k8s version chosen is based on the oldest still supported k8s
|
|
||||||
# version among two managed k8s services, GKE, EKS.
|
|
||||||
# - GKE: https://endoflife.date/google-kubernetes-engine
|
|
||||||
# - EKS: https://endoflife.date/amazon-eks
|
|
||||||
#
|
|
||||||
# The helm client's version can influence what helper functions is
|
|
||||||
# available for use in the templates, currently we need v3.6.0 or
|
|
||||||
# higher.
|
|
||||||
#
|
|
||||||
- k3s-channel: v1.21
|
|
||||||
helm-version: v3.6.0
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# This action starts a k8s cluster with NetworkPolicy enforcement and
|
|
||||||
# installs both kubectl and helm.
|
|
||||||
#
|
|
||||||
# ref: https://github.com/jupyterhub/action-k3s-helm#readme
|
|
||||||
#
|
|
||||||
- uses: jupyterhub/action-k3s-helm@v3
|
|
||||||
with:
|
|
||||||
k3s-channel: ${{ matrix.k3s-channel }}
|
|
||||||
helm-version: ${{ matrix.helm-version }}
|
|
||||||
metrics-enabled: false
|
|
||||||
traefik-enabled: false
|
|
||||||
docker-enabled: false
|
|
||||||
|
|
||||||
- run: helm dependency update
|
|
||||||
|
|
||||||
# Validate rendered helm templates against the k8s api-server
|
|
||||||
- name: helm template --validate
|
|
||||||
run: |
|
|
||||||
helm template --validate mastodon . \
|
|
||||||
--values dev-values.yaml
|
|
||||||
|
|
||||||
- name: helm install
|
|
||||||
run: |
|
|
||||||
helm install mastodon . \
|
|
||||||
--values dev-values.yaml \
|
|
||||||
--timeout 10m
|
|
||||||
|
|
||||||
# This actions provides a report about the state of the k8s cluster,
|
|
||||||
# providing logs etc on anything that has failed and workloads marked as
|
|
||||||
# important.
|
|
||||||
#
|
|
||||||
# ref: https://github.com/jupyterhub/action-k8s-namespace-report#readme
|
|
||||||
#
|
|
||||||
- name: Kubernetes namespace report
|
|
||||||
uses: jupyterhub/action-k8s-namespace-report@v1
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
important-workloads: >-
|
|
||||||
deploy/mastodon-sidekiq
|
|
||||||
deploy/mastodon-streaming
|
|
||||||
deploy/mastodon-web
|
|
||||||
job/mastodon-assets-precompile
|
|
||||||
job/mastodon-chewy-upgrade
|
|
||||||
job/mastodon-create-admin
|
|
||||||
job/mastodon-db-migrate
|
|
|
@ -44,12 +44,6 @@
|
||||||
/redis
|
/redis
|
||||||
/elasticsearch
|
/elasticsearch
|
||||||
|
|
||||||
# ignore Helm charts
|
|
||||||
/chart/*.tgz
|
|
||||||
|
|
||||||
# ignore Helm dependency charts
|
|
||||||
/chart/charts/*.tgz
|
|
||||||
|
|
||||||
# Ignore Apple files
|
# Ignore Apple files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
/redis
|
/redis
|
||||||
/elasticsearch
|
/elasticsearch
|
||||||
|
|
||||||
# ignore Helm dependency charts
|
|
||||||
/chart/charts/*.tgz
|
|
||||||
|
|
||||||
# Ignore Apple files
|
# Ignore Apple files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
@ -67,12 +64,25 @@ yarn-debug.log
|
||||||
# Ignore Docker option files
|
# Ignore Docker option files
|
||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
|
|
||||||
# Ignore Helm files
|
|
||||||
/chart
|
|
||||||
|
|
||||||
# Ignore emoji map file
|
# Ignore emoji map file
|
||||||
/app/javascript/mastodon/features/emoji/emoji_map.json
|
/app/javascript/mastodon/features/emoji/emoji_map.json
|
||||||
|
|
||||||
# Ignore locale files
|
# Ignore locale files
|
||||||
/app/javascript/mastodon/locales
|
/app/javascript/mastodon/locales
|
||||||
/config/locales
|
/config/locales
|
||||||
|
|
||||||
|
# Ignore vendored CSS reset
|
||||||
|
app/javascript/styles/mastodon/reset.scss
|
||||||
|
|
||||||
|
# Ignore glitch-soc emoji map file
|
||||||
|
/app/javascript/flavours/glitch/features/emoji/emoji_map.json
|
||||||
|
|
||||||
|
# Ignore glitch-soc locale files
|
||||||
|
/app/javascript/flavours/glitch/locales
|
||||||
|
/config/locales-glitch
|
||||||
|
|
||||||
|
# Ignore glitch-soc vendored CSS reset
|
||||||
|
app/javascript/flavours/glitch/styles/reset.scss
|
||||||
|
|
||||||
|
# Ignore win95 theme
|
||||||
|
app/javascript/styles/win95.scss
|
||||||
|
|
206
.rubocop.yml
206
.rubocop.yml
|
@ -1,12 +1,18 @@
|
||||||
require:
|
require:
|
||||||
- rubocop-rails
|
- rubocop-rails
|
||||||
|
- rubocop-rspec
|
||||||
|
- rubocop-performance
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: 2.5
|
TargetRubyVersion: 2.7
|
||||||
NewCops: disable
|
DisplayCopNames: true
|
||||||
|
DisplayStyleGuide: true
|
||||||
|
ExtraDetails: true
|
||||||
|
UseCache: true
|
||||||
|
CacheRootDirectory: tmp
|
||||||
|
NewCops: enable
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'spec/**/*'
|
- db/schema.rb
|
||||||
- 'db/**/*'
|
|
||||||
- 'app/views/**/*'
|
- 'app/views/**/*'
|
||||||
- 'config/**/*'
|
- 'config/**/*'
|
||||||
- 'bin/*'
|
- 'bin/*'
|
||||||
|
@ -67,15 +73,57 @@ Lint/UselessAccessModifier:
|
||||||
- class_methods
|
- class_methods
|
||||||
|
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Max: 115
|
Max: 34 # RuboCop default 17
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/mastodon/*_cli.rb'
|
- '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!
|
||||||
|
|
||||||
Metrics/BlockLength:
|
Metrics/BlockLength:
|
||||||
Max: 55
|
Max: 55
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/tasks/**/*'
|
|
||||||
- 'lib/mastodon/*_cli.rb'
|
- 'lib/mastodon/*_cli.rb'
|
||||||
|
CountComments: false
|
||||||
|
CountAsOne: [array, heredoc]
|
||||||
|
AllowedMethods:
|
||||||
|
- task
|
||||||
|
- namespace
|
||||||
|
- class_methods
|
||||||
|
- included
|
||||||
|
|
||||||
Metrics/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
Max: 3
|
Max: 3
|
||||||
|
@ -85,34 +133,144 @@ Metrics/BlockNesting:
|
||||||
Metrics/ClassLength:
|
Metrics/ClassLength:
|
||||||
CountComments: false
|
CountComments: false
|
||||||
Max: 500
|
Max: 500
|
||||||
|
CountAsOne: [array, heredoc]
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/mastodon/*_cli.rb'
|
- 'lib/mastodon/*_cli.rb'
|
||||||
|
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Max: 25
|
Max: 12
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/mastodon/*_cli.rb'
|
- 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!
|
||||||
|
|
||||||
Layout/LineLength:
|
Layout/LineLength:
|
||||||
|
Max: 140 # RuboCop default 120
|
||||||
|
AllowHeredoc: true
|
||||||
AllowURI: true
|
AllowURI: true
|
||||||
Enabled: false
|
IgnoreCopDirectives: true
|
||||||
|
AllowedPatterns:
|
||||||
|
# Allow comments to be long lines
|
||||||
|
- !ruby/regexp / \# .*$/
|
||||||
|
- !ruby/regexp /^\# .*$/
|
||||||
|
Exclude:
|
||||||
|
- lib/**/*cli*.rb
|
||||||
|
- db/*migrate/**/*
|
||||||
|
- db/seeds/**/*
|
||||||
|
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
CountComments: false
|
CountComments: false
|
||||||
Max: 65
|
CountAsOne: [array, heredoc]
|
||||||
|
Max: 25 # RuboCop default 10
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/mastodon/*_cli.rb'
|
- '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:
|
Metrics/ModuleLength:
|
||||||
CountComments: false
|
CountComments: false
|
||||||
Max: 200
|
Max: 200
|
||||||
|
CountAsOne: [array, heredoc]
|
||||||
|
|
||||||
Metrics/ParameterLists:
|
Metrics/ParameterLists:
|
||||||
Max: 5
|
Max: 5 # RuboCop default 5
|
||||||
CountKeywordArgs: true
|
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
|
||||||
|
|
||||||
Metrics/PerceivedComplexity:
|
Metrics/PerceivedComplexity:
|
||||||
Max: 25
|
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!
|
||||||
|
|
||||||
Naming/MemoizedInstanceVariableName:
|
Naming/MemoizedInstanceVariableName:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -243,6 +401,10 @@ Style/HashTransformKeys:
|
||||||
Style/HashTransformValues:
|
Style/HashTransformValues:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Style/HashSyntax:
|
||||||
|
Enabled: true
|
||||||
|
EnforcedStyle: ruby19_no_mixed_keys
|
||||||
|
|
||||||
Style/IfUnlessModifier:
|
Style/IfUnlessModifier:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
@ -263,9 +425,6 @@ Style/PercentLiteralDelimiters:
|
||||||
Style/PerlBackrefs:
|
Style/PerlBackrefs:
|
||||||
AutoCorrect: false
|
AutoCorrect: false
|
||||||
|
|
||||||
Style/RedundantAssignment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/RedundantFetchBlock:
|
Style/RedundantFetchBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
@ -288,7 +447,7 @@ Style/RegexpLiteral:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/RescueStandardError:
|
Style/RescueStandardError:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Style/SignalException:
|
Style/SignalException:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -307,3 +466,14 @@ Style/TrailingCommaInHashLiteral:
|
||||||
|
|
||||||
Style/UnpackFirst:
|
Style/UnpackFirst:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
RSpec/ScatteredSetup:
|
||||||
|
Enabled: false
|
||||||
|
RSpec/ImplicitExpect:
|
||||||
|
Enabled: false
|
||||||
|
RSpec/NamedSubject:
|
||||||
|
Enabled: false
|
||||||
|
RSpec/DescribeClass:
|
||||||
|
Enabled: false
|
||||||
|
RSpec/LetSetup:
|
||||||
|
Enabled: false
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
3.0.4
|
3.0.5
|
||||||
|
|
22
Aptfile
22
Aptfile
|
@ -1,26 +1,4 @@
|
||||||
ffmpeg
|
ffmpeg
|
||||||
libicu[0-9][0-9]
|
|
||||||
libicu-dev
|
|
||||||
libidn12
|
|
||||||
libidn-dev
|
|
||||||
libpq-dev
|
libpq-dev
|
||||||
libxdamage1
|
libxdamage1
|
||||||
libxfixes3
|
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
|
|
||||||
|
|
222
CHANGELOG.md
222
CHANGELOG.md
|
@ -3,6 +3,228 @@ Changelog
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [4.1.0] - 2023-02-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Add support for importing/exporting server-wide domain blocks** ([enbylenore](https://github.com/mastodon/mastodon/pull/20597), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/21471), [dariusk](https://github.com/mastodon/mastodon/pull/22803), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/21470))
|
||||||
|
- **Add listing of followed hashtags** ([connorshea](https://github.com/mastodon/mastodon/pull/21773))
|
||||||
|
- **Add support for editing media description and focus point of already-sent posts** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20878))
|
||||||
|
- Previously, you could add and remove attachments, but not edit media description of already-attached media
|
||||||
|
- REST API changes:
|
||||||
|
- `PUT /api/v1/statuses/:id` now takes an extra `media_attributes[]` array parameter with the `id` of the updated media and their updated `description`, `focus`, and `thumbnail`
|
||||||
|
- **Add follow request banner on account header** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20785))
|
||||||
|
- REST API changes:
|
||||||
|
- `Relationship` entities have an extra `requested_by` boolean attribute representing whether the represented user has requested to follow you
|
||||||
|
- **Add confirmation screen when handling reports** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22375), [Gargron](https://github.com/mastodon/mastodon/pull/23156), [tribela](https://github.com/mastodon/mastodon/pull/23178))
|
||||||
|
- Add option to make the landing page be `/about` even when trends are enabled ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20808))
|
||||||
|
- Add `noindex` setting back to the admin interface ([prplecake](https://github.com/mastodon/mastodon/pull/22205))
|
||||||
|
- Add instance peers API endpoint toggle back to the admin interface ([dariusk](https://github.com/mastodon/mastodon/pull/22810))
|
||||||
|
- Add instance activity API endpoint toggle back to the admin interface ([dariusk](https://github.com/mastodon/mastodon/pull/22833))
|
||||||
|
- Add setting for status page URL ([Gargron](https://github.com/mastodon/mastodon/pull/23390), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23499))
|
||||||
|
- REST API changes:
|
||||||
|
- Add `configuration.urls.status` attribute to the object returned by `GET /api/v1/instance`
|
||||||
|
- Add `account.approved` webhook ([Saiv46](https://github.com/mastodon/mastodon/pull/22938))
|
||||||
|
- Add 12 hours option to polls ([Pleclown](https://github.com/mastodon/mastodon/pull/21131))
|
||||||
|
- Add dropdown menu item to open admin interface for remote domains ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21895))
|
||||||
|
- Add `--remove-headers`, `--prune-profiles` and `--include-follows` flags to `tootctl media remove` ([evanphilip](https://github.com/mastodon/mastodon/pull/22149))
|
||||||
|
- Add `--email` and `--dry-run` options to `tootctl accounts delete` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22328))
|
||||||
|
- Add `tootctl accounts migrate` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22330))
|
||||||
|
- Add `tootctl accounts prune` ([tribela](https://github.com/mastodon/mastodon/pull/18397))
|
||||||
|
- Add `tootctl domains purge` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22063))
|
||||||
|
- Add `SIDEKIQ_CONCURRENCY` environment variable ([muffinista](https://github.com/mastodon/mastodon/pull/19589))
|
||||||
|
- Add `DB_POOL` environment variable support for streaming server ([Gargron](https://github.com/mastodon/mastodon/pull/23470))
|
||||||
|
- Add `MIN_THREADS` environment variable to set minimum Puma threads ([jimeh](https://github.com/mastodon/mastodon/pull/21048))
|
||||||
|
- Add explanation text to log-in page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20946))
|
||||||
|
- Add user profile OpenGraph tag on post pages ([bramus](https://github.com/mastodon/mastodon/pull/21423))
|
||||||
|
- Add maskable icon support for Android ([workeffortwaste](https://github.com/mastodon/mastodon/pull/20904))
|
||||||
|
- Add Belarusian to supported languages ([Mixaill](https://github.com/mastodon/mastodon/pull/22022))
|
||||||
|
- Add Western Frisian to supported languages ([ykzts](https://github.com/mastodon/mastodon/pull/18602))
|
||||||
|
- Add Montenegrin to the language picker ([ayefries](https://github.com/mastodon/mastodon/pull/21013))
|
||||||
|
- Add Southern Sami and Lule Sami to the language picker ([Jullan-M](https://github.com/mastodon/mastodon/pull/21262))
|
||||||
|
- Add logging for Rails cache timeouts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21667))
|
||||||
|
- Add color highlight for active hashtag “follow” button ([MFTabriz](https://github.com/mastodon/mastodon/pull/21629))
|
||||||
|
- Add brotli compression to `assets:precompile` ([Izorkin](https://github.com/mastodon/mastodon/pull/19025))
|
||||||
|
- Add “disabled” account filter to the `/admin/accounts` UI ([tribela](https://github.com/mastodon/mastodon/pull/21282))
|
||||||
|
- Add transparency to modal background for accessibility ([edent](https://github.com/mastodon/mastodon/pull/18081))
|
||||||
|
- Add `lang` attribute to image description textarea and poll option field ([c960657](https://github.com/mastodon/mastodon/pull/23293))
|
||||||
|
- Add `spellcheck` attribute to Content Warning and poll option input fields ([c960657](https://github.com/mastodon/mastodon/pull/23395))
|
||||||
|
- Add `title` attribute to video elements in media attachments ([bramus](https://github.com/mastodon/mastodon/pull/21420))
|
||||||
|
- Add left and right margins to emojis ([dsblank](https://github.com/mastodon/mastodon/pull/20464))
|
||||||
|
- Add `roles` attribute to `Account` entities in REST API ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23255), [tribela](https://github.com/mastodon/mastodon/pull/23428))
|
||||||
|
- Add `reading:autoplay:gifs` to `/api/v1/preferences` ([j-f1](https://github.com/mastodon/mastodon/pull/22706))
|
||||||
|
- Add `hide_collections` parameter to `/api/v1/accounts/credentials` ([CarlSchwan](https://github.com/mastodon/mastodon/pull/22790))
|
||||||
|
- Add `policy` attribute to web push subscription objects in REST API at `/api/v1/push/subscriptions` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23210))
|
||||||
|
- Add metrics endpoint to streaming API ([Gargron](https://github.com/mastodon/mastodon/pull/23388), [Gargron](https://github.com/mastodon/mastodon/pull/23469))
|
||||||
|
- Add more specific error messages to HTTP signature verification ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21617))
|
||||||
|
- Add Storj DCS to cloud object storage options in the `mastodon:setup` rake task ([jtolio](https://github.com/mastodon/mastodon/pull/21929))
|
||||||
|
- Add checkmark symbol in the checkbox for sensitive media ([sidp](https://github.com/mastodon/mastodon/pull/22795))
|
||||||
|
- Add missing accessibility attributes to logout link in modals ([kytta](https://github.com/mastodon/mastodon/pull/22549))
|
||||||
|
- Add missing accessibility attributes to “Hide image” button in `MediaGallery` ([hs4man21](https://github.com/mastodon/mastodon/pull/22513))
|
||||||
|
- Add missing accessibility attributes to hide content warning field when disabled ([hs4man21](https://github.com/mastodon/mastodon/pull/22568))
|
||||||
|
- Add `aria-hidden` to footer circle dividers to improve accessibility ([hs4man21](https://github.com/mastodon/mastodon/pull/22576))
|
||||||
|
- Add `lang` attribute to compose form inputs ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23240))
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Ensure exact match is the first result in hashtag searches** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21315))
|
||||||
|
- Change account search to return followed accounts first ([dariusk](https://github.com/mastodon/mastodon/pull/22956))
|
||||||
|
- Change batch account suspension to create a strike ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20897))
|
||||||
|
- Change default reply language to match the default language when replying to a translated post ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22272))
|
||||||
|
- Change misleading wording about waitlists ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20850))
|
||||||
|
- Increase width of the unread notification border ([connorshea](https://github.com/mastodon/mastodon/pull/21692))
|
||||||
|
- Change new post notification button on profiles to make it more apparent when it is enabled ([tribela](https://github.com/mastodon/mastodon/pull/22541))
|
||||||
|
- Change trending tags admin interface to always show batch action controls ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23013))
|
||||||
|
- Change wording of some OAuth scope descriptions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22491))
|
||||||
|
- Change wording of admin report handling actions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18388))
|
||||||
|
- Change confirm prompts for relationships management ([tribela](https://github.com/mastodon/mastodon/pull/19411))
|
||||||
|
- Change language surrounding disability in prompts for media descriptions ([hs4man21](https://github.com/mastodon/mastodon/pull/20923))
|
||||||
|
- Change confusing wording in the sign in banner ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22490))
|
||||||
|
- Change `POST /settings/applications/:id` to regenerate token on scopes change ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23359))
|
||||||
|
- Change account moderation notes to make links clickable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22553))
|
||||||
|
- Change link previews for statuses to never use avatar as fallback ([Gargron](https://github.com/mastodon/mastodon/pull/23376))
|
||||||
|
- Change email address input to be read-only for logged-in users when requesting a new confirmation e-mail ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23247))
|
||||||
|
- Change notifications per page from 15 to 40 in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/23348))
|
||||||
|
- Change number of stored items in home feed from 400 to 800 ([Gargron](https://github.com/mastodon/mastodon/pull/23349))
|
||||||
|
- Change API rate limits from 300/5min per user to 1500/5min per user, 300/5min per app ([Gargron](https://github.com/mastodon/mastodon/pull/23347))
|
||||||
|
- Save avatar or header correctly even if the other one fails ([tribela](https://github.com/mastodon/mastodon/pull/18465))
|
||||||
|
- Change `referrer-policy` to `same-origin` application-wide ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23014), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23037))
|
||||||
|
- Add 'private' to `Cache-Control`, match Rails expectations ([daxtens](https://github.com/mastodon/mastodon/pull/20608))
|
||||||
|
- Make the button that expands the compose form differentiable from the button that publishes a post ([Tak](https://github.com/mastodon/mastodon/pull/20864))
|
||||||
|
- Change automatic post deletion configuration to be accessible to moved users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20774))
|
||||||
|
- Make tag following idempotent ([trwnh](https://github.com/mastodon/mastodon/pull/20860), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/21285))
|
||||||
|
- Use buildx functions for faster builds ([inductor](https://github.com/mastodon/mastodon/pull/20692))
|
||||||
|
- Split off Dockerfile components for faster builds ([moritzheiber](https://github.com/mastodon/mastodon/pull/20933), [ineffyble](https://github.com/mastodon/mastodon/pull/20948), [BtbN](https://github.com/mastodon/mastodon/pull/21028))
|
||||||
|
- Change last occurrence of “silence” to “limit” in UI text ([cincodenada](https://github.com/mastodon/mastodon/pull/20637))
|
||||||
|
- Change “hide toot” to “hide post” ([seanthegeek](https://github.com/mastodon/mastodon/pull/22385))
|
||||||
|
- Don't allow URLs that contain non-normalized paths to be verified ([dgl](https://github.com/mastodon/mastodon/pull/20999))
|
||||||
|
- Change the “Trending now” header to be a link to the Explore page ([connorshea](https://github.com/mastodon/mastodon/pull/21759))
|
||||||
|
- Change PostgreSQL connection timeout from 2 minutes to 15 seconds ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21790))
|
||||||
|
- Make handle more easily selectable on profile page ([cadars](https://github.com/mastodon/mastodon/pull/21479))
|
||||||
|
- Allow admins to refresh remotely-suspended accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22327))
|
||||||
|
- Change dropdown menu to contain “Copy link to post” even for non-public posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21316))
|
||||||
|
- Allow adding relays in secure mode and limited federation mode ([ineffyble](https://github.com/mastodon/mastodon/pull/22324))
|
||||||
|
- Change timestamps to be displayed using the user's timezone throughout the moderation interface ([FrancisMurillo](https://github.com/mastodon/mastodon/pull/21878), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/22555))
|
||||||
|
- Change CSP directives on API to be tight and concise ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20960))
|
||||||
|
- Change web UI to not autofocus the compose form ([raboof](https://github.com/mastodon/mastodon/pull/16517), [Akkiesoft](https://github.com/mastodon/mastodon/pull/23094))
|
||||||
|
- Change idempotency key handling for posting when database access is slow ([lambda](https://github.com/mastodon/mastodon/pull/21840))
|
||||||
|
- Change remote media files to be downloaded outside of transactions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21796))
|
||||||
|
- Improve contrast of charts in “poll has ended” notifications ([j-f1](https://github.com/mastodon/mastodon/pull/22575))
|
||||||
|
- Change OEmbed detection and validation to be somewhat more lenient ([ineffyble](https://github.com/mastodon/mastodon/pull/22533))
|
||||||
|
- Widen ElasticSearch version detection to not display a warning for OpenSearch ([VyrCossont](https://github.com/mastodon/mastodon/pull/22422), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23064))
|
||||||
|
- Change link verification to allow pages larger than 1MB as long as the link is in the first 1MB ([untitaker](https://github.com/mastodon/mastodon/pull/22879))
|
||||||
|
- Update default Node.js version to Node.js 16 ([ineffyble](https://github.com/mastodon/mastodon/pull/22223), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/22342))
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Officially remove support for Ruby 2.6 ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21477))
|
||||||
|
- Remove `object-fit` polyfill used for old versions of Microsoft Edge ([shuuji3](https://github.com/mastodon/mastodon/pull/22693))
|
||||||
|
- Remove `intersection-observer` polyfill for old Safari support ([shuuji3](https://github.com/mastodon/mastodon/pull/23284))
|
||||||
|
- Remove empty `title` tag from mailer layout ([nametoolong](https://github.com/mastodon/mastodon/pull/23078))
|
||||||
|
- Remove post count and last posts from ActivityPub representation of hashtag collections ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23460))
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Fix changing domain block severity not undoing individual account effects** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22135))
|
||||||
|
- Fix suspension worker crashing on S3-compatible setups without ACL support ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22487))
|
||||||
|
- Fix possible race conditions when suspending/unsuspending accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22363))
|
||||||
|
- Fix being stuck in edit mode when deleting the edited posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22126))
|
||||||
|
- Fix attached media uploads not being cleared when replying to a post ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23504))
|
||||||
|
- Fix filters not being applied to some notification types ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23211))
|
||||||
|
- Fix incorrect link in push notifications for some event types ([elizabeth-dev](https://github.com/mastodon/mastodon/pull/23286))
|
||||||
|
- Fix some performance issues with `/admin/instances` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21907))
|
||||||
|
- Fix some pre-4.0 admin audit logs ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22091))
|
||||||
|
- Fix moderation audit log items for warnings having incorrect links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23242))
|
||||||
|
- Fix account activation being sometimes triggered before email confirmation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23245))
|
||||||
|
- Fix missing OAuth scopes for admin APIs ([trwnh](https://github.com/mastodon/mastodon/pull/20918), [trwnh](https://github.com/mastodon/mastodon/pull/20979))
|
||||||
|
- Fix voter count not being cleared when a poll is reset ([afontenot](https://github.com/mastodon/mastodon/pull/21700))
|
||||||
|
- Fix attachments of edited posts not being fetched ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21565))
|
||||||
|
- Fix irreversible and whole_word parameters handling in `/api/v1/filters` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21988))
|
||||||
|
- Fix 500 error when marking posts as sensitive while some of them are deleted ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22134))
|
||||||
|
- Fix expanded posts not always being scrolled into view ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21797))
|
||||||
|
- Fix not being able to scroll the remote interaction modal on small screens ([xendke](https://github.com/mastodon/mastodon/pull/21763))
|
||||||
|
- Fix not being able to scroll in post history modal ([cadars](https://github.com/mastodon/mastodon/pull/23396))
|
||||||
|
- Fix audio player volume control on Safari ([minacle](https://github.com/mastodon/mastodon/pull/23187))
|
||||||
|
- Fix disappearing “Explore” tabs on Safari ([nyura](https://github.com/mastodon/mastodon/pull/20917), [ykzts](https://github.com/mastodon/mastodon/pull/20982))
|
||||||
|
- Fix wrong padding in RTL layout ([Gargron](https://github.com/mastodon/mastodon/pull/23157))
|
||||||
|
- Fix drag & drop upload area display in single-column mode ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23217))
|
||||||
|
- Fix being unable to get a single EmailDomainBlock from the admin API ([trwnh](https://github.com/mastodon/mastodon/pull/20846))
|
||||||
|
- Fix admin-set follow recommandations being case-sensitive ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23500))
|
||||||
|
- Fix unserialized `role` on account entities in admin API ([Gargron](https://github.com/mastodon/mastodon/pull/23290))
|
||||||
|
- Fix pagination of followed tags ([trwnh](https://github.com/mastodon/mastodon/pull/20861))
|
||||||
|
- Fix dropdown menu positions when scrolling ([sidp](https://github.com/mastodon/mastodon/pull/22916), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23062))
|
||||||
|
- Fix email with empty domain name labels passing validation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23246))
|
||||||
|
- Fix mysterious registration failure when “Require a reason to join” is set with open registrations ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22127))
|
||||||
|
- Fix attachment rendering of edited posts in OpenGraph ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22270))
|
||||||
|
- Fix invalid/empty RSS feed link on account pages ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20772))
|
||||||
|
- Fix error in `VerifyLinkService` when processing links with no href ([joshuap](https://github.com/mastodon/mastodon/pull/20741))
|
||||||
|
- Fix error in `VerifyLinkService` when processing links with invalid URLs ([untitaker](https://github.com/mastodon/mastodon/pull/23204))
|
||||||
|
- Fix media uploads with FFmpeg 5 ([dead10ck](https://github.com/mastodon/mastodon/pull/21191))
|
||||||
|
- Fix sensitive flag not being set when replying to a post with a content warning under certain conditions ([kedamaDQ](https://github.com/mastodon/mastodon/pull/21724))
|
||||||
|
- Fix misleading message briefly showing up when loading follow requests under some conditions ([c960657](https://github.com/mastodon/mastodon/pull/23386))
|
||||||
|
- Fix “Share @:user's profile” profile menu item not working ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21490))
|
||||||
|
- Fix crash and incorrect behavior in `tootctl domains crawl` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19004))
|
||||||
|
- Fix autoplay on iOS ([jamesadney](https://github.com/mastodon/mastodon/pull/21422))
|
||||||
|
- Fix user clean-up scheduler crash when an unconfirmed account has a moderation note ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23318))
|
||||||
|
- Fix spaces not being stripped in admin account search ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21324))
|
||||||
|
- Fix spaces not being stripped when adding relays ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22655))
|
||||||
|
- Fix infinite loading spinner instead of soft 404 for non-existing remote accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21303))
|
||||||
|
- Fix minor visual issue with the top border of verified account fields ([j-f1](https://github.com/mastodon/mastodon/pull/22006))
|
||||||
|
- Fix pending account approval and rejection not being recorded in the admin audit log ([FrancisMurillo](https://github.com/mastodon/mastodon/pull/22088))
|
||||||
|
- Fix “Sign up” button with closed registrations not opening modal on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22060))
|
||||||
|
- Fix UI header overflowing on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21783))
|
||||||
|
- Fix 500 error when trying to migrate to an invalid address ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21462))
|
||||||
|
- Fix crash when trying to fetch unobtainable avatar of user using external authentication ([lochiiconnectivity](https://github.com/mastodon/mastodon/pull/22462))
|
||||||
|
- Fix processing error on incoming malformed JSON-LD under some situations ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23416))
|
||||||
|
- Fix potential duplicate posts in Explore tab ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22121))
|
||||||
|
- Fix deprecation warning in `tootctl accounts rotate` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22120))
|
||||||
|
- Fix styling of featured tags in light theme ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23252))
|
||||||
|
- Fix missing style in warning and strike cards ([AtelierSnek](https://github.com/mastodon/mastodon/pull/22177), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/22302))
|
||||||
|
- Fix wasteful request to `/api/v1/custom_emojis` when not logged in ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22326))
|
||||||
|
- Fix replies sometimes being delivered to user-blocked domains ([tribela](https://github.com/mastodon/mastodon/pull/22117))
|
||||||
|
- Fix admin dashboard crash when using some ElasticSearch replacements ([cortices](https://github.com/mastodon/mastodon/pull/21006))
|
||||||
|
- Fix profile avatar being slightly offset into left border ([RiedleroD](https://github.com/mastodon/mastodon/pull/20994))
|
||||||
|
- Fix N+1 queries in `NotificationsController` ([nametoolong](https://github.com/mastodon/mastodon/pull/21202))
|
||||||
|
- Fix being unable to react to announcements with the keycap number sign emoji ([kescherCode](https://github.com/mastodon/mastodon/pull/22231))
|
||||||
|
- Fix height computation of post embeds ([hodgesmr](https://github.com/mastodon/mastodon/pull/22141))
|
||||||
|
- Fix accessibility issue of the search bar due to hidden placeholder ([alexstine](https://github.com/mastodon/mastodon/pull/21275))
|
||||||
|
- Fix layout change handler not being removed due to a typo ([nschonni](https://github.com/mastodon/mastodon/pull/21829))
|
||||||
|
- Fix typo in the default `S3_HOSTNAME` used in the `mastodon:setup` rake task ([danp](https://github.com/mastodon/mastodon/pull/19932))
|
||||||
|
- Fix the top action bar appearing in the multi-column layout ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20943))
|
||||||
|
- Fix inability to use local LibreTranslate without setting `ALLOWED_PRIVATE_ADDRESSES` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21926))
|
||||||
|
- Fix punycoded local domains not being prettified in initial state ([Tritlo](https://github.com/mastodon/mastodon/pull/21440))
|
||||||
|
- Fix CSP violation warning by removing inline CSS from SVG logo ([luxiaba](https://github.com/mastodon/mastodon/pull/20814))
|
||||||
|
- Fix margin for search field on medium window size ([minacle](https://github.com/mastodon/mastodon/pull/21606))
|
||||||
|
- Fix search popout scrolling with the page in single-column mode ([rgroothuijsen](https://github.com/mastodon/mastodon/pull/16463))
|
||||||
|
- Fix minor post cache hydration discrepancy ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19879))
|
||||||
|
- Fix `・` detection in hashtags ([parthoghosh24](https://github.com/mastodon/mastodon/pull/22888))
|
||||||
|
- Fix hashtag follows bypassing user blocks ([tribela](https://github.com/mastodon/mastodon/pull/22849))
|
||||||
|
- Fix moved accounts being incorrectly redirected to account settings when trying to view a remote profile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22497))
|
||||||
|
- Fix site upload validations ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22479))
|
||||||
|
- Fix “Add new domain block” button using last submitted search value instead of the current one ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22485))
|
||||||
|
- Fix misleading hashtag warning when posting with “Followers only” or “Mentioned people only” visibility ([n0toose](https://github.com/mastodon/mastodon/pull/22827))
|
||||||
|
- Fix embedded posts with videos grabbing focus ([Akkiesoft](https://github.com/mastodon/mastodon/pull/22778))
|
||||||
|
- Fix `$` not being escaped in `.env.production` files generated by the `mastodon:setup` rake task ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23012), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23072))
|
||||||
|
- Fix sanitizer parsing link text as HTML when stripping unsupported links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22558))
|
||||||
|
- Fix `scheduled_at` input not using `datetime-local` when editing announcements ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21896))
|
||||||
|
- Fix REST API serializer for `Account` not including `moved` when the moved account has itself moved ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22483))
|
||||||
|
- Fix `/api/v1/admin/trends/tags` using wrong serializer ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18943))
|
||||||
|
- Fix situations in which instance actor can be set to a Mastodon-incompatible name ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22307))
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Add `form-action` CSP directive ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20781), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20958), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20962))
|
||||||
|
- Fix unbounded recursion in account discovery ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22025))
|
||||||
|
- Revoke all authorized applications on password reset ([FrancisMurillo](https://github.com/mastodon/mastodon/pull/21325))
|
||||||
|
- Fix unbounded recursion in post discovery ([ClearlyClaire,nametoolong](https://github.com/mastodon/mastodon/pull/23506))
|
||||||
|
|
||||||
|
## [4.0.2] - 2022-11-15
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
|
||||||
|
- Fix filters from other users being used in the streaming service ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20719))
|
||||||
|
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))
|
||||||
|
|
||||||
## [4.0.1] - 2022-11-14
|
## [4.0.1] - 2022-11-14
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
[homepage]: http://contributor-covenant.org
|
[homepage]: https://contributor-covenant.org
|
||||||
[version]: http://contributor-covenant.org/version/1/4/
|
[version]: https://contributor-covenant.org/version/1/4/
|
||||||
|
|
|
@ -6,6 +6,12 @@ Here are some guidelines, and ways you can help.
|
||||||
> (This document is a bit of a work-in-progress, so please bear with us.
|
> (This document is a bit of a work-in-progress, so please bear with us.
|
||||||
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
||||||
|
|
||||||
|
## Translations
|
||||||
|
|
||||||
|
You can submit glitch-soc-specific translations via [Crowdin](https://crowdin.com/project/glitch-soc). They are periodically merged into the codebase.
|
||||||
|
|
||||||
|
[](https://crowdin.com/project/glitch-soc)
|
||||||
|
|
||||||
## Planning ##
|
## Planning ##
|
||||||
|
|
||||||
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
||||||
|
|
170
Dockerfile
170
Dockerfile
|
@ -1,121 +1,99 @@
|
||||||
FROM ubuntu:20.04 as build-dep
|
# syntax=docker/dockerfile:1.4
|
||||||
|
# This needs to be bullseye-slim because the Ruby image is built on bullseye-slim
|
||||||
|
ARG NODE_VERSION="16.19-bullseye-slim"
|
||||||
|
|
||||||
# Use bash for the shell
|
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.0.5-slim as ruby
|
||||||
SHELL ["/bin/bash", "-c"]
|
FROM node:${NODE_VERSION} as build
|
||||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
|
||||||
|
|
||||||
# Install Node v16 (LTS)
|
COPY --link --from=ruby /opt/ruby /opt/ruby
|
||||||
ENV NODE_VER="16.17.1"
|
|
||||||
RUN ARCH= && \
|
|
||||||
dpkgArch="$(dpkg --print-architecture)" && \
|
|
||||||
case "${dpkgArch##*-}" in \
|
|
||||||
amd64) ARCH='x64';; \
|
|
||||||
ppc64el) ARCH='ppc64le';; \
|
|
||||||
s390x) ARCH='s390x';; \
|
|
||||||
arm64) ARCH='arm64';; \
|
|
||||||
armhf) ARCH='armv7l';; \
|
|
||||||
i386) ARCH='x86';; \
|
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
|
||||||
esac && \
|
|
||||||
echo "Etc/UTC" > /etc/localtime && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends ca-certificates wget python3 apt-utils && \
|
|
||||||
cd ~ && \
|
|
||||||
wget -q https://nodejs.org/download/release/v$NODE_VER/node-v$NODE_VER-linux-$ARCH.tar.gz && \
|
|
||||||
tar xf node-v$NODE_VER-linux-$ARCH.tar.gz && \
|
|
||||||
rm node-v$NODE_VER-linux-$ARCH.tar.gz && \
|
|
||||||
mv node-v$NODE_VER-linux-$ARCH /opt/node
|
|
||||||
|
|
||||||
# Install Ruby 3.0
|
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||||
ENV RUBY_VER="3.0.4"
|
PATH="${PATH}:/opt/ruby/bin"
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends build-essential \
|
|
||||||
bison libyaml-dev libgdbm-dev libreadline-dev libjemalloc-dev \
|
|
||||||
libncurses5-dev libffi-dev zlib1g-dev libssl-dev && \
|
|
||||||
cd ~ && \
|
|
||||||
wget https://cache.ruby-lang.org/pub/ruby/${RUBY_VER%.*}/ruby-$RUBY_VER.tar.gz && \
|
|
||||||
tar xf ruby-$RUBY_VER.tar.gz && \
|
|
||||||
cd ruby-$RUBY_VER && \
|
|
||||||
./configure --prefix=/opt/ruby \
|
|
||||||
--with-jemalloc \
|
|
||||||
--with-shared \
|
|
||||||
--disable-install-doc && \
|
|
||||||
make -j"$(nproc)" > /dev/null && \
|
|
||||||
make install && \
|
|
||||||
rm -rf ../ruby-$RUBY_VER.tar.gz ../ruby-$RUBY_VER
|
|
||||||
|
|
||||||
ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin"
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
RUN npm install -g npm@latest && \
|
|
||||||
npm install -g yarn && \
|
|
||||||
gem install bundler && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends git libicu-dev libidn11-dev \
|
|
||||||
libpq-dev shared-mime-info
|
|
||||||
|
|
||||||
|
WORKDIR /opt/mastodon
|
||||||
COPY Gemfile* package.json yarn.lock /opt/mastodon/
|
COPY Gemfile* package.json yarn.lock /opt/mastodon/
|
||||||
|
|
||||||
RUN cd /opt/mastodon && \
|
# hadolint ignore=DL3008
|
||||||
bundle config set --local deployment 'true' && \
|
RUN apt-get update && \
|
||||||
bundle config set --local without 'development test' && \
|
apt-get install -y --no-install-recommends build-essential \
|
||||||
bundle config set silence_root_warning true && \
|
ca-certificates \
|
||||||
bundle install -j"$(nproc)" && \
|
git \
|
||||||
yarn install --pure-lockfile
|
libicu-dev \
|
||||||
|
libidn11-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libjemalloc-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libgdbm-dev \
|
||||||
|
libgmp-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libyaml-0-2 \
|
||||||
|
ca-certificates \
|
||||||
|
libreadline8 \
|
||||||
|
python3 \
|
||||||
|
shared-mime-info && \
|
||||||
|
bundle config set --local deployment 'true' && \
|
||||||
|
bundle config set --local without 'development test' && \
|
||||||
|
bundle config set silence_root_warning true && \
|
||||||
|
bundle install -j"$(nproc)" && \
|
||||||
|
yarn install --pure-lockfile --network-timeout 600000 && \
|
||||||
|
yarn cache clean
|
||||||
|
|
||||||
FROM ubuntu:20.04
|
FROM node:${NODE_VERSION}
|
||||||
|
|
||||||
# Copy over all the langs needed for runtime
|
ARG UID="991"
|
||||||
COPY --from=build-dep /opt/node /opt/node
|
ARG GID="991"
|
||||||
COPY --from=build-dep /opt/ruby /opt/ruby
|
|
||||||
|
|
||||||
# Add more PATHs to the PATH
|
COPY --link --from=ruby /opt/ruby /opt/ruby
|
||||||
ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin:/opt/mastodon/bin"
|
|
||||||
|
|
||||||
# Create the mastodon user
|
|
||||||
ARG UID=991
|
|
||||||
ARG GID=991
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
RUN apt-get update && \
|
|
||||||
echo "Etc/UTC" > /etc/localtime && \
|
|
||||||
apt-get install -y --no-install-recommends whois wget && \
|
|
||||||
addgroup --gid $GID mastodon && \
|
|
||||||
useradd -m -u $UID -g $GID -d /opt/mastodon mastodon && \
|
|
||||||
echo "mastodon:$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 24 | mkpasswd -s -m sha-256)" | chpasswd && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Install mastodon runtime deps
|
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y --no-install-recommends install \
|
# Ignoreing these here since we don't want to pin any versions and the Debian image removes apt-get content after use
|
||||||
libssl1.1 libpq5 imagemagick ffmpeg libjemalloc2 \
|
# hadolint ignore=DL3008,DL3009
|
||||||
libicu66 libidn11 libyaml-0-2 \
|
RUN apt-get update && \
|
||||||
file ca-certificates tzdata libreadline8 gcc tini apt-utils && \
|
echo "Etc/UTC" > /etc/localtime && \
|
||||||
ln -s /opt/mastodon /mastodon && \
|
groupadd -g "${GID}" mastodon && \
|
||||||
gem install bundler && \
|
useradd -l -u "$UID" -g "${GID}" -m -d /opt/mastodon mastodon && \
|
||||||
rm -rf /var/cache && \
|
apt-get -y --no-install-recommends install whois \
|
||||||
rm -rf /var/lib/apt/lists/*
|
wget \
|
||||||
|
procps \
|
||||||
|
libssl1.1 \
|
||||||
|
libpq5 \
|
||||||
|
imagemagick \
|
||||||
|
ffmpeg \
|
||||||
|
libjemalloc2 \
|
||||||
|
libicu67 \
|
||||||
|
libidn11 \
|
||||||
|
libyaml-0-2 \
|
||||||
|
file \
|
||||||
|
ca-certificates \
|
||||||
|
tzdata \
|
||||||
|
libreadline8 \
|
||||||
|
tini && \
|
||||||
|
ln -s /opt/mastodon /mastodon
|
||||||
|
|
||||||
|
# Note: no, cleaning here since Debian does this automatically
|
||||||
|
# See the file /etc/apt/apt.conf.d/docker-clean within the Docker image's filesystem
|
||||||
|
|
||||||
# Copy over mastodon source, and dependencies from building, and set permissions
|
|
||||||
COPY --chown=mastodon:mastodon . /opt/mastodon
|
COPY --chown=mastodon:mastodon . /opt/mastodon
|
||||||
COPY --from=build-dep --chown=mastodon:mastodon /opt/mastodon /opt/mastodon
|
COPY --chown=mastodon:mastodon --from=build /opt/mastodon /opt/mastodon
|
||||||
|
|
||||||
# Run mastodon services in prod mode
|
ENV RAILS_ENV="production" \
|
||||||
ENV RAILS_ENV="production"
|
NODE_ENV="production" \
|
||||||
ENV NODE_ENV="production"
|
RAILS_SERVE_STATIC_FILES="true" \
|
||||||
|
BIND="0.0.0.0"
|
||||||
# Tell rails to serve static files
|
|
||||||
ENV RAILS_SERVE_STATIC_FILES="true"
|
|
||||||
ENV BIND="0.0.0.0"
|
|
||||||
|
|
||||||
# Set the run user
|
# Set the run user
|
||||||
USER mastodon
|
USER mastodon
|
||||||
|
WORKDIR /opt/mastodon
|
||||||
|
|
||||||
# Precompile assets
|
# Precompile assets
|
||||||
RUN cd ~ && \
|
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile
|
||||||
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
|
|
||||||
yarn cache clean
|
|
||||||
|
|
||||||
# Set the work dir and the container entry point
|
# Set the work dir and the container entry point
|
||||||
WORKDIR /opt/mastodon
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
EXPOSE 3000 4000
|
EXPOSE 3000 4000
|
||||||
|
|
63
Gemfile
63
Gemfile
|
@ -1,32 +1,32 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
ruby '>= 2.6.0', '< 3.1.0'
|
ruby '>= 2.7.0', '< 3.1.0'
|
||||||
|
|
||||||
gem 'pkg-config', '~> 1.4'
|
gem 'pkg-config', '~> 1.5'
|
||||||
gem 'rexml', '~> 3.2'
|
gem 'rexml', '~> 3.2'
|
||||||
|
|
||||||
gem 'puma', '~> 5.6'
|
gem 'puma', '~> 5.6'
|
||||||
gem 'rails', '~> 6.1.7'
|
gem 'rails', '~> 6.1.7'
|
||||||
gem 'sprockets', '~> 3.7.2'
|
gem 'sprockets', '~> 3.7.2'
|
||||||
gem 'thor', '~> 1.2'
|
gem 'thor', '~> 1.2'
|
||||||
gem 'rack', '~> 2.2.4'
|
gem 'rack', '~> 2.2.6'
|
||||||
|
|
||||||
gem 'hamlit-rails', '~> 0.2'
|
gem 'haml-rails', '~>2.0'
|
||||||
gem 'pg', '~> 1.4'
|
gem 'pg', '~> 1.4'
|
||||||
gem 'makara', '~> 0.5'
|
gem 'makara', '~> 0.5'
|
||||||
gem 'pghero', '~> 2.8'
|
gem 'pghero'
|
||||||
gem 'dotenv-rails', '~> 2.8'
|
gem 'dotenv-rails', '~> 2.8'
|
||||||
|
|
||||||
gem 'aws-sdk-s3', '~> 1.114', require: false
|
gem 'aws-sdk-s3', '~> 1.119', require: false
|
||||||
gem 'fog-core', '<= 2.1.0'
|
gem 'fog-core', '<= 2.4.0'
|
||||||
gem 'fog-openstack', '~> 0.3', require: false
|
gem 'fog-openstack', '~> 0.3', require: false
|
||||||
gem 'kt-paperclip', '~> 7.1'
|
gem 'kt-paperclip', '~> 7.1'
|
||||||
gem 'blurhash', '~> 0.1'
|
gem 'blurhash', '~> 0.1'
|
||||||
|
|
||||||
gem 'active_model_serializers', '~> 0.10'
|
gem 'active_model_serializers', '~> 0.10'
|
||||||
gem 'addressable', '~> 2.8'
|
gem 'addressable', '~> 2.8'
|
||||||
gem 'bootsnap', '~> 1.13.0', require: false
|
gem 'bootsnap', '~> 1.16.0', require: false
|
||||||
gem 'browser'
|
gem 'browser'
|
||||||
gem 'charlock_holmes', '~> 0.7.7'
|
gem 'charlock_holmes', '~> 0.7.7'
|
||||||
gem 'chewy', '~> 7.2'
|
gem 'chewy', '~> 7.2'
|
||||||
|
@ -40,7 +40,7 @@ end
|
||||||
gem 'net-ldap', '~> 0.17'
|
gem 'net-ldap', '~> 0.17'
|
||||||
gem 'omniauth-cas', '~> 2.0'
|
gem 'omniauth-cas', '~> 2.0'
|
||||||
gem 'omniauth-saml', '~> 1.10'
|
gem 'omniauth-saml', '~> 1.10'
|
||||||
gem 'gitlab-omniauth-openid-connect', '~>0.10.0', require: 'omniauth_openid_connect'
|
gem 'omniauth_openid_connect', '~> 0.6.0'
|
||||||
gem 'omniauth', '~> 1.9'
|
gem 'omniauth', '~> 1.9'
|
||||||
gem 'omniauth-rails_csrf_protection', '~> 0.1'
|
gem 'omniauth-rails_csrf_protection', '~> 0.1'
|
||||||
|
|
||||||
|
@ -51,42 +51,43 @@ gem 'ed25519', '~> 1.3'
|
||||||
gem 'fast_blank', '~> 1.0'
|
gem 'fast_blank', '~> 1.0'
|
||||||
gem 'fastimage'
|
gem 'fastimage'
|
||||||
gem 'hiredis', '~> 0.6'
|
gem 'hiredis', '~> 0.6'
|
||||||
gem 'redis-namespace', '~> 1.9'
|
gem 'redis-namespace', '~> 1.10'
|
||||||
gem 'htmlentities', '~> 4.3'
|
gem 'htmlentities', '~> 4.3'
|
||||||
gem 'http', '~> 5.1'
|
gem 'http', '~> 5.1'
|
||||||
gem 'http_accept_language', '~> 2.1'
|
gem 'http_accept_language', '~> 2.1'
|
||||||
gem 'httplog', '~> 1.6.0'
|
gem 'httplog', '~> 1.6.2'
|
||||||
gem 'idn-ruby', require: 'idn'
|
gem 'idn-ruby', require: 'idn'
|
||||||
gem 'kaminari', '~> 1.2'
|
gem 'kaminari', '~> 1.2'
|
||||||
gem 'link_header', '~> 0.0'
|
gem 'link_header', '~> 0.0'
|
||||||
gem 'mime-types', '~> 3.4.1', require: 'mime/types/columnar'
|
gem 'mime-types', '~> 3.4.1', require: 'mime/types/columnar'
|
||||||
gem 'nokogiri', '~> 1.13'
|
gem 'nokogiri', '~> 1.14'
|
||||||
gem 'nsa', '~> 0.2'
|
gem 'nsa', '~> 0.2'
|
||||||
gem 'oj', '~> 3.13'
|
gem 'oj', '~> 3.13'
|
||||||
gem 'ox', '~> 2.14'
|
gem 'ox', '~> 2.14'
|
||||||
gem 'parslet'
|
gem 'parslet'
|
||||||
gem 'posix-spawn'
|
gem 'posix-spawn'
|
||||||
gem 'pundit', '~> 2.2'
|
gem 'public_suffix', '~> 5.0'
|
||||||
|
gem 'pundit', '~> 2.3'
|
||||||
gem 'premailer-rails'
|
gem 'premailer-rails'
|
||||||
gem 'rack-attack', '~> 6.6'
|
gem 'rack-attack', '~> 6.6'
|
||||||
gem 'rack-cors', '~> 1.1', require: 'rack/cors'
|
gem 'rack-cors', '~> 1.1', require: 'rack/cors'
|
||||||
gem 'rails-i18n', '~> 6.0'
|
gem 'rails-i18n', '~> 6.0'
|
||||||
gem 'rails-settings-cached', '~> 0.6'
|
gem 'rails-settings-cached', '~> 0.6'
|
||||||
gem 'redcarpet', '~> 3.5'
|
gem 'redcarpet', '~> 3.6'
|
||||||
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
||||||
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
||||||
gem 'rqrcode', '~> 2.1'
|
gem 'rqrcode', '~> 2.1'
|
||||||
gem 'ruby-progressbar', '~> 1.11'
|
gem 'ruby-progressbar', '~> 1.11'
|
||||||
gem 'sanitize', '~> 6.0'
|
gem 'sanitize', '~> 6.0'
|
||||||
gem 'scenic', '~> 1.6'
|
gem 'scenic', '~> 1.7'
|
||||||
gem 'sidekiq', '~> 6.5'
|
gem 'sidekiq', '~> 6.5'
|
||||||
gem 'sidekiq-scheduler', '~> 4.0'
|
gem 'sidekiq-scheduler', '~> 5.0'
|
||||||
gem 'sidekiq-unique-jobs', '~> 7.1'
|
gem 'sidekiq-unique-jobs', '~> 7.1'
|
||||||
gem 'sidekiq-bulk', '~> 0.2.0'
|
gem 'sidekiq-bulk', '~> 0.2.0'
|
||||||
gem 'simple-navigation', '~> 4.4'
|
gem 'simple-navigation', '~> 4.4'
|
||||||
gem 'simple_form', '~> 5.1'
|
gem 'simple_form', '~> 5.2'
|
||||||
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
|
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
|
||||||
gem 'stoplight', '~> 3.0.0'
|
gem 'stoplight', '~> 3.0.1'
|
||||||
gem 'strong_migrations', '~> 0.7'
|
gem 'strong_migrations', '~> 0.7'
|
||||||
gem 'tty-prompt', '~> 0.23', require: false
|
gem 'tty-prompt', '~> 0.23', require: false
|
||||||
gem 'twitter-text', '~> 3.1.0'
|
gem 'twitter-text', '~> 3.1.0'
|
||||||
|
@ -106,6 +107,10 @@ group :development, :test do
|
||||||
gem 'pry-byebug', '~> 3.10'
|
gem 'pry-byebug', '~> 3.10'
|
||||||
gem 'pry-rails', '~> 0.3'
|
gem 'pry-rails', '~> 0.3'
|
||||||
gem 'rspec-rails', '~> 5.1'
|
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
|
end
|
||||||
|
|
||||||
group :production, :test do
|
group :production, :test do
|
||||||
|
@ -113,16 +118,16 @@ group :production, :test do
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'capybara', '~> 3.37'
|
gem 'capybara', '~> 3.38'
|
||||||
gem 'climate_control', '~> 0.2'
|
gem 'climate_control', '~> 0.2'
|
||||||
gem 'faker', '~> 2.23'
|
gem 'faker', '~> 3.1'
|
||||||
gem 'microformats', '~> 4.4'
|
gem 'json-schema', '~> 3.0'
|
||||||
gem 'rails-controller-testing', '~> 1.0'
|
|
||||||
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'
|
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.22', require: false
|
||||||
|
gem 'webmock', '~> 3.18'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
@ -134,9 +139,7 @@ group :development do
|
||||||
gem 'letter_opener', '~> 1.8'
|
gem 'letter_opener', '~> 1.8'
|
||||||
gem 'letter_opener_web', '~> 2.0'
|
gem 'letter_opener_web', '~> 2.0'
|
||||||
gem 'memory_profiler'
|
gem 'memory_profiler'
|
||||||
gem 'rubocop', '~> 1.30', require: false
|
gem 'brakeman', '~> 5.4', require: false
|
||||||
gem 'rubocop-rails', '~> 2.15', require: false
|
|
||||||
gem 'brakeman', '~> 5.3', require: false
|
|
||||||
gem 'bundler-audit', '~> 0.9', require: false
|
gem 'bundler-audit', '~> 0.9', require: false
|
||||||
|
|
||||||
gem 'capistrano', '~> 3.17'
|
gem 'capistrano', '~> 3.17'
|
||||||
|
@ -157,3 +160,5 @@ gem 'xorcist', '~> 1.1'
|
||||||
|
|
||||||
gem 'hcaptcha', '~> 7.1'
|
gem 'hcaptcha', '~> 7.1'
|
||||||
gem 'cocoon', '~> 1.2'
|
gem 'cocoon', '~> 1.2'
|
||||||
|
|
||||||
|
gem 'net-http', '~> 0.3.2'
|
||||||
|
|
419
Gemfile.lock
419
Gemfile.lock
|
@ -10,40 +10,40 @@ GIT
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (6.1.7)
|
actioncable (6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (6.1.7)
|
actionmailbox (6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
activejob (= 6.1.7)
|
activejob (= 6.1.7.2)
|
||||||
activerecord (= 6.1.7)
|
activerecord (= 6.1.7.2)
|
||||||
activestorage (= 6.1.7)
|
activestorage (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
actionmailer (6.1.7)
|
actionmailer (6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
actionview (= 6.1.7)
|
actionview (= 6.1.7.2)
|
||||||
activejob (= 6.1.7)
|
activejob (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (6.1.7)
|
actionpack (6.1.7.2)
|
||||||
actionview (= 6.1.7)
|
actionview (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
rack (~> 2.0, >= 2.0.9)
|
rack (~> 2.0, >= 2.0.9)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (6.1.7)
|
actiontext (6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
activerecord (= 6.1.7)
|
activerecord (= 6.1.7.2)
|
||||||
activestorage (= 6.1.7)
|
activestorage (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (6.1.7)
|
actionview (6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
|
@ -54,22 +54,22 @@ GEM
|
||||||
case_transform (>= 0.2)
|
case_transform (>= 0.2)
|
||||||
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
||||||
active_record_query_trace (1.8)
|
active_record_query_trace (1.8)
|
||||||
activejob (6.1.7)
|
activejob (6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.1.7)
|
activemodel (6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
activerecord (6.1.7)
|
activerecord (6.1.7.2)
|
||||||
activemodel (= 6.1.7)
|
activemodel (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
activestorage (6.1.7)
|
activestorage (6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
activejob (= 6.1.7)
|
activejob (= 6.1.7.2)
|
||||||
activerecord (= 6.1.7)
|
activerecord (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
mini_mime (>= 1.1.0)
|
mini_mime (>= 1.1.0)
|
||||||
activesupport (6.1.7)
|
activesupport (6.1.7.2)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
|
@ -90,20 +90,20 @@ GEM
|
||||||
attr_required (1.0.1)
|
attr_required (1.0.1)
|
||||||
awrence (1.2.1)
|
awrence (1.2.1)
|
||||||
aws-eventstream (1.2.0)
|
aws-eventstream (1.2.0)
|
||||||
aws-partitions (1.587.0)
|
aws-partitions (1.701.0)
|
||||||
aws-sdk-core (3.130.2)
|
aws-sdk-core (3.170.0)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
aws-partitions (~> 1, >= 1.525.0)
|
aws-partitions (~> 1, >= 1.651.0)
|
||||||
|
aws-sigv4 (~> 1.5)
|
||||||
|
jmespath (~> 1, >= 1.6.1)
|
||||||
|
aws-sdk-kms (1.62.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.165.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
jmespath (~> 1.0)
|
aws-sdk-s3 (1.119.0)
|
||||||
aws-sdk-kms (1.56.0)
|
aws-sdk-core (~> 3, >= 3.165.0)
|
||||||
aws-sdk-core (~> 3, >= 3.127.0)
|
|
||||||
aws-sigv4 (~> 1.1)
|
|
||||||
aws-sdk-s3 (1.114.0)
|
|
||||||
aws-sdk-core (~> 3, >= 3.127.0)
|
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.4)
|
aws-sigv4 (~> 1.4)
|
||||||
aws-sigv4 (1.5.0)
|
aws-sigv4 (1.5.2)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
bcrypt (3.1.17)
|
bcrypt (3.1.17)
|
||||||
better_errors (2.9.1)
|
better_errors (2.9.1)
|
||||||
|
@ -117,20 +117,19 @@ GEM
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
parser (>= 2.4)
|
parser (>= 2.4)
|
||||||
smart_properties
|
smart_properties
|
||||||
bindata (2.4.10)
|
bindata (2.4.14)
|
||||||
binding_of_caller (1.0.0)
|
binding_of_caller (1.0.0)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
blurhash (0.1.6)
|
blurhash (0.1.7)
|
||||||
ffi (~> 1.14)
|
bootsnap (1.16.0)
|
||||||
bootsnap (1.13.0)
|
|
||||||
msgpack (~> 1.2)
|
msgpack (~> 1.2)
|
||||||
brakeman (5.3.1)
|
brakeman (5.4.0)
|
||||||
browser (4.2.0)
|
browser (4.2.0)
|
||||||
brpoplpush-redis_script (0.1.2)
|
brpoplpush-redis_script (0.1.3)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.5)
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
||||||
redis (>= 1.0, <= 5.0)
|
redis (>= 1.0, < 6)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
bullet (7.0.3)
|
bullet (7.0.7)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
uniform_notifier (~> 1.11)
|
uniform_notifier (~> 1.11)
|
||||||
bundler-audit (0.9.1)
|
bundler-audit (0.9.1)
|
||||||
|
@ -152,7 +151,7 @@ GEM
|
||||||
sshkit (~> 1.3)
|
sshkit (~> 1.3)
|
||||||
capistrano-yarn (2.0.2)
|
capistrano-yarn (2.0.2)
|
||||||
capistrano (~> 3.0)
|
capistrano (~> 3.0)
|
||||||
capybara (3.37.1)
|
capybara (3.38.0)
|
||||||
addressable
|
addressable
|
||||||
matrix
|
matrix
|
||||||
mini_mime (>= 0.1.3)
|
mini_mime (>= 0.1.3)
|
||||||
|
@ -165,7 +164,7 @@ GEM
|
||||||
activesupport
|
activesupport
|
||||||
cbor (0.5.9.6)
|
cbor (0.5.9.6)
|
||||||
charlock_holmes (0.7.7)
|
charlock_holmes (0.7.7)
|
||||||
chewy (7.2.4)
|
chewy (7.2.7)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
elasticsearch (>= 7.12.0, < 7.14.0)
|
elasticsearch (>= 7.12.0, < 7.14.0)
|
||||||
elasticsearch-dsl
|
elasticsearch-dsl
|
||||||
|
@ -174,7 +173,7 @@ GEM
|
||||||
cocoon (1.2.15)
|
cocoon (1.2.15)
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
color_diff (0.1)
|
color_diff (0.1)
|
||||||
concurrent-ruby (1.1.10)
|
concurrent-ruby (1.2.0)
|
||||||
connection_pool (2.3.0)
|
connection_pool (2.3.0)
|
||||||
cose (1.2.1)
|
cose (1.2.1)
|
||||||
cbor (~> 0.5.9)
|
cbor (~> 0.5.9)
|
||||||
|
@ -182,8 +181,9 @@ GEM
|
||||||
crack (0.4.5)
|
crack (0.4.5)
|
||||||
rexml
|
rexml
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
css_parser (1.7.1)
|
css_parser (1.12.0)
|
||||||
addressable
|
addressable
|
||||||
|
date (3.3.3)
|
||||||
debug_inspector (1.0.0)
|
debug_inspector (1.0.0)
|
||||||
devise (4.8.1)
|
devise (4.8.1)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
|
@ -203,10 +203,10 @@ GEM
|
||||||
diff-lcs (1.5.0)
|
diff-lcs (1.5.0)
|
||||||
discard (1.2.1)
|
discard (1.2.1)
|
||||||
activerecord (>= 4.2, < 8)
|
activerecord (>= 4.2, < 8)
|
||||||
docile (1.3.4)
|
docile (1.4.0)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.5.20190701)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
doorkeeper (5.6.0)
|
doorkeeper (5.6.4)
|
||||||
railties (>= 5)
|
railties (>= 5)
|
||||||
dotenv (2.8.1)
|
dotenv (2.8.1)
|
||||||
dotenv-rails (2.8.1)
|
dotenv-rails (2.8.1)
|
||||||
|
@ -223,14 +223,14 @@ GEM
|
||||||
faraday (~> 1)
|
faraday (~> 1)
|
||||||
multi_json
|
multi_json
|
||||||
encryptor (3.0.0)
|
encryptor (3.0.0)
|
||||||
erubi (1.11.0)
|
erubi (1.12.0)
|
||||||
et-orbi (1.2.7)
|
et-orbi (1.2.7)
|
||||||
tzinfo
|
tzinfo
|
||||||
excon (0.76.0)
|
excon (0.95.0)
|
||||||
fabrication (2.30.0)
|
fabrication (2.30.0)
|
||||||
faker (2.23.0)
|
faker (3.1.1)
|
||||||
i18n (>= 1.8.11, < 2)
|
i18n (>= 1.8.11, < 2)
|
||||||
faraday (1.9.3)
|
faraday (1.10.3)
|
||||||
faraday-em_http (~> 1.0)
|
faraday-em_http (~> 1.0)
|
||||||
faraday-em_synchrony (~> 1.0)
|
faraday-em_synchrony (~> 1.0)
|
||||||
faraday-excon (~> 1.1)
|
faraday-excon (~> 1.1)
|
||||||
|
@ -246,8 +246,8 @@ GEM
|
||||||
faraday-em_synchrony (1.0.0)
|
faraday-em_synchrony (1.0.0)
|
||||||
faraday-excon (1.1.0)
|
faraday-excon (1.1.0)
|
||||||
faraday-httpclient (1.0.1)
|
faraday-httpclient (1.0.1)
|
||||||
faraday-multipart (1.0.3)
|
faraday-multipart (1.0.4)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (~> 2)
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.1)
|
||||||
faraday-net_http_persistent (1.2.0)
|
faraday-net_http_persistent (1.2.0)
|
||||||
faraday-patron (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
|
@ -271,28 +271,24 @@ GEM
|
||||||
fog-core (>= 1.45, <= 2.1.0)
|
fog-core (>= 1.45, <= 2.1.0)
|
||||||
fog-json (>= 1.0)
|
fog-json (>= 1.0)
|
||||||
ipaddress (>= 0.8)
|
ipaddress (>= 0.8)
|
||||||
formatador (0.2.5)
|
formatador (0.3.0)
|
||||||
fugit (1.7.1)
|
fugit (1.8.1)
|
||||||
et-orbi (~> 1, >= 1.2.7)
|
et-orbi (~> 1, >= 1.2.7)
|
||||||
raabro (~> 1.4)
|
raabro (~> 1.4)
|
||||||
fuubar (2.5.1)
|
fuubar (2.5.1)
|
||||||
rspec-core (~> 3.0)
|
rspec-core (~> 3.0)
|
||||||
ruby-progressbar (~> 1.4)
|
ruby-progressbar (~> 1.4)
|
||||||
gitlab-omniauth-openid-connect (0.10.0)
|
globalid (1.1.0)
|
||||||
addressable (~> 2.7)
|
|
||||||
omniauth (>= 1.9, < 3)
|
|
||||||
openid_connect (~> 1.2)
|
|
||||||
globalid (1.0.0)
|
|
||||||
activesupport (>= 5.0)
|
activesupport (>= 5.0)
|
||||||
hamlit (2.13.0)
|
haml (6.1.1)
|
||||||
temple (>= 0.8.2)
|
temple (>= 0.8.2)
|
||||||
thor
|
thor
|
||||||
tilt
|
tilt
|
||||||
hamlit-rails (0.2.3)
|
haml-rails (2.1.0)
|
||||||
actionpack (>= 4.0.1)
|
actionpack (>= 5.1)
|
||||||
activesupport (>= 4.0.1)
|
activesupport (>= 5.1)
|
||||||
hamlit (>= 1.2.0)
|
haml (>= 4.0.6)
|
||||||
railties (>= 4.0.1)
|
railties (>= 5.1)
|
||||||
hashdiff (1.0.1)
|
hashdiff (1.0.1)
|
||||||
hashie (5.0.0)
|
hashie (5.0.0)
|
||||||
hcaptcha (7.1.0)
|
hcaptcha (7.1.0)
|
||||||
|
@ -301,7 +297,7 @@ GEM
|
||||||
hiredis (0.6.3)
|
hiredis (0.6.3)
|
||||||
hkdf (0.3.0)
|
hkdf (0.3.0)
|
||||||
htmlentities (4.3.4)
|
htmlentities (4.3.4)
|
||||||
http (5.1.0)
|
http (5.1.1)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
http-cookie (~> 1.0)
|
http-cookie (~> 1.0)
|
||||||
http-form_data (~> 2.2)
|
http-form_data (~> 2.2)
|
||||||
|
@ -311,7 +307,7 @@ GEM
|
||||||
http-form_data (2.3.0)
|
http-form_data (2.3.0)
|
||||||
http_accept_language (2.1.1)
|
http_accept_language (2.1.1)
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
httplog (1.6.0)
|
httplog (1.6.2)
|
||||||
rack (>= 2.0)
|
rack (>= 2.0)
|
||||||
rainbow (>= 2.0.0)
|
rainbow (>= 2.0.0)
|
||||||
i18n (1.12.0)
|
i18n (1.12.0)
|
||||||
|
@ -327,15 +323,16 @@ GEM
|
||||||
rails-i18n
|
rails-i18n
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
terminal-table (>= 1.5.1)
|
terminal-table (>= 1.5.1)
|
||||||
idn-ruby (0.1.4)
|
idn-ruby (0.1.5)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
jmespath (1.6.1)
|
jmespath (1.6.2)
|
||||||
json (2.6.2)
|
json (2.6.3)
|
||||||
json-canonicalization (0.3.0)
|
json-canonicalization (0.3.0)
|
||||||
json-jwt (1.13.0)
|
json-jwt (1.15.3)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
aes_key_wrap
|
aes_key_wrap
|
||||||
bindata
|
bindata
|
||||||
|
httpclient
|
||||||
json-ld (3.2.3)
|
json-ld (3.2.3)
|
||||||
htmlentities (~> 4.3)
|
htmlentities (~> 4.3)
|
||||||
json-canonicalization (~> 0.3)
|
json-canonicalization (~> 0.3)
|
||||||
|
@ -343,11 +340,13 @@ GEM
|
||||||
multi_json (~> 1.15)
|
multi_json (~> 1.15)
|
||||||
rack (~> 2.2)
|
rack (~> 2.2)
|
||||||
rdf (~> 3.2, >= 3.2.9)
|
rdf (~> 3.2, >= 3.2.9)
|
||||||
json-ld-preloaded (3.2.0)
|
json-ld-preloaded (3.2.2)
|
||||||
json-ld (~> 3.2)
|
json-ld (~> 3.2)
|
||||||
rdf (~> 3.2)
|
rdf (~> 3.2)
|
||||||
|
json-schema (3.0.0)
|
||||||
|
addressable (>= 2.8)
|
||||||
jsonapi-renderer (0.2.2)
|
jsonapi-renderer (0.2.2)
|
||||||
jwt (2.4.1)
|
jwt (2.5.0)
|
||||||
kaminari (1.2.2)
|
kaminari (1.2.2)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.2.2)
|
kaminari-actionview (= 1.2.2)
|
||||||
|
@ -384,37 +383,48 @@ GEM
|
||||||
activesupport (>= 4)
|
activesupport (>= 4)
|
||||||
railties (>= 4)
|
railties (>= 4)
|
||||||
request_store (~> 1.0)
|
request_store (~> 1.0)
|
||||||
loofah (2.19.0)
|
loofah (2.19.1)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.8.0.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
|
net-imap
|
||||||
|
net-pop
|
||||||
|
net-smtp
|
||||||
makara (0.5.1)
|
makara (0.5.1)
|
||||||
activerecord (>= 5.2.0)
|
activerecord (>= 5.2.0)
|
||||||
marcel (1.0.2)
|
marcel (1.0.2)
|
||||||
mario-redis-lock (1.2.1)
|
mario-redis-lock (1.2.1)
|
||||||
redis (>= 3.0.5)
|
redis (>= 3.0.5)
|
||||||
matrix (0.4.2)
|
matrix (0.4.2)
|
||||||
memory_profiler (1.0.0)
|
memory_profiler (1.0.1)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
microformats (4.4.1)
|
|
||||||
json (~> 2.2)
|
|
||||||
nokogiri (~> 1.10)
|
|
||||||
mime-types (3.4.1)
|
mime-types (3.4.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2022.0105)
|
mime-types-data (3.2022.0105)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
mini_portile2 (2.8.0)
|
mini_portile2 (2.8.1)
|
||||||
minitest (5.16.3)
|
minitest (5.17.0)
|
||||||
msgpack (1.5.4)
|
msgpack (1.6.0)
|
||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.3.0)
|
||||||
|
net-http (0.3.2)
|
||||||
|
uri
|
||||||
|
net-imap (0.3.4)
|
||||||
|
date
|
||||||
|
net-protocol
|
||||||
net-ldap (0.17.1)
|
net-ldap (0.17.1)
|
||||||
|
net-pop (0.1.2)
|
||||||
|
net-protocol
|
||||||
|
net-protocol (0.2.1)
|
||||||
|
timeout
|
||||||
net-scp (4.0.0.rc1)
|
net-scp (4.0.0.rc1)
|
||||||
net-ssh (>= 2.6.5, < 8.0.0)
|
net-ssh (>= 2.6.5, < 8.0.0)
|
||||||
|
net-smtp (0.3.3)
|
||||||
|
net-protocol
|
||||||
net-ssh (7.0.1)
|
net-ssh (7.0.1)
|
||||||
nio4r (2.5.8)
|
nio4r (2.5.8)
|
||||||
nokogiri (1.13.8)
|
nokogiri (1.14.1)
|
||||||
mini_portile2 (~> 2.8.0)
|
mini_portile2 (~> 2.8.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nsa (0.2.8)
|
nsa (0.2.8)
|
||||||
|
@ -422,7 +432,7 @@ GEM
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
sidekiq (>= 3.5)
|
sidekiq (>= 3.5)
|
||||||
statsd-ruby (~> 1.4, >= 1.4.0)
|
statsd-ruby (~> 1.4, >= 1.4.0)
|
||||||
oj (3.13.21)
|
oj (3.13.23)
|
||||||
omniauth (1.9.2)
|
omniauth (1.9.2)
|
||||||
hashie (>= 3.4.6)
|
hashie (>= 3.4.6)
|
||||||
rack (>= 1.6.2, < 3)
|
rack (>= 1.6.2, < 3)
|
||||||
|
@ -436,38 +446,43 @@ GEM
|
||||||
omniauth-saml (1.10.3)
|
omniauth-saml (1.10.3)
|
||||||
omniauth (~> 1.3, >= 1.3.2)
|
omniauth (~> 1.3, >= 1.3.2)
|
||||||
ruby-saml (~> 1.9)
|
ruby-saml (~> 1.9)
|
||||||
openid_connect (1.3.0)
|
omniauth_openid_connect (0.6.0)
|
||||||
|
omniauth (>= 1.9, < 3)
|
||||||
|
openid_connect (~> 1.1)
|
||||||
|
openid_connect (1.4.2)
|
||||||
activemodel
|
activemodel
|
||||||
attr_required (>= 1.0.0)
|
attr_required (>= 1.0.0)
|
||||||
json-jwt (>= 1.5.0)
|
json-jwt (>= 1.15.0)
|
||||||
rack-oauth2 (>= 1.6.1)
|
net-smtp
|
||||||
swd (>= 1.0.0)
|
rack-oauth2 (~> 1.21)
|
||||||
|
swd (~> 1.3)
|
||||||
tzinfo
|
tzinfo
|
||||||
validate_email
|
validate_email
|
||||||
validate_url
|
validate_url
|
||||||
webfinger (>= 1.0.1)
|
webfinger (~> 1.2)
|
||||||
openssl (3.0.0)
|
openssl (3.0.0)
|
||||||
openssl-signature_algorithm (1.2.1)
|
openssl-signature_algorithm (1.2.1)
|
||||||
openssl (> 2.0, < 3.1)
|
openssl (> 2.0, < 3.1)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
ox (2.14.11)
|
ox (2.14.14)
|
||||||
parallel (1.22.1)
|
parallel (1.22.1)
|
||||||
parser (3.1.2.1)
|
parser (3.2.1.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
parslet (2.0.0)
|
parslet (2.0.0)
|
||||||
pastel (0.8.0)
|
pastel (0.8.0)
|
||||||
tty-color (~> 0.5)
|
tty-color (~> 0.5)
|
||||||
pg (1.4.3)
|
pg (1.4.5)
|
||||||
pghero (2.8.3)
|
pghero (3.1.0)
|
||||||
activerecord (>= 5)
|
activerecord (>= 6)
|
||||||
pkg-config (1.4.9)
|
pkg-config (1.5.1)
|
||||||
posix-spawn (0.3.15)
|
posix-spawn (0.3.15)
|
||||||
premailer (1.14.2)
|
premailer (1.18.0)
|
||||||
addressable
|
addressable
|
||||||
css_parser (>= 1.6.0)
|
css_parser (>= 1.12.0)
|
||||||
htmlentities (>= 4.0.0)
|
htmlentities (>= 4.0.0)
|
||||||
premailer-rails (1.11.1)
|
premailer-rails (1.12.0)
|
||||||
actionmailer (>= 3)
|
actionmailer (>= 3)
|
||||||
|
net-smtp
|
||||||
premailer (~> 1.7, >= 1.7.9)
|
premailer (~> 1.7, >= 1.7.9)
|
||||||
private_address_check (0.5.0)
|
private_address_check (0.5.0)
|
||||||
pry (0.14.1)
|
pry (0.14.1)
|
||||||
|
@ -478,42 +493,42 @@ GEM
|
||||||
pry (>= 0.13, < 0.15)
|
pry (>= 0.13, < 0.15)
|
||||||
pry-rails (0.3.9)
|
pry-rails (0.3.9)
|
||||||
pry (>= 0.10.4)
|
pry (>= 0.10.4)
|
||||||
public_suffix (5.0.0)
|
public_suffix (5.0.1)
|
||||||
puma (5.6.5)
|
puma (5.6.5)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
pundit (2.2.0)
|
pundit (2.3.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
raabro (1.4.0)
|
raabro (1.4.0)
|
||||||
racc (1.6.0)
|
racc (1.6.2)
|
||||||
rack (2.2.4)
|
rack (2.2.6.2)
|
||||||
rack-attack (6.6.1)
|
rack-attack (6.6.1)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rack-cors (1.1.1)
|
rack-cors (1.1.1)
|
||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
rack-oauth2 (1.19.0)
|
rack-oauth2 (1.21.3)
|
||||||
activesupport
|
activesupport
|
||||||
attr_required
|
attr_required
|
||||||
httpclient
|
httpclient
|
||||||
json-jwt (>= 1.11.0)
|
json-jwt (>= 1.11.0)
|
||||||
rack (>= 2.1.0)
|
rack (>= 2.1.0)
|
||||||
rack-proxy (0.7.0)
|
rack-proxy (0.7.6)
|
||||||
rack
|
rack
|
||||||
rack-test (2.0.2)
|
rack-test (2.0.2)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rails (6.1.7)
|
rails (6.1.7.2)
|
||||||
actioncable (= 6.1.7)
|
actioncable (= 6.1.7.2)
|
||||||
actionmailbox (= 6.1.7)
|
actionmailbox (= 6.1.7.2)
|
||||||
actionmailer (= 6.1.7)
|
actionmailer (= 6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
actiontext (= 6.1.7)
|
actiontext (= 6.1.7.2)
|
||||||
actionview (= 6.1.7)
|
actionview (= 6.1.7.2)
|
||||||
activejob (= 6.1.7)
|
activejob (= 6.1.7.2)
|
||||||
activemodel (= 6.1.7)
|
activemodel (= 6.1.7.2)
|
||||||
activerecord (= 6.1.7)
|
activerecord (= 6.1.7.2)
|
||||||
activestorage (= 6.1.7)
|
activestorage (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 6.1.7)
|
railties (= 6.1.7.2)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.5)
|
rails-controller-testing (1.0.5)
|
||||||
actionpack (>= 5.0.1.rc1)
|
actionpack (>= 5.0.1.rc1)
|
||||||
|
@ -522,16 +537,16 @@ GEM
|
||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.4.3)
|
rails-html-sanitizer (1.5.0)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.19, >= 2.19.1)
|
||||||
rails-i18n (6.0.0)
|
rails-i18n (6.0.0)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
railties (>= 6.0.0, < 7)
|
railties (>= 6.0.0, < 7)
|
||||||
rails-settings-cached (0.6.6)
|
rails-settings-cached (0.6.6)
|
||||||
rails (>= 4.2.0)
|
rails (>= 4.2.0)
|
||||||
railties (6.1.7)
|
railties (6.1.7.2)
|
||||||
actionpack (= 6.1.7)
|
actionpack (= 6.1.7.2)
|
||||||
activesupport (= 6.1.7)
|
activesupport (= 6.1.7.2)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
|
@ -539,13 +554,15 @@ GEM
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rdf (3.2.9)
|
rdf (3.2.9)
|
||||||
link_header (~> 0.0, >= 0.0.8)
|
link_header (~> 0.0, >= 0.0.8)
|
||||||
rdf-normalize (0.5.0)
|
rdf-normalize (0.5.1)
|
||||||
rdf (~> 3.2)
|
rdf (~> 3.2)
|
||||||
redcarpet (3.5.1)
|
redcarpet (3.6.0)
|
||||||
redis (4.5.1)
|
redis (4.5.1)
|
||||||
redis-namespace (1.9.0)
|
redis-namespace (1.10.0)
|
||||||
redis (>= 4)
|
redis (>= 4)
|
||||||
regexp_parser (2.5.0)
|
redlock (1.3.2)
|
||||||
|
redis (>= 3.0.0, < 6.0)
|
||||||
|
regexp_parser (2.7.0)
|
||||||
request_store (1.5.1)
|
request_store (1.5.1)
|
||||||
rack (>= 1.4)
|
rack (>= 1.4)
|
||||||
responders (3.0.1)
|
responders (3.0.1)
|
||||||
|
@ -580,21 +597,30 @@ GEM
|
||||||
rspec-support (3.11.1)
|
rspec-support (3.11.1)
|
||||||
rspec_junit_formatter (0.6.0)
|
rspec_junit_formatter (0.6.0)
|
||||||
rspec-core (>= 2, < 4, != 2.12.0)
|
rspec-core (>= 2, < 4, != 2.12.0)
|
||||||
rubocop (1.30.1)
|
rubocop (1.45.1)
|
||||||
|
json (~> 2.3)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.1.0.0)
|
parser (>= 3.2.0.0)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.18.0, < 2.0)
|
rubocop-ast (>= 1.24.1, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.18.0)
|
rubocop-ast (1.24.1)
|
||||||
parser (>= 3.1.1.0)
|
parser (>= 3.1.1.0)
|
||||||
rubocop-rails (2.15.0)
|
rubocop-capybara (2.17.0)
|
||||||
|
rubocop (~> 1.41)
|
||||||
|
rubocop-performance (1.16.0)
|
||||||
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
|
rubocop-ast (>= 0.4.0)
|
||||||
|
rubocop-rails (2.17.4)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
|
rubocop-rspec (2.18.1)
|
||||||
|
rubocop (~> 1.33)
|
||||||
|
rubocop-capybara (~> 2.17)
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
ruby-saml (1.13.0)
|
ruby-saml (1.13.0)
|
||||||
nokogiri (>= 1.10.5)
|
nokogiri (>= 1.10.5)
|
||||||
|
@ -604,40 +630,40 @@ GEM
|
||||||
fugit (~> 1.1, >= 1.1.6)
|
fugit (~> 1.1, >= 1.1.6)
|
||||||
safety_net_attestation (0.4.0)
|
safety_net_attestation (0.4.0)
|
||||||
jwt (~> 2.0)
|
jwt (~> 2.0)
|
||||||
sanitize (6.0.0)
|
sanitize (6.0.1)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
scenic (1.6.0)
|
scenic (1.7.0)
|
||||||
activerecord (>= 4.0.0)
|
activerecord (>= 4.0.0)
|
||||||
railties (>= 4.0.0)
|
railties (>= 4.0.0)
|
||||||
semantic_range (3.0.0)
|
semantic_range (3.0.0)
|
||||||
sidekiq (6.5.7)
|
sidekiq (6.5.8)
|
||||||
connection_pool (>= 2.2.5)
|
connection_pool (>= 2.2.5, < 3)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
redis (>= 4.5.0, < 5)
|
redis (>= 4.5.0, < 5)
|
||||||
sidekiq-bulk (0.2.0)
|
sidekiq-bulk (0.2.0)
|
||||||
sidekiq
|
sidekiq
|
||||||
sidekiq-scheduler (4.0.3)
|
sidekiq-scheduler (5.0.1)
|
||||||
redis (>= 4.2.0)
|
|
||||||
rufus-scheduler (~> 3.2)
|
rufus-scheduler (~> 3.2)
|
||||||
sidekiq (>= 4, < 7)
|
sidekiq (>= 4, < 8)
|
||||||
tilt (>= 1.4.0)
|
tilt (>= 1.4.0)
|
||||||
sidekiq-unique-jobs (7.1.27)
|
sidekiq-unique-jobs (7.1.29)
|
||||||
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
|
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.5)
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
||||||
sidekiq (>= 5.0, < 8.0)
|
redis (< 5.0)
|
||||||
|
sidekiq (>= 5.0, < 7.0)
|
||||||
thor (>= 0.20, < 3.0)
|
thor (>= 0.20, < 3.0)
|
||||||
simple-navigation (4.4.0)
|
simple-navigation (4.4.0)
|
||||||
activesupport (>= 2.3.2)
|
activesupport (>= 2.3.2)
|
||||||
simple_form (5.1.0)
|
simple_form (5.2.0)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
activemodel (>= 5.2)
|
activemodel (>= 5.2)
|
||||||
simplecov (0.21.2)
|
simplecov (0.22.0)
|
||||||
docile (~> 1.1)
|
docile (~> 1.1)
|
||||||
simplecov-html (~> 0.11)
|
simplecov-html (~> 0.11)
|
||||||
simplecov_json_formatter (~> 0.1)
|
simplecov_json_formatter (~> 0.1)
|
||||||
simplecov-html (0.12.3)
|
simplecov-html (0.12.3)
|
||||||
simplecov_json_formatter (0.1.2)
|
simplecov_json_formatter (0.1.4)
|
||||||
smart_properties (1.17.0)
|
smart_properties (1.17.0)
|
||||||
sprockets (3.7.2)
|
sprockets (3.7.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
@ -649,22 +675,24 @@ GEM
|
||||||
sshkit (1.21.2)
|
sshkit (1.21.2)
|
||||||
net-scp (>= 1.1.2)
|
net-scp (>= 1.1.2)
|
||||||
net-ssh (>= 2.8.0)
|
net-ssh (>= 2.8.0)
|
||||||
stackprof (0.2.22)
|
stackprof (0.2.23)
|
||||||
statsd-ruby (1.5.0)
|
statsd-ruby (1.5.0)
|
||||||
stoplight (3.0.0)
|
stoplight (3.0.1)
|
||||||
|
redlock (~> 1.0)
|
||||||
strong_migrations (0.7.9)
|
strong_migrations (0.7.9)
|
||||||
activerecord (>= 5)
|
activerecord (>= 5)
|
||||||
swd (1.3.0)
|
swd (1.3.0)
|
||||||
activesupport (>= 3)
|
activesupport (>= 3)
|
||||||
attr_required (>= 0.0.5)
|
attr_required (>= 0.0.5)
|
||||||
httpclient (>= 2.4)
|
httpclient (>= 2.4)
|
||||||
temple (0.8.2)
|
temple (0.10.0)
|
||||||
terminal-table (3.0.2)
|
terminal-table (3.0.2)
|
||||||
unicode-display_width (>= 1.1.1, < 3)
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
terrapin (0.6.0)
|
terrapin (0.6.0)
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
thor (1.2.1)
|
thor (1.2.1)
|
||||||
tilt (2.0.11)
|
tilt (2.0.11)
|
||||||
|
timeout (0.3.1)
|
||||||
tpm-key_attestation (0.11.0)
|
tpm-key_attestation (0.11.0)
|
||||||
bindata (~> 2.4)
|
bindata (~> 2.4)
|
||||||
openssl (> 2.0, < 3.1)
|
openssl (> 2.0, < 3.1)
|
||||||
|
@ -682,15 +710,16 @@ GEM
|
||||||
twitter-text (3.1.0)
|
twitter-text (3.1.0)
|
||||||
idn-ruby
|
idn-ruby
|
||||||
unf (~> 0.1.0)
|
unf (~> 0.1.0)
|
||||||
tzinfo (2.0.5)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
tzinfo-data (1.2022.4)
|
tzinfo-data (1.2022.7)
|
||||||
tzinfo (>= 1.0.0)
|
tzinfo (>= 1.0.0)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.8.2)
|
unf_ext (0.0.8.2)
|
||||||
unicode-display_width (2.3.0)
|
unicode-display_width (2.4.2)
|
||||||
uniform_notifier (1.16.0)
|
uniform_notifier (1.16.0)
|
||||||
|
uri (0.12.0)
|
||||||
validate_email (0.1.6)
|
validate_email (0.1.6)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
mail (>= 2.2.5)
|
mail (>= 2.2.5)
|
||||||
|
@ -715,7 +744,7 @@ GEM
|
||||||
addressable (>= 2.8.0)
|
addressable (>= 2.8.0)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff (>= 0.4.0, < 2.0.0)
|
hashdiff (>= 0.4.0, < 2.0.0)
|
||||||
webpacker (5.4.3)
|
webpacker (5.4.4)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
rack-proxy (>= 0.6.1)
|
rack-proxy (>= 0.6.1)
|
||||||
railties (>= 5.2)
|
railties (>= 5.2)
|
||||||
|
@ -727,7 +756,7 @@ GEM
|
||||||
xorcist (1.1.3)
|
xorcist (1.1.3)
|
||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
zeitwerk (2.6.0)
|
zeitwerk (2.6.7)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
@ -737,12 +766,12 @@ DEPENDENCIES
|
||||||
active_record_query_trace (~> 1.8)
|
active_record_query_trace (~> 1.8)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
annotate (~> 3.2)
|
annotate (~> 3.2)
|
||||||
aws-sdk-s3 (~> 1.114)
|
aws-sdk-s3 (~> 1.119)
|
||||||
better_errors (~> 2.9)
|
better_errors (~> 2.9)
|
||||||
binding_of_caller (~> 1.0)
|
binding_of_caller (~> 1.0)
|
||||||
blurhash (~> 0.1)
|
blurhash (~> 0.1)
|
||||||
bootsnap (~> 1.13.0)
|
bootsnap (~> 1.16.0)
|
||||||
brakeman (~> 5.3)
|
brakeman (~> 5.4)
|
||||||
browser
|
browser
|
||||||
bullet (~> 7.0)
|
bullet (~> 7.0)
|
||||||
bundler-audit (~> 0.9)
|
bundler-audit (~> 0.9)
|
||||||
|
@ -750,7 +779,7 @@ DEPENDENCIES
|
||||||
capistrano-rails (~> 1.6)
|
capistrano-rails (~> 1.6)
|
||||||
capistrano-rbenv (~> 2.2)
|
capistrano-rbenv (~> 2.2)
|
||||||
capistrano-yarn (~> 2.0)
|
capistrano-yarn (~> 2.0)
|
||||||
capybara (~> 3.37)
|
capybara (~> 3.38)
|
||||||
charlock_holmes (~> 0.7.7)
|
charlock_holmes (~> 0.7.7)
|
||||||
chewy (~> 7.2)
|
chewy (~> 7.2)
|
||||||
climate_control (~> 0.2)
|
climate_control (~> 0.2)
|
||||||
|
@ -766,24 +795,24 @@ DEPENDENCIES
|
||||||
dotenv-rails (~> 2.8)
|
dotenv-rails (~> 2.8)
|
||||||
ed25519 (~> 1.3)
|
ed25519 (~> 1.3)
|
||||||
fabrication (~> 2.30)
|
fabrication (~> 2.30)
|
||||||
faker (~> 2.23)
|
faker (~> 3.1)
|
||||||
fast_blank (~> 1.0)
|
fast_blank (~> 1.0)
|
||||||
fastimage
|
fastimage
|
||||||
fog-core (<= 2.1.0)
|
fog-core (<= 2.4.0)
|
||||||
fog-openstack (~> 0.3)
|
fog-openstack (~> 0.3)
|
||||||
fuubar (~> 2.5)
|
fuubar (~> 2.5)
|
||||||
gitlab-omniauth-openid-connect (~> 0.10.0)
|
haml-rails (~> 2.0)
|
||||||
hamlit-rails (~> 0.2)
|
|
||||||
hcaptcha (~> 7.1)
|
hcaptcha (~> 7.1)
|
||||||
hiredis (~> 0.6)
|
hiredis (~> 0.6)
|
||||||
htmlentities (~> 4.3)
|
htmlentities (~> 4.3)
|
||||||
http (~> 5.1)
|
http (~> 5.1)
|
||||||
http_accept_language (~> 2.1)
|
http_accept_language (~> 2.1)
|
||||||
httplog (~> 1.6.0)
|
httplog (~> 1.6.2)
|
||||||
i18n-tasks (~> 1.0)
|
i18n-tasks (~> 1.0)
|
||||||
idn-ruby
|
idn-ruby
|
||||||
json-ld
|
json-ld
|
||||||
json-ld-preloaded (~> 3.2)
|
json-ld-preloaded (~> 3.2)
|
||||||
|
json-schema (~> 3.0)
|
||||||
kaminari (~> 1.2)
|
kaminari (~> 1.2)
|
||||||
kt-paperclip (~> 7.1)
|
kt-paperclip (~> 7.1)
|
||||||
letter_opener (~> 1.8)
|
letter_opener (~> 1.8)
|
||||||
|
@ -793,29 +822,31 @@ DEPENDENCIES
|
||||||
makara (~> 0.5)
|
makara (~> 0.5)
|
||||||
mario-redis-lock (~> 1.2)
|
mario-redis-lock (~> 1.2)
|
||||||
memory_profiler
|
memory_profiler
|
||||||
microformats (~> 4.4)
|
|
||||||
mime-types (~> 3.4.1)
|
mime-types (~> 3.4.1)
|
||||||
|
net-http (~> 0.3.2)
|
||||||
net-ldap (~> 0.17)
|
net-ldap (~> 0.17)
|
||||||
nokogiri (~> 1.13)
|
nokogiri (~> 1.14)
|
||||||
nsa (~> 0.2)
|
nsa (~> 0.2)
|
||||||
oj (~> 3.13)
|
oj (~> 3.13)
|
||||||
omniauth (~> 1.9)
|
omniauth (~> 1.9)
|
||||||
omniauth-cas (~> 2.0)
|
omniauth-cas (~> 2.0)
|
||||||
omniauth-rails_csrf_protection (~> 0.1)
|
omniauth-rails_csrf_protection (~> 0.1)
|
||||||
omniauth-saml (~> 1.10)
|
omniauth-saml (~> 1.10)
|
||||||
|
omniauth_openid_connect (~> 0.6.0)
|
||||||
ox (~> 2.14)
|
ox (~> 2.14)
|
||||||
parslet
|
parslet
|
||||||
pg (~> 1.4)
|
pg (~> 1.4)
|
||||||
pghero (~> 2.8)
|
pghero
|
||||||
pkg-config (~> 1.4)
|
pkg-config (~> 1.5)
|
||||||
posix-spawn
|
posix-spawn
|
||||||
premailer-rails
|
premailer-rails
|
||||||
private_address_check (~> 0.5)
|
private_address_check (~> 0.5)
|
||||||
pry-byebug (~> 3.10)
|
pry-byebug (~> 3.10)
|
||||||
pry-rails (~> 0.3)
|
pry-rails (~> 0.3)
|
||||||
|
public_suffix (~> 5.0)
|
||||||
puma (~> 5.6)
|
puma (~> 5.6)
|
||||||
pundit (~> 2.2)
|
pundit (~> 2.3)
|
||||||
rack (~> 2.2.4)
|
rack (~> 2.2.6)
|
||||||
rack-attack (~> 6.6)
|
rack-attack (~> 6.6)
|
||||||
rack-cors (~> 1.1)
|
rack-cors (~> 1.1)
|
||||||
rack-test (~> 2.0)
|
rack-test (~> 2.0)
|
||||||
|
@ -824,30 +855,32 @@ DEPENDENCIES
|
||||||
rails-i18n (~> 6.0)
|
rails-i18n (~> 6.0)
|
||||||
rails-settings-cached (~> 0.6)
|
rails-settings-cached (~> 0.6)
|
||||||
rdf-normalize (~> 0.5)
|
rdf-normalize (~> 0.5)
|
||||||
redcarpet (~> 3.5)
|
redcarpet (~> 3.6)
|
||||||
redis (~> 4.5)
|
redis (~> 4.5)
|
||||||
redis-namespace (~> 1.9)
|
redis-namespace (~> 1.10)
|
||||||
rexml (~> 3.2)
|
rexml (~> 3.2)
|
||||||
rqrcode (~> 2.1)
|
rqrcode (~> 2.1)
|
||||||
rspec-rails (~> 5.1)
|
rspec-rails (~> 5.1)
|
||||||
rspec-sidekiq (~> 3.1)
|
rspec-sidekiq (~> 3.1)
|
||||||
rspec_junit_formatter (~> 0.6)
|
rspec_junit_formatter (~> 0.6)
|
||||||
rubocop (~> 1.30)
|
rubocop
|
||||||
rubocop-rails (~> 2.15)
|
rubocop-performance
|
||||||
|
rubocop-rails
|
||||||
|
rubocop-rspec
|
||||||
ruby-progressbar (~> 1.11)
|
ruby-progressbar (~> 1.11)
|
||||||
sanitize (~> 6.0)
|
sanitize (~> 6.0)
|
||||||
scenic (~> 1.6)
|
scenic (~> 1.7)
|
||||||
sidekiq (~> 6.5)
|
sidekiq (~> 6.5)
|
||||||
sidekiq-bulk (~> 0.2.0)
|
sidekiq-bulk (~> 0.2.0)
|
||||||
sidekiq-scheduler (~> 4.0)
|
sidekiq-scheduler (~> 5.0)
|
||||||
sidekiq-unique-jobs (~> 7.1)
|
sidekiq-unique-jobs (~> 7.1)
|
||||||
simple-navigation (~> 4.4)
|
simple-navigation (~> 4.4)
|
||||||
simple_form (~> 5.1)
|
simple_form (~> 5.2)
|
||||||
simplecov (~> 0.21)
|
simplecov (~> 0.22)
|
||||||
sprockets (~> 3.7.2)
|
sprockets (~> 3.7.2)
|
||||||
sprockets-rails (~> 3.4)
|
sprockets-rails (~> 3.4)
|
||||||
stackprof
|
stackprof
|
||||||
stoplight (~> 3.0.0)
|
stoplight (~> 3.0.1)
|
||||||
strong_migrations (~> 0.7)
|
strong_migrations (~> 0.7)
|
||||||
thor (~> 1.2)
|
thor (~> 1.2)
|
||||||
tty-prompt (~> 0.23)
|
tty-prompt (~> 0.23)
|
||||||
|
|
|
@ -11,7 +11,8 @@ A "vulnerability in Mastodon" is a vulnerability in the code distributed through
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ------- | ----------|
|
| ------- | --------- |
|
||||||
|
| 4.1.x | Yes |
|
||||||
| 4.0.x | Yes |
|
| 4.0.x | Yes |
|
||||||
| 3.5.x | Yes |
|
| 3.5.x | Yes |
|
||||||
| < 3.5 | No |
|
| < 3.5 | No |
|
||||||
|
|
|
@ -3,16 +3,14 @@
|
||||||
|
|
||||||
ENV["PORT"] ||= "3000"
|
ENV["PORT"] ||= "3000"
|
||||||
|
|
||||||
$provision = <<SCRIPT
|
$provisionA = <<SCRIPT
|
||||||
|
|
||||||
cd /vagrant # This is where the host folder/repo is mounted
|
|
||||||
|
|
||||||
# Add the yarn repo + yarn repo keys
|
# Add the yarn repo + yarn repo keys
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||||
sudo apt-add-repository 'deb https://dl.yarnpkg.com/debian/ stable main'
|
sudo apt-add-repository 'deb https://dl.yarnpkg.com/debian/ stable main'
|
||||||
|
|
||||||
# Add repo for NodeJS
|
# Add repo for NodeJS
|
||||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
|
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
|
||||||
|
|
||||||
# Add firewall rule to redirect 80 to PORT and save
|
# Add firewall rule to redirect 80 to PORT and save
|
||||||
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port #{ENV["PORT"]}
|
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port #{ENV["PORT"]}
|
||||||
|
@ -33,32 +31,56 @@ sudo apt-get install \
|
||||||
redis-tools \
|
redis-tools \
|
||||||
postgresql \
|
postgresql \
|
||||||
postgresql-contrib \
|
postgresql-contrib \
|
||||||
yarn \
|
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libidn11-dev \
|
libidn11-dev \
|
||||||
libreadline-dev \
|
libreadline6-dev \
|
||||||
libpam0g-dev \
|
autoconf \
|
||||||
|
bison \
|
||||||
|
build-essential \
|
||||||
|
ffmpeg \
|
||||||
|
file \
|
||||||
|
gcc \
|
||||||
|
libffi-dev \
|
||||||
|
libgdbm-dev \
|
||||||
|
libjemalloc-dev \
|
||||||
|
libncurses5-dev \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libyaml-dev \
|
||||||
|
pkg-config \
|
||||||
|
protobuf-compiler \
|
||||||
|
zlib1g-dev \
|
||||||
-y
|
-y
|
||||||
|
|
||||||
# Install rvm
|
# Install rvm
|
||||||
read RUBY_VERSION < .ruby-version
|
sudo apt-add-repository -y ppa:rael-gc/rvm
|
||||||
|
sudo apt-get install rvm -y
|
||||||
|
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg --import
|
sudo usermod -a -G rvm $USER
|
||||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import
|
|
||||||
|
|
||||||
curl -sSL https://raw.githubusercontent.com/rvm/rvm/stable/binscripts/rvm-installer | bash -s stable --ruby=$RUBY_VERSION
|
SCRIPT
|
||||||
source /home/vagrant/.rvm/scripts/rvm
|
|
||||||
|
$provisionB = <<SCRIPT
|
||||||
|
|
||||||
|
source "/etc/profile.d/rvm.sh"
|
||||||
|
|
||||||
# Install Ruby
|
# Install Ruby
|
||||||
rvm reinstall ruby-$RUBY_VERSION --disable-binary
|
read RUBY_VERSION < /vagrant/.ruby-version
|
||||||
|
rvm install ruby-$RUBY_VERSION --disable-binary
|
||||||
|
|
||||||
# Configure database
|
# Configure database
|
||||||
sudo -u postgres createuser -U postgres vagrant -s
|
sudo -u postgres createuser -U postgres vagrant -s
|
||||||
sudo -u postgres createdb -U postgres mastodon_development
|
sudo -u postgres createdb -U postgres mastodon_development
|
||||||
|
|
||||||
# Install gems and node modules
|
cd /vagrant # This is where the host folder/repo is mounted
|
||||||
|
|
||||||
|
# Install gems
|
||||||
gem install bundler foreman
|
gem install bundler foreman
|
||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
|
# Install node modules
|
||||||
|
sudo corepack enable
|
||||||
|
yarn set version classic
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
# Build Mastodon
|
# Build Mastodon
|
||||||
|
@ -72,18 +94,11 @@ echo 'export $(cat "/vagrant/.env.vagrant" | xargs)' >> ~/.bash_profile
|
||||||
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
$start = <<SCRIPT
|
|
||||||
|
|
||||||
echo 'To start server'
|
|
||||||
echo ' $ vagrant ssh -c "cd /vagrant && foreman start"'
|
|
||||||
|
|
||||||
SCRIPT
|
|
||||||
|
|
||||||
VAGRANTFILE_API_VERSION = "2"
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
config.vm.box = "ubuntu/bionic64"
|
config.vm.box = "ubuntu/focal64"
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
vb.name = "mastodon"
|
vb.name = "mastodon"
|
||||||
|
@ -100,7 +115,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
# Use "virtio" network interfaces for better performance.
|
# Use "virtio" network interfaces for better performance.
|
||||||
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
|
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
|
||||||
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
|
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# This uses the vagrant-hostsupdater plugin, and lets you
|
# This uses the vagrant-hostsupdater plugin, and lets you
|
||||||
|
@ -118,7 +132,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
if config.vm.networks.any? { |type, options| type == :private_network }
|
if config.vm.networks.any? { |type, options| type == :private_network }
|
||||||
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp', 'actimeo=1']
|
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'actimeo=1']
|
||||||
else
|
else
|
||||||
config.vm.synced_folder ".", "/vagrant"
|
config.vm.synced_folder ".", "/vagrant"
|
||||||
end
|
end
|
||||||
|
@ -129,9 +143,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
config.vm.network :forwarded_port, guest: 8080, host: 8080
|
config.vm.network :forwarded_port, guest: 8080, host: 8080
|
||||||
|
|
||||||
# Full provisioning script, only runs on first 'vagrant up' or with 'vagrant provision'
|
# Full provisioning script, only runs on first 'vagrant up' or with 'vagrant provision'
|
||||||
config.vm.provision :shell, inline: $provision, privileged: false
|
config.vm.provision :shell, inline: $provisionA, privileged: false, reset: true
|
||||||
|
config.vm.provision :shell, inline: $provisionB, privileged: false
|
||||||
|
|
||||||
# Start up script, runs on every 'vagrant up'
|
config.vm.post_up_message = <<MESSAGE
|
||||||
config.vm.provision :shell, inline: $start, run: 'always', privileged: false
|
To start server
|
||||||
|
$ vagrant ssh -c "cd /vagrant && foreman start"
|
||||||
|
MESSAGE
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,6 +17,8 @@ class AccountsController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
expires_in 0, public: true unless user_signed_in?
|
expires_in 0, public: true unless user_signed_in?
|
||||||
|
|
||||||
|
@rss_url = rss_url
|
||||||
end
|
end
|
||||||
|
|
||||||
format.rss do
|
format.rss do
|
||||||
|
|
|
@ -21,7 +21,7 @@ module Admin
|
||||||
account_action.save!
|
account_action.save!
|
||||||
|
|
||||||
if account_action.with_report?
|
if account_action.with_report?
|
||||||
redirect_to admin_reports_path
|
redirect_to admin_reports_path, notice: I18n.t('admin.reports.processed_msg', id: params[:report_id])
|
||||||
else
|
else
|
||||||
redirect_to admin_account_path(@account.id)
|
redirect_to admin_account_path(@account.id)
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,12 +55,14 @@ module Admin
|
||||||
def approve
|
def approve
|
||||||
authorize @account.user, :approve?
|
authorize @account.user, :approve?
|
||||||
@account.user.approve!
|
@account.user.approve!
|
||||||
|
log_action :approve, @account.user
|
||||||
redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.approved_msg', username: @account.acct)
|
redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.approved_msg', username: @account.acct)
|
||||||
end
|
end
|
||||||
|
|
||||||
def reject
|
def reject
|
||||||
authorize @account.user, :reject?
|
authorize @account.user, :reject?
|
||||||
DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false)
|
DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false)
|
||||||
|
log_action :reject, @account.user
|
||||||
redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.rejected_msg', username: @account.acct)
|
redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.rejected_msg', username: @account.acct)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ module Admin
|
||||||
@form = Form::DomainBlockBatch.new(form_domain_block_batch_params.merge(current_account: current_account, action: action_from_button))
|
@form = Form::DomainBlockBatch.new(form_domain_block_batch_params.merge(current_account: current_account, action: action_from_button))
|
||||||
@form.save
|
@form.save
|
||||||
rescue ActionController::ParameterMissing
|
rescue ActionController::ParameterMissing
|
||||||
flash[:alert] = I18n.t('admin.email_domain_blocks.no_domain_block_selected')
|
flash[:alert] = I18n.t('admin.domain_blocks.no_domain_block_selected')
|
||||||
rescue Mastodon::NotPermittedError
|
rescue Mastodon::NotPermittedError
|
||||||
flash[:alert] = I18n.t('admin.domain_blocks.created_msg')
|
flash[:alert] = I18n.t('admin.domain_blocks.not_permitted')
|
||||||
else
|
else
|
||||||
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
||||||
end
|
end
|
||||||
|
@ -55,12 +55,8 @@ module Admin
|
||||||
def update
|
def update
|
||||||
authorize :domain_block, :update?
|
authorize :domain_block, :update?
|
||||||
|
|
||||||
@domain_block.update(update_params)
|
if @domain_block.update(update_params)
|
||||||
|
DomainBlockWorker.perform_async(@domain_block.id, @domain_block.severity_previously_changed?)
|
||||||
severity_changed = @domain_block.severity_changed?
|
|
||||||
|
|
||||||
if @domain_block.save
|
|
||||||
DomainBlockWorker.perform_async(@domain_block.id, severity_changed)
|
|
||||||
log_action :update, @domain_block
|
log_action :update, @domain_block
|
||||||
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
||||||
else
|
else
|
||||||
|
|
|
@ -19,7 +19,7 @@ module Admin
|
||||||
rescue ActionController::ParameterMissing
|
rescue ActionController::ParameterMissing
|
||||||
flash[:alert] = I18n.t('admin.email_domain_blocks.no_email_domain_block_selected')
|
flash[:alert] = I18n.t('admin.email_domain_blocks.no_email_domain_block_selected')
|
||||||
rescue Mastodon::NotPermittedError
|
rescue Mastodon::NotPermittedError
|
||||||
flash[:alert] = I18n.t('admin.custom_emojis.not_permitted')
|
flash[:alert] = I18n.t('admin.email_domain_blocks.not_permitted')
|
||||||
ensure
|
ensure
|
||||||
redirect_to admin_email_domain_blocks_path
|
redirect_to admin_email_domain_blocks_path
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,8 +8,6 @@ module Admin
|
||||||
|
|
||||||
before_action :set_dummy_import!, only: [:new]
|
before_action :set_dummy_import!, only: [:new]
|
||||||
|
|
||||||
ROWS_PROCESSING_LIMIT = 20_000
|
|
||||||
|
|
||||||
def new
|
def new
|
||||||
authorize :domain_allow, :create?
|
authorize :domain_allow, :create?
|
||||||
end
|
end
|
||||||
|
@ -23,9 +21,9 @@ module Admin
|
||||||
authorize :domain_allow, :create?
|
authorize :domain_allow, :create?
|
||||||
begin
|
begin
|
||||||
@import = Admin::Import.new(import_params)
|
@import = Admin::Import.new(import_params)
|
||||||
parse_import_data!(export_headers)
|
return render :new unless @import.validate
|
||||||
|
|
||||||
@data.take(ROWS_PROCESSING_LIMIT).each do |row|
|
@import.csv_rows.each do |row|
|
||||||
domain = row['#domain'].strip
|
domain = row['#domain'].strip
|
||||||
next if DomainAllow.allowed?(domain)
|
next if DomainAllow.allowed?(domain)
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@ module Admin
|
||||||
|
|
||||||
before_action :set_dummy_import!, only: [:new]
|
before_action :set_dummy_import!, only: [:new]
|
||||||
|
|
||||||
ROWS_PROCESSING_LIMIT = 20_000
|
|
||||||
|
|
||||||
def new
|
def new
|
||||||
authorize :domain_block, :create?
|
authorize :domain_block, :create?
|
||||||
end
|
end
|
||||||
|
@ -23,24 +21,32 @@ module Admin
|
||||||
authorize :domain_block, :create?
|
authorize :domain_block, :create?
|
||||||
|
|
||||||
@import = Admin::Import.new(import_params)
|
@import = Admin::Import.new(import_params)
|
||||||
parse_import_data!(export_headers)
|
return render :new unless @import.validate
|
||||||
|
|
||||||
@global_private_comment = I18n.t('admin.export_domain_blocks.import.private_comment_template', source: @import.data_file_name, date: I18n.l(Time.now.utc))
|
@global_private_comment = I18n.t('admin.export_domain_blocks.import.private_comment_template', source: @import.data_file_name, date: I18n.l(Time.now.utc))
|
||||||
|
|
||||||
@form = Form::DomainBlockBatch.new
|
@form = Form::DomainBlockBatch.new
|
||||||
@domain_blocks = @data.take(ROWS_PROCESSING_LIMIT).filter_map do |row|
|
@domain_blocks = @import.csv_rows.filter_map do |row|
|
||||||
domain = row['#domain'].strip
|
domain = row['#domain'].strip
|
||||||
next if DomainBlock.rule_for(domain).present?
|
next if DomainBlock.rule_for(domain).present?
|
||||||
|
|
||||||
domain_block = DomainBlock.new(domain: domain,
|
domain_block = DomainBlock.new(domain: domain,
|
||||||
severity: row['#severity'].strip,
|
severity: row.fetch('#severity', :suspend),
|
||||||
reject_media: row['#reject_media'].strip,
|
reject_media: row.fetch('#reject_media', false),
|
||||||
reject_reports: row['#reject_reports'].strip,
|
reject_reports: row.fetch('#reject_reports', false),
|
||||||
private_comment: @global_private_comment,
|
private_comment: @global_private_comment,
|
||||||
public_comment: row['#public_comment']&.strip,
|
public_comment: row['#public_comment'],
|
||||||
obfuscate: row['#obfuscate'].strip)
|
obfuscate: row.fetch('#obfuscate', false))
|
||||||
|
|
||||||
domain_block if domain_block.valid?
|
if domain_block.invalid?
|
||||||
|
flash.now[:alert] = I18n.t('admin.export_domain_blocks.invalid_domain_block', error: domain_block.errors.full_messages.join(', '))
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
domain_block
|
||||||
|
rescue ArgumentError => e
|
||||||
|
flash.now[:alert] = I18n.t('admin.export_domain_blocks.invalid_domain_block', error: e.message)
|
||||||
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
@warning_domains = Instance.where(domain: @domain_blocks.map(&:domain)).where('EXISTS (SELECT 1 FROM follows JOIN accounts ON follows.account_id = accounts.id OR follows.target_account_id = accounts.id WHERE accounts.domain = instances.domain)').pluck(:domain)
|
@warning_domains = Instance.where(domain: @domain_blocks.map(&:domain)).where('EXISTS (SELECT 1 FROM follows JOIN accounts ON follows.account_id = accounts.id OR follows.target_account_id = accounts.id WHERE accounts.domain = instances.domain)').pluck(:domain)
|
||||||
|
|
|
@ -49,7 +49,7 @@ module Admin
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_instance
|
def set_instance
|
||||||
@instance = Instance.find(params[:id])
|
@instance = Instance.find(TagManager.instance.normalize_domain(params[:id]&.strip))
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_instances
|
def set_instances
|
||||||
|
@ -57,7 +57,7 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def preload_delivery_failures!
|
def preload_delivery_failures!
|
||||||
warning_domains_map = DeliveryFailureTracker.warning_domains_map
|
warning_domains_map = DeliveryFailureTracker.warning_domains_map(@instances.map(&:domain))
|
||||||
|
|
||||||
@instances.each do |instance|
|
@instances.each do |instance|
|
||||||
instance.failure_days = warning_domains_map[instance.domain]
|
instance.failure_days = warning_domains_map[instance.domain]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
module Admin
|
module Admin
|
||||||
class RelaysController < BaseController
|
class RelaysController < BaseController
|
||||||
before_action :set_relay, except: [:index, :new, :create]
|
before_action :set_relay, except: [:index, :new, :create]
|
||||||
before_action :require_signatures_enabled!, only: [:new, :create, :enable]
|
before_action :warn_signatures_not_enabled!, only: [:new, :create, :enable]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
authorize :relay, :update?
|
authorize :relay, :update?
|
||||||
|
@ -56,8 +56,8 @@ module Admin
|
||||||
params.require(:relay).permit(:inbox_url)
|
params.require(:relay).permit(:inbox_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_signatures_enabled!
|
def warn_signatures_not_enabled!
|
||||||
redirect_to admin_relays_path, alert: I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
|
flash.now[:error] = I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
class Admin::Reports::ActionsController < Admin::BaseController
|
class Admin::Reports::ActionsController < Admin::BaseController
|
||||||
before_action :set_report
|
before_action :set_report
|
||||||
|
|
||||||
|
def preview
|
||||||
|
authorize @report, :show?
|
||||||
|
@moderation_action = action_from_button
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize @report, :show?
|
authorize @report, :show?
|
||||||
|
|
||||||
|
@ -13,7 +18,8 @@ class Admin::Reports::ActionsController < Admin::BaseController
|
||||||
status_ids: @report.status_ids,
|
status_ids: @report.status_ids,
|
||||||
current_account: current_account,
|
current_account: current_account,
|
||||||
report_id: @report.id,
|
report_id: @report.id,
|
||||||
send_email_notification: !@report.spam?
|
send_email_notification: !@report.spam?,
|
||||||
|
text: params[:text]
|
||||||
)
|
)
|
||||||
|
|
||||||
status_batch_action.save!
|
status_batch_action.save!
|
||||||
|
@ -23,13 +29,16 @@ class Admin::Reports::ActionsController < Admin::BaseController
|
||||||
report_id: @report.id,
|
report_id: @report.id,
|
||||||
target_account: @report.target_account,
|
target_account: @report.target_account,
|
||||||
current_account: current_account,
|
current_account: current_account,
|
||||||
send_email_notification: !@report.spam?
|
send_email_notification: !@report.spam?,
|
||||||
|
text: params[:text]
|
||||||
)
|
)
|
||||||
|
|
||||||
account_action.save!
|
account_action.save!
|
||||||
|
else
|
||||||
|
return redirect_to admin_report_path(@report), alert: I18n.t('admin.reports.unknown_action_msg', action: action_from_button)
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to admin_reports_path
|
redirect_to admin_reports_path, notice: I18n.t('admin.reports.processed_msg', id: @report.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -47,6 +56,8 @@ class Admin::Reports::ActionsController < Admin::BaseController
|
||||||
'silence'
|
'silence'
|
||||||
elsif params[:suspend]
|
elsif params[:suspend]
|
||||||
'suspend'
|
'suspend'
|
||||||
|
elsif params[:moderation_action]
|
||||||
|
params[:moderation_action]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,6 +16,26 @@ class Api::BaseController < ApplicationController
|
||||||
|
|
||||||
protect_from_forgery with: :null_session
|
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|
|
rescue_from ActiveRecord::RecordInvalid, Mastodon::ValidationError do |e|
|
||||||
render json: { error: e.to_s }, status: 422
|
render json: { error: e.to_s }, status: 422
|
||||||
end
|
end
|
||||||
|
@ -129,7 +149,7 @@ class Api::BaseController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cache_headers
|
def set_cache_headers
|
||||||
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
|
response.headers['Cache-Control'] = 'private, no-store'
|
||||||
end
|
end
|
||||||
|
|
||||||
def disallow_unauthenticated_api_access?
|
def disallow_unauthenticated_api_access?
|
||||||
|
|
|
@ -21,7 +21,17 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
|
||||||
private
|
private
|
||||||
|
|
||||||
def account_params
|
def account_params
|
||||||
params.permit(:display_name, :note, :avatar, :header, :locked, :bot, :discoverable, fields_attributes: [:name, :value])
|
params.permit(
|
||||||
|
:display_name,
|
||||||
|
:note,
|
||||||
|
:avatar,
|
||||||
|
:header,
|
||||||
|
:locked,
|
||||||
|
:bot,
|
||||||
|
:discoverable,
|
||||||
|
:hide_collections,
|
||||||
|
fields_attributes: [:name, :value]
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_settings_params
|
def user_settings_params
|
||||||
|
|
|
@ -54,12 +54,14 @@ class Api::V1::Admin::AccountsController < Api::BaseController
|
||||||
def approve
|
def approve
|
||||||
authorize @account.user, :approve?
|
authorize @account.user, :approve?
|
||||||
@account.user.approve!
|
@account.user.approve!
|
||||||
|
log_action :approve, @account.user
|
||||||
render json: @account, serializer: REST::Admin::AccountSerializer
|
render json: @account, serializer: REST::Admin::AccountSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def reject
|
def reject
|
||||||
authorize @account.user, :reject?
|
authorize @account.user, :reject?
|
||||||
DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false)
|
DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false)
|
||||||
|
log_action :reject, @account.user
|
||||||
render_empty
|
render_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,8 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
authorize @domain_block, :update?
|
authorize @domain_block, :update?
|
||||||
@domain_block.update(domain_block_params)
|
@domain_block.update!(domain_block_params)
|
||||||
severity_changed = @domain_block.severity_changed?
|
DomainBlockWorker.perform_async(@domain_block.id, @domain_block.severity_previously_changed?)
|
||||||
@domain_block.save!
|
|
||||||
DomainBlockWorker.perform_async(@domain_block.id, severity_changed)
|
|
||||||
log_action :update, @domain_block
|
log_action :update, @domain_block
|
||||||
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,14 @@
|
||||||
class Api::V1::Admin::Trends::TagsController < Api::V1::Trends::TagsController
|
class Api::V1::Admin::Trends::TagsController < Api::V1::Trends::TagsController
|
||||||
before_action -> { authorize_if_got_token! :'admin:read' }
|
before_action -> { authorize_if_got_token! :'admin:read' }
|
||||||
|
|
||||||
|
def index
|
||||||
|
if current_user&.can?(:manage_taxonomies)
|
||||||
|
render json: @tags, each_serializer: REST::Admin::TagSerializer
|
||||||
|
else
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def enabled?
|
def enabled?
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Api::V1::FiltersController < Api::BaseController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
ApplicationRecord.transaction do
|
ApplicationRecord.transaction do
|
||||||
filter_category = current_account.custom_filters.create!(resource_params)
|
filter_category = current_account.custom_filters.create!(filter_params)
|
||||||
@filter = filter_category.keywords.create!(keyword_params)
|
@filter = filter_category.keywords.create!(keyword_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -52,11 +52,11 @@ class Api::V1::FiltersController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource_params
|
def resource_params
|
||||||
params.permit(:phrase, :expires_in, :irreversible, context: [])
|
params.permit(:phrase, :expires_in, :irreversible, :whole_word, context: [])
|
||||||
end
|
end
|
||||||
|
|
||||||
def filter_params
|
def filter_params
|
||||||
resource_params.slice(:expires_in, :irreversible, :context)
|
resource_params.slice(:phrase, :expires_in, :irreversible, :context)
|
||||||
end
|
end
|
||||||
|
|
||||||
def keyword_params
|
def keyword_params
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
class Api::V1::FollowedTagsController < Api::BaseController
|
class Api::V1::FollowedTagsController < Api::BaseController
|
||||||
TAGS_LIMIT = 100
|
TAGS_LIMIT = 100
|
||||||
|
|
||||||
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }, except: :show
|
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }
|
||||||
before_action :require_user!
|
before_action :require_user!
|
||||||
before_action :set_results
|
before_action :set_results
|
||||||
|
|
||||||
after_action :insert_pagination_headers, only: :show
|
after_action :insert_pagination_headers
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render json: @results.map(&:tag), each_serializer: REST::TagSerializer, relationships: TagRelationshipsPresenter.new(@results.map(&:tag), current_user&.account_id)
|
render json: @results.map(&:tag), each_serializer: REST::TagSerializer, relationships: TagRelationshipsPresenter.new(@results.map(&:tag), current_user&.account_id)
|
||||||
|
@ -43,7 +43,7 @@ class Api::V1::FollowedTagsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def records_continue?
|
def records_continue?
|
||||||
@results.size == limit_param(TAG_LIMIT)
|
@results.size == limit_param(TAGS_LIMIT)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_params(core_params)
|
def pagination_params(core_params)
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Api::V1::NotificationsController < Api::BaseController
|
||||||
before_action :require_user!
|
before_action :require_user!
|
||||||
after_action :insert_pagination_headers, only: :index
|
after_action :insert_pagination_headers, only: :index
|
||||||
|
|
||||||
DEFAULT_NOTIFICATIONS_LIMIT = 15
|
DEFAULT_NOTIFICATIONS_LIMIT = 40
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@notifications = load_notifications
|
@notifications = load_notifications
|
||||||
|
@ -40,7 +40,7 @@ class Api::V1::NotificationsController < Api::BaseController
|
||||||
private
|
private
|
||||||
|
|
||||||
def load_notifications
|
def load_notifications
|
||||||
notifications = browserable_account_notifications.includes(from_account: :account_stat).to_a_paginated_by_id(
|
notifications = browserable_account_notifications.includes(from_account: [:account_stat, :user]).to_a_paginated_by_id(
|
||||||
limit_param(DEFAULT_NOTIFICATIONS_LIMIT),
|
limit_param(DEFAULT_NOTIFICATIONS_LIMIT),
|
||||||
params_slice(:max_id, :since_id, :min_id)
|
params_slice(:max_id, :since_id, :min_id)
|
||||||
)
|
)
|
||||||
|
|
|
@ -64,11 +64,18 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
application: doorkeeper_token.application,
|
application: doorkeeper_token.application,
|
||||||
poll: status_params[:poll],
|
poll: status_params[:poll],
|
||||||
content_type: status_params[:content_type],
|
content_type: status_params[:content_type],
|
||||||
|
allowed_mentions: status_params[:allowed_mentions],
|
||||||
idempotency: request.headers['Idempotency-Key'],
|
idempotency: request.headers['Idempotency-Key'],
|
||||||
with_rate_limit: true
|
with_rate_limit: true
|
||||||
)
|
)
|
||||||
|
|
||||||
render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer
|
render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer
|
||||||
|
rescue PostStatusService::UnexpectedMentionsError => e
|
||||||
|
unexpected_accounts = ActiveModel::Serializer::CollectionSerializer.new(
|
||||||
|
e.accounts,
|
||||||
|
serializer: REST::AccountSerializer
|
||||||
|
)
|
||||||
|
render json: { error: e.message, unexpected_accounts: unexpected_accounts }, status: 422
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@ -80,6 +87,7 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
current_account.id,
|
current_account.id,
|
||||||
text: status_params[:status],
|
text: status_params[:status],
|
||||||
media_ids: status_params[:media_ids],
|
media_ids: status_params[:media_ids],
|
||||||
|
media_attributes: status_params[:media_attributes],
|
||||||
sensitive: status_params[:sensitive],
|
sensitive: status_params[:sensitive],
|
||||||
language: status_params[:language],
|
language: status_params[:language],
|
||||||
spoiler_text: status_params[:spoiler_text],
|
spoiler_text: status_params[:spoiler_text],
|
||||||
|
@ -130,7 +138,14 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
:language,
|
:language,
|
||||||
:scheduled_at,
|
:scheduled_at,
|
||||||
:content_type,
|
:content_type,
|
||||||
|
allowed_mentions: [],
|
||||||
media_ids: [],
|
media_ids: [],
|
||||||
|
media_attributes: [
|
||||||
|
:id,
|
||||||
|
:thumbnail,
|
||||||
|
:description,
|
||||||
|
:focus,
|
||||||
|
],
|
||||||
poll: [
|
poll: [
|
||||||
:multiple,
|
:multiple,
|
||||||
:hide_totals,
|
:hide_totals,
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
class Api::V1::StreamingController < Api::BaseController
|
class Api::V1::StreamingController < Api::BaseController
|
||||||
def index
|
def index
|
||||||
if Rails.configuration.x.streaming_api_base_url != request.host
|
if Rails.configuration.x.streaming_api_base_url == request.host
|
||||||
redirect_to streaming_api_url, status: 301
|
|
||||||
else
|
|
||||||
not_found
|
not_found
|
||||||
|
else
|
||||||
|
redirect_to streaming_api_url, status: 301
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Api::V1::TagsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def follow
|
def follow
|
||||||
TagFollow.create!(tag: @tag, account: current_account, rate_limit: true)
|
TagFollow.create_with(rate_limit: true).find_or_create_by!(tag: @tag, account: current_account)
|
||||||
render json: @tag, serializer: REST::TagSerializer
|
render json: @tag, serializer: REST::TagSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@ class Auth::PasswordsController < Devise::PasswordsController
|
||||||
super do |resource|
|
super do |resource|
|
||||||
if resource.errors.empty?
|
if resource.errors.empty?
|
||||||
resource.session_activations.destroy_all
|
resource.session_activations.destroy_all
|
||||||
|
|
||||||
|
resource.revoke_access!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -57,8 +57,8 @@ class Auth::RegistrationsController < Devise::RegistrationsController
|
||||||
end
|
end
|
||||||
|
|
||||||
def configure_sign_up_params
|
def configure_sign_up_params
|
||||||
devise_parameter_sanitizer.permit(:sign_up) do |u|
|
devise_parameter_sanitizer.permit(:sign_up) do |user_params|
|
||||||
u.permit({ account_attributes: [:username, :display_name], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code, :agreement, :website, :confirm_password)
|
user_params.permit({ account_attributes: [:username, :display_name], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code, :agreement, :website, :confirm_password)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -159,6 +159,6 @@ class Auth::RegistrationsController < Devise::RegistrationsController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cache_headers
|
def set_cache_headers
|
||||||
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
|
response.headers['Cache-Control'] = 'private, no-store'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,6 +15,10 @@ class Auth::SessionsController < Devise::SessionsController
|
||||||
before_action :set_instance_presenter, only: [:new]
|
before_action :set_instance_presenter, only: [:new]
|
||||||
before_action :set_body_classes
|
before_action :set_body_classes
|
||||||
|
|
||||||
|
content_security_policy only: :new do |p|
|
||||||
|
p.form_action(false)
|
||||||
|
end
|
||||||
|
|
||||||
def check_suspicious!
|
def check_suspicious!
|
||||||
user = find_user
|
user = find_user
|
||||||
@login_is_suspicious = suspicious_sign_in?(user) unless user.nil?
|
@login_is_suspicious = suspicious_sign_in?(user) unless user.nil?
|
||||||
|
|
|
@ -26,14 +26,4 @@ module AdminExportControllerConcern
|
||||||
def import_params
|
def import_params
|
||||||
params.require(:admin_import).permit(:data)
|
params.require(:admin_import).permit(:data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def import_data
|
|
||||||
Paperclip.io_adapters.for(@import.data).read
|
|
||||||
end
|
|
||||||
|
|
||||||
def parse_import_data!(default_headers)
|
|
||||||
data = CSV.parse(import_data, headers: true)
|
|
||||||
data = CSV.parse(import_data, headers: default_headers) unless data.headers&.first&.strip&.include?(default_headers[0])
|
|
||||||
@data = data.reject(&:blank?)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,7 +58,7 @@ module RateLimitHeaders
|
||||||
end
|
end
|
||||||
|
|
||||||
def api_throttle_data
|
def api_throttle_data
|
||||||
most_limited_type, = request.env['rack.attack.throttle_data'].min_by { |_, v| v[:limit] - v[:count] }
|
most_limited_type, = request.env['rack.attack.throttle_data'].min_by { |_key, value| value[:limit] - value[:count] }
|
||||||
request.env['rack.attack.throttle_data'][most_limited_type]
|
request.env['rack.attack.throttle_data'][most_limited_type]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ module SignatureVerification
|
||||||
end
|
end
|
||||||
|
|
||||||
class SignatureParamsTransformer < Parslet::Transform
|
class SignatureParamsTransformer < Parslet::Transform
|
||||||
rule(params: subtree(:p)) do
|
rule(params: subtree(:param)) do
|
||||||
(p.is_a?(Array) ? p : [p]).each_with_object({}) { |(key, val), h| h[key] = val }
|
(param.is_a?(Array) ? param : [param]).each_with_object({}) { |(key, value), hash| hash[key] = value }
|
||||||
end
|
end
|
||||||
|
|
||||||
rule(param: { key: simple(:key), value: simple(:val) }) do
|
rule(param: { key: simple(:key), value: simple(:val) }) do
|
||||||
|
@ -46,11 +46,11 @@ module SignatureVerification
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_account_signature!
|
def require_account_signature!
|
||||||
render plain: signature_verification_failure_reason, status: signature_verification_failure_code unless signed_request_account
|
render json: signature_verification_failure_reason, status: signature_verification_failure_code unless signed_request_account
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_actor_signature!
|
def require_actor_signature!
|
||||||
render plain: signature_verification_failure_reason, status: signature_verification_failure_code unless signed_request_actor
|
render json: signature_verification_failure_reason, status: signature_verification_failure_code unless signed_request_actor
|
||||||
end
|
end
|
||||||
|
|
||||||
def signed_request?
|
def signed_request?
|
||||||
|
@ -97,11 +97,11 @@ module SignatureVerification
|
||||||
|
|
||||||
actor = stoplight_wrap_request { actor_refresh_key!(actor) }
|
actor = stoplight_wrap_request { actor_refresh_key!(actor) }
|
||||||
|
|
||||||
raise SignatureVerificationError, "Public key not found for key #{signature_params['keyId']}" if actor.nil?
|
raise SignatureVerificationError, "Could not refresh public key #{signature_params['keyId']}" if actor.nil?
|
||||||
|
|
||||||
return actor unless verify_signature(actor, signature, compare_signed_string).nil?
|
return actor unless verify_signature(actor, signature, compare_signed_string).nil?
|
||||||
|
|
||||||
fail_with! "Verification failed for #{actor.to_log_human_identifier} #{actor.uri} using rsa-sha256 (RSASSA-PKCS1-v1_5 with SHA-256)"
|
fail_with! "Verification failed for #{actor.to_log_human_identifier} #{actor.uri} using rsa-sha256 (RSASSA-PKCS1-v1_5 with SHA-256)", signed_string: compare_signed_string, signature: signature_params['signature']
|
||||||
rescue SignatureVerificationError => e
|
rescue SignatureVerificationError => e
|
||||||
fail_with! e.message
|
fail_with! e.message
|
||||||
rescue HTTP::Error, OpenSSL::SSL::SSLError => e
|
rescue HTTP::Error, OpenSSL::SSL::SSLError => e
|
||||||
|
@ -118,8 +118,8 @@ module SignatureVerification
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def fail_with!(message)
|
def fail_with!(message, **options)
|
||||||
@signature_verification_failure_reason = message
|
@signature_verification_failure_reason = { error: message }.merge(options)
|
||||||
@signed_request_actor = nil
|
@signed_request_actor = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -209,8 +209,8 @@ module SignatureVerification
|
||||||
end
|
end
|
||||||
|
|
||||||
expires_time = Time.at(signature_params['expires'].to_i).utc if signature_params['expires'].present?
|
expires_time = Time.at(signature_params['expires'].to_i).utc if signature_params['expires'].present?
|
||||||
rescue ArgumentError
|
rescue ArgumentError => e
|
||||||
return false
|
raise SignatureVerificationError, "Invalid Date header: #{e.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
expires_time ||= created_time + 5.minutes unless created_time.nil?
|
expires_time ||= created_time + 5.minutes unless created_time.nil?
|
||||||
|
@ -227,7 +227,7 @@ module SignatureVerification
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_header_name(name)
|
def to_header_name(name)
|
||||||
name.split(/-/).map(&:capitalize).join('-')
|
name.split('-').map(&:capitalize).join('-')
|
||||||
end
|
end
|
||||||
|
|
||||||
def missing_required_signature_parameters?
|
def missing_required_signature_parameters?
|
||||||
|
|
|
@ -4,22 +4,17 @@ module WebAppControllerConcern
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
included do
|
included do
|
||||||
|
prepend_before_action :redirect_unauthenticated_to_permalinks!
|
||||||
before_action :set_pack
|
before_action :set_pack
|
||||||
before_action :redirect_unauthenticated_to_permalinks!
|
|
||||||
before_action :set_app_body_class
|
before_action :set_app_body_class
|
||||||
before_action :set_referrer_policy_header
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_app_body_class
|
def set_app_body_class
|
||||||
@body_classes = 'app-body'
|
@body_classes = 'app-body'
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_referrer_policy_header
|
|
||||||
response.headers['Referrer-Policy'] = 'origin'
|
|
||||||
end
|
|
||||||
|
|
||||||
def redirect_unauthenticated_to_permalinks!
|
def redirect_unauthenticated_to_permalinks!
|
||||||
return if user_signed_in?
|
return if user_signed_in? # NOTE: Different from upstream because we allow moved users to log in
|
||||||
|
|
||||||
redirect_path = PermalinkRedirector.new(request.path).redirect_path
|
redirect_path = PermalinkRedirector.new(request.path).redirect_path
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class FollowerAccountsController < ApplicationController
|
||||||
if page_requested?
|
if page_requested?
|
||||||
ActivityPub::CollectionPresenter.new(
|
ActivityPub::CollectionPresenter.new(
|
||||||
id: account_followers_url(@account, page: params.fetch(:page, 1)),
|
id: account_followers_url(@account, page: params.fetch(:page, 1)),
|
||||||
items: follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.account) },
|
items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.account) },
|
||||||
part_of: account_followers_url(@account),
|
part_of: account_followers_url(@account),
|
||||||
next: next_page_url,
|
next: next_page_url,
|
||||||
prev: prev_page_url,
|
prev: prev_page_url,
|
||||||
|
|
|
@ -66,7 +66,7 @@ class FollowingAccountsController < ApplicationController
|
||||||
id: account_following_index_url(@account, page: params.fetch(:page, 1)),
|
id: account_following_index_url(@account, page: params.fetch(:page, 1)),
|
||||||
type: :ordered,
|
type: :ordered,
|
||||||
size: @account.following_count,
|
size: @account.following_count,
|
||||||
items: follows.map { |f| ActivityPub::TagManager.instance.uri_for(f.target_account) },
|
items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.target_account) },
|
||||||
part_of: account_following_index_url(@account),
|
part_of: account_following_index_url(@account),
|
||||||
next: next_page_url,
|
next: next_page_url,
|
||||||
prev: prev_page_url
|
prev: prev_page_url
|
||||||
|
|
|
@ -13,8 +13,8 @@ class MediaController < ApplicationController
|
||||||
before_action :allow_iframing, only: :player
|
before_action :allow_iframing, only: :player
|
||||||
before_action :set_pack, only: :player
|
before_action :set_pack, only: :player
|
||||||
|
|
||||||
content_security_policy only: :player do |p|
|
content_security_policy only: :player do |policy|
|
||||||
p.frame_ancestors(false)
|
policy.frame_ancestors(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -8,6 +8,10 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
|
||||||
before_action :set_pack
|
before_action :set_pack
|
||||||
before_action :set_cache_headers
|
before_action :set_cache_headers
|
||||||
|
|
||||||
|
content_security_policy do |p|
|
||||||
|
p.form_action(false)
|
||||||
|
end
|
||||||
|
|
||||||
include Localized
|
include Localized
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -35,6 +39,6 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cache_headers
|
def set_cache_headers
|
||||||
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
|
response.headers['Cache-Control'] = 'private, no-store'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,7 +29,13 @@ class Settings::ApplicationsController < Settings::BaseController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if @application.update(application_params)
|
if @application.update(application_params)
|
||||||
redirect_to settings_applications_path, notice: I18n.t('generic.changes_saved_msg')
|
if @application.scopes_previously_changed?
|
||||||
|
@access_token = current_user.token_for_app(@application)
|
||||||
|
@access_token.destroy
|
||||||
|
redirect_to settings_application_path(@application), notice: I18n.t('applications.token_regenerated')
|
||||||
|
else
|
||||||
|
redirect_to settings_application_path(@application), notice: I18n.t('generic.changes_saved_msg')
|
||||||
|
end
|
||||||
else
|
else
|
||||||
render :show
|
render :show
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Settings::BaseController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cache_headers
|
def set_cache_headers
|
||||||
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
|
response.headers['Cache-Control'] = 'private, no-store'
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_not_suspended!
|
def require_not_suspended!
|
||||||
|
|
|
@ -20,6 +20,10 @@ class StatusesCleanupController < ApplicationController
|
||||||
# Do nothing
|
# Do nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def require_functional!
|
||||||
|
redirect_to edit_user_registration_path unless current_user.functional_or_moved?
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_pack
|
def set_pack
|
||||||
|
|
|
@ -17,8 +17,8 @@ class StatusesController < ApplicationController
|
||||||
skip_around_action :set_locale, if: -> { request.format == :json }
|
skip_around_action :set_locale, if: -> { request.format == :json }
|
||||||
skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
|
skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
|
||||||
|
|
||||||
content_security_policy only: :embed do |p|
|
content_security_policy only: :embed do |policy|
|
||||||
p.frame_ancestors(false)
|
policy.frame_ancestors(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -11,7 +11,7 @@ class TagsController < ApplicationController
|
||||||
before_action :authenticate_user!, if: :whitelist_mode?
|
before_action :authenticate_user!, if: :whitelist_mode?
|
||||||
before_action :set_local
|
before_action :set_local
|
||||||
before_action :set_tag
|
before_action :set_tag
|
||||||
before_action :set_statuses
|
before_action :set_statuses, if: -> { request.format == :rss }
|
||||||
before_action :set_instance_presenter
|
before_action :set_instance_presenter
|
||||||
|
|
||||||
skip_before_action :require_functional!, unless: :whitelist_mode?
|
skip_before_action :require_functional!, unless: :whitelist_mode?
|
||||||
|
@ -44,12 +44,7 @@ class TagsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_statuses
|
def set_statuses
|
||||||
case request.format&.to_sym
|
@statuses = cache_collection(TagFeed.new(@tag, nil, local: @local).get(limit_param), Status)
|
||||||
when :json
|
|
||||||
@statuses = cache_collection(TagFeed.new(@tag, current_account, local: @local).get(PAGE_SIZE, params[:max_id], params[:since_id], params[:min_id]), Status)
|
|
||||||
when :rss
|
|
||||||
@statuses = cache_collection(TagFeed.new(@tag, nil, local: @local).get(limit_param), Status)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_instance_presenter
|
def set_instance_presenter
|
||||||
|
@ -64,8 +59,6 @@ class TagsController < ApplicationController
|
||||||
ActivityPub::CollectionPresenter.new(
|
ActivityPub::CollectionPresenter.new(
|
||||||
id: tag_url(@tag),
|
id: tag_url(@tag),
|
||||||
type: :ordered,
|
type: :ordered,
|
||||||
size: @tag.statuses.count,
|
|
||||||
items: @statuses.map { |s| ActivityPub::TagManager.instance.uri_for(s) }
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,7 +20,7 @@ module Admin::ActionLogsHelper
|
||||||
when 'Status'
|
when 'Status'
|
||||||
link_to log.human_identifier, log.permalink
|
link_to log.human_identifier, log.permalink
|
||||||
when 'AccountWarning'
|
when 'AccountWarning'
|
||||||
link_to log.human_identifier, admin_account_path(log.target_id)
|
link_to log.human_identifier, disputes_strike_path(log.target_id)
|
||||||
when 'Announcement'
|
when 'Announcement'
|
||||||
link_to truncate(log.human_identifier), edit_admin_announcement_path(log.target_id)
|
link_to truncate(log.human_identifier), edit_admin_announcement_path(log.target_id)
|
||||||
when 'IpBlock', 'Instance', 'CustomEmoji'
|
when 'IpBlock', 'Instance', 'CustomEmoji'
|
||||||
|
|
|
@ -67,7 +67,7 @@ module ApplicationHelper
|
||||||
def link_to_login(name = nil, html_options = nil, &block)
|
def link_to_login(name = nil, html_options = nil, &block)
|
||||||
target = new_user_session_path
|
target = new_user_session_path
|
||||||
|
|
||||||
html_options = name if block_given?
|
html_options = name if block
|
||||||
|
|
||||||
if omniauth_only? && Devise.mappings[:user].omniauthable? && User.omniauth_providers.size == 1
|
if omniauth_only? && Devise.mappings[:user].omniauthable? && User.omniauth_providers.size == 1
|
||||||
target = omniauth_authorize_path(:user, User.omniauth_providers[0])
|
target = omniauth_authorize_path(:user, User.omniauth_providers[0])
|
||||||
|
@ -75,7 +75,7 @@ module ApplicationHelper
|
||||||
html_options[:method] = :post
|
html_options[:method] = :post
|
||||||
end
|
end
|
||||||
|
|
||||||
if block_given?
|
if block
|
||||||
link_to(target, html_options, &block)
|
link_to(target, html_options, &block)
|
||||||
else
|
else
|
||||||
link_to(name, target, html_options)
|
link_to(name, target, html_options)
|
||||||
|
|
|
@ -7,7 +7,7 @@ module EmailHelper
|
||||||
|
|
||||||
def email_to_canonical_email(str)
|
def email_to_canonical_email(str)
|
||||||
username, domain = str.downcase.split('@', 2)
|
username, domain = str.downcase.split('@', 2)
|
||||||
username, = username.gsub('.', '').split('+', 2)
|
username, = username.delete('.').split('+', 2)
|
||||||
|
|
||||||
"#{username}@#{domain}"
|
"#{username}@#{domain}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,19 +23,28 @@ module FormattingHelper
|
||||||
|
|
||||||
before_html = begin
|
before_html = begin
|
||||||
if status.spoiler_text?
|
if status.spoiler_text?
|
||||||
"<p><strong>#{I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)}</strong> #{h(status.spoiler_text)}</p><hr />"
|
tag.p do
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
end.html_safe # rubocop:disable Rails/OutputSafety
|
end
|
||||||
|
|
||||||
after_html = begin
|
after_html = begin
|
||||||
if status.preloadable_poll
|
if status.preloadable_poll
|
||||||
"<p>#{status.preloadable_poll.options.map { |o| "<input type=#{status.preloadable_poll.multiple? ? 'checkbox' : 'radio'} disabled /> #{h(o)}" }.join('<br />')}</p>"
|
tag.p do
|
||||||
else
|
safe_join(
|
||||||
''
|
status.preloadable_poll.options.map do |o|
|
||||||
|
tag.send(status.preloadable_poll.multiple? ? 'checkbox' : 'radio', o, disabled: true)
|
||||||
|
end,
|
||||||
|
tag.br
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end.html_safe # rubocop:disable Rails/OutputSafety
|
end
|
||||||
|
|
||||||
prerender_custom_emojis(
|
prerender_custom_emojis(
|
||||||
safe_join([before_html, html, after_html]),
|
safe_join([before_html, html, after_html]),
|
||||||
|
|
|
@ -213,7 +213,7 @@ module JsonLdHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_jsonld_context(url, _options = {}, &_block)
|
def load_jsonld_context(url, _options = {}, &block)
|
||||||
json = Rails.cache.fetch("jsonld:context:#{url}", expires_in: 30.days, raw: true) do
|
json = Rails.cache.fetch("jsonld:context:#{url}", expires_in: 30.days, raw: true) do
|
||||||
request = Request.new(:get, url)
|
request = Request.new(:get, url)
|
||||||
request.add_headers('Accept' => 'application/ld+json')
|
request.add_headers('Accept' => 'application/ld+json')
|
||||||
|
@ -226,6 +226,6 @@ module JsonLdHelper
|
||||||
|
|
||||||
doc = JSON::LD::API::RemoteDocument.new(json, documentUrl: url)
|
doc = JSON::LD::API::RemoteDocument.new(json, documentUrl: url)
|
||||||
|
|
||||||
block_given? ? yield(doc) : doc
|
block ? yield(doc) : doc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -190,12 +190,17 @@ module LanguagesHelper
|
||||||
ISO_639_3 = {
|
ISO_639_3 = {
|
||||||
ast: ['Asturian', 'Asturianu'].freeze,
|
ast: ['Asturian', 'Asturianu'].freeze,
|
||||||
ckb: ['Sorani (Kurdish)', 'سۆرانی'].freeze,
|
ckb: ['Sorani (Kurdish)', 'سۆرانی'].freeze,
|
||||||
|
cnr: ['Montenegrin', 'crnogorski'].freeze,
|
||||||
jbo: ['Lojban', 'la .lojban.'].freeze,
|
jbo: ['Lojban', 'la .lojban.'].freeze,
|
||||||
kab: ['Kabyle', 'Taqbaylit'].freeze,
|
kab: ['Kabyle', 'Taqbaylit'].freeze,
|
||||||
kmr: ['Kurmanji (Kurdish)', 'Kurmancî'].freeze,
|
kmr: ['Kurmanji (Kurdish)', 'Kurmancî'].freeze,
|
||||||
ldn: ['Láadan', 'Láadan'].freeze,
|
ldn: ['Láadan', 'Láadan'].freeze,
|
||||||
lfn: ['Lingua Franca Nova', 'lingua franca nova'].freeze,
|
lfn: ['Lingua Franca Nova', 'lingua franca nova'].freeze,
|
||||||
sco: ['Scots', 'Scots'].freeze,
|
sco: ['Scots', 'Scots'].freeze,
|
||||||
|
sma: ['Southern Sami', 'Åarjelsaemien Gïele'].freeze,
|
||||||
|
smj: ['Lule Sami', 'Julevsámegiella'].freeze,
|
||||||
|
szl: ['Silesian', 'ślůnsko godka'].freeze,
|
||||||
|
tai: ['Tai', 'ภาษาไท or ภาษาไต'].freeze,
|
||||||
tok: ['Toki Pona', 'toki pona'].freeze,
|
tok: ['Toki Pona', 'toki pona'].freeze,
|
||||||
zba: ['Balaibalan', 'باليبلن'].freeze,
|
zba: ['Balaibalan', 'باليبلن'].freeze,
|
||||||
zgh: ['Standard Moroccan Tamazight', 'ⵜⴰⵎⴰⵣⵉⵖⵜ'].freeze,
|
zgh: ['Standard Moroccan Tamazight', 'ⵜⴰⵎⴰⵣⵉⵖⵜ'].freeze,
|
||||||
|
@ -207,8 +212,10 @@ module LanguagesHelper
|
||||||
# names, but for some translations, we need the names of the
|
# names, but for some translations, we need the names of the
|
||||||
# regional variants specifically
|
# regional variants specifically
|
||||||
REGIONAL_LOCALE_NAMES = {
|
REGIONAL_LOCALE_NAMES = {
|
||||||
|
'en-GB': 'English (British)',
|
||||||
'es-AR': 'Español (Argentina)',
|
'es-AR': 'Español (Argentina)',
|
||||||
'es-MX': 'Español (México)',
|
'es-MX': 'Español (México)',
|
||||||
|
'fr-QC': 'Français (Canadien)',
|
||||||
'pt-BR': 'Português (Brasil)',
|
'pt-BR': 'Português (Brasil)',
|
||||||
'pt-PT': 'Português (Portugal)',
|
'pt-PT': 'Português (Portugal)',
|
||||||
'sr-Latn': 'Srpski (latinica)',
|
'sr-Latn': 'Srpski (latinica)',
|
||||||
|
|
|
@ -21,7 +21,7 @@ module StatusesHelper
|
||||||
def media_summary(status)
|
def media_summary(status)
|
||||||
attachments = { image: 0, video: 0, audio: 0 }
|
attachments = { image: 0, video: 0, audio: 0 }
|
||||||
|
|
||||||
status.media_attachments.each do |media|
|
status.ordered_media_attachments.each do |media|
|
||||||
if media.video?
|
if media.video?
|
||||||
attachments[:video] += 1
|
attachments[:video] += 1
|
||||||
elsif media.audio?
|
elsif media.audio?
|
||||||
|
|
|
@ -194,7 +194,7 @@ ready(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector('a#add-instance-button')?.addEventListener('click', (e) => {
|
document.querySelector('a#add-instance-button')?.addEventListener('click', (e) => {
|
||||||
const domain = document.getElementById('by_domain')?.value;
|
const domain = document.querySelector('input[type="text"]#by_domain')?.value;
|
||||||
|
|
||||||
if (domain) {
|
if (domain) {
|
||||||
const url = new URL(event.target.href);
|
const url = new URL(event.target.href);
|
||||||
|
|
|
@ -15,7 +15,7 @@ window.addEventListener('message', e => {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
height: document.getElementsByTagName('html')[0].scrollHeight,
|
height: document.getElementsByTagName('html')[0].scrollHeight,
|
||||||
}, '*');
|
}, '*');
|
||||||
};
|
}
|
||||||
|
|
||||||
if (['interactive', 'complete'].includes(document.readyState)) {
|
if (['interactive', 'complete'].includes(document.readyState)) {
|
||||||
setEmbedHeight();
|
setEmbedHeight();
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
import 'packs/public-path';
|
import 'packs/public-path';
|
||||||
import escapeTextContentForBrowser from 'escape-html';
|
import escapeTextContentForBrowser from 'escape-html';
|
||||||
|
|
||||||
const { delegate } = require('@rails/ujs');
|
const { delegate } = require('@rails/ujs');
|
||||||
|
|
||||||
import emojify from '../mastodon/features/emoji/emoji';
|
import emojify from '../mastodon/features/emoji/emoji';
|
||||||
|
|
||||||
delegate(document, '#account_display_name', 'input', ({ target }) => {
|
delegate(document, '#account_display_name', 'input', ({ target }) => {
|
||||||
|
@ -65,7 +67,7 @@ delegate(document, '.input-copy button', 'click', ({ target }) => {
|
||||||
input.blur();
|
input.blur();
|
||||||
target.parentNode.classList.add('copied');
|
target.parentNode.classList.add('copied');
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
target.parentNode.classList.remove('copied');
|
target.parentNode.classList.remove('copied');
|
||||||
}, 700);
|
}, 700);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,27 +21,27 @@ export function submitAccountNote() {
|
||||||
dispatch(submitAccountNoteSuccess(response.data));
|
dispatch(submitAccountNoteSuccess(response.data));
|
||||||
}).catch(error => dispatch(submitAccountNoteFail(error)));
|
}).catch(error => dispatch(submitAccountNoteFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitAccountNoteRequest() {
|
export function submitAccountNoteRequest() {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_NOTE_SUBMIT_REQUEST,
|
type: ACCOUNT_NOTE_SUBMIT_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitAccountNoteSuccess(relationship) {
|
export function submitAccountNoteSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_NOTE_SUBMIT_SUCCESS,
|
type: ACCOUNT_NOTE_SUBMIT_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitAccountNoteFail(error) {
|
export function submitAccountNoteFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_NOTE_SUBMIT_FAIL,
|
type: ACCOUNT_NOTE_SUBMIT_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function initEditAccountNote(account) {
|
export function initEditAccountNote(account) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -53,17 +53,17 @@ export function initEditAccountNote(account) {
|
||||||
comment,
|
comment,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function cancelAccountNote() {
|
export function cancelAccountNote() {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_NOTE_CANCEL,
|
type: ACCOUNT_NOTE_CANCEL,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeAccountNoteComment(comment) {
|
export function changeAccountNoteComment(comment) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_NOTE_CHANGE_COMMENT,
|
type: ACCOUNT_NOTE_CHANGE_COMMENT,
|
||||||
comment,
|
comment,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ export function fetchAccount(id) {
|
||||||
dispatch(fetchAccountFail(id, error));
|
dispatch(fetchAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export const lookupAccount = acct => (dispatch, getState) => {
|
export const lookupAccount = acct => (dispatch, getState) => {
|
||||||
dispatch(lookupAccountRequest(acct));
|
dispatch(lookupAccountRequest(acct));
|
||||||
|
@ -143,13 +143,13 @@ export function fetchAccountRequest(id) {
|
||||||
type: ACCOUNT_FETCH_REQUEST,
|
type: ACCOUNT_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchAccountSuccess() {
|
export function fetchAccountSuccess() {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_FETCH_SUCCESS,
|
type: ACCOUNT_FETCH_SUCCESS,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchAccountFail(id, error) {
|
export function fetchAccountFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -158,7 +158,7 @@ export function fetchAccountFail(id, error) {
|
||||||
error,
|
error,
|
||||||
skipAlert: true,
|
skipAlert: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccount(id, options = { reblogs: true }) {
|
export function followAccount(id, options = { reblogs: true }) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -173,7 +173,7 @@ export function followAccount(id, options = { reblogs: true }) {
|
||||||
dispatch(followAccountFail(error, locked));
|
dispatch(followAccountFail(error, locked));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccount(id) {
|
export function unfollowAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -185,7 +185,7 @@ export function unfollowAccount(id) {
|
||||||
dispatch(unfollowAccountFail(error));
|
dispatch(unfollowAccountFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccountRequest(id, locked) {
|
export function followAccountRequest(id, locked) {
|
||||||
return {
|
return {
|
||||||
|
@ -194,7 +194,7 @@ export function followAccountRequest(id, locked) {
|
||||||
locked,
|
locked,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccountSuccess(relationship, alreadyFollowing) {
|
export function followAccountSuccess(relationship, alreadyFollowing) {
|
||||||
return {
|
return {
|
||||||
|
@ -203,7 +203,7 @@ export function followAccountSuccess(relationship, alreadyFollowing) {
|
||||||
alreadyFollowing,
|
alreadyFollowing,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function followAccountFail(error, locked) {
|
export function followAccountFail(error, locked) {
|
||||||
return {
|
return {
|
||||||
|
@ -212,7 +212,7 @@ export function followAccountFail(error, locked) {
|
||||||
locked,
|
locked,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccountRequest(id) {
|
export function unfollowAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
|
@ -220,7 +220,7 @@ export function unfollowAccountRequest(id) {
|
||||||
id,
|
id,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccountSuccess(relationship, statuses) {
|
export function unfollowAccountSuccess(relationship, statuses) {
|
||||||
return {
|
return {
|
||||||
|
@ -229,7 +229,7 @@ export function unfollowAccountSuccess(relationship, statuses) {
|
||||||
statuses,
|
statuses,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfollowAccountFail(error) {
|
export function unfollowAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -237,7 +237,7 @@ export function unfollowAccountFail(error) {
|
||||||
error,
|
error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccount(id) {
|
export function blockAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -250,7 +250,7 @@ export function blockAccount(id) {
|
||||||
dispatch(blockAccountFail(id, error));
|
dispatch(blockAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccount(id) {
|
export function unblockAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -262,14 +262,14 @@ export function unblockAccount(id) {
|
||||||
dispatch(unblockAccountFail(id, error));
|
dispatch(unblockAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccountRequest(id) {
|
export function blockAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_BLOCK_REQUEST,
|
type: ACCOUNT_BLOCK_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccountSuccess(relationship, statuses) {
|
export function blockAccountSuccess(relationship, statuses) {
|
||||||
return {
|
return {
|
||||||
|
@ -277,35 +277,35 @@ export function blockAccountSuccess(relationship, statuses) {
|
||||||
relationship,
|
relationship,
|
||||||
statuses,
|
statuses,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockAccountFail(error) {
|
export function blockAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_BLOCK_FAIL,
|
type: ACCOUNT_BLOCK_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccountRequest(id) {
|
export function unblockAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNBLOCK_REQUEST,
|
type: ACCOUNT_UNBLOCK_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccountSuccess(relationship) {
|
export function unblockAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNBLOCK_SUCCESS,
|
type: ACCOUNT_UNBLOCK_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockAccountFail(error) {
|
export function unblockAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNBLOCK_FAIL,
|
type: ACCOUNT_UNBLOCK_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
export function muteAccount(id, notifications, duration=0) {
|
export function muteAccount(id, notifications, duration=0) {
|
||||||
|
@ -319,7 +319,7 @@ export function muteAccount(id, notifications, duration=0) {
|
||||||
dispatch(muteAccountFail(id, error));
|
dispatch(muteAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccount(id) {
|
export function unmuteAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -331,14 +331,14 @@ export function unmuteAccount(id) {
|
||||||
dispatch(unmuteAccountFail(id, error));
|
dispatch(unmuteAccountFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccountRequest(id) {
|
export function muteAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_MUTE_REQUEST,
|
type: ACCOUNT_MUTE_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccountSuccess(relationship, statuses) {
|
export function muteAccountSuccess(relationship, statuses) {
|
||||||
return {
|
return {
|
||||||
|
@ -346,35 +346,35 @@ export function muteAccountSuccess(relationship, statuses) {
|
||||||
relationship,
|
relationship,
|
||||||
statuses,
|
statuses,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function muteAccountFail(error) {
|
export function muteAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_MUTE_FAIL,
|
type: ACCOUNT_MUTE_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccountRequest(id) {
|
export function unmuteAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNMUTE_REQUEST,
|
type: ACCOUNT_UNMUTE_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccountSuccess(relationship) {
|
export function unmuteAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNMUTE_SUCCESS,
|
type: ACCOUNT_UNMUTE_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmuteAccountFail(error) {
|
export function unmuteAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNMUTE_FAIL,
|
type: ACCOUNT_UNMUTE_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
export function fetchFollowers(id) {
|
export function fetchFollowers(id) {
|
||||||
|
@ -391,14 +391,14 @@ export function fetchFollowers(id) {
|
||||||
dispatch(fetchFollowersFail(id, error));
|
dispatch(fetchFollowersFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowersRequest(id) {
|
export function fetchFollowersRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWERS_FETCH_REQUEST,
|
type: FOLLOWERS_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowersSuccess(id, accounts, next) {
|
export function fetchFollowersSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -407,7 +407,7 @@ export function fetchFollowersSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowersFail(id, error) {
|
export function fetchFollowersFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -416,7 +416,7 @@ export function fetchFollowersFail(id, error) {
|
||||||
error,
|
error,
|
||||||
skipNotFound: true,
|
skipNotFound: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowers(id) {
|
export function expandFollowers(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -438,14 +438,14 @@ export function expandFollowers(id) {
|
||||||
dispatch(expandFollowersFail(id, error));
|
dispatch(expandFollowersFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowersRequest(id) {
|
export function expandFollowersRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWERS_EXPAND_REQUEST,
|
type: FOLLOWERS_EXPAND_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowersSuccess(id, accounts, next) {
|
export function expandFollowersSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -454,7 +454,7 @@ export function expandFollowersSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowersFail(id, error) {
|
export function expandFollowersFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -462,7 +462,7 @@ export function expandFollowersFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowing(id) {
|
export function fetchFollowing(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -478,14 +478,14 @@ export function fetchFollowing(id) {
|
||||||
dispatch(fetchFollowingFail(id, error));
|
dispatch(fetchFollowingFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowingRequest(id) {
|
export function fetchFollowingRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWING_FETCH_REQUEST,
|
type: FOLLOWING_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowingSuccess(id, accounts, next) {
|
export function fetchFollowingSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -494,7 +494,7 @@ export function fetchFollowingSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowingFail(id, error) {
|
export function fetchFollowingFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -503,7 +503,7 @@ export function fetchFollowingFail(id, error) {
|
||||||
error,
|
error,
|
||||||
skipNotFound: true,
|
skipNotFound: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowing(id) {
|
export function expandFollowing(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -525,14 +525,14 @@ export function expandFollowing(id) {
|
||||||
dispatch(expandFollowingFail(id, error));
|
dispatch(expandFollowingFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowingRequest(id) {
|
export function expandFollowingRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOWING_EXPAND_REQUEST,
|
type: FOLLOWING_EXPAND_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowingSuccess(id, accounts, next) {
|
export function expandFollowingSuccess(id, accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -541,7 +541,7 @@ export function expandFollowingSuccess(id, accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowingFail(id, error) {
|
export function expandFollowingFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -549,7 +549,7 @@ export function expandFollowingFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationships(accountIds) {
|
export function fetchRelationships(accountIds) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -570,7 +570,7 @@ export function fetchRelationships(accountIds) {
|
||||||
dispatch(fetchRelationshipsFail(error));
|
dispatch(fetchRelationshipsFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationshipsRequest(ids) {
|
export function fetchRelationshipsRequest(ids) {
|
||||||
return {
|
return {
|
||||||
|
@ -578,7 +578,7 @@ export function fetchRelationshipsRequest(ids) {
|
||||||
ids,
|
ids,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationshipsSuccess(relationships) {
|
export function fetchRelationshipsSuccess(relationships) {
|
||||||
return {
|
return {
|
||||||
|
@ -586,7 +586,7 @@ export function fetchRelationshipsSuccess(relationships) {
|
||||||
relationships,
|
relationships,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchRelationshipsFail(error) {
|
export function fetchRelationshipsFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -595,7 +595,7 @@ export function fetchRelationshipsFail(error) {
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
skipNotFound: true,
|
skipNotFound: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequests() {
|
export function fetchFollowRequests() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -607,13 +607,13 @@ export function fetchFollowRequests() {
|
||||||
dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null));
|
dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null));
|
||||||
}).catch(error => dispatch(fetchFollowRequestsFail(error)));
|
}).catch(error => dispatch(fetchFollowRequestsFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequestsRequest() {
|
export function fetchFollowRequestsRequest() {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_FETCH_REQUEST,
|
type: FOLLOW_REQUESTS_FETCH_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequestsSuccess(accounts, next) {
|
export function fetchFollowRequestsSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -621,14 +621,14 @@ export function fetchFollowRequestsSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFollowRequestsFail(error) {
|
export function fetchFollowRequestsFail(error) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_FETCH_FAIL,
|
type: FOLLOW_REQUESTS_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequests() {
|
export function expandFollowRequests() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -646,13 +646,13 @@ export function expandFollowRequests() {
|
||||||
dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null));
|
dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null));
|
||||||
}).catch(error => dispatch(expandFollowRequestsFail(error)));
|
}).catch(error => dispatch(expandFollowRequestsFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequestsRequest() {
|
export function expandFollowRequestsRequest() {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_EXPAND_REQUEST,
|
type: FOLLOW_REQUESTS_EXPAND_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequestsSuccess(accounts, next) {
|
export function expandFollowRequestsSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -660,14 +660,14 @@ export function expandFollowRequestsSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFollowRequestsFail(error) {
|
export function expandFollowRequestsFail(error) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUESTS_EXPAND_FAIL,
|
type: FOLLOW_REQUESTS_EXPAND_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequest(id) {
|
export function authorizeFollowRequest(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -678,21 +678,21 @@ export function authorizeFollowRequest(id) {
|
||||||
.then(() => dispatch(authorizeFollowRequestSuccess(id)))
|
.then(() => dispatch(authorizeFollowRequestSuccess(id)))
|
||||||
.catch(error => dispatch(authorizeFollowRequestFail(id, error)));
|
.catch(error => dispatch(authorizeFollowRequestFail(id, error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequestRequest(id) {
|
export function authorizeFollowRequestRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_AUTHORIZE_REQUEST,
|
type: FOLLOW_REQUEST_AUTHORIZE_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequestSuccess(id) {
|
export function authorizeFollowRequestSuccess(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
|
type: FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function authorizeFollowRequestFail(id, error) {
|
export function authorizeFollowRequestFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -700,7 +700,7 @@ export function authorizeFollowRequestFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
export function rejectFollowRequest(id) {
|
export function rejectFollowRequest(id) {
|
||||||
|
@ -712,21 +712,21 @@ export function rejectFollowRequest(id) {
|
||||||
.then(() => dispatch(rejectFollowRequestSuccess(id)))
|
.then(() => dispatch(rejectFollowRequestSuccess(id)))
|
||||||
.catch(error => dispatch(rejectFollowRequestFail(id, error)));
|
.catch(error => dispatch(rejectFollowRequestFail(id, error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequestRequest(id) {
|
export function rejectFollowRequestRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_REJECT_REQUEST,
|
type: FOLLOW_REQUEST_REJECT_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequestSuccess(id) {
|
export function rejectFollowRequestSuccess(id) {
|
||||||
return {
|
return {
|
||||||
type: FOLLOW_REQUEST_REJECT_SUCCESS,
|
type: FOLLOW_REQUEST_REJECT_SUCCESS,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function rejectFollowRequestFail(id, error) {
|
export function rejectFollowRequestFail(id, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -734,7 +734,7 @@ export function rejectFollowRequestFail(id, error) {
|
||||||
id,
|
id,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccount(id) {
|
export function pinAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -746,7 +746,7 @@ export function pinAccount(id) {
|
||||||
dispatch(pinAccountFail(error));
|
dispatch(pinAccountFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccount(id) {
|
export function unpinAccount(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -758,49 +758,49 @@ export function unpinAccount(id) {
|
||||||
dispatch(unpinAccountFail(error));
|
dispatch(unpinAccountFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccountRequest(id) {
|
export function pinAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_PIN_REQUEST,
|
type: ACCOUNT_PIN_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccountSuccess(relationship) {
|
export function pinAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_PIN_SUCCESS,
|
type: ACCOUNT_PIN_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinAccountFail(error) {
|
export function pinAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_PIN_FAIL,
|
type: ACCOUNT_PIN_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccountRequest(id) {
|
export function unpinAccountRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNPIN_REQUEST,
|
type: ACCOUNT_UNPIN_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccountSuccess(relationship) {
|
export function unpinAccountSuccess(relationship) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNPIN_SUCCESS,
|
type: ACCOUNT_UNPIN_SUCCESS,
|
||||||
relationship,
|
relationship,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinAccountFail(error) {
|
export function unpinAccountFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ACCOUNT_UNPIN_FAIL,
|
type: ACCOUNT_UNPIN_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export const revealAccount = id => ({
|
export const revealAccount = id => ({
|
||||||
type: ACCOUNT_REVEAL,
|
type: ACCOUNT_REVEAL,
|
||||||
|
@ -811,18 +811,18 @@ export function fetchPinnedAccounts() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
dispatch(fetchPinnedAccountsRequest());
|
dispatch(fetchPinnedAccountsRequest());
|
||||||
|
|
||||||
api(getState).get(`/api/v1/endorsements`, { params: { limit: 0 } }).then(response => {
|
api(getState).get('/api/v1/endorsements', { params: { limit: 0 } }).then(response => {
|
||||||
dispatch(importFetchedAccounts(response.data));
|
dispatch(importFetchedAccounts(response.data));
|
||||||
dispatch(fetchPinnedAccountsSuccess(response.data));
|
dispatch(fetchPinnedAccountsSuccess(response.data));
|
||||||
}).catch(err => dispatch(fetchPinnedAccountsFail(err)));
|
}).catch(err => dispatch(fetchPinnedAccountsFail(err)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchPinnedAccountsRequest() {
|
export function fetchPinnedAccountsRequest() {
|
||||||
return {
|
return {
|
||||||
type: PINNED_ACCOUNTS_FETCH_REQUEST,
|
type: PINNED_ACCOUNTS_FETCH_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchPinnedAccountsSuccess(accounts, next) {
|
export function fetchPinnedAccountsSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -830,14 +830,14 @@ export function fetchPinnedAccountsSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchPinnedAccountsFail(error) {
|
export function fetchPinnedAccountsFail(error) {
|
||||||
return {
|
return {
|
||||||
type: PINNED_ACCOUNTS_FETCH_FAIL,
|
type: PINNED_ACCOUNTS_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchPinnedAccountsSuggestions(q) {
|
export function fetchPinnedAccountsSuggestions(q) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -853,7 +853,7 @@ export function fetchPinnedAccountsSuggestions(q) {
|
||||||
dispatch(fetchPinnedAccountsSuggestionsReady(q, response.data));
|
dispatch(fetchPinnedAccountsSuggestionsReady(q, response.data));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchPinnedAccountsSuggestionsReady(query, accounts) {
|
export function fetchPinnedAccountsSuggestionsReady(query, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -861,24 +861,24 @@ export function fetchPinnedAccountsSuggestionsReady(query, accounts) {
|
||||||
query,
|
query,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function clearPinnedAccountsSuggestions() {
|
export function clearPinnedAccountsSuggestions() {
|
||||||
return {
|
return {
|
||||||
type: PINNED_ACCOUNTS_EDITOR_SUGGESTIONS_CLEAR,
|
type: PINNED_ACCOUNTS_EDITOR_SUGGESTIONS_CLEAR,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changePinnedAccountsSuggestions(value) {
|
export function changePinnedAccountsSuggestions(value) {
|
||||||
return {
|
return {
|
||||||
type: PINNED_ACCOUNTS_EDITOR_SUGGESTIONS_CHANGE,
|
type: PINNED_ACCOUNTS_EDITOR_SUGGESTIONS_CHANGE,
|
||||||
value,
|
value,
|
||||||
}
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function resetPinnedAccountsEditor() {
|
export function resetPinnedAccountsEditor() {
|
||||||
return {
|
return {
|
||||||
type: PINNED_ACCOUNTS_EDITOR_RESET,
|
type: PINNED_ACCOUNTS_EDITOR_RESET,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,13 @@ export function dismissAlert(alert) {
|
||||||
type: ALERT_DISMISS,
|
type: ALERT_DISMISS,
|
||||||
alert,
|
alert,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function clearAlert() {
|
export function clearAlert() {
|
||||||
return {
|
return {
|
||||||
type: ALERT_CLEAR,
|
type: ALERT_CLEAR,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function showAlert(title = messages.unexpectedTitle, message = messages.unexpectedMessage, message_values = undefined) {
|
export function showAlert(title = messages.unexpectedTitle, message = messages.unexpectedMessage, message_values = undefined) {
|
||||||
return {
|
return {
|
||||||
|
@ -32,7 +32,7 @@ export function showAlert(title = messages.unexpectedTitle, message = messages.u
|
||||||
message,
|
message,
|
||||||
message_values,
|
message_values,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function showAlertForError(error, skipNotFound = false) {
|
export function showAlertForError(error, skipNotFound = false) {
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ export const addReaction = (announcementId, name) => (dispatch, getState) => {
|
||||||
dispatch(addReactionRequest(announcementId, name, alreadyAdded));
|
dispatch(addReactionRequest(announcementId, name, alreadyAdded));
|
||||||
}
|
}
|
||||||
|
|
||||||
api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${name}`).then(() => {
|
api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => {
|
||||||
dispatch(addReactionSuccess(announcementId, name, alreadyAdded));
|
dispatch(addReactionSuccess(announcementId, name, alreadyAdded));
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
if (!alreadyAdded) {
|
if (!alreadyAdded) {
|
||||||
|
@ -136,7 +136,7 @@ export const addReactionFail = (announcementId, name, error) => ({
|
||||||
export const removeReaction = (announcementId, name) => (dispatch, getState) => {
|
export const removeReaction = (announcementId, name) => (dispatch, getState) => {
|
||||||
dispatch(removeReactionRequest(announcementId, name));
|
dispatch(removeReactionRequest(announcementId, name));
|
||||||
|
|
||||||
api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${name}`).then(() => {
|
api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => {
|
||||||
dispatch(removeReactionSuccess(announcementId, name));
|
dispatch(removeReactionSuccess(announcementId, name));
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
dispatch(removeReactionFail(announcementId, name, err));
|
dispatch(removeReactionFail(announcementId, name, err));
|
||||||
|
|
|
@ -24,13 +24,13 @@ export function fetchBlocks() {
|
||||||
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
||||||
}).catch(error => dispatch(fetchBlocksFail(error)));
|
}).catch(error => dispatch(fetchBlocksFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchBlocksRequest() {
|
export function fetchBlocksRequest() {
|
||||||
return {
|
return {
|
||||||
type: BLOCKS_FETCH_REQUEST,
|
type: BLOCKS_FETCH_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchBlocksSuccess(accounts, next) {
|
export function fetchBlocksSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -38,14 +38,14 @@ export function fetchBlocksSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchBlocksFail(error) {
|
export function fetchBlocksFail(error) {
|
||||||
return {
|
return {
|
||||||
type: BLOCKS_FETCH_FAIL,
|
type: BLOCKS_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBlocks() {
|
export function expandBlocks() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -64,13 +64,13 @@ export function expandBlocks() {
|
||||||
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
||||||
}).catch(error => dispatch(expandBlocksFail(error)));
|
}).catch(error => dispatch(expandBlocksFail(error)));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBlocksRequest() {
|
export function expandBlocksRequest() {
|
||||||
return {
|
return {
|
||||||
type: BLOCKS_EXPAND_REQUEST,
|
type: BLOCKS_EXPAND_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBlocksSuccess(accounts, next) {
|
export function expandBlocksSuccess(accounts, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -78,14 +78,14 @@ export function expandBlocksSuccess(accounts, next) {
|
||||||
accounts,
|
accounts,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBlocksFail(error) {
|
export function expandBlocksFail(error) {
|
||||||
return {
|
return {
|
||||||
type: BLOCKS_EXPAND_FAIL,
|
type: BLOCKS_EXPAND_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function initBlockModal(account) {
|
export function initBlockModal(account) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
|
|
@ -25,13 +25,13 @@ export function fetchBookmarkedStatuses() {
|
||||||
dispatch(fetchBookmarkedStatusesFail(error));
|
dispatch(fetchBookmarkedStatusesFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchBookmarkedStatusesRequest() {
|
export function fetchBookmarkedStatusesRequest() {
|
||||||
return {
|
return {
|
||||||
type: BOOKMARKED_STATUSES_FETCH_REQUEST,
|
type: BOOKMARKED_STATUSES_FETCH_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchBookmarkedStatusesSuccess(statuses, next) {
|
export function fetchBookmarkedStatusesSuccess(statuses, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -39,14 +39,14 @@ export function fetchBookmarkedStatusesSuccess(statuses, next) {
|
||||||
statuses,
|
statuses,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchBookmarkedStatusesFail(error) {
|
export function fetchBookmarkedStatusesFail(error) {
|
||||||
return {
|
return {
|
||||||
type: BOOKMARKED_STATUSES_FETCH_FAIL,
|
type: BOOKMARKED_STATUSES_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBookmarkedStatuses() {
|
export function expandBookmarkedStatuses() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -66,13 +66,13 @@ export function expandBookmarkedStatuses() {
|
||||||
dispatch(expandBookmarkedStatusesFail(error));
|
dispatch(expandBookmarkedStatusesFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBookmarkedStatusesRequest() {
|
export function expandBookmarkedStatusesRequest() {
|
||||||
return {
|
return {
|
||||||
type: BOOKMARKED_STATUSES_EXPAND_REQUEST,
|
type: BOOKMARKED_STATUSES_EXPAND_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBookmarkedStatusesSuccess(statuses, next) {
|
export function expandBookmarkedStatusesSuccess(statuses, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -80,11 +80,11 @@ export function expandBookmarkedStatusesSuccess(statuses, next) {
|
||||||
statuses,
|
statuses,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandBookmarkedStatusesFail(error) {
|
export function expandBookmarkedStatusesFail(error) {
|
||||||
return {
|
return {
|
||||||
type: BOOKMARKED_STATUSES_EXPAND_FAIL,
|
type: BOOKMARKED_STATUSES_EXPAND_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ export function initBoostModal(props) {
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: BOOSTS_INIT_MODAL,
|
type: BOOSTS_INIT_MODAL,
|
||||||
privacy
|
privacy,
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch(openModal('BOOST', props));
|
dispatch(openModal('BOOST', props));
|
||||||
|
|
|
@ -15,7 +15,7 @@ export function addColumn(id, params) {
|
||||||
|
|
||||||
dispatch(saveSettings());
|
dispatch(saveSettings());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function removeColumn(uuid) {
|
export function removeColumn(uuid) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
@ -26,7 +26,7 @@ export function removeColumn(uuid) {
|
||||||
|
|
||||||
dispatch(saveSettings());
|
dispatch(saveSettings());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function moveColumn(uuid, direction) {
|
export function moveColumn(uuid, direction) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
@ -38,7 +38,7 @@ export function moveColumn(uuid, direction) {
|
||||||
|
|
||||||
dispatch(saveSettings());
|
dispatch(saveSettings());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeColumnParams(uuid, path, value) {
|
export function changeColumnParams(uuid, path, value) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
|
|
@ -93,27 +93,28 @@ export const ensureComposeIsVisible = (getState, routerHistory) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export function setComposeToStatus(status, text, spoiler_text) {
|
export function setComposeToStatus(status, text, spoiler_text, content_type) {
|
||||||
return{
|
return{
|
||||||
type: COMPOSE_SET_STATUS,
|
type: COMPOSE_SET_STATUS,
|
||||||
status,
|
status,
|
||||||
text,
|
text,
|
||||||
spoiler_text,
|
spoiler_text,
|
||||||
|
content_type,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeCompose(text) {
|
export function changeCompose(text) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_CHANGE,
|
type: COMPOSE_CHANGE,
|
||||||
text: text,
|
text: text,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function cycleElefriendCompose() {
|
export function cycleElefriendCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_CYCLE_ELEFRIEND,
|
type: COMPOSE_CYCLE_ELEFRIEND,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function replyCompose(status, routerHistory) {
|
export function replyCompose(status, routerHistory) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -126,19 +127,19 @@ export function replyCompose(status, routerHistory) {
|
||||||
|
|
||||||
ensureComposeIsVisible(getState, routerHistory);
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function cancelReplyCompose() {
|
export function cancelReplyCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_REPLY_CANCEL,
|
type: COMPOSE_REPLY_CANCEL,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function resetCompose() {
|
export function resetCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_RESET,
|
type: COMPOSE_RESET,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function mentionCompose(account, routerHistory) {
|
export function mentionCompose(account, routerHistory) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -149,7 +150,7 @@ export function mentionCompose(account, routerHistory) {
|
||||||
|
|
||||||
ensureComposeIsVisible(getState, routerHistory);
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function directCompose(account, routerHistory) {
|
export function directCompose(account, routerHistory) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -160,7 +161,7 @@ export function directCompose(account, routerHistory) {
|
||||||
|
|
||||||
ensureComposeIsVisible(getState, routerHistory);
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitCompose(routerHistory) {
|
export function submitCompose(routerHistory) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
@ -180,6 +181,18 @@ export function submitCompose(routerHistory) {
|
||||||
|
|
||||||
dispatch(submitComposeRequest());
|
dispatch(submitComposeRequest());
|
||||||
|
|
||||||
|
// If we're editing a post with media attachments, those have not
|
||||||
|
// necessarily been changed on the server. Do it now in the same
|
||||||
|
// API call.
|
||||||
|
let media_attributes;
|
||||||
|
if (statusId !== null) {
|
||||||
|
media_attributes = media.map(item => ({
|
||||||
|
id: item.get('id'),
|
||||||
|
description: item.get('description'),
|
||||||
|
focus: item.get('focus'),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
api(getState).request({
|
api(getState).request({
|
||||||
url: statusId === null ? '/api/v1/statuses' : `/api/v1/statuses/${statusId}`,
|
url: statusId === null ? '/api/v1/statuses' : `/api/v1/statuses/${statusId}`,
|
||||||
method: statusId === null ? 'post' : 'put',
|
method: statusId === null ? 'post' : 'put',
|
||||||
|
@ -188,6 +201,7 @@ export function submitCompose(routerHistory) {
|
||||||
content_type: getState().getIn(['compose', 'content_type']),
|
content_type: getState().getIn(['compose', 'content_type']),
|
||||||
in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
|
in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
|
||||||
media_ids: media.map(item => item.get('id')),
|
media_ids: media.map(item => item.get('id')),
|
||||||
|
media_attributes,
|
||||||
sensitive: getState().getIn(['compose', 'sensitive']) || (spoilerText.length > 0 && media.size !== 0),
|
sensitive: getState().getIn(['compose', 'sensitive']) || (spoilerText.length > 0 && media.size !== 0),
|
||||||
spoiler_text: spoilerText,
|
spoiler_text: spoilerText,
|
||||||
visibility: getState().getIn(['compose', 'privacy']),
|
visibility: getState().getIn(['compose', 'privacy']),
|
||||||
|
@ -243,34 +257,34 @@ export function submitCompose(routerHistory) {
|
||||||
dispatch(submitComposeFail(error));
|
dispatch(submitComposeFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitComposeRequest() {
|
export function submitComposeRequest() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SUBMIT_REQUEST,
|
type: COMPOSE_SUBMIT_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitComposeSuccess(status) {
|
export function submitComposeSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SUBMIT_SUCCESS,
|
type: COMPOSE_SUBMIT_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function submitComposeFail(error) {
|
export function submitComposeFail(error) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SUBMIT_FAIL,
|
type: COMPOSE_SUBMIT_FAIL,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function doodleSet(options) {
|
export function doodleSet(options) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_DOODLE_SET,
|
type: COMPOSE_DOODLE_SET,
|
||||||
options: options,
|
options: options,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadCompose(files) {
|
export function uploadCompose(files) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
@ -333,9 +347,9 @@ export function uploadCompose(files) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).catch(error => dispatch(uploadComposeFail(error)));
|
}).catch(error => dispatch(uploadComposeFail(error)));
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export const uploadComposeProcessing = () => ({
|
export const uploadComposeProcessing = () => ({
|
||||||
type: COMPOSE_UPLOAD_PROCESSING,
|
type: COMPOSE_UPLOAD_PROCESSING,
|
||||||
|
@ -393,14 +407,14 @@ export function initMediaEditModal(id) {
|
||||||
|
|
||||||
dispatch(openModal('FOCAL_POINT', { id }));
|
dispatch(openModal('FOCAL_POINT', { id }));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function onChangeMediaDescription(description) {
|
export function onChangeMediaDescription(description) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_CHANGE_MEDIA_DESCRIPTION,
|
type: COMPOSE_CHANGE_MEDIA_DESCRIPTION,
|
||||||
description,
|
description,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function onChangeMediaFocus(focusX, focusY) {
|
export function onChangeMediaFocus(focusX, focusY) {
|
||||||
return {
|
return {
|
||||||
|
@ -408,34 +422,55 @@ export function onChangeMediaFocus(focusX, focusY) {
|
||||||
focusX,
|
focusX,
|
||||||
focusY,
|
focusY,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadCompose(id, params) {
|
export function changeUploadCompose(id, params) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
dispatch(changeUploadComposeRequest());
|
dispatch(changeUploadComposeRequest());
|
||||||
|
|
||||||
api(getState).put(`/api/v1/media/${id}`, params).then(response => {
|
let media = getState().getIn(['compose', 'media_attachments']).find((item) => item.get('id') === id);
|
||||||
dispatch(changeUploadComposeSuccess(response.data));
|
|
||||||
}).catch(error => {
|
// Editing already-attached media is deferred to editing the post itself.
|
||||||
dispatch(changeUploadComposeFail(id, error));
|
// For simplicity's sake, fake an API reply.
|
||||||
});
|
if (media && !media.get('unattached')) {
|
||||||
|
let { description, focus } = params;
|
||||||
|
const data = media.toJS();
|
||||||
|
|
||||||
|
if (description) {
|
||||||
|
data.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (focus) {
|
||||||
|
focus = focus.split(',');
|
||||||
|
data.meta = { focus: { x: parseFloat(focus[0]), y: parseFloat(focus[1]) } };
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatch(changeUploadComposeSuccess(data, true));
|
||||||
|
} else {
|
||||||
|
api(getState).put(`/api/v1/media/${id}`, params).then(response => {
|
||||||
|
dispatch(changeUploadComposeSuccess(response.data, false));
|
||||||
|
}).catch(error => {
|
||||||
|
dispatch(changeUploadComposeFail(id, error));
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadComposeRequest() {
|
export function changeUploadComposeRequest() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_UPLOAD_CHANGE_REQUEST,
|
type: COMPOSE_UPLOAD_CHANGE_REQUEST,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadComposeSuccess(media) {
|
export function changeUploadComposeSuccess(media, attached) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_UPLOAD_CHANGE_SUCCESS,
|
type: COMPOSE_UPLOAD_CHANGE_SUCCESS,
|
||||||
media: media,
|
media: media,
|
||||||
|
attached: attached,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeUploadComposeFail(error) {
|
export function changeUploadComposeFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -443,14 +478,14 @@ export function changeUploadComposeFail(error) {
|
||||||
error: error,
|
error: error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeRequest() {
|
export function uploadComposeRequest() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_UPLOAD_REQUEST,
|
type: COMPOSE_UPLOAD_REQUEST,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeProgress(loaded, total) {
|
export function uploadComposeProgress(loaded, total) {
|
||||||
return {
|
return {
|
||||||
|
@ -458,7 +493,7 @@ export function uploadComposeProgress(loaded, total) {
|
||||||
loaded: loaded,
|
loaded: loaded,
|
||||||
total: total,
|
total: total,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeSuccess(media, file) {
|
export function uploadComposeSuccess(media, file) {
|
||||||
return {
|
return {
|
||||||
|
@ -467,7 +502,7 @@ export function uploadComposeSuccess(media, file) {
|
||||||
file: file,
|
file: file,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function uploadComposeFail(error) {
|
export function uploadComposeFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -475,14 +510,14 @@ export function uploadComposeFail(error) {
|
||||||
error: error,
|
error: error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function undoUploadCompose(media_id) {
|
export function undoUploadCompose(media_id) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_UPLOAD_UNDO,
|
type: COMPOSE_UPLOAD_UNDO,
|
||||||
media_id: media_id,
|
media_id: media_id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function clearComposeSuggestions() {
|
export function clearComposeSuggestions() {
|
||||||
if (fetchComposeSuggestionsAccountsController) {
|
if (fetchComposeSuggestionsAccountsController) {
|
||||||
|
@ -491,7 +526,7 @@ export function clearComposeSuggestions() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SUGGESTIONS_CLEAR,
|
type: COMPOSE_SUGGESTIONS_CLEAR,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => {
|
const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => {
|
||||||
if (fetchComposeSuggestionsAccountsController) {
|
if (fetchComposeSuggestionsAccountsController) {
|
||||||
|
@ -568,7 +603,7 @@ export function fetchComposeSuggestions(token) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function readyComposeSuggestionsEmojis(token, emojis) {
|
export function readyComposeSuggestionsEmojis(token, emojis) {
|
||||||
return {
|
return {
|
||||||
|
@ -576,7 +611,7 @@ export function readyComposeSuggestionsEmojis(token, emojis) {
|
||||||
token,
|
token,
|
||||||
emojis,
|
emojis,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function readyComposeSuggestionsAccounts(token, accounts) {
|
export function readyComposeSuggestionsAccounts(token, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -584,7 +619,7 @@ export function readyComposeSuggestionsAccounts(token, accounts) {
|
||||||
token,
|
token,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export const readyComposeSuggestionsTags = (token, tags) => ({
|
export const readyComposeSuggestionsTags = (token, tags) => ({
|
||||||
type: COMPOSE_SUGGESTIONS_READY,
|
type: COMPOSE_SUGGESTIONS_READY,
|
||||||
|
@ -624,7 +659,7 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function updateSuggestionTags(token) {
|
export function updateSuggestionTags(token) {
|
||||||
return {
|
return {
|
||||||
|
@ -672,13 +707,13 @@ export function mountCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_MOUNT,
|
type: COMPOSE_MOUNT,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unmountCompose() {
|
export function unmountCompose() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_UNMOUNT,
|
type: COMPOSE_UNMOUNT,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeAdvancedOption(option, value) {
|
export function changeComposeAdvancedOption(option, value) {
|
||||||
return {
|
return {
|
||||||
|
@ -692,7 +727,7 @@ export function changeComposeSensitivity() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SENSITIVITY_CHANGE,
|
type: COMPOSE_SENSITIVITY_CHANGE,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export const changeComposeLanguage = language => ({
|
export const changeComposeLanguage = language => ({
|
||||||
type: COMPOSE_LANGUAGE_CHANGE,
|
type: COMPOSE_LANGUAGE_CHANGE,
|
||||||
|
@ -703,28 +738,28 @@ export function changeComposeSpoilerness() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SPOILERNESS_CHANGE,
|
type: COMPOSE_SPOILERNESS_CHANGE,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeSpoilerText(text) {
|
export function changeComposeSpoilerText(text) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_SPOILER_TEXT_CHANGE,
|
type: COMPOSE_SPOILER_TEXT_CHANGE,
|
||||||
text,
|
text,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeVisibility(value) {
|
export function changeComposeVisibility(value) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_VISIBILITY_CHANGE,
|
type: COMPOSE_VISIBILITY_CHANGE,
|
||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeComposeContentType(value) {
|
export function changeComposeContentType(value) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_CONTENT_TYPE_CHANGE,
|
type: COMPOSE_CONTENT_TYPE_CHANGE,
|
||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function insertEmojiCompose(position, emoji) {
|
export function insertEmojiCompose(position, emoji) {
|
||||||
return {
|
return {
|
||||||
|
@ -732,26 +767,26 @@ export function insertEmojiCompose(position, emoji) {
|
||||||
position,
|
position,
|
||||||
emoji,
|
emoji,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function addPoll() {
|
export function addPoll() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_ADD,
|
type: COMPOSE_POLL_ADD,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function removePoll() {
|
export function removePoll() {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_REMOVE,
|
type: COMPOSE_POLL_REMOVE,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function addPollOption(title) {
|
export function addPollOption(title) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_OPTION_ADD,
|
type: COMPOSE_POLL_OPTION_ADD,
|
||||||
title,
|
title,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changePollOption(index, title) {
|
export function changePollOption(index, title) {
|
||||||
return {
|
return {
|
||||||
|
@ -759,14 +794,14 @@ export function changePollOption(index, title) {
|
||||||
index,
|
index,
|
||||||
title,
|
title,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function removePollOption(index) {
|
export function removePollOption(index) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_POLL_OPTION_REMOVE,
|
type: COMPOSE_POLL_OPTION_REMOVE,
|
||||||
index,
|
index,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changePollSettings(expiresIn, isMultiple) {
|
export function changePollSettings(expiresIn, isMultiple) {
|
||||||
return {
|
return {
|
||||||
|
@ -774,4 +809,4 @@ export function changePollSettings(expiresIn, isMultiple) {
|
||||||
expiresIn,
|
expiresIn,
|
||||||
isMultiple,
|
isMultiple,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -14,14 +14,14 @@ export function fetchCustomEmojis() {
|
||||||
dispatch(fetchCustomEmojisFail(error));
|
dispatch(fetchCustomEmojisFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchCustomEmojisRequest() {
|
export function fetchCustomEmojisRequest() {
|
||||||
return {
|
return {
|
||||||
type: CUSTOM_EMOJIS_FETCH_REQUEST,
|
type: CUSTOM_EMOJIS_FETCH_REQUEST,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchCustomEmojisSuccess(custom_emojis) {
|
export function fetchCustomEmojisSuccess(custom_emojis) {
|
||||||
return {
|
return {
|
||||||
|
@ -29,7 +29,7 @@ export function fetchCustomEmojisSuccess(custom_emojis) {
|
||||||
custom_emojis,
|
custom_emojis,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchCustomEmojisFail(error) {
|
export function fetchCustomEmojisFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -37,4 +37,4 @@ export function fetchCustomEmojisFail(error) {
|
||||||
error,
|
error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -29,14 +29,14 @@ export function blockDomain(domain) {
|
||||||
dispatch(blockDomainFail(domain, err));
|
dispatch(blockDomainFail(domain, err));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockDomainRequest(domain) {
|
export function blockDomainRequest(domain) {
|
||||||
return {
|
return {
|
||||||
type: DOMAIN_BLOCK_REQUEST,
|
type: DOMAIN_BLOCK_REQUEST,
|
||||||
domain,
|
domain,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockDomainSuccess(domain, accounts) {
|
export function blockDomainSuccess(domain, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -44,7 +44,7 @@ export function blockDomainSuccess(domain, accounts) {
|
||||||
domain,
|
domain,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function blockDomainFail(domain, error) {
|
export function blockDomainFail(domain, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -52,7 +52,7 @@ export function blockDomainFail(domain, error) {
|
||||||
domain,
|
domain,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockDomain(domain) {
|
export function unblockDomain(domain) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -66,14 +66,14 @@ export function unblockDomain(domain) {
|
||||||
dispatch(unblockDomainFail(domain, err));
|
dispatch(unblockDomainFail(domain, err));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockDomainRequest(domain) {
|
export function unblockDomainRequest(domain) {
|
||||||
return {
|
return {
|
||||||
type: DOMAIN_UNBLOCK_REQUEST,
|
type: DOMAIN_UNBLOCK_REQUEST,
|
||||||
domain,
|
domain,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockDomainSuccess(domain, accounts) {
|
export function unblockDomainSuccess(domain, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -81,7 +81,7 @@ export function unblockDomainSuccess(domain, accounts) {
|
||||||
domain,
|
domain,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unblockDomainFail(domain, error) {
|
export function unblockDomainFail(domain, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -89,7 +89,7 @@ export function unblockDomainFail(domain, error) {
|
||||||
domain,
|
domain,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchDomainBlocks() {
|
export function fetchDomainBlocks() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -102,13 +102,13 @@ export function fetchDomainBlocks() {
|
||||||
dispatch(fetchDomainBlocksFail(err));
|
dispatch(fetchDomainBlocksFail(err));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchDomainBlocksRequest() {
|
export function fetchDomainBlocksRequest() {
|
||||||
return {
|
return {
|
||||||
type: DOMAIN_BLOCKS_FETCH_REQUEST,
|
type: DOMAIN_BLOCKS_FETCH_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchDomainBlocksSuccess(domains, next) {
|
export function fetchDomainBlocksSuccess(domains, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -116,14 +116,14 @@ export function fetchDomainBlocksSuccess(domains, next) {
|
||||||
domains,
|
domains,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchDomainBlocksFail(error) {
|
export function fetchDomainBlocksFail(error) {
|
||||||
return {
|
return {
|
||||||
type: DOMAIN_BLOCKS_FETCH_FAIL,
|
type: DOMAIN_BLOCKS_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandDomainBlocks() {
|
export function expandDomainBlocks() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -142,13 +142,13 @@ export function expandDomainBlocks() {
|
||||||
dispatch(expandDomainBlocksFail(err));
|
dispatch(expandDomainBlocksFail(err));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandDomainBlocksRequest() {
|
export function expandDomainBlocksRequest() {
|
||||||
return {
|
return {
|
||||||
type: DOMAIN_BLOCKS_EXPAND_REQUEST,
|
type: DOMAIN_BLOCKS_EXPAND_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandDomainBlocksSuccess(domains, next) {
|
export function expandDomainBlocksSuccess(domains, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -156,11 +156,11 @@ export function expandDomainBlocksSuccess(domains, next) {
|
||||||
domains,
|
domains,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandDomainBlocksFail(error) {
|
export function expandDomainBlocksFail(error) {
|
||||||
return {
|
return {
|
||||||
type: DOMAIN_BLOCKS_EXPAND_FAIL,
|
type: DOMAIN_BLOCKS_EXPAND_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
export const DROPDOWN_MENU_OPEN = 'DROPDOWN_MENU_OPEN';
|
export const DROPDOWN_MENU_OPEN = 'DROPDOWN_MENU_OPEN';
|
||||||
export const DROPDOWN_MENU_CLOSE = 'DROPDOWN_MENU_CLOSE';
|
export const DROPDOWN_MENU_CLOSE = 'DROPDOWN_MENU_CLOSE';
|
||||||
|
|
||||||
export function openDropdownMenu(id, placement, keyboard, scroll_key) {
|
export function openDropdownMenu(id, keyboard, scroll_key) {
|
||||||
return { type: DROPDOWN_MENU_OPEN, id, placement, keyboard, scroll_key };
|
return { type: DROPDOWN_MENU_OPEN, id, keyboard, scroll_key };
|
||||||
}
|
}
|
||||||
|
|
||||||
export function closeDropdownMenu(id) {
|
export function closeDropdownMenu(id) {
|
||||||
|
|
|
@ -11,4 +11,4 @@ export function useEmoji(emoji) {
|
||||||
|
|
||||||
dispatch(saveSettings());
|
dispatch(saveSettings());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -25,14 +25,14 @@ export function fetchFavouritedStatuses() {
|
||||||
dispatch(fetchFavouritedStatusesFail(error));
|
dispatch(fetchFavouritedStatusesFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavouritedStatusesRequest() {
|
export function fetchFavouritedStatusesRequest() {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITED_STATUSES_FETCH_REQUEST,
|
type: FAVOURITED_STATUSES_FETCH_REQUEST,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavouritedStatusesSuccess(statuses, next) {
|
export function fetchFavouritedStatusesSuccess(statuses, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -41,7 +41,7 @@ export function fetchFavouritedStatusesSuccess(statuses, next) {
|
||||||
next,
|
next,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavouritedStatusesFail(error) {
|
export function fetchFavouritedStatusesFail(error) {
|
||||||
return {
|
return {
|
||||||
|
@ -49,7 +49,7 @@ export function fetchFavouritedStatusesFail(error) {
|
||||||
error,
|
error,
|
||||||
skipLoading: true,
|
skipLoading: true,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFavouritedStatuses() {
|
export function expandFavouritedStatuses() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -69,13 +69,13 @@ export function expandFavouritedStatuses() {
|
||||||
dispatch(expandFavouritedStatusesFail(error));
|
dispatch(expandFavouritedStatusesFail(error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFavouritedStatusesRequest() {
|
export function expandFavouritedStatusesRequest() {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITED_STATUSES_EXPAND_REQUEST,
|
type: FAVOURITED_STATUSES_EXPAND_REQUEST,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFavouritedStatusesSuccess(statuses, next) {
|
export function expandFavouritedStatusesSuccess(statuses, next) {
|
||||||
return {
|
return {
|
||||||
|
@ -83,11 +83,11 @@ export function expandFavouritedStatusesSuccess(statuses, next) {
|
||||||
statuses,
|
statuses,
|
||||||
next,
|
next,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function expandFavouritedStatusesFail(error) {
|
export function expandFavouritedStatusesFail(error) {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITED_STATUSES_EXPAND_FAIL,
|
type: FAVOURITED_STATUSES_EXPAND_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ export function setHeight (key, id, height) {
|
||||||
id,
|
id,
|
||||||
height,
|
height,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function clearHeight () {
|
export function clearHeight () {
|
||||||
return {
|
return {
|
||||||
type: HEIGHT_CACHE_CLEAR,
|
type: HEIGHT_CACHE_CLEAR,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ export function reblog(status, visibility) {
|
||||||
dispatch(reblogFail(status, error));
|
dispatch(reblogFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unreblog(status) {
|
export function unreblog(status) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -67,21 +67,21 @@ export function unreblog(status) {
|
||||||
dispatch(unreblogFail(status, error));
|
dispatch(unreblogFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function reblogRequest(status) {
|
export function reblogRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: REBLOG_REQUEST,
|
type: REBLOG_REQUEST,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function reblogSuccess(status) {
|
export function reblogSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: REBLOG_SUCCESS,
|
type: REBLOG_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function reblogFail(status, error) {
|
export function reblogFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -89,21 +89,21 @@ export function reblogFail(status, error) {
|
||||||
status: status,
|
status: status,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unreblogRequest(status) {
|
export function unreblogRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: UNREBLOG_REQUEST,
|
type: UNREBLOG_REQUEST,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unreblogSuccess(status) {
|
export function unreblogSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: UNREBLOG_SUCCESS,
|
type: UNREBLOG_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unreblogFail(status, error) {
|
export function unreblogFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -111,7 +111,7 @@ export function unreblogFail(status, error) {
|
||||||
status: status,
|
status: status,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function favourite(status) {
|
export function favourite(status) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
@ -124,7 +124,7 @@ export function favourite(status) {
|
||||||
dispatch(favouriteFail(status, error));
|
dispatch(favouriteFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfavourite(status) {
|
export function unfavourite(status) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -137,21 +137,21 @@ export function unfavourite(status) {
|
||||||
dispatch(unfavouriteFail(status, error));
|
dispatch(unfavouriteFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function favouriteRequest(status) {
|
export function favouriteRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITE_REQUEST,
|
type: FAVOURITE_REQUEST,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function favouriteSuccess(status) {
|
export function favouriteSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITE_SUCCESS,
|
type: FAVOURITE_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function favouriteFail(status, error) {
|
export function favouriteFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -159,21 +159,21 @@ export function favouriteFail(status, error) {
|
||||||
status: status,
|
status: status,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfavouriteRequest(status) {
|
export function unfavouriteRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: UNFAVOURITE_REQUEST,
|
type: UNFAVOURITE_REQUEST,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfavouriteSuccess(status) {
|
export function unfavouriteSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: UNFAVOURITE_SUCCESS,
|
type: UNFAVOURITE_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unfavouriteFail(status, error) {
|
export function unfavouriteFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -181,7 +181,7 @@ export function unfavouriteFail(status, error) {
|
||||||
status: status,
|
status: status,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function bookmark(status) {
|
export function bookmark(status) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
@ -194,7 +194,7 @@ export function bookmark(status) {
|
||||||
dispatch(bookmarkFail(status, error));
|
dispatch(bookmarkFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unbookmark(status) {
|
export function unbookmark(status) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -207,21 +207,21 @@ export function unbookmark(status) {
|
||||||
dispatch(unbookmarkFail(status, error));
|
dispatch(unbookmarkFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function bookmarkRequest(status) {
|
export function bookmarkRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: BOOKMARK_REQUEST,
|
type: BOOKMARK_REQUEST,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function bookmarkSuccess(status) {
|
export function bookmarkSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: BOOKMARK_SUCCESS,
|
type: BOOKMARK_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function bookmarkFail(status, error) {
|
export function bookmarkFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -229,21 +229,21 @@ export function bookmarkFail(status, error) {
|
||||||
status: status,
|
status: status,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unbookmarkRequest(status) {
|
export function unbookmarkRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: UNBOOKMARK_REQUEST,
|
type: UNBOOKMARK_REQUEST,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unbookmarkSuccess(status) {
|
export function unbookmarkSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: UNBOOKMARK_SUCCESS,
|
type: UNBOOKMARK_SUCCESS,
|
||||||
status: status,
|
status: status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unbookmarkFail(status, error) {
|
export function unbookmarkFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -251,7 +251,7 @@ export function unbookmarkFail(status, error) {
|
||||||
status: status,
|
status: status,
|
||||||
error: error,
|
error: error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchReblogs(id) {
|
export function fetchReblogs(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -264,14 +264,14 @@ export function fetchReblogs(id) {
|
||||||
dispatch(fetchReblogsFail(id, error));
|
dispatch(fetchReblogsFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchReblogsRequest(id) {
|
export function fetchReblogsRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: REBLOGS_FETCH_REQUEST,
|
type: REBLOGS_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchReblogsSuccess(id, accounts) {
|
export function fetchReblogsSuccess(id, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -279,14 +279,14 @@ export function fetchReblogsSuccess(id, accounts) {
|
||||||
id,
|
id,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchReblogsFail(id, error) {
|
export function fetchReblogsFail(id, error) {
|
||||||
return {
|
return {
|
||||||
type: REBLOGS_FETCH_FAIL,
|
type: REBLOGS_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavourites(id) {
|
export function fetchFavourites(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -299,14 +299,14 @@ export function fetchFavourites(id) {
|
||||||
dispatch(fetchFavouritesFail(id, error));
|
dispatch(fetchFavouritesFail(id, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavouritesRequest(id) {
|
export function fetchFavouritesRequest(id) {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITES_FETCH_REQUEST,
|
type: FAVOURITES_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavouritesSuccess(id, accounts) {
|
export function fetchFavouritesSuccess(id, accounts) {
|
||||||
return {
|
return {
|
||||||
|
@ -314,14 +314,14 @@ export function fetchFavouritesSuccess(id, accounts) {
|
||||||
id,
|
id,
|
||||||
accounts,
|
accounts,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function fetchFavouritesFail(id, error) {
|
export function fetchFavouritesFail(id, error) {
|
||||||
return {
|
return {
|
||||||
type: FAVOURITES_FETCH_FAIL,
|
type: FAVOURITES_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pin(status) {
|
export function pin(status) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -334,21 +334,21 @@ export function pin(status) {
|
||||||
dispatch(pinFail(status, error));
|
dispatch(pinFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinRequest(status) {
|
export function pinRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: PIN_REQUEST,
|
type: PIN_REQUEST,
|
||||||
status,
|
status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinSuccess(status) {
|
export function pinSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: PIN_SUCCESS,
|
type: PIN_SUCCESS,
|
||||||
status,
|
status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function pinFail(status, error) {
|
export function pinFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -356,7 +356,7 @@ export function pinFail(status, error) {
|
||||||
status,
|
status,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpin (status) {
|
export function unpin (status) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
|
@ -369,21 +369,21 @@ export function unpin (status) {
|
||||||
dispatch(unpinFail(status, error));
|
dispatch(unpinFail(status, error));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinRequest(status) {
|
export function unpinRequest(status) {
|
||||||
return {
|
return {
|
||||||
type: UNPIN_REQUEST,
|
type: UNPIN_REQUEST,
|
||||||
status,
|
status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinSuccess(status) {
|
export function unpinSuccess(status) {
|
||||||
return {
|
return {
|
||||||
type: UNPIN_SUCCESS,
|
type: UNPIN_SUCCESS,
|
||||||
status,
|
status,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function unpinFail(status, error) {
|
export function unpinFail(status, error) {
|
||||||
return {
|
return {
|
||||||
|
@ -391,4 +391,4 @@ export function unpinFail(status, error) {
|
||||||
status,
|
status,
|
||||||
error,
|
error,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -33,14 +33,14 @@ export function checkDeprecatedLocalSettings() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function clearDeprecatedLocalSettings() {
|
export function clearDeprecatedLocalSettings() {
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
dispatch(deleteLocalSetting(['content_warnings', 'auto_unfold']));
|
dispatch(deleteLocalSetting(['content_warnings', 'auto_unfold']));
|
||||||
dispatch(deleteLocalSetting(['swipe_to_change_columns']));
|
dispatch(deleteLocalSetting(['swipe_to_change_columns']));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function changeLocalSetting(key, value) {
|
export function changeLocalSetting(key, value) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
@ -52,7 +52,7 @@ export function changeLocalSetting(key, value) {
|
||||||
|
|
||||||
dispatch(saveLocalSettings());
|
dispatch(saveLocalSettings());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export function deleteLocalSetting(key) {
|
export function deleteLocalSetting(key) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
|
@ -63,7 +63,7 @@ export function deleteLocalSetting(key) {
|
||||||
|
|
||||||
dispatch(saveLocalSettings());
|
dispatch(saveLocalSettings());
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
// __TODO :__
|
// __TODO :__
|
||||||
// Right now `saveLocalSettings()` doesn't keep track of which user
|
// Right now `saveLocalSettings()` doesn't keep track of which user
|
||||||
|
@ -74,4 +74,4 @@ export function saveLocalSettings() {
|
||||||
const localSettings = getState().get('local_settings').toJS();
|
const localSettings = getState().get('local_settings').toJS();
|
||||||
localStorage.setItem('mastodon-settings', JSON.stringify(localSettings));
|
localStorage.setItem('mastodon-settings', JSON.stringify(localSettings));
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue