Merge branch 'develop' into fedi-absturztau-be

This commit is contained in:
Absturztaube 2022-07-29 11:11:38 +02:00
commit a51ef82d77
49 changed files with 8131 additions and 868 deletions

188
.woodpecker.yml Normal file
View file

@ -0,0 +1,188 @@
variables:
- &scw-secrets
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &on-release
when:
event:
- push
- tag
branch:
- develop
- stable
- refs/tags/v*
- refs/tags/stable-*
- &on-point-release
when:
event:
- push
branch:
- develop
- stable
- &on-pr-open
when:
event:
- pull_request
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
- &mix-clean "mix deps.clean --all && mix clean"
services:
postgres:
image: postgres:13
when:
event:
- pull_request
environment:
POSTGRES_DB: pleroma_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
pipeline:
lint:
<<: *on-pr-open
image: akkoma/ci-base:latest
commands:
- mix local.hex --force
- mix local.rebar --force
- mix format --check-formatted
build:
image: akkoma/ci-base:latest
<<: *on-pr-open
environment:
MIX_ENV: test
POSTGRES_DB: pleroma_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_HOST: postgres
commands:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix compile
test:
image: akkoma/ci-base:latest
<<: *on-pr-open
environment:
MIX_ENV: test
POSTGRES_DB: pleroma_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_HOST: postgres
commands:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix compile
- mix ecto.drop -f -q
- mix ecto.create
- mix ecto.migrate
- mix test --preload-modules --exclude erratic --exclude federated --max-cases 4
# Canonical amd64
ubuntu22:
image: hexpm/elixir:1.13.4-erlang-25.0.2-ubuntu-jammy-20220428
<<: *on-release
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands:
- rm config/emoji.txt
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
- *clean
- echo "import Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-ubuntu-jammy.zip -r release
release-ubuntu22:
image: akkoma/releaser
<<: *on-release
secrets: *scw-secrets
commands:
- export SOURCE=akkoma-ubuntu-jammy.zip
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-ubuntu-jammy.zip
- /bin/sh /entrypoint.sh
debian-bullseye:
image: elixir:1.13.4
<<: *on-release
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands:
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential gcc make g++ wget
- *clean
- echo "import Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- *mix-clean
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64.zip -r release
release-debian:
image: akkoma/releaser
<<: *on-release
secrets: *scw-secrets
commands:
- export SOURCE=akkoma-amd64.zip
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64.zip
- /bin/sh /entrypoint.sh
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-debian-stable.zip
- /bin/sh /entrypoint.sh
# Canonical amd64-musl
musl:
image: elixir:1.13.4-alpine
<<: *on-release
environment:
MIX_ENV: prod
commands:
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
- *clean
- *setup-hex
- *mix-clean
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64-musl.zip -r release
release-musl:
image: akkoma/releaser
<<: *on-release
secrets: *scw-secrets
commands:
- export SOURCE=akkoma-amd64-musl.zip
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-musl.zip
- /bin/sh /entrypoint.sh
docs:
<<: *on-point-release
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
environment:
CI: "true"
image: python:3.10-slim
commands:
- apt-get update && apt-get install -y rclone wget git zip
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
- chmod +x scaleway-cli
- ./scaleway-cli object config install type=rclone
- cd docs
- pip install -r requirements.txt
- mkdocs build
- zip -r docs.zip site/*
- cd site
- rclone copy . scaleway:akkoma-docs/$CI_COMMIT_BRANCH/

View file

@ -1,27 +0,0 @@
pipeline:
build:
when:
event:
- push
branch:
- develop
- stable
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
environment:
CI: "true"
image: python:3.10-slim
commands:
- apt-get update && apt-get install -y rclone wget git zip
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
- chmod +x scaleway-cli
- ./scaleway-cli object config install type=rclone
- cd docs
- pip install -r requirements.txt
- mkdocs build
- zip -r docs.zip site/*
- cd site
- rclone copy . scaleway:akkoma-docs/$CI_COMMIT_BRANCH/

View file

@ -1,59 +0,0 @@
variables:
- &scw-secrets
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
- &setup-scw-s3 "wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64 && mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli && chmod +x scaleway-cli && ./scaleway-cli object config install type=rclone"
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &build-on
when:
event:
- push
- tag
branch:
- develop
- stable
- refs/tags/v*
- refs/tags/stable-*
- &tag-build 'export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG'
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix) && (rm scaleway-cli || true)"
pipeline:
glibc:
image: elixir:1.13
<<: *build-on
secrets: *scw-secrets
environment:
MIX_ENV: prod
commands:
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git
- *clean
- *setup-scw-s3
- echo "import Mix.Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64.zip -r release
- rclone copyto akkoma-amd64.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-amd64.zip
musl:
image: elixir:1.13-alpine
<<: *build-on
secrets: *scw-secrets
environment:
MIX_ENV: prod
commands:
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
- *clean
- *setup-scw-s3
- *setup-hex
- mix deps.clean --all
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64.zip -r release
- rclone copyto akkoma-amd64.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-amd64-musl.zip

View file

@ -1,59 +0,0 @@
matrix:
ELIXIR_VERSION:
- 1.13
pipeline:
lint:
when:
event:
- pull_request
image: pleromaforkci/ci-base:1.13
commands:
- mix local.hex --force
- mix local.rebar --force
- mix format --check-formatted
build:
image: pleromaforkci/ci-base:${ELIXIR_VERSION}
when:
event:
- pull_request
environment:
MIX_ENV: test
commands:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix compile
test:
group: test
image: pleromaforkci/ci-base:${ELIXIR_VERSION}
when:
event:
- pull_request
environment:
MIX_ENV: test
POSTGRES_DB: pleroma_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_HOST: postgres
commands:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix ecto.drop -f -q
- mix ecto.create
- mix ecto.migrate
- mix test --preload-modules --exclude erratic --exclude federated --max-cases 4
services:
postgres:
image: postgres:13
when:
event:
- pull_request
environment:
POSTGRES_DB: pleroma_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

View file

@ -10,6 +10,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- extended runtime module support, see config cheatsheet
- quote posting; quotes are limited to public posts
### Changed
- quarantining is now considered absolutely; public activities are no longer
an exception.
- flavours:
- amd64 is built for debian stable. Compatible with ubuntu 20.
- ubuntu-jammy is built for... well, ubuntu 22 (LTS)
- amd64-musl is built for alpine 3.16
### Fixed
- Updated mastoFE path, for the newer version
@ -22,7 +30,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `/api/v1/notifications/dismiss`
- `/api/v1/search`
- `/api/v1/statuses/{id}/card`
- LDAP authenticator (use the akkoma-contrib-authenticator-ldap runtime module)
- Chats, they were half-baked. Just use PMs.
- Prometheus, it causes massive slowdown

View file

@ -1,4 +1,4 @@
FROM hexpm/elixir:1.13.4-erlang-24.3.4.2-alpine-3.16.0 as build
FROM elixir:1.13.4-alpine as build
COPY . .

View file

@ -509,7 +509,6 @@
"~",
"about",
"activities",
"akkoma",
"api",
"auth",
"check_password",
@ -590,6 +589,17 @@
extra: true,
validate_tld: :no_scheme
config :pleroma, :ldap,
enabled: System.get_env("LDAP_ENABLED") == "true",
host: System.get_env("LDAP_HOST") || "localhost",
port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
ssl: System.get_env("LDAP_SSL") == "true",
sslopts: [],
tls: System.get_env("LDAP_TLS") == "true",
tlsopts: [],
base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
uid: System.get_env("LDAP_UID") || "cn"
oauth_consumer_strategies =
"OAUTH_CONSUMER_STRATEGIES"
|> System.get_env()

View file

@ -691,7 +691,7 @@
key_placeholder: "instance",
value_placeholder: "reason",
description:
"List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so",
"List of ActivityPub instances where activities will not be sent, and the reason for doing so",
suggestions: [
{"quarantined.com", "Reason"},
{"*.quarantined.com", "Reason"}
@ -1655,6 +1655,11 @@
type: :boolean,
description: "Sign object fetches with HTTP signatures"
},
%{
key: :authorized_fetch_mode,
type: :boolean,
description: "Require HTTP signatures on AP fetches"
},
%{
key: :note_replies_output_limit,
type: :integer,
@ -2135,6 +2140,104 @@
}
]
},
%{
group: :pleroma,
key: :ldap,
label: "LDAP",
type: :group,
description:
"Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
" will be verified by trying to authenticate (bind) to a LDAP server." <>
" If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
" Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
children: [
%{
key: :enabled,
type: :boolean,
description: "Enables LDAP authentication"
},
%{
key: :host,
type: :string,
description: "LDAP server hostname",
suggestions: ["localhosts"]
},
%{
key: :port,
type: :integer,
description: "LDAP port, e.g. 389 or 636",
suggestions: [389, 636]
},
%{
key: :ssl,
label: "SSL",
type: :boolean,
description: "Enable to use SSL, usually implies the port 636"
},
%{
key: :sslopts,
label: "SSL options",
type: :keyword,
description: "Additional SSL options",
suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
children: [
%{
key: :cacertfile,
type: :string,
description: "Path to file with PEM encoded cacerts",
suggestions: ["path/to/file/with/PEM/cacerts"]
},
%{
key: :verify,
type: :atom,
description: "Type of cert verification",
suggestions: [:verify_peer]
}
]
},
%{
key: :tls,
label: "TLS",
type: :boolean,
description: "Enable to use STARTTLS, usually implies the port 389"
},
%{
key: :tlsopts,
label: "TLS options",
type: :keyword,
description: "Additional TLS options",
suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
children: [
%{
key: :cacertfile,
type: :string,
description: "Path to file with PEM encoded cacerts",
suggestions: ["path/to/file/with/PEM/cacerts"]
},
%{
key: :verify,
type: :atom,
description: "Type of cert verification",
suggestions: [:verify_peer]
}
]
},
%{
key: :base,
type: :string,
description: "LDAP base, e.g. \"dc=example,dc=com\"",
suggestions: ["dc=example,dc=com"]
},
%{
key: :uid,
label: "UID",
type: :string,
description:
"LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
suggestions: ["cn"]
}
]
},
%{
group: :pleroma,
key: :auth,

View file

@ -5,3 +5,5 @@ install:
pipenv install
clean:
rm -rf site
serve:
pipenv run python3 -m http.server -d site

View file

@ -34,7 +34,7 @@ To add configuration to your config file, you can copy it from the base config.
* `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.
* `allow_relay`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance.
* `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details.
* `quarantined_instances`: ActivityPub instances where private (DMs, followers-only) activities will not be send.
* `quarantined_instances`: ActivityPub instances where activities will not be sent. They can still reach there via other means, we just won't send them.
* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
older software for theses nicknames.
@ -891,6 +891,28 @@ Authentication / authorization settings.
### Pleroma.Web.Auth.Authenticator
* `Pleroma.Web.Auth.PleromaAuthenticator`: default database authenticator.
* `Pleroma.Web.Auth.LDAPAuthenticator`: LDAP authentication.
### :ldap
Use LDAP for user authentication. When a user logs in to the Akkoma
instance, the name and password will be verified by trying to authenticate
(bind) to an LDAP server. If a user exists in the LDAP directory but there
is no account with the same name yet on the Akkoma instance then a new
Akkoma account will be created with the same name as the LDAP user name.
* `enabled`: enables LDAP authentication
* `host`: LDAP server hostname
* `port`: LDAP port, e.g. 389 or 636
* `ssl`: true to use SSL, usually implies the port 636
* `sslopts`: additional SSL options
* `tls`: true to start TLS, usually implies the port 389
* `tlsopts`: additional TLS options
* `base`: LDAP base, e.g. "dc=example,dc=com"
* `uid`: LDAP attribute name to authenticate the user, e.g. when "cn", the filter will be "cn=username,base"
Note, if your LDAP server is an Active Directory server the correct value is commonly `uid: "cn"`, but if you use an
OpenLDAP server the value may be `uid: "uid"`.
### :oauth2 (Akkoma as OAuth 2.0 provider settings)

View file

@ -41,6 +41,12 @@ doas apk add git build-base cmake file-dev
doas apk add erlang elixir
```
* Install `erlang-eldap` if you want to enable ldap authenticator
```shell
doas apk add erlang-eldap
```
### Install PostgreSQL
* Install Postgresql server:

View file

@ -1,188 +0,0 @@
# Akkomaの入れ方
## 日本語訳について
この記事は [Installing on Debian based distributions](Installing on Debian based distributions) の日本語訳です。何かがおかしいと思ったら、原文を見てください。
## インストール
このガイドはDebian Stretchを利用することを想定しています。Ubuntu 16.04や18.04でもおそらく動作します。また、ユーザはrootもしくはsudoにより管理者権限を持っていることを前提とします。もし、以下の操作をrootユーザで行う場合は、 `sudo` を無視してください。ただし、`sudo -Hu akkoma` のようにユーザを指定している場合には `su <username> -s $SHELL -c 'command'` を代わりに使ってください。
### 必要なソフトウェア
- PostgreSQL 9.6以上 (Ubuntu16.04では9.5しか提供されていないので,[](https://www.postgresql.org/download/linux/ubuntu/)こちらから新しいバージョンを入手してください)
- `postgresql-contrib` 9.6以上 (同上)
- Elixir 1.8 以上 ([Debianのリポジトリからインストールしないこと ここからインストールすること!](https://elixir-lang.org/install.html#unix-and-unix-like)。または [asdf](https://github.com/asdf-vm/asdf) をakkomaユーザーでインストールしてください)
- `erlang-dev`
- `erlang-nox`
- `git`
- `build-essential`
- `cmake`
- `libmagic-dev`
#### このガイドで利用している追加パッケージ
- `nginx` (おすすめです。他のリバースプロキシを使う場合は、参考となる設定をこのリポジトリから探してください)
- `certbot` (または何らかのLet's Encrypt向けACMEクライアント)
- `ImageMagick`
- `ffmpeg`
- `exiftool`
### システムを準備する
* まずシステムをアップデートしてください。
```
sudo apt update
sudo apt full-upgrade
```
* 上記に挙げたパッケージをインストールしておきます。
```
sudo apt install git build-essential postgresql postgresql-contrib cmake ffmpeg imagemagick libmagic-dev
```
### ElixirとErlangをインストールします
* Erlangのリポジトリをダウンロードおよびインストールします。
```
wget -P /tmp/ https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo dpkg -i /tmp/erlang-solutions_2.0_all.deb
```
* ElixirとErlangをインストールします、
```
sudo apt update
sudo apt install elixir erlang-dev erlang-nox
```
### オプションパッケージ: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
```shell
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
```
### Akkoma BE (バックエンド) をインストールします
* Akkoma用に新しいユーザーを作ります。
```
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
```
**注意**: Akkomaユーザとして単発のコマンドを実行したい場合はは、`sudo -Hu akkoma command` を使ってください。シェルを使いたい場合は `sudo -Hu akkoma $SHELL`です。もし `sudo` を使わない場合は、rootユーザで `su -l akkoma -s $SHELL -c 'command'` とすることでコマンドを、`su -l akkoma -s $SHELL` とすることでシェルを開始できます。
* Gitリポジトリをクローンします。
```
sudo mkdir -p /opt/akkoma
sudo chown -R akkoma:akkoma /opt/akkoma
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
```
* 新しいディレクトリに移動します。
```
cd /opt/akkoma
```
* Akkomaが依存するパッケージをインストールします。Hexをインストールしてもよいか聞かれたら、yesを入力してください。
```
sudo -Hu akkoma mix deps.get
```
* コンフィギュレーションを生成します。
```
sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen
```
* rebar3をインストールしてもよいか聞かれたら、yesを入力してください。
* このときにakkomaの一部がコンパイルされるため、この処理には時間がかかります。
* あなたのインスタンスについて、いくつかの質問されます。この質問により `config/generated_config.exs` という設定ファイルが生成されます。
* コンフィギュレーションを確認して、もし問題なければ、ファイル名を変更してください。
```
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
```
* 先程のコマンドで、すでに `config/setup_db.psql` というファイルが作られています。このファイルをもとに、データベースを作成します。
```
sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen
```
* そして、データベースのマイグレーションを実行します。
```
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
```
* これでAkkomaを起動できるようになりました。
```
sudo -Hu akkoma MIX_ENV=prod mix phx.server
```
### インストールの最終段階
あなたの新しいインスタンスを世界に向けて公開するには、nginx等のWebサーバやプロキシサーバをAkkomaの前段に使用する必要があります。また、Akkoma のためにシステムサービスファイルを作成する必要があります。
#### Nginx
* まだインストールしていないなら、nginxをインストールします。
```
sudo apt install nginx
```
* SSLをセットアップします。他の方法でもよいですが、ここではcertbotを説明します。
certbotを使うならば、まずそれをインストールします。
```
sudo apt install certbot
```
そしてセットアップします。
```
sudo mkdir -p /var/lib/letsencrypt/
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
```
もしうまくいかないときは、nginxが正しく動いていない可能性があります。先にnginxを設定してください。ssl "on" を "off" に変えてから再試行してください。
---
* nginxの設定ファイルサンプルをnginxフォルダーにコピーします。
```
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/sites-available/akkoma.nginx
sudo ln -s /etc/nginx/sites-available/akkoma.nginx /etc/nginx/sites-enabled/akkoma.nginx
```
* nginxを起動する前に、設定ファイルを編集してください。例えば、サーバー名、証明書のパスなどを変更する必要があります。
* nginxを再起動します。
```
sudo systemctl enable --now nginx.service
```
もし証明書を更新する必要が出てきた場合には、nginxの関連するlocationブロックのコメントアウトを外し、以下のコマンドを動かします。
```
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /var/lib/letsencrypt/
```
#### 他のWebサーバやプロキシ
これに関してはサンプルが `/opt/akkoma/installation/` にあるので、探してみてください。
#### Systemd サービス
* サービスファイルのサンプルをコピーします。
```
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
```
* サービスファイルを変更します。すべてのパスが正しいことを確認してください
* サービスを有効化し `akkoma.service` を開始してください
```
sudo systemctl enable --now akkoma.service
```
#### 初期ユーザの作成
新たにインスタンスを作成したら、以下のコマンドにより管理者権限を持った初期ユーザを作成できます。
```
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
```
#### その他の設定とカスタマイズ
{! installation/further_reading.include !}

View file

@ -0,0 +1,197 @@
# Installing on Fedora
## OTP releases and RedHat-distributions
While the OTP releases of Akkoma work on most Linux distributions, they do not work correctly with RedHat-distributions. Therefore from-source installations are the recommended way to go when trying to install Akkoma on Fedora, Centos Stream or RedHat.
However, it is possible to compile your own OTP release of Akkoma for RedHat. Keep in mind that this has a few drawbacks, and has no particular advantage over a from-source installation, since you'll need to install Erlang and Elixir anyway.
This guide will cover a from-source installation. For instructions on how to build your own OTP release, please check out [the OTP for RedHat guide](./otp_redhat_en.md).
## Installation
This guide will assume you are on Fedora 36. This guide should also work with current releases of Centos Stream and RedHat, although it has not been tested yet. It also assumes that you have administrative rights, either as root or a user with [sudo permissions](https://docs.fedoraproject.org/en-US/quick-docs/adding_user_to_sudoers_file/). If you want to run this guide with root, ignore the `sudo` at the beginning of the lines, unless it calls a user like `sudo -Hu akkoma`; in this case, use `su <username> -s $SHELL -c 'command'` instead.
{! installation/generic_dependencies.include !}
### Prepare the system
* First update the system, if not already done:
```shell
sudo dnf upgrade --refresh
```
* Install some of the above mentioned programs:
```shell
sudo dnf install git gcc g++ make cmake file-devel postgresql postgresql-contrib
```
### Install Elixir and Erlang
* Install Elixir and Erlang:
```shell
sudo dnf install elixir erlang-os_mon erlang-eldap erlang-xmerl erlang-erl_interface erlang-syntax_tools
```
### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
* Install ffmpeg (requires setting up the RPM-fusion repositories):
```shell
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg
```
* Install ImageMagick and ExifTool for image manipulation:
```shell
sudo dnf install Imagemagick perl-Image-ExifTool
```
### Install AkkomaBE
* Add a new system user for the Akkoma service:
```shell
sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
```
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you dont have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
```shell
sudo mkdir -p /opt/akkoma
sudo chown -R akkoma:akkoma /opt/akkoma
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
```
* Change to the new directory:
```shell
cd /opt/akkoma
```
* Install the dependencies for Akkoma and answer with `yes` if it asks you to install `Hex`:
```shell
sudo -Hu akkoma mix deps.get
```
* Generate the configuration: `sudo -Hu akkoma MIX_ENV=prod mix pleroma.instance gen`
* Answer with `yes` if it asks you to install `rebar3`.
* This may take some time, because parts of akkoma get compiled first.
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
```shell
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
```
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
```shell
sudo -Hu postgres psql -f config/setup_db.psql
```
* Now run the database migration:
```shell
sudo -Hu akkoma MIX_ENV=prod mix ecto.migrate
```
* Now you can start Akkoma already
```shell
sudo -Hu akkoma MIX_ENV=prod mix phx.server
```
### Finalize installation
If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create a systemd service file for Akkoma.
#### Nginx
* Install nginx, if not already done:
```shell
sudo dnf install nginx
```
* Setup your SSL cert, using your method of choice or certbot. If using certbot, first install it:
```shell
sudo dnf install certbot
```
and then set it up:
```shell
sudo mkdir -p /var/lib/letsencrypt/
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --standalone
```
If that doesnt work, make sure, that nginx is not already running. If it still doesnt work, try setting up nginx first (change ssl “on” to “off” and try again).
---
* Copy the example nginx configuration and activate it:
```shell
sudo cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/conf.d/akkoma.conf
```
* Before starting nginx edit the configuration and change it to your needs (e.g. change servername, change cert paths)
* Enable and start nginx:
```shell
sudo systemctl enable --now nginx.service
```
If you need to renew the certificate in the future, uncomment the relevant location block in the nginx config and run:
```shell
sudo certbot certonly --email <your@emailaddress> -d <yourdomain> --webroot -w /var/lib/letsencrypt/
```
#### Other webserver/proxies
You can find example configurations for them in `/opt/akkoma/installation/`.
#### Systemd service
* Copy example service file
```shell
sudo cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
```
* Edit the service file and make sure that all paths fit your installation
* Enable and start `akkoma.service`:
```shell
sudo systemctl enable --now akkoma.service
```
#### Create your first user
If your instance is up and running, you can create your first user with administrative rights with the following task:
```shell
sudo -Hu akkoma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
```
#### Further reading
{! installation/further_reading.include !}
{! support.include !}

View file

@ -30,22 +30,18 @@ upstream git URL then just rebuild - that'll be:
git remote set-url origin https://akkoma.dev/AkkomaGang/akkoma.git/
git fetch origin
git pull -r
# or, if you're on an instance-specific branch, you may want
# to run "git merge stable" instead (or develop if you want)
```
Then compile, migrate and restart as usual.
## From OTP
**IMPORTANT: if you are using musl1.1 (void linux musl edition),
you will need to override the FLAVOUR to amd64-musl11,
also pls go shout at your maintainers to actually upgrade from EOL software.**
the flavour to be
This will just be setting the update URL -
This will just be setting the update URL - find your flavour from the [mapping on the install guide](../otp_en/#detecting-flavour) first.
```bash
export FLAVOUR=$(arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix")
export FLAVOUR=[the flavour you found above]
./bin/pleroma_ctl update --zip-url https://akkoma-updates.s3-website.fr-par.scw.cloud/develop/akkoma-$FLAVOUR.zip
./bin/pleroma_ctl migrate

View file

@ -1,121 +0,0 @@
# Akkoman asennus OpenBSD:llä
Tarvitset:
* Oman domainin
* OpenBSD 6.3 -serverin
* Auttavan ymmärryksen unix-järjestelmistä
Komennot, joiden edessä on '#', tulee ajaa käyttäjänä `root`. Tämä on
suositeltavaa tehdä komennon `doas` avulla, katso `doas (1)` ja `doas.conf (5)`.
Tästä eteenpäin oletuksena on, että domain "esimerkki.com" osoittaa
serverin IP-osoitteeseen.
Jos asennuksen kanssa on ongelmia, IRC-kanava #pleroma Libera.chat tai
Matrix-kanava #pleroma:libera.chat ovat hyviä paikkoja löytää apua
(englanniksi), `/msg eal kukkuu` jos haluat välttämättä puhua härmää.
Asenna tarvittava ohjelmisto:
`# pkg_add git elixir gmake postgresql-server-10.3 postgresql-contrib-10.3 cmake ffmpeg ImageMagick`
#### Optional software
[`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md):
* ImageMagick
* ffmpeg
* exiftool
Asenna tarvittava ohjelmisto:
`# pkg_add ImageMagick ffmpeg p5-Image-ExifTool`
Luo postgresql-tietokanta:
`# su - _postgresql`
`$ mkdir /var/postgresql/data`
`$ initdb -D /var/postgresql/data -E UTF8`
`$ createdb`
Käynnistä tietokanta ja aseta se käynnistymään automaattisesti.
`# rcctl start postgresql`
`# rcctl enable postgresql`
Luo käyttäjä akkomaa varten (kysyy muutaman kysymyksen):
`# adduser akkoma`
Vaihda akkoma-käyttäjään ja mene kotihakemistoosi:
`# su - akkoma`
Lataa akkoman lähdekoodi:
`$ git clone https://akkoma.dev/AkkomaGang/akkoma.git`
`$ cd akkoma`
Asenna tarvittavat elixir-kirjastot:
`$ mix deps.get`
`$ mix deps.compile`
Luo tarvittava konfiguraatio:
`$ mix generate_config`
`$ cp config/generated_config.exs config/prod.secret.exs`
Aja luodut tietokantakomennot:
`# su _postgres -c 'psql -f config/setup_db.psql'`
`$ MIX_ENV=prod mix ecto.migrate`
Käynnistä akkoma-prosessi:
`$ MIX_ENV=prod mix compile`
`$ MIX_ENV=prod mix phx.server`
Tässä vaiheessa on hyvä tarkistaa että asetukset ovat oikein. Avaa selaimella,
curlilla tai vastaavalla työkalulla `esimerkki.com:4000/api/v1/instance` ja katso
että kohta "uri" on "https://esimerkki.com".
Huom! Muista varmistaa että muuttuja MIX_ENV on "prod" mix-komentoja ajaessasi.
Mix lukee oikean konfiguraatiotiedoston sen mukaisesti.
Ohessa enimmäkseen toimivaksi todettu rc.d-skripti akkoman käynnistämiseen.
Kirjoita se tiedostoon /etc/rc.d/akkoma. Tämän jälkeen aja
`# chmod +x /etc/rc.d/akkoma`, ja voit käynnistää akkoman komennolla
`# /etc/rc.d/akkoma start`.
```
#!/bin/ksh
#/etc/rc.d/akkoma
daemon="cd /home/akkoma/akkoma;MIX_ENV=prod /usr/local/bin/elixir"
daemon_flags="--detached /usr/local/bin/mix phx.server"
daemon_user="akkoma"
rc_reload="NO"
rc_bg="YES"
pexp="beam"
. /etc/rc.d/rc.subr
rc_cmd $1
```
Tämän jälkeen tarvitset enää HTTP-serverin välittämään kutsut akkoma-prosessille.
Tiedostosta `install/akkoma.nginx` löytyy esimerkkikonfiguraatio, ja TLS-sertifikaatit
saat ilmaiseksi esimerkiksi [letsencryptiltä](https://certbot.eff.org/lets-encrypt/opbsd-nginx.html).
Nginx asentuu yksinkertaisesti komennolla `# pkg_add nginx`.
Kun olet valmis, avaa https://esimerkki.com selaimessasi. Luo käyttäjä ja seuraa kiinnostavia
tyyppejä muilla palvelimilla!

View file

@ -6,6 +6,7 @@ This guide covers a installation using an OTP release. To install Akkoma from so
## Pre-requisites
* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below
* For installing OTP releases on RedHat-based distros like Fedora and Centos Stream, please follow [this guide](./otp_redhat_en.md) instead.
* A (sub)domain pointed to the machine
You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`.
@ -14,12 +15,19 @@ While in theory OTP releases are possbile to install on any compatible machine,
### Detecting flavour
Paste the following into the shell:
```sh
arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix"
```
This is a little more complex than it used to be (thanks ubuntu)
If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source.
Use the following mapping to figure out your flavour:
| distribution | flavour |
| ------------- | ------------ |
| debian stable | amd64 |
| ubuntu focal | amd64 |
| ubuntu jammy | ubuntu-jammy |
| alpine | amd64-musl |
Other similar distributions will _probably_ work, but if it is not listed above, there is no official
support.
### Installing the required packages

View file

@ -0,0 +1,285 @@
# Installing on RedHat using OTP releases
## OTP releases and Fedora/RedHat
The current OTP builds available for Linux are unfortunately incompatible with RedHat Linux distributions, like Fedora and Centos Stream. This is due to RedHat maintaining patched versions of certain Erlang libraries, making them incompatible with other Linux distributions.
However, you may compile your own OTP release from scratch. This is particularly useful if you wish to quickly distribute your OTP build onto multiple systems, without having to worry about compiling code on every system. However, if your goal is to simply set up a single instance for yourself, installing from-source might be a simpler option. To install from-source, please follow [this guide](./fedora_based_en.md).
## Pre-requisites
In order to compile a RedHat-compatible OTP release, you will need to run a RedHat Linux distribution. This guide will assume you run Fedora 36, though it should also work on older Fedora releases and other RedHat distributions. It also assumes that you have administrative rights and sufficient knowledge on how to perform common CLI tasks in Linux. If you want to run this guide with root, ignore the `sudo` at the beginning of the lines.
Important: keep in mind that you must build your OTP release for the specific RedHat distribution you wish to use it on. A build on Fedora will only be compatible with a specific Fedora release version.
## Building an OTP release for Fedora 36
### Installing required packages
* First, update your system, if not already done:
```shell
sudo dnf upgrade --refresh
```
* Then install the required packages to build your OTP release:
```shell
sudo dnf install git gcc g++ erlang elixir erlang-os_mon erlang-eldap erlang-xmerl erlang-erl_interface erlang-syntax_tools make cmake file-devel
```
### Preparing the project files
* Git clone the AkkomaBE repository. This can be done anywhere:
```shell
cd ~
git clone https://akkoma.dev/AkkomaGang/akkoma.git
```
* Change to the new directory:
```shell
cd ./akkoma
```
### Building the OTP release
* Run the following commands:
```shell
export MIX_ENV=prod
echo "import Config" > config/prod.secret.exs
mix local.hex --force
mix local.rebar --force
mix deps.get --only prod
mkdir release
mix release --path release
```
Note that compiling the OTP release will take some time. Once it completes, you will find the OTP files in the directory `release`.
If all went well, you will have built your very own Fedora-compatible OTP release! You can now pack up the files in the `release` directory and deploy them to your other Fedora servers.
## Installing the OTP release
Installing the OTP release from this point onward will be very similar to the regular OTP release. This guide assumes you will want to install your OTP package on other systems, so additional pre-requisites will be listed below.
Please note that running your own OTP release has some minor caveats that you should be aware of. They will be listed below as well.
### Installing required packages
Other than things bundled in the OTP release Akkoma depends on:
* curl (to download the release build)
* ncurses (ERTS won't run without it)
* PostgreSQL (also utilizes extensions in postgresql-contrib)
* nginx (could be swapped with another reverse proxy but this guide covers only it)
* certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it)
* libmagic/file
First, update your system, if not already done:
```shell
sudo dnf upgrade --refresh
```
Then install the required packages:
```shell
sudo dnf install curl ncurses postgresql postgresql-contrib nginx certbot file-devel
```
### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
* Install ffmpeg (requires setting up the RPM-fusion repositories):
```shell
sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg
```
* Install ImageMagick and ExifTool for image manipulation:
```shell
sudo dnf install Imagemagick perl-Image-ExifTool
```
### Configuring PostgreSQL
#### (Optional) Performance configuration
It is encouraged to check [Optimizing your PostgreSQL performance](../configuration/postgresql.md) document, for tips on PostgreSQL tuning.
Restart PostgreSQL to apply configuration changes:
```shell
sudo systemctl restart postgresql
```
### Installing Akkoma
```sh
# Create a Akkoma user
adduser --system --shell /bin/false --home /opt/akkoma akkoma
# Move your custom OTP release to the home directory
sudo -Hu akkoma mv /your/custom/otp/release /opt/akkoma
# Create uploads directory and set proper permissions (skip if planning to use a remote uploader)
# Note: It does not have to be `/var/lib/akkoma/uploads`, the config generator will ask about the upload directory later
sudo mkdir -p /var/lib/akkoma/uploads
sudo chown -R akkoma /var/lib/akkoma
# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
# Note: It does not have to be `/var/lib/akkoma/static`, the config generator will ask about the custom public files directory later
sudo mkdir -p /var/lib/akkoma/static
sudo chown -R akkoma /var/lib/akkoma
# Create a config directory
sudo mkdir -p /etc/akkoma
sudo chown -R akkoma /etc/akkoma
# Run the config generator
sudo -Hu akkoma ./bin/pleroma_ctl instance gen --output /etc/akkoma/config.exs --output-psql /tmp/setup_db.psql
# Create the postgres database
sudo -Hu postgres psql -f /tmp/setup_db.psql
# Create the database schema
sudo -Hu akkoma ./bin/pleroma_ctl migrate
# Start the instance to verify that everything is working as expected
sudo -Hu akkoma ./bin/pleroma daemon
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly
sleep 20 && curl http://localhost:4000/api/v1/instance
# Stop the instance
sudo -Hu akkoma ./bin/pleroma stop
```
### Setting up nginx and getting Let's Encrypt SSL certificaties
#### Get a Let's Encrypt certificate
```shell
certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
```
#### Copy Akkoma nginx configuration to the nginx folder
```shell
cp /opt/akkoma/installation/nginx/akkoma.nginx /etc/nginx/conf.d/akkoma.conf
```
#### Edit the nginx config
```shell
# Replace example.tld with your (sub)domain (replace $EDITOR with your editor of choice)
sudo $EDITOR /etc/nginx/conf.d/akkoma.conf
# Verify that the config is valid
sudo nginx -t
```
#### Start nginx
```shell
sudo systemctl start nginx
```
At this point if you open your (sub)domain in a browser you should see a 502 error, that's because Akkoma is not started yet.
### Setting up a system service
```shell
# Copy the service into a proper directory
cp /opt/akkoma/installation/akkoma.service /etc/systemd/system/akkoma.service
# Edit the service file and make any neccesary changes
sudo $EDITOR /etc/systemd/system/akkoma.service
# If you use SELinux, set the correct file context on the pleroma binary
sudo semanage fcontext -a -t init_t /opt/akkoma/bin/pleroma
sudo restorecon -v /opt/akkoma/bin/pleroma
# Start akkoma and enable it on boot
sudo systemctl start akkoma
sudo systemctl enable akkoma
```
If everything worked, you should see a response from Akkoma-BE when visiting your domain. You may need to install frontends like Akkoma-FE and Admin-FE; refer to [this guide](../administration/CLI_tasks/frontend.md) on how to install them.
If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors.
{! support.include !}
## Post installation
### Setting up auto-renew of the Let's Encrypt certificate
```shell
# Create the directory for webroot challenges
sudo mkdir -p /var/lib/letsencrypt
# Uncomment the webroot method
sudo $EDITOR /etc/nginx/conf.d/akkoma.conf
# Verify that the config is valid
sudo nginx -t
# Restart nginx
sudo systemctl restart nginx
# Ensure the webroot menthod and post hook is working
sudo certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'systemctl reload nginx'
# Add it to the daily cron
echo '#!/bin/sh
certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx"
' > /etc/cron.daily/renew-akkoma-cert
sudo chmod +x /etc/cron.daily/renew-akkoma-cert
# If everything worked the output should contain /etc/cron.daily/renew-akkoma-cert
sudo run-parts --test /etc/cron.daily
```
## Create your first user and set as admin
```shell
cd /opt/akkoma
sudo -Hu akkoma ./bin/pleroma_ctl user new joeuser joeuser@sld.tld --admin
```
This will create an account withe the username of 'joeuser' with the email address of joeuser@sld.tld, and set that user's account as an admin. This will result in a link that you can paste into the browser, which logs you in and enables you to set the password.
## Further reading
### Caveats of building your own OTP release
There are some things to take note of when your are running your own OTP builds.
#### Updating your OTP builds
Using your custom OTP build, you will not be able to update the installation using the `pleroma_ctl update` command. Running this command would overwrite your install with an OTP release from the main Akkoma repository, which will break your install.
Instead, you will have to rebuild your OTP release every time there are updates, then manually move it to where your Akkoma installation is running, overwriting the old OTP release files. Make sure to stop the Akkoma-BE server before overwriting any files!
After that, run the `pleroma_ctl migrate` command as usual to perform database migrations.
#### Cross-compatibility between RedHat distributions
As it currently stands, your OTP build will only be compatible for the specific RedHat distribution you've built it on. Fedora builds only work on Fedora, Centos builds only on Centos, RedHat builds only on RedHat. Secondly, for Fedora, they will also be bound to the specific Fedora release. This is because different releases of Fedora may have significant changes made in some of the required packages and libraries.
{! installation/further_reading.include !}
{! support.include !}

View file

@ -0,0 +1,10 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Docs.Translator do
require Pleroma.Docs.Translator.Compiler
require Pleroma.Web.Gettext
@before_compile Pleroma.Docs.Translator.Compiler
end

View file

@ -0,0 +1,119 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Docs.Translator.Compiler do
@external_resource "config/description.exs"
@raw_config Pleroma.Config.Loader.read("config/description.exs")
@raw_descriptions @raw_config[:pleroma][:config_description]
defmacro __before_compile__(_env) do
strings =
__MODULE__.descriptions()
|> __MODULE__.extract_strings()
quote do
def placeholder do
unquote do
Enum.map(
strings,
fn {path, type, string} ->
ctxt = msgctxt_for(path, type)
quote do
Pleroma.Web.Gettext.dpgettext_noop(
"config_descriptions",
unquote(ctxt),
unquote(string)
)
end
end
)
end
end
end
end
def descriptions do
Pleroma.Web.ActivityPub.MRF.config_descriptions()
|> Enum.reduce(@raw_descriptions, fn description, acc -> [description | acc] end)
|> Pleroma.Docs.Generator.convert_to_strings()
end
def extract_strings(descriptions) do
descriptions
|> Enum.reduce(%{strings: [], path: []}, &process_item/2)
|> Map.get(:strings)
end
defp process_item(entity, acc) do
current_level =
acc
|> process_desc(entity)
|> process_label(entity)
process_children(entity, current_level)
end
defp process_desc(acc, %{description: desc} = item) do
%{
strings: [{acc.path ++ [key_for(item)], "description", desc} | acc.strings],
path: acc.path
}
end
defp process_desc(acc, _) do
acc
end
defp process_label(acc, %{label: label} = item) do
%{
strings: [{acc.path ++ [key_for(item)], "label", label} | acc.strings],
path: acc.path
}
end
defp process_label(acc, _) do
acc
end
defp process_children(%{children: children} = item, acc) do
current_level = Map.put(acc, :path, acc.path ++ [key_for(item)])
children
|> Enum.reduce(current_level, &process_item/2)
|> Map.put(:path, acc.path)
end
defp process_children(_, acc) do
acc
end
def msgctxt_for(path, type) do
"config #{type} at #{Enum.join(path, " > ")}"
end
defp convert_group({_, group}) do
group
end
defp convert_group(group) do
group
end
def key_for(%{group: group, key: key}) do
"#{convert_group(group)}-#{key}"
end
def key_for(%{group: group}) do
convert_group(group)
end
def key_for(%{key: key}) do
key
end
def key_for(_) do
nil
end
end

View file

@ -9,6 +9,7 @@ defmodule Pleroma.Emoji do
"""
use GenServer
alias Pleroma.Emoji.Combinations
alias Pleroma.Emoji.Loader
require Logger
@ -124,7 +125,7 @@ defp update_emojis(emojis) do
|> String.split("\n")
|> Enum.filter(fn line ->
line != "" and not String.starts_with?(line, "#") and
String.contains?(line, "qualified")
String.contains?(line, "fully-qualified")
end)
|> Enum.map(fn line ->
line
@ -186,4 +187,17 @@ def emoji_url(%{"type" => "EmojiReact", "content" => emoji, "tag" => tags}) do
end
def emoji_url(_), do: nil
emoji_qualification_map =
emojis
|> Enum.filter(&String.contains?(&1, "\uFE0F"))
|> Combinations.variate_emoji_qualification()
for {qualified, unqualified_list} <- emoji_qualification_map do
for unqualified <- unqualified_list do
def fully_qualify_emoji(unquote(unqualified)), do: unquote(qualified)
end
end
def fully_qualify_emoji(emoji), do: emoji
end

View file

@ -0,0 +1,45 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Emoji.Combinations do
# FE0F is the emoji variation sequence. It is used for fully-qualifying
# emoji, and that includes emoji combinations.
# This code generates combinations per emoji: for each FE0F, all possible
# combinations of the character being removed or staying will be generated.
# This is made as an attempt to find all partially-qualified and unqualified
# versions of a fully-qualified emoji.
# I have found *no cases* for which this would be a problem, after browsing
# the entire emoji list in emoji-test.txt. This is safe, and, sadly, most
# likely sane too.
defp qualification_combinations(codepoints) do
qualification_combinations([[]], codepoints)
end
defp qualification_combinations(acc, []), do: acc
defp qualification_combinations(acc, ["\uFE0F" | tail]) do
acc
|> Enum.flat_map(fn x -> [x, x ++ ["\uFE0F"]] end)
|> qualification_combinations(tail)
end
defp qualification_combinations(acc, [codepoint | tail]) do
acc
|> Enum.map(&Kernel.++(&1, [codepoint]))
|> qualification_combinations(tail)
end
def variate_emoji_qualification(emoji) when is_binary(emoji) do
emoji
|> String.codepoints()
|> qualification_combinations()
|> Enum.map(&List.to_string/1)
end
def variate_emoji_qualification(emoji) when is_list(emoji) do
emoji
|> Enum.map(fn emoji -> {emoji, variate_emoji_qualification(emoji)} end)
end
end

View file

@ -114,6 +114,7 @@ def call(conn = %{method: method}, url, opts) when method in @methods do
else
{:ok, true} ->
conn
|> put_private(:proxied_url, url)
|> error_or_redirect(500, "Request failed", opts)
|> halt()

View file

@ -37,6 +37,13 @@ defp to_es({:filter, [field, query]}) do
end
def parse(q) do
Enum.map(q, &to_es/1)
[
%{
exists: %{
field: "content"
}
}
] ++
Enum.map(q, &to_es/1)
end
end

View file

@ -660,6 +660,31 @@ def force_password_reset_async(user) do
@spec force_password_reset(User.t()) :: {:ok, User.t()} | {:error, Ecto.Changeset.t()}
def force_password_reset(user), do: update_password_reset_pending(user, true)
# Used to auto-register LDAP accounts which won't have a password hash stored locally
def register_changeset_ldap(struct, params = %{password: password})
when is_nil(password) do
params =
if Map.has_key?(params, :email) do
Map.put_new(params, :email, params[:email])
else
params
end
struct
|> cast(params, [
:name,
:nickname,
:email
])
|> validate_required([:name, :nickname])
|> unique_constraint(:nickname)
|> validate_exclusion(:nickname, Config.get([User, :restricted_nicknames]))
|> validate_format(:nickname, local_nickname_regex())
|> put_ap_id()
|> unique_constraint(:ap_id)
|> put_following_and_follower_and_featured_address()
end
def register_changeset(struct, params \\ %{}, opts \\ []) do
bio_limit = Config.get([:instance, :user_bio_length], 5000)
name_limit = Config.get([:instance, :user_name_length], 100)

View file

@ -1657,7 +1657,13 @@ def pin_data_from_featured_collection(
)
when type in ["OrderedCollection", "Collection"] do
{:ok, objects} = Collections.Fetcher.fetch_collection(collection)
Map.new(objects, fn %{"id" => object_ap_id} -> {object_ap_id, NaiveDateTime.utc_now()} end)
# Items can either be a map _or_ a string
objects
|> Map.new(fn
ap_id when is_binary(ap_id) -> {ap_id, NaiveDateTime.utc_now()}
%{"id" => object_ap_id} -> {object_ap_id, NaiveDateTime.utc_now()}
end)
end
def fetch_and_prepare_featured_from_ap_id(nil) do

View file

@ -110,7 +110,8 @@ defp remote_mention_resolver(
# https://github.com/misskey-dev/misskey/pull/8787
defp fix_misskey_content(
%{"source" => %{"mediaType" => "text/x.misskeymarkdown", "content" => content}} = object
) do
)
when is_binary(content) do
mention_handler = fn nick, buffer, opts, acc ->
remote_mention_resolver(object, nick, buffer, opts, acc)
end
@ -121,7 +122,7 @@ defp fix_misskey_content(
Map.put(object, "content", linked)
end
defp fix_misskey_content(%{"_misskey_content" => content} = object) do
defp fix_misskey_content(%{"_misskey_content" => content} = object) when is_binary(content) do
mention_handler = fn nick, buffer, opts, acc ->
remote_mention_resolver(object, nick, buffer, opts, acc)
end
@ -156,7 +157,6 @@ defp fix(data) do
|> fix_replies()
|> fix_source()
|> fix_misskey_content()
|> Transmogrifier.fix_quote_url()
|> Transmogrifier.fix_attachments()
|> Transmogrifier.fix_emoji()
|> Transmogrifier.fix_content_map()

View file

@ -53,6 +53,7 @@ def changeset(struct, data) do
defp fix(data) do
data =
data
|> fix_emoji_qualification()
|> CommonFixes.fix_actor()
|> CommonFixes.fix_activity_addressing()
@ -77,6 +78,23 @@ defp fix(data) do
defp matches_shortcode?(nil), do: false
defp matches_shortcode?(s), do: Regex.match?(@emoji_regex, s)
defp fix_emoji_qualification(%{"content" => emoji} = data) do
new_emoji = Pleroma.Emoji.fully_qualify_emoji(emoji)
cond do
Pleroma.Emoji.is_unicode_emoji?(emoji) ->
data
Pleroma.Emoji.is_unicode_emoji?(new_emoji) ->
data |> Map.put("content", new_emoji)
true ->
data
end
end
defp fix_emoji_qualification(data), do: data
defp validate_emoji(cng) do
content = get_field(cng, :content)

View file

@ -103,19 +103,15 @@ defp signature_host(%URI{port: port, scheme: scheme, host: host}) do
end
end
defp should_federate?(inbox, public) do
if public do
true
else
%{host: host} = URI.parse(inbox)
defp should_federate?(inbox) do
%{host: host} = URI.parse(inbox)
quarantined_instances =
Config.get([:instance, :quarantined_instances], [])
|> Pleroma.Web.ActivityPub.MRF.instance_list_from_tuples()
|> Pleroma.Web.ActivityPub.MRF.subdomains_regex()
quarantined_instances =
Config.get([:instance, :quarantined_instances], [])
|> Pleroma.Web.ActivityPub.MRF.instance_list_from_tuples()
|> Pleroma.Web.ActivityPub.MRF.subdomains_regex()
!Pleroma.Web.ActivityPub.MRF.subdomain_match?(quarantined_instances, host)
end
!Pleroma.Web.ActivityPub.MRF.subdomain_match?(quarantined_instances, host)
end
@spec recipients(User.t(), Activity.t()) :: list(User.t()) | []
@ -192,7 +188,6 @@ def determine_inbox(
def publish(%User{} = actor, %{data: %{"bcc" => bcc}} = activity)
when is_list(bcc) and bcc != [] do
public = is_public?(activity)
{:ok, data} = Transmogrifier.prepare_outgoing(activity.data)
recipients = recipients(actor, activity)
@ -201,7 +196,7 @@ def publish(%User{} = actor, %{data: %{"bcc" => bcc}} = activity)
recipients
|> Enum.filter(&User.ap_enabled?/1)
|> Enum.map(fn actor -> actor.inbox end)
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|> Enum.filter(fn inbox -> should_federate?(inbox) end)
|> Instances.filter_reachable()
Repo.checkout(fn ->
@ -246,7 +241,7 @@ def publish(%User{} = actor, %Activity{} = activity) do
determine_inbox(activity, user)
end)
|> Enum.uniq()
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|> Enum.filter(fn inbox -> should_federate?(inbox) end)
|> Instances.filter_reachable()
|> Enum.each(fn {inbox, unreachable_since} ->
Pleroma.Web.Federator.Publisher.enqueue_one(

View file

@ -38,6 +38,7 @@ def fix_object(object, options \\ []) do
|> fix_attachments()
|> fix_context()
|> fix_in_reply_to(options)
|> fix_quote_url(options)
|> fix_emoji()
|> fix_tag()
|> fix_content_map()
@ -167,6 +168,53 @@ def fix_in_reply_to(%{"inReplyTo" => in_reply_to} = object, options)
def fix_in_reply_to(object, _options), do: object
def fix_quote_url(object, options \\ [])
def fix_quote_url(%{"quoteUri" => quote_url} = object, options)
when not is_nil(quote_url) do
depth = (options[:depth] || 0) + 1
if Federator.allowed_thread_distance?(depth) do
with {:ok, quoted_object} <- get_obj_helper(quote_url, options),
%Activity{} <- Activity.get_create_by_object_ap_id(quoted_object.data["id"]) do
object
|> Map.put("quoteUri", quoted_object.data["id"])
else
e ->
Logger.warn("Couldn't fetch #{inspect(quote_url)}, error: #{inspect(e)}")
object
end
else
object
end
end
# Soapbox
def fix_quote_url(%{"quoteUrl" => quote_url} = object, options) do
object
|> Map.put("quoteUri", quote_url)
|> Map.delete("quoteUrl")
|> fix_quote_url(options)
end
# Old Fedibird (bug)
# https://github.com/fedibird/mastodon/issues/9
def fix_quote_url(%{"quoteURL" => quote_url} = object, options) do
object
|> Map.put("quoteUri", quote_url)
|> Map.delete("quoteURL")
|> fix_quote_url(options)
end
def fix_quote_url(%{"_misskey_quote" => quote_url} = object, options) do
object
|> Map.put("quoteUri", quote_url)
|> Map.delete("_misskey_quote")
|> fix_quote_url(options)
end
def fix_quote_url(object, _), do: object
defp prepare_in_reply_to(in_reply_to) do
cond do
is_bitstring(in_reply_to) ->
@ -424,6 +472,7 @@ def handle_incoming(
|> strip_internal_fields()
|> fix_type(fetch_options)
|> fix_in_reply_to(fetch_options)
|> fix_quote_url(fetch_options)
data = Map.put(data, "object", object)
options = Keyword.put(options, :local, false)
@ -886,43 +935,6 @@ defp strip_internal_tags(%{"tag" => tags} = object) do
defp strip_internal_tags(object), do: object
def fix_quote_url(object, options \\ [])
def fix_quote_url(%{"quoteUri" => quote_url} = object, options)
when not is_nil(quote_url) do
with {:ok, quoted_object} <- get_obj_helper(quote_url, options),
%Activity{} <- Activity.get_create_by_object_ap_id(quoted_object.data["id"]) do
Map.put(object, "quoteUri", quoted_object.data["id"])
else
e ->
Logger.warn("Couldn't fetch #{inspect(quote_url)}, error: #{inspect(e)}")
object
end
end
# Soapbox
def fix_quote_url(%{"quoteUrl" => quote_url} = object, options) do
object
|> Map.put("quoteUri", quote_url)
|> fix_quote_url(options)
end
# Old Fedibird (bug)
# https://github.com/fedibird/mastodon/issues/9
def fix_quote_url(%{"quoteURL" => quote_url} = object, options) do
object
|> Map.put("quoteUri", quote_url)
|> fix_quote_url(options)
end
def fix_quote_url(%{"_misskey_quote" => quote_url} = object, options) do
object
|> Map.put("quoteUri", quote_url)
|> fix_quote_url(options)
end
def fix_quote_url(object, _), do: object
def perform(:user_upgrade, user) do
# we pass a fake user so that the followers collection is stripped away
old_follower_address = User.ap_followers(%User{nickname: user.nickname})

View file

@ -22,10 +22,58 @@ defmodule Pleroma.Web.AdminAPI.ConfigController do
defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.Admin.ConfigOperation
defp translate_descriptions(descriptions, path \\ []) do
Enum.map(descriptions, fn desc -> translate_item(desc, path) end)
end
defp translate_string(str, path, type) do
Gettext.dpgettext(
Pleroma.Web.Gettext,
"config_descriptions",
Pleroma.Docs.Translator.Compiler.msgctxt_for(path, type),
str
)
end
defp maybe_put_translated(item, key, path) do
if item[key] do
Map.put(
item,
key,
translate_string(
item[key],
path ++ [Pleroma.Docs.Translator.Compiler.key_for(item)],
to_string(key)
)
)
else
item
end
end
defp translate_item(item, path) do
item
|> maybe_put_translated(:label, path)
|> maybe_put_translated(:description, path)
|> translate_children(path)
end
defp translate_children(%{children: children} = item, path) when is_list(children) do
item
|> Map.put(
:children,
translate_descriptions(children, path ++ [Pleroma.Docs.Translator.Compiler.key_for(item)])
)
end
defp translate_children(item, _path) do
item
end
def descriptions(conn, _params) do
descriptions = Enum.filter(Pleroma.Docs.JSON.compiled_descriptions(), &whitelisted_config?/1)
json(conn, descriptions)
json(conn, translate_descriptions(descriptions))
end
def show(conn, %{only_db: true}) do

View file

@ -0,0 +1,129 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Auth.LDAPAuthenticator do
alias Pleroma.User
require Logger
import Pleroma.Web.Auth.Helpers, only: [fetch_credentials: 1, fetch_user: 1]
@behaviour Pleroma.Web.Auth.Authenticator
@base Pleroma.Web.Auth.PleromaAuthenticator
@connection_timeout 10_000
@search_timeout 10_000
defdelegate get_registration(conn), to: @base
defdelegate create_from_registration(conn, registration), to: @base
defdelegate handle_error(conn, error), to: @base
defdelegate auth_template, to: @base
defdelegate oauth_consumer_template, to: @base
def get_user(%Plug.Conn{} = conn) do
with {:ldap, true} <- {:ldap, Pleroma.Config.get([:ldap, :enabled])},
{:ok, {name, password}} <- fetch_credentials(conn),
%User{} = user <- ldap_user(name, password) do
{:ok, user}
else
{:ldap, _} ->
@base.get_user(conn)
error ->
error
end
end
defp ldap_user(name, password) do
ldap = Pleroma.Config.get(:ldap, [])
host = Keyword.get(ldap, :host, "localhost")
port = Keyword.get(ldap, :port, 389)
ssl = Keyword.get(ldap, :ssl, false)
sslopts = Keyword.get(ldap, :sslopts, [])
options =
[{:port, port}, {:ssl, ssl}, {:timeout, @connection_timeout}] ++
if sslopts != [], do: [{:sslopts, sslopts}], else: []
case :eldap.open([to_charlist(host)], options) do
{:ok, connection} ->
try do
if Keyword.get(ldap, :tls, false) do
:application.ensure_all_started(:ssl)
case :eldap.start_tls(
connection,
Keyword.get(ldap, :tlsopts, []),
@connection_timeout
) do
:ok ->
:ok
error ->
Logger.error("Could not start TLS: #{inspect(error)}")
end
end
bind_user(connection, ldap, name, password)
after
:eldap.close(connection)
end
{:error, error} ->
Logger.error("Could not open LDAP connection: #{inspect(error)}")
{:error, {:ldap_connection_error, error}}
end
end
defp bind_user(connection, ldap, name, password) do
uid = Keyword.get(ldap, :uid, "cn")
base = Keyword.get(ldap, :base)
case :eldap.simple_bind(connection, "#{uid}=#{name},#{base}", password) do
:ok ->
case fetch_user(name) do
%User{} = user ->
user
_ ->
register_user(connection, base, uid, name)
end
error ->
error
end
end
defp register_user(connection, base, uid, name) do
case :eldap.search(connection, [
{:base, to_charlist(base)},
{:filter, :eldap.equalityMatch(to_charlist(uid), to_charlist(name))},
{:scope, :eldap.wholeSubtree()},
{:timeout, @search_timeout}
]) do
{:ok, {:eldap_search_result, [{:eldap_entry, _, attributes}], _}} ->
params = %{
name: name,
nickname: name,
password: nil
}
params =
case List.keyfind(attributes, 'mail', 0) do
{_, [mail]} -> Map.put_new(params, :email, :erlang.list_to_binary(mail))
_ -> params
end
changeset = User.register_changeset_ldap(%User{}, params)
case User.register(changeset) do
{:ok, user} -> user
error -> error
end
error ->
error
end
end
end

View file

@ -128,7 +128,11 @@ def public(%{assigns: %{user: user}} = conn, params) do
# GET /api/v1/timelines/bubble
def bubble(%{assigns: %{user: user}} = conn, params) do
bubble_instances = Config.get([:instance, :local_bubble], [])
bubble_instances =
Enum.uniq(
Config.get([:instance, :local_bubble], []) ++
[Pleroma.Web.Endpoint.host()]
)
if is_nil(user) do
fail_on_bad_auth(conn)

View file

@ -9,6 +9,7 @@ def project do
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
elixirc_options: [warnings_as_errors: warnings_as_errors()],
xref: [exclude: [:eldap]],
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),

File diff suppressed because it is too large Load diff

View file

@ -10,175 +10,175 @@
msgid ""
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:122
msgid "%{name} - %{count} is not a multiple of %{multiple}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:131
msgid "%{name} - %{value} is larger than exclusive maximum %{max}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:140
msgid "%{name} - %{value} is larger than inclusive maximum %{max}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:149
msgid "%{name} - %{value} is smaller than exclusive minimum %{min}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:158
msgid "%{name} - %{value} is smaller than inclusive minimum %{min}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:102
msgid "%{name} - Array items must be unique."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:114
msgid "%{name} - Array length %{length} is larger than maxItems: %{}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:106
msgid "%{name} - Array length %{length} is smaller than minItems: %{min}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:166
msgid "%{name} - Invalid %{type}. Got: %{value}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:174
msgid "%{name} - Invalid format. Expected %{format}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:51
msgid "%{name} - Invalid schema.type. Got: %{type}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:178
msgid "%{name} - Invalid value for enum."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:95
msgid "%{name} - String length is larger than maxLength: %{length}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:88
msgid "%{name} - String length is smaller than minLength: %{length}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:63
msgid "%{name} - null value where %{type} expected."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:60
msgid "%{name} - null value."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:182
msgid "Failed to cast to any schema in %{polymorphic_type}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:71
msgid "Failed to cast value as %{invalid_schema}. Value must be castable using `allOf` schemas listed."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:84
msgid "Failed to cast value to one of: %{failed_schemas}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:78
msgid "Failed to cast value using any of: %{failed_schemas}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:212
msgid "Invalid value for header: %{name}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:204
msgid "Missing field: %{name}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:208
msgid "Missing header: %{name}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:196
msgid "No value provided for required discriminator `%{field}`."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:216
msgid "Object property count %{property_count} is greater than maxProperties: %{max_properties}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:224
msgid "Object property count %{property_count} is less than minProperties: %{min_properties}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/static_fe/static_fe/error.html.eex:2
msgid "Oops"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:188
msgid "Unexpected field: %{name}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:200
msgid "Unknown schema: %{name}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/api_spec/render_error.ex:192
msgid "Value used as discriminator for `%{field}` matches no schemas."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/embed/show.html.eex:43
#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:37
msgid "announces"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/embed/show.html.eex:44
#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:38
msgid "likes"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/embed/show.html.eex:42
#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:36
msgid "replies"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/embed/show.html.eex:27
#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:22
msgid "sensitive media"

View file

@ -89,436 +89,483 @@ msgstr ""
msgid "must be equal to %{number}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:523
msgid "Account not found"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:316
msgid "Already voted"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:402
msgid "Bad request"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/controller_helper.ex:97
#: lib/pleroma/web/controller_helper.ex:103
msgid "Can't display this activity"
msgstr ""
#, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:324
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:325
msgid "Can't find user"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:80
msgid "Can't get favorites"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/utils.ex:482
msgid "Cannot post an empty status without attachments"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/utils.ex:441
msgid "Comment must be up to %{max_size} characters"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/config_db.ex:200
msgid "Config with params %{params} not found"
msgstr ""
#, elixir-format
#: lib/pleroma/web/common_api.ex:167 lib/pleroma/web/common_api.ex:171
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:167
#: lib/pleroma/web/common_api.ex:171
msgid "Could not delete"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:217
msgid "Could not favorite"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:254
msgid "Could not unfavorite"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:202
msgid "Could not unrepeat"
msgstr ""
#, elixir-format
#: lib/pleroma/web/common_api.ex:530 lib/pleroma/web/common_api.ex:539
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:530
#: lib/pleroma/web/common_api.ex:539
msgid "Could not update state"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:205
msgid "Error."
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:99
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:105
msgid "Invalid CAPTCHA"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:144
#: lib/pleroma/web/o_auth/o_auth_controller.ex:631
msgid "Invalid credentials"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/ensure_authenticated_plug.ex:42
msgid "Invalid credentials."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:337
msgid "Invalid indices"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:29
msgid "Invalid parameters"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/utils.ex:349
msgid "Invalid password."
msgstr ""
#, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:254
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:255
msgid "Invalid request"
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:102
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:108
msgid "Kocaptcha service unavailable"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:140
msgid "Missing parameters"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/utils.ex:477
msgid "No such conversation"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:171
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:197 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:239
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:197
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:239
msgid "No such permission_group"
msgstr ""
#, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:504
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:11 lib/pleroma/web/feed/tag_controller.ex:16
#: lib/pleroma/web/feed/user_controller.ex:69 lib/pleroma/web/o_status/o_status_controller.ex:132
#, elixir-autogen, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:515
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:11
#: lib/pleroma/web/feed/tag_controller.ex:16
#: lib/pleroma/web/feed/user_controller.ex:69
#: lib/pleroma/web/o_status/o_status_controller.ex:132
#: lib/pleroma/web/plugs/uploaded_media.ex:84
msgid "Not found"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:308
msgid "Poll's author can't vote"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:39 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:51
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:52 lib/pleroma/web/mastodon_api/controllers/status_controller.ex:326
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:39
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:51
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:52
#: lib/pleroma/web/mastodon_api/controllers/status_controller.ex:326
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:71
msgid "Record not found"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:35
#: lib/pleroma/web/feed/user_controller.ex:78 lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:42
#: lib/pleroma/web/feed/user_controller.ex:78
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:42
#: lib/pleroma/web/o_status/o_status_controller.ex:138
msgid "Something went wrong"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/activity_draft.ex:143
msgid "The message visibility must be direct"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/utils.ex:492
msgid "The status is over the character limit"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex:36
msgid "This resource requires authentication."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/rate_limiter.ex:208
msgid "Throttled"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:338
msgid "Too many choices"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:268
msgid "You can't revoke your own admin status."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:243
#: lib/pleroma/web/o_auth/o_auth_controller.ex:333
msgid "Your account is currently disabled"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:205
#: lib/pleroma/web/o_auth/o_auth_controller.ex:356
msgid "Your login is missing a confirmed e-mail address"
msgstr ""
#, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:392
#, elixir-autogen, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:403
msgid "can't read inbox of %{nickname} as %{as_nickname}"
msgstr ""
#, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:491
#, elixir-autogen, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:502
msgid "can't update outbox of %{nickname} as %{as_nickname}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:475
msgid "conversation is already muted"
msgstr ""
#, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:510
#, elixir-autogen, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:521
msgid "error"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:34
msgid "mascots can only be images"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:63
msgid "not found"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:437
msgid "Bad OAuth request."
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:108
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:114
msgid "CAPTCHA already used"
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:105
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:111
msgid "CAPTCHA expired"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/uploaded_media.ex:57
msgid "Failed"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:453
msgid "Failed to authenticate: %{message}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:484
msgid "Failed to set up user account."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/o_auth_scopes_plug.ex:37
msgid "Insufficient permissions: %{permissions}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/uploaded_media.ex:111
msgid "Internal Error"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/fallback_controller.ex:22
#: lib/pleroma/web/o_auth/fallback_controller.ex:29
msgid "Invalid Username/Password"
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:111
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:117
msgid "Invalid answer data"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:33
msgid "Nodeinfo schema version not handled"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:194
msgid "This action is outside the authorized scopes"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/fallback_controller.ex:14
msgid "Unknown error, please check the details and try again."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:136
#: lib/pleroma/web/o_auth/o_auth_controller.ex:180
msgid "Unlisted redirect_uri."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:433
msgid "Unsupported OAuth provider: %{provider}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/uploaders/uploader.ex:74
msgid "Uploader callback timeout"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/uploader_controller.ex:23
msgid "bad request"
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:96
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:102
msgid "CAPTCHA Error"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:266
msgid "Could not add reaction emoji"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api.ex:277
msgid "Could not remove reaction emoji"
msgstr ""
#, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:122
#, elixir-autogen, elixir-format
#: lib/pleroma/web/twitter_api/twitter_api.ex:128
msgid "Invalid CAPTCHA (Missing parameter: %{name})"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:96
msgid "List not found"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:151
msgid "Missing parameter: %{name}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:232
#: lib/pleroma/web/o_auth/o_auth_controller.ex:346
msgid "Password reset is required"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/tests/auth_test_controller.ex:9
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:6 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/chat_controller.ex:6 lib/pleroma/web/admin_api/controllers/config_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:6 lib/pleroma/web/admin_api/controllers/frontend_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/instance_controller.ex:6 lib/pleroma/web/admin_api/controllers/instance_document_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/invite_controller.ex:6 lib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/o_auth_app_controller.ex:6 lib/pleroma/web/admin_api/controllers/relay_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/report_controller.ex:6 lib/pleroma/web/admin_api/controllers/status_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/user_controller.ex:6 lib/pleroma/web/controller_helper.ex:6 lib/pleroma/web/embed_controller.ex:6
#: lib/pleroma/web/fallback/redirect_controller.ex:6 lib/pleroma/web/feed/tag_controller.ex:6
#: lib/pleroma/web/feed/user_controller.ex:6 lib/pleroma/web/mailer/subscription_controller.ex:6
#: lib/pleroma/web/manifest_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/account_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/app_controller.ex:11 lib/pleroma/web/mastodon_api/controllers/auth_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/custom_emoji_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/filter_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/follow_request_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/instance_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/marker_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex:14 lib/pleroma/web/mastodon_api/controllers/media_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/notification_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/report_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/scheduled_activity_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/search_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/status_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:7 lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:6 lib/pleroma/web/media_proxy/media_proxy_controller.ex:6
#: lib/pleroma/web/mongoose_im/mongoose_im_controller.ex:6 lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:6
#: lib/pleroma/web/o_auth/fallback_controller.ex:6 lib/pleroma/web/o_auth/mfa_controller.ex:10
#: lib/pleroma/web/o_auth/o_auth_controller.ex:6 lib/pleroma/web/o_status/o_status_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/app_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/backup_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/chat_controller.ex:5
#: lib/pleroma/web/pleroma_api/controllers/conversation_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/emoji_file_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/instances_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/notification_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/report_controller.ex:6
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/announcement_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/chat_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/config_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/frontend_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/instance_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/instance_document_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/invite_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/o_auth_app_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/relay_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/report_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/status_controller.ex:6
#: lib/pleroma/web/admin_api/controllers/user_controller.ex:6
#: lib/pleroma/web/controller_helper.ex:6
#: lib/pleroma/web/embed_controller.ex:6
#: lib/pleroma/web/fallback/redirect_controller.ex:6
#: lib/pleroma/web/feed/tag_controller.ex:6
#: lib/pleroma/web/feed/user_controller.ex:6
#: lib/pleroma/web/mailer/subscription_controller.ex:6
#: lib/pleroma/web/manifest_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/announcement_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/app_controller.ex:11
#: lib/pleroma/web/mastodon_api/controllers/auth_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/custom_emoji_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/filter_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/follow_request_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/instance_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/marker_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex:14
#: lib/pleroma/web/mastodon_api/controllers/media_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/notification_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/report_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/scheduled_activity_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/search_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/status_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:7
#: lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex:6
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:6
#: lib/pleroma/web/media_proxy/media_proxy_controller.ex:6
#: lib/pleroma/web/mongoose_im/mongoose_im_controller.ex:6
#: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:6
#: lib/pleroma/web/o_auth/fallback_controller.ex:6
#: lib/pleroma/web/o_auth/mfa_controller.ex:10
#: lib/pleroma/web/o_auth/o_auth_controller.ex:6
#: lib/pleroma/web/o_status/o_status_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/app_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/backup_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/chat_controller.ex:5
#: lib/pleroma/web/pleroma_api/controllers/conversation_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/emoji_file_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/instances_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/notification_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/report_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller.ex:7 lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex:6
#: lib/pleroma/web/static_fe/static_fe_controller.ex:6 lib/pleroma/web/twitter_api/controller.ex:6
#: lib/pleroma/web/twitter_api/controllers/password_controller.ex:10 lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex:6
#: lib/pleroma/web/twitter_api/controllers/util_controller.ex:6 lib/pleroma/web/uploader_controller.ex:6
#: lib/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller.ex:7
#: lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex:6
#: lib/pleroma/web/static_fe/static_fe_controller.ex:6
#: lib/pleroma/web/twitter_api/controller.ex:6
#: lib/pleroma/web/twitter_api/controllers/password_controller.ex:10
#: lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex:6
#: lib/pleroma/web/twitter_api/controllers/util_controller.ex:6
#: lib/pleroma/web/uploader_controller.ex:6
#: lib/pleroma/web/web_finger/web_finger_controller.ex:6
msgid "Security violation: OAuth scopes check was neither handled nor explicitly skipped."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/ensure_authenticated_plug.ex:32
msgid "Two-factor authentication enabled, you must use a access token."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61
msgid "Web push subscription is disabled on this Pleroma instance"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:234
msgid "You can't revoke your own admin/moderator status."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:129
msgid "authorization required for timeline view"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:24
msgid "Access denied"
msgstr ""
#, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:321
#, elixir-autogen, elixir-format
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:322
msgid "This API requires an authenticated user"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/ensure_staff_privileged_plug.ex:26
#: lib/pleroma/web/plugs/user_is_admin_plug.ex:21
msgid "User is not an admin."
@ -531,33 +578,33 @@ msgid_plural "Last export was less than %{days} days ago"
msgstr[0] ""
msgstr[1] ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/user/backup.ex:93
msgid "Backups require enabled email"
msgstr ""
#, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:423
#, elixir-autogen, elixir-format
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:434
msgid "Character limit (%{limit} characters) exceeded, contains %{length} characters"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/user/backup.ex:98
msgid "Email is required"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/common_api/utils.ex:507
msgid "Too many attachments"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/plugs/ensure_staff_privileged_plug.ex:33
#: lib/pleroma/web/plugs/user_is_staff_plug.ex:20
msgid "User is not a staff member."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/o_auth/o_auth_controller.ex:366
msgid "Your account is awaiting approval."
msgstr ""

View file

@ -10,393 +10,393 @@
msgid ""
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex:9
msgctxt "remote follow authorization button"
msgid "Authorize"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex:2
msgctxt "remote follow error"
msgid "Error fetching user"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex:4
msgctxt "remote follow header"
msgid "Remote follow"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex:8
msgctxt "placeholder text for auth code entry"
msgid "Authentication code"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:10
msgctxt "placeholder text for password entry"
msgid "Password"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:8
msgctxt "placeholder text for username entry"
msgid "Username"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:13
msgctxt "remote follow authorization button for login"
msgid "Authorize"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex:12
msgctxt "remote follow authorization button for mfa"
msgid "Authorize"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex:2
msgctxt "remote follow error"
msgid "Error following account"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:4
msgctxt "remote follow header, need login"
msgid "Log in to follow"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex:4
msgctxt "remote follow mfa header"
msgid "Two-factor authentication"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex:4
msgctxt "remote follow success"
msgid "Account followed!"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:7
msgctxt "placeholder text for account id"
msgid "Your account ID, e.g. lain@quitter.se"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:8
msgctxt "remote follow authorization button for following with a remote account"
msgid "Follow"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:2
msgctxt "remote follow error"
msgid "Error: %{error}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:4
msgctxt "remote follow header"
msgid "Remotely follow %{nickname}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset.html.eex:12
msgctxt "password reset button"
msgid "Reset"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex:4
msgctxt "password reset failed homepage link"
msgid "Homepage"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex:1
msgctxt "password reset failed message"
msgid "Password reset failed"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset.html.eex:8
msgctxt "password reset form confirm password prompt"
msgid "Confirmation"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset.html.eex:4
msgctxt "password reset form password prompt"
msgid "Password"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/invalid_token.html.eex:1
msgctxt "password reset invalid token message"
msgid "Invalid Token"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex:2
msgctxt "password reset successful homepage link"
msgid "Homepage"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex:1
msgctxt "password reset successful message"
msgid "Password changed!"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/feed/feed/tag.atom.eex:15
#: lib/pleroma/web/templates/feed/feed/tag.rss.eex:7
msgctxt "tag feed description"
msgid "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/oob_token_exists.html.eex:1
msgctxt "oauth authorization exists page title"
msgid "Authorization exists"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:32
msgctxt "oauth authorize approve button"
msgid "Approve"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:30
msgctxt "oauth authorize cancel button"
msgid "Cancel"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:23
msgctxt "oauth authorize message"
msgid "Application <strong>%{client_name}</strong> is requesting access to your account."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/oob_authorization_created.html.eex:1
msgctxt "oauth authorized page title"
msgid "Successfully authorized"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex:1
msgctxt "oauth external provider page title"
msgid "Sign in with external provider"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex:13
msgctxt "oauth external provider sign in button"
msgid "Sign in with %{strategy}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:54
msgctxt "oauth login button"
msgid "Log In"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:51
msgctxt "oauth login password prompt"
msgid "Password"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:47
msgctxt "oauth login username prompt"
msgid "Username"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:39
msgctxt "oauth register nickname prompt"
msgid "Pleroma Handle"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:37
msgctxt "oauth register nickname unchangeable warning"
msgid "Choose carefully! You won't be able to change this later. You will be able to change your display name, though."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:18
msgctxt "oauth register page email prompt"
msgid "Email"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:10
msgctxt "oauth register page fill form prompt"
msgid "If you'd like to register a new account, please provide the details below."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:35
msgctxt "oauth register page login button"
msgid "Proceed as existing user"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:31
msgctxt "oauth register page login password prompt"
msgid "Password"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:24
msgctxt "oauth register page login prompt"
msgid "Alternatively, sign in to connect to existing account."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:27
msgctxt "oauth register page login username prompt"
msgid "Name or email"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:14
msgctxt "oauth register page nickname prompt"
msgid "Nickname"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:22
msgctxt "oauth register page register button"
msgid "Proceed as new user"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:8
msgctxt "oauth register page title"
msgid "Registration Details"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:36
msgctxt "oauth register page title"
msgid "This is the first time you visit! Please enter your Pleroma handle."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex:2
msgctxt "oauth scopes message"
msgid "The following permissions will be granted"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/o_auth/oob_authorization_created.html.eex:2
#: lib/pleroma/web/templates/o_auth/o_auth/oob_token_exists.html.eex:2
msgctxt "oauth token code message"
msgid "Token code is <br>%{token}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:12
msgctxt "mfa auth code prompt"
msgid "Authentication code"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:8
msgctxt "mfa auth page title"
msgid "Two-factor authentication"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:23
msgctxt "mfa auth page use recovery code link"
msgid "Enter a two-factor recovery code"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:20
msgctxt "mfa auth verify code button"
msgid "Verify"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:8
msgctxt "mfa recover page title"
msgid "Two-factor recovery"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:12
msgctxt "mfa recover recovery code prompt"
msgid "Recovery code"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:23
msgctxt "mfa recover use 2fa code link"
msgid "Enter a two-factor code"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:20
msgctxt "mfa recover verify recovery code button"
msgid "Verify"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex:8
msgctxt "static fe profile page remote follow button"
msgid "Remote follow"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/email/digest.html.eex:163
msgctxt "digest email header line"
msgid "Hey %{nickname}, here is what you've missed!"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/email/digest.html.eex:544
msgctxt "digest email receiver address"
msgid "The email address you are subscribed as is <a href='mailto:%{@user.email}' style='color: %{color};text-decoration: none;'>%{email}</a>. "
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/email/digest.html.eex:538
msgctxt "digest email sending reason"
msgid "You have received this email because you have signed up to receive digest emails from <b>%{instance}</b> Pleroma instance."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/email/digest.html.eex:547
msgctxt "digest email unsubscribe action"
msgid "To unsubscribe, please go %{here}."
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/email/digest.html.eex:547
msgctxt "digest email unsubscribe action link text"
msgid "here"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/mailer/subscription/unsubscribe_failure.html.eex:1
msgctxt "mailer unsubscribe failed message"
msgid "UNSUBSCRIBE FAILURE"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/web/templates/mailer/subscription/unsubscribe_success.html.eex:1
msgctxt "mailer unsubscribe successful message"
msgid "UNSUBSCRIBE SUCCESSFUL"
@ -410,103 +410,103 @@ msgid_plural "%{count} New Followers"
msgstr[0] ""
msgstr[1] ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:356
msgctxt "account archive email body - self-requested"
msgid "<p>You requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:384
msgctxt "account archive email subject"
msgid "Your account archive is ready"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:188
msgctxt "approval pending email body"
msgid "<h3>Awaiting Approval</h3>\n<p>Your account at %{instance_name} is being reviewed by staff. You will receive another email once your account is approved.</p>\n"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:202
msgctxt "approval pending email subject"
msgid "Your account is awaiting approval"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:158
msgctxt "confirmation email body"
msgid "<h3>Thank you for registering on %{instance_name}</h3>\n<p>Email confirmation is required to activate the account.</p>\n<p>Please click the following link to <a href=\"%{confirmation_url}\">activate your account</a>.</p>\n"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:174
msgctxt "confirmation email subject"
msgid "%{instance_name} account confirmation"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:310
msgctxt "digest email subject"
msgid "Your digest from %{instance_name}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:81
msgctxt "password reset email body"
msgid "<h3>Reset your password at %{instance_name}</h3>\n<p>Someone has requested password change for your account at %{instance_name}.</p>\n<p>If it was you, visit the following link to proceed: <a href=\"%{password_reset_url}\">reset password</a>.</p>\n<p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p>\n"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:98
msgctxt "password reset email subject"
msgid "Password reset"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:215
msgctxt "successful registration email body"
msgid "<h3>Hello @%{nickname},</h3>\n<p>Your account at %{instance_name} has been registered successfully.</p>\n<p>No further action is required to activate your account.</p>\n"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:231
msgctxt "successful registration email subject"
msgid "Account registered on %{instance_name}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:119
msgctxt "user invitation email body"
msgid "<h3>You are invited to %{instance_name}</h3>\n<p>%{inviter_name} invites you to join %{instance_name}, an instance of Pleroma federated social networking platform.</p>\n<p>Click the following link to register: <a href=\"%{registration_url}\">accept invitation</a>.</p>\n"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:136
msgctxt "user invitation email subject"
msgid "Invitation to %{instance_name}"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:53
msgctxt "welcome email html body"
msgid "Welcome to %{instance_name}!"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:41
msgctxt "welcome email subject"
msgid "Welcome to %{instance_name}!"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:65
msgctxt "welcome email text body"
msgid "Welcome to %{instance_name}!"
msgstr ""
#, elixir-format
#, elixir-autogen, elixir-format
#: lib/pleroma/emails/user_email.ex:368
msgctxt "account archive email body - admin requested"
msgid "<p>Admin @%{admin_nickname} requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n"

View file

@ -2,6 +2,7 @@
# XXX: This should be removed when elixir's releases get custom command support
detect_flavour() {
echo "Trying to autodetect flavour, you may want to override this with --flavour"
arch="$(uname -m)"
if [ "$arch" = "x86_64" ]; then
arch="amd64"
@ -101,6 +102,7 @@ update() {
echo "Restoring erlang cookie"
echo $erlang_cookie > $RELEASE_ROOT/releases/COOKIE
echo "Done! Please refer to the changelog/release notes for changes and update instructions"
echo "You probably also want to update your frontend!"
set +e
}

View file

@ -0,0 +1,20 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"ostatus": "http://ostatus.org#",
"atomUri": "ostatus:atomUri",
"inReplyToAtomUri": "ostatus:inReplyToAtomUri",
"conversation": "ostatus:conversation",
"sensitive": "as:sensitive",
"toot": "http://joinmastodon.org/ns#",
"votersCount": "toot:votersCount"
}
],
"id": "https://example.com/users/alisaie/collections/featured",
"type": "OrderedCollection",
"totalItems": 5,
"orderedItems": [
"https://example.com/users/alisaie/statuses/108311386746229284"
]
}

View file

@ -0,0 +1,48 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"sensitive": "as:sensitive",
"Hashtag": "as:Hashtag",
"quoteUrl": "as:quoteUrl",
"toot": "http://joinmastodon.org/ns#",
"Emoji": "toot:Emoji",
"featured": "toot:featured",
"discoverable": "toot:discoverable",
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
"value": "schema:value",
"misskey": "https://misskey-hub.net/ns#",
"_misskey_content": "misskey:_misskey_content",
"_misskey_quote": "misskey:_misskey_quote",
"_misskey_reaction": "misskey:_misskey_reaction",
"_misskey_votes": "misskey:_misskey_votes",
"_misskey_talk": "misskey:_misskey_talk",
"isCat": "misskey:isCat",
"vcard": "http://www.w3.org/2006/vcard/ns#"
}
],
"id": "https://misskey.io/notes/934gok3482",
"type": "Note",
"attributedTo": "https://misskey.io/users/93492q0ip0",
"summary": null,
"content": "<p><span>i quompt u</p>",
"_misskey_content": "i quompt u",
"source": {
"content": "i quompt u",
"mediaType": "text/x.misskeymarkdown"
},
"_misskey_quote": "https://misskey.io/notes/934gok3482",
"quoteUrl": "https://misskey.io/notes/934gok3482",
"published": "2022-07-25T15:21:48.208Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [],
"inReplyTo": null,
"attachment": [],
"sensitive": false,
"tag": []
}

View file

@ -0,0 +1,90 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Docs.Translator.CompilerTest do
use ExUnit.Case, async: true
alias Pleroma.Docs.Translator.Compiler
@descriptions [
%{
key: "1",
label: "1",
description: "2",
children: [
%{
key: "3",
label: "3",
description: "4"
},
%{
key: "5",
label: "5",
description: "6"
}
]
},
%{
key: "7",
label: "7",
description: "8",
children: [
%{
key: "9",
description: "9",
children: [
%{
key: "10",
description: "10",
children: [
%{key: "11", description: "11"},
%{description: "12"}
]
}
]
},
%{
label: "13"
}
]
},
%{
group: "14",
label: "14"
},
%{
group: "15",
key: "15",
label: "15"
},
%{
group: {":subgroup", "16"},
label: "16"
}
]
describe "extract_strings/1" do
test "it extracts all labels and descriptions" do
strings = Compiler.extract_strings(@descriptions)
assert length(strings) == 16
assert {["1"], "label", "1"} in strings
assert {["1"], "description", "2"} in strings
assert {["1", "3"], "label", "3"} in strings
assert {["1", "3"], "description", "4"} in strings
assert {["1", "5"], "label", "5"} in strings
assert {["1", "5"], "description", "6"} in strings
assert {["7"], "label", "7"} in strings
assert {["7"], "description", "8"} in strings
assert {["7", "9"], "description", "9"} in strings
assert {["7", "9", "10"], "description", "10"} in strings
assert {["7", "9", "10", "11"], "description", "11"} in strings
assert {["7", "9", "10", nil], "description", "12"} in strings
assert {["7", nil], "label", "13"} in strings
assert {["14"], "label", "14"} in strings
assert {["15-15"], "label", "15"} in strings
assert {["16"], "label", "16"} in strings
end
end
end

View file

@ -13,8 +13,8 @@ test "tells if a string is an unicode emoji" do
# Accept fully-qualified and unqualified emoji
# See http://www.unicode.org/reports/tr51/
assert Emoji.is_unicode_emoji?("")
assert Emoji.is_unicode_emoji?("")
refute Emoji.is_unicode_emoji?("")
refute Emoji.is_unicode_emoji?("")
assert Emoji.is_unicode_emoji?("🥺")
assert Emoji.is_unicode_emoji?("🤰")

View file

@ -347,6 +347,39 @@ test "fetches user featured collection using the first property" do
assert Map.has_key?(data, "http://inserted")
end
test "fetches user featured when it has string IDs" do
featured_url = "https://example.com/alisaie/collections/featured"
dead_url = "https://example.com/users/alisaie/statuses/108311386746229284"
featured_data =
"test/fixtures/mastodon/featured_collection.json"
|> File.read!()
Tesla.Mock.mock(fn
%{
method: :get,
url: ^featured_url
} ->
%Tesla.Env{
status: 200,
body: featured_data,
headers: [{"content-type", "application/activity+json"}]
}
%{
method: :get,
url: ^dead_url
} ->
%Tesla.Env{
status: 404,
body: "{}",
headers: [{"content-type", "application/activity+json"}]
}
end)
{:ok, %{}} = ActivityPub.fetch_and_prepare_featured_from_ap_id(featured_url)
end
test "it fetches the appropriate tag-restricted posts" do
user = insert(:user)

View file

@ -143,61 +143,5 @@ test "a misskey MFM status with a _misskey_content field should work and be link
}
} = ArticleNotePageValidator.cast_and_validate(note)
end
test "a misskey quote should work", _ do
Tesla.Mock.mock(fn %{
method: :get,
url: "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
} ->
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/quoted_status.json"),
headers: HttpRequestMock.activitypub_object_headers()
}
end)
insert(:user, %{ap_id: "https://misskey.io/users/93492q0ip0"})
insert(:user, %{ap_id: "https://example.com/users/user"})
note =
"test/fixtures/misskey/quote.json"
|> File.read!()
|> Jason.decode!()
%{
valid?: true,
changes: %{
quoteUri: "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
}
} = ArticleNotePageValidator.cast_and_validate(note)
end
test "a fedibird quote should work", _ do
Tesla.Mock.mock(fn %{
method: :get,
url: "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
} ->
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/quoted_status.json"),
headers: HttpRequestMock.activitypub_object_headers()
}
end)
insert(:user, %{ap_id: "https://fedibird.com/users/akkoma_ap_integration_tester"})
insert(:user, %{ap_id: "https://example.com/users/user"})
note =
"test/fixtures/fedibird/quote.json"
|> File.read!()
|> Jason.decode!()
%{
valid?: true,
changes: %{
quoteUri: "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
}
} = ArticleNotePageValidator.cast_and_validate(note)
end
end
end

View file

@ -23,7 +23,10 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
:ok
end
setup_all do: clear_config([:instance, :federating], true)
setup_all do
clear_config([:instance, :federating], true)
clear_config([:instance, :quarantined_instances], [])
end
describe "gather_webfinger_links/1" do
test "it returns links" do
@ -267,7 +270,7 @@ test "publish to url with with different ports" do
end
describe "publish/2" do
test_with_mock "doesn't publish a non-public activity to quarantined instances.",
test_with_mock "doesn't publish any activity to quarantined instances.",
Pleroma.Web.Federator.Publisher,
[:passthrough],
[] do
@ -291,10 +294,18 @@ test "publish to url with with different ports" do
recipients: [follower.ap_id]
)
public_note_activity =
insert(:note_activity,
user: actor,
recipients: [follower.ap_id, @as_public]
)
res = Publisher.publish(actor, note_activity)
assert res == :ok
:ok = Publisher.publish(actor, public_note_activity)
assert not called(
Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
inbox: "https://domain.com/users/nick1/inbox",
@ -302,6 +313,14 @@ test "publish to url with with different ports" do
id: note_activity.data["id"]
})
)
assert not called(
Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
inbox: "https://domain.com/users/nick1/inbox",
actor_id: actor.id,
id: public_note_activity.data["id"]
})
)
end
test_with_mock "Publishes a non-public activity to non-quarantined instances.",
@ -345,6 +364,8 @@ test "publish to url with with different ports" do
Pleroma.Web.Federator.Publisher,
[:passthrough],
[] do
Config.put([:instance, :quarantined_instances], [])
follower =
insert(:user, %{
local: false,
@ -379,6 +400,8 @@ test "publish to url with with different ports" do
Pleroma.Web.Federator.Publisher,
[:passthrough],
[] do
clear_config([:instance, :quarantined_instances], [])
fetcher =
insert(:user,
local: false,

View file

@ -86,6 +86,37 @@ test "it works for incoming custom emoji reactions" do
)
end
test "it works for incoming unqualified emoji reactions" do
user = insert(:user)
other_user = insert(:user, local: false)
{:ok, activity} = CommonAPI.post(user, %{status: "hello"})
# woman detective emoji, unqualified
unqualified_emoji = [0x1F575, 0x200D, 0x2640] |> List.to_string()
data =
File.read!("test/fixtures/emoji-reaction.json")
|> Jason.decode!()
|> Map.put("object", activity.data["object"])
|> Map.put("actor", other_user.ap_id)
|> Map.put("content", unqualified_emoji)
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
assert data["actor"] == other_user.ap_id
assert data["type"] == "EmojiReact"
assert data["id"] == "http://mastodon.example.org/users/admin#reactions/2"
assert data["object"] == activity.data["object"]
# woman detective emoji, fully qualified
emoji = [0x1F575, 0xFE0F, 0x200D, 0x2640, 0xFE0F] |> List.to_string()
assert data["content"] == emoji
object = Object.get_by_ap_id(data["object"])
assert object.data["reaction_count"] == 1
assert match?([[^emoji, _, _]], object.data["reactions"])
end
test "it reject invalid emoji reactions" do
user = insert(:user)
other_user = insert(:user, local: false)

View file

@ -707,4 +707,81 @@ test "take_emoji_tags/1" do
}
]
end
describe "fix_quote_url/1" do
test "a misskey quote should work", _ do
Tesla.Mock.mock(fn %{
method: :get,
url: "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
} ->
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/quoted_status.json"),
headers: HttpRequestMock.activitypub_object_headers()
}
end)
insert(:user, %{ap_id: "https://misskey.io/users/93492q0ip0"})
insert(:user, %{ap_id: "https://example.com/users/user"})
note =
"test/fixtures/misskey/quote.json"
|> File.read!()
|> Jason.decode!()
%{"quoteUri" => "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"} =
Transmogrifier.fix_quote_url(note)
end
test "a fedibird quote should work", _ do
Tesla.Mock.mock(fn %{
method: :get,
url: "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
} ->
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/quoted_status.json"),
headers: HttpRequestMock.activitypub_object_headers()
}
end)
insert(:user, %{ap_id: "https://fedibird.com/users/akkoma_ap_integration_tester"})
insert(:user, %{ap_id: "https://example.com/users/user"})
note =
"test/fixtures/fedibird/quote.json"
|> File.read!()
|> Jason.decode!()
%{
"quoteUri" => "https://example.com/objects/43479e20-c0f8-4f49-bf7f-13fab8234924"
} = Transmogrifier.fix_quote_url(note)
end
test "quote fetching should stop after n levels", _ do
clear_config([:instance, :federation_incoming_replies_max_depth], 1)
Tesla.Mock.mock(fn %{
method: :get,
url: "https://misskey.io/notes/934gok3482"
} ->
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/misskey/recursive_quote.json"),
headers: HttpRequestMock.activitypub_object_headers()
}
end)
insert(:user, %{ap_id: "https://misskey.io/users/93492q0ip0"})
note =
"test/fixtures/misskey/recursive_quote.json"
|> File.read!()
|> Jason.decode!()
%{
"quoteUri" => "https://misskey.io/notes/934gok3482"
} = Transmogrifier.fix_quote_url(note)
end
end
end

View file

@ -997,18 +997,10 @@ test "with `%{local: true, federated: false}`, forbids unauthenticated access to
describe "bubble" do
setup do: oauth_access(["read:statuses"])
test "it returns nothing if no bubble is configured", %{user: user, conn: conn} do
clear_config([:instance, :local_bubble], [])
{:ok, _} = CommonAPI.post(user, %{status: ".", visibility: "public"})
conn = get(conn, "/api/v1/timelines/bubble")
assert [] = json_response_and_validate_schema(conn, :ok)
end
test "filtering", %{conn: conn, user: user} do
clear_config([:instance, :local_bubble], [])
local_user = insert(:user)
# our endpoint host has a port in it so let's set the AP ID
local_user = insert(:user, %{ap_id: "https://localhost/users/user"})
remote_user = insert(:user, %{ap_id: "https://example.com/users/remote_user"})
{:ok, user, local_user} = User.follow(user, local_user)
{:ok, _user, remote_user} = User.follow(user, remote_user)
@ -1016,15 +1008,8 @@ test "filtering", %{conn: conn, user: user} do
{:ok, local_activity} = CommonAPI.post(local_user, %{status: "Status"})
remote_activity = create_remote_activity(remote_user)
resp =
conn
|> get("/api/v1/timelines/bubble")
|> json_response_and_validate_schema(200)
|> Enum.map(& &1["id"])
assert Enum.empty?(resp)
clear_config([:instance, :local_bubble], ["localhost:4001"])
# If nothing, only include ours
clear_config([:instance, :local_bubble], [])
one_instance =
conn
@ -1034,7 +1019,8 @@ test "filtering", %{conn: conn, user: user} do
assert local_activity.id in one_instance
clear_config([:instance, :local_bubble], ["localhost:4001", "example.com"])
# If we have others, also include theirs
clear_config([:instance, :local_bubble], ["example.com"])
two_instances =
conn

View file

@ -0,0 +1,135 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do
use Pleroma.Web.ConnCase
alias Pleroma.Repo
alias Pleroma.Web.OAuth.Token
import Pleroma.Factory
import Mock
@skip if !Code.ensure_loaded?(:eldap), do: :skip
setup_all do: clear_config([:ldap, :enabled], true)
setup_all do: clear_config(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator)
@tag @skip
test "authorizes the existing user using LDAP credentials" do
password = "testpassword"
user = insert(:user, password_hash: Pleroma.Password.Pbkdf2.hash_pwd_salt(password))
app = insert(:oauth_app, scopes: ["read", "write"])
host = Pleroma.Config.get([:ldap, :host]) |> to_charlist
port = Pleroma.Config.get([:ldap, :port])
with_mocks [
{:eldap, [],
[
open: fn [^host], [{:port, ^port}, {:ssl, false} | _] -> {:ok, self()} end,
simple_bind: fn _connection, _dn, ^password -> :ok end,
close: fn _connection ->
send(self(), :close_connection)
:ok
end
]}
] do
conn =
build_conn()
|> post("/oauth/token", %{
"grant_type" => "password",
"username" => user.nickname,
"password" => password,
"client_id" => app.client_id,
"client_secret" => app.client_secret
})
assert %{"access_token" => token} = json_response(conn, 200)
token = Repo.get_by(Token, token: token)
assert token.user_id == user.id
assert_received :close_connection
end
end
@tag @skip
test "creates a new user after successful LDAP authorization" do
password = "testpassword"
user = build(:user)
app = insert(:oauth_app, scopes: ["read", "write"])
host = Pleroma.Config.get([:ldap, :host]) |> to_charlist
port = Pleroma.Config.get([:ldap, :port])
with_mocks [
{:eldap, [],
[
open: fn [^host], [{:port, ^port}, {:ssl, false} | _] -> {:ok, self()} end,
simple_bind: fn _connection, _dn, ^password -> :ok end,
equalityMatch: fn _type, _value -> :ok end,
wholeSubtree: fn -> :ok end,
search: fn _connection, _options ->
{:ok, {:eldap_search_result, [{:eldap_entry, '', []}], []}}
end,
close: fn _connection ->
send(self(), :close_connection)
:ok
end
]}
] do
conn =
build_conn()
|> post("/oauth/token", %{
"grant_type" => "password",
"username" => user.nickname,
"password" => password,
"client_id" => app.client_id,
"client_secret" => app.client_secret
})
assert %{"access_token" => token} = json_response(conn, 200)
token = Repo.get_by(Token, token: token) |> Repo.preload(:user)
assert token.user.nickname == user.nickname
assert_received :close_connection
end
end
@tag @skip
test "disallow authorization for wrong LDAP credentials" do
password = "testpassword"
user = insert(:user, password_hash: Pleroma.Password.Pbkdf2.hash_pwd_salt(password))
app = insert(:oauth_app, scopes: ["read", "write"])
host = Pleroma.Config.get([:ldap, :host]) |> to_charlist
port = Pleroma.Config.get([:ldap, :port])
with_mocks [
{:eldap, [],
[
open: fn [^host], [{:port, ^port}, {:ssl, false} | _] -> {:ok, self()} end,
simple_bind: fn _connection, _dn, ^password -> {:error, :invalidCredentials} end,
close: fn _connection ->
send(self(), :close_connection)
:ok
end
]}
] do
conn =
build_conn()
|> post("/oauth/token", %{
"grant_type" => "password",
"username" => user.nickname,
"password" => password,
"client_id" => app.client_id,
"client_secret" => app.client_secret
})
assert %{"error" => "Invalid credentials"} = json_response(conn, 400)
assert_received :close_connection
end
end
end