mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 10:07:24 +00:00
Merge remote-tracking branch 'remotes/origin/develop' into auth-improvements
This commit is contained in:
commit
62993db499
|
@ -57,7 +57,7 @@ unit-testing:
|
||||||
policy: pull
|
policy: pull
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- name: postgres:9.6
|
- name: postgres:13
|
||||||
alias: postgres
|
alias: postgres
|
||||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
- Polls now always return a `voters_count`, even if they are single-choice.
|
- Polls now always return a `voters_count`, even if they are single-choice.
|
||||||
- Admin Emails: The ap id is used as the user link in emails now.
|
- Admin Emails: The ap id is used as the user link in emails now.
|
||||||
|
- Search: When using Postgres 11+, Pleroma will use the `websearch_to_tsvector` function to parse search queries.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ ARG DATA=/var/lib/pleroma
|
||||||
|
|
||||||
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
|
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
|
||||||
apk update &&\
|
apk update &&\
|
||||||
apk add exiftool imagemagick ncurses postgresql-client &&\
|
apk add exiftool imagemagick libmagic ncurses postgresql-client &&\
|
||||||
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
||||||
mkdir -p ${DATA}/uploads &&\
|
mkdir -p ${DATA}/uploads &&\
|
||||||
mkdir -p ${DATA}/static &&\
|
mkdir -p ${DATA}/static &&\
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
import Config
|
|
||||||
|
|
||||||
config :pleroma, :instance, static_dir: "/var/lib/pleroma/static"
|
|
||||||
config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads"
|
|
||||||
config :pleroma, :modules, runtime_dir: "/var/lib/pleroma/modules"
|
|
||||||
|
|
||||||
config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
|
|
||||||
|
|
||||||
config :pleroma, release: true, config_path: config_path
|
|
||||||
|
|
||||||
if File.exists?(config_path) do
|
|
||||||
import_config config_path
|
|
||||||
else
|
|
||||||
warning = [
|
|
||||||
IO.ANSI.red(),
|
|
||||||
IO.ANSI.bright(),
|
|
||||||
"!!! #{config_path} not found! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file",
|
|
||||||
IO.ANSI.reset()
|
|
||||||
]
|
|
||||||
|
|
||||||
IO.puts(warning)
|
|
||||||
end
|
|
||||||
|
|
||||||
exported_config =
|
|
||||||
config_path
|
|
||||||
|> Path.dirname()
|
|
||||||
|> Path.join("prod.exported_from_db.secret.exs")
|
|
||||||
|
|
||||||
if File.exists?(exported_config) do
|
|
||||||
import_config exported_config
|
|
||||||
end
|
|
|
@ -19,11 +19,18 @@ defmodule Pleroma.Activity.Search do
|
||||||
offset = Keyword.get(options, :offset, 0)
|
offset = Keyword.get(options, :offset, 0)
|
||||||
author = Keyword.get(options, :author)
|
author = Keyword.get(options, :author)
|
||||||
|
|
||||||
|
search_function =
|
||||||
|
if :persistent_term.get({Pleroma.Repo, :postgres_version}) >= 11 do
|
||||||
|
:websearch
|
||||||
|
else
|
||||||
|
:plain
|
||||||
|
end
|
||||||
|
|
||||||
Activity
|
Activity
|
||||||
|> Activity.with_preloaded_object()
|
|> Activity.with_preloaded_object()
|
||||||
|> Activity.restrict_deactivated_users()
|
|> Activity.restrict_deactivated_users()
|
||||||
|> restrict_public()
|
|> restrict_public()
|
||||||
|> query_with(index_type, search_query)
|
|> query_with(index_type, search_query, search_function)
|
||||||
|> maybe_restrict_local(user)
|
|> maybe_restrict_local(user)
|
||||||
|> maybe_restrict_author(author)
|
|> maybe_restrict_author(author)
|
||||||
|> maybe_restrict_blocked(user)
|
|> maybe_restrict_blocked(user)
|
||||||
|
@ -53,7 +60,7 @@ defmodule Pleroma.Activity.Search do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp query_with(q, :gin, search_query) do
|
defp query_with(q, :gin, search_query, :plain) do
|
||||||
from([a, o] in q,
|
from([a, o] in q,
|
||||||
where:
|
where:
|
||||||
fragment(
|
fragment(
|
||||||
|
@ -64,7 +71,18 @@ defmodule Pleroma.Activity.Search do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp query_with(q, :rum, search_query) do
|
defp query_with(q, :gin, search_query, :websearch) do
|
||||||
|
from([a, o] in q,
|
||||||
|
where:
|
||||||
|
fragment(
|
||||||
|
"to_tsvector('english', ?->>'content') @@ websearch_to_tsquery('english', ?)",
|
||||||
|
o.data,
|
||||||
|
^search_query
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp query_with(q, :rum, search_query, :plain) do
|
||||||
from([a, o] in q,
|
from([a, o] in q,
|
||||||
where:
|
where:
|
||||||
fragment(
|
fragment(
|
||||||
|
@ -76,6 +94,18 @@ defmodule Pleroma.Activity.Search do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp query_with(q, :rum, search_query, :websearch) do
|
||||||
|
from([a, o] in q,
|
||||||
|
where:
|
||||||
|
fragment(
|
||||||
|
"? @@ websearch_to_tsquery('english', ?)",
|
||||||
|
o.fts_content,
|
||||||
|
^search_query
|
||||||
|
),
|
||||||
|
order_by: [fragment("? <=> now()::date", o.inserted_at)]
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
defp maybe_restrict_local(q, user) do
|
defp maybe_restrict_local(q, user) do
|
||||||
limit = Pleroma.Config.get([:instance, :limit_to_local_content], :unauthenticated)
|
limit = Pleroma.Config.get([:instance, :limit_to_local_content], :unauthenticated)
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,28 @@ defmodule Pleroma.Application do
|
||||||
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
|
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
|
||||||
# for other strategies and supported options
|
# for other strategies and supported options
|
||||||
opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
|
opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
|
||||||
Supervisor.start_link(children, opts)
|
result = Supervisor.start_link(children, opts)
|
||||||
|
|
||||||
|
set_postgres_server_version()
|
||||||
|
|
||||||
|
result
|
||||||
|
end
|
||||||
|
|
||||||
|
defp set_postgres_server_version do
|
||||||
|
version =
|
||||||
|
with %{rows: [[version]]} <- Ecto.Adapters.SQL.query!(Pleroma.Repo, "show server_version"),
|
||||||
|
{num, _} <- Float.parse(version) do
|
||||||
|
num
|
||||||
|
else
|
||||||
|
e ->
|
||||||
|
Logger.warn(
|
||||||
|
"Could not get the postgres version: #{inspect(e)}.\nSetting the default value of 9.6"
|
||||||
|
)
|
||||||
|
|
||||||
|
9.6
|
||||||
|
end
|
||||||
|
|
||||||
|
:persistent_term.put({Pleroma.Repo, :postgres_version}, version)
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_custom_modules do
|
def load_custom_modules do
|
||||||
|
|
|
@ -9,12 +9,7 @@ defmodule Pleroma.Config.Holder do
|
||||||
def save_default do
|
def save_default do
|
||||||
default_config =
|
default_config =
|
||||||
if System.get_env("RELEASE_NAME") do
|
if System.get_env("RELEASE_NAME") do
|
||||||
release_config =
|
Pleroma.Config.Loader.merge(@config, release_defaults())
|
||||||
[:code.root_dir(), "releases", System.get_env("RELEASE_VSN"), "releases.exs"]
|
|
||||||
|> Path.join()
|
|
||||||
|> Pleroma.Config.Loader.read()
|
|
||||||
|
|
||||||
Pleroma.Config.Loader.merge(@config, release_config)
|
|
||||||
else
|
else
|
||||||
@config
|
@config
|
||||||
end
|
end
|
||||||
|
@ -32,4 +27,16 @@ defmodule Pleroma.Config.Holder do
|
||||||
def default_config(group, key), do: get_in(get_default(), [group, key])
|
def default_config(group, key), do: get_in(get_default(), [group, key])
|
||||||
|
|
||||||
defp get_default, do: Pleroma.Config.get(:default_config)
|
defp get_default, do: Pleroma.Config.get(:default_config)
|
||||||
|
|
||||||
|
@spec release_defaults() :: keyword()
|
||||||
|
def release_defaults do
|
||||||
|
[
|
||||||
|
pleroma: [
|
||||||
|
{:instance, [static_dir: "/var/lib/pleroma/static"]},
|
||||||
|
{Pleroma.Uploaders.Local, [uploads: "/var/lib/pleroma/uploads"]},
|
||||||
|
{:modules, [runtime_dir: "/var/lib/pleroma/modules"]},
|
||||||
|
{:release, true}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
50
lib/pleroma/config/release_runtime_provider.ex
Normal file
50
lib/pleroma/config/release_runtime_provider.ex
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
defmodule Pleroma.Config.ReleaseRuntimeProvider do
|
||||||
|
@moduledoc """
|
||||||
|
Imports `runtime.exs` and `{env}.exported_from_db.secret.exs` for elixir releases.
|
||||||
|
"""
|
||||||
|
@behaviour Config.Provider
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
def init(opts), do: opts
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
def load(config, _opts) do
|
||||||
|
with_defaults = Config.Reader.merge(config, Pleroma.Config.Holder.release_defaults())
|
||||||
|
|
||||||
|
config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
|
||||||
|
|
||||||
|
with_runtime_config =
|
||||||
|
if File.exists?(config_path) do
|
||||||
|
runtime_config = Config.Reader.read!(config_path)
|
||||||
|
|
||||||
|
with_defaults
|
||||||
|
|> Config.Reader.merge(pleroma: [config_path: config_path])
|
||||||
|
|> Config.Reader.merge(runtime_config)
|
||||||
|
else
|
||||||
|
warning = [
|
||||||
|
IO.ANSI.red(),
|
||||||
|
IO.ANSI.bright(),
|
||||||
|
"!!! #{config_path} not found! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file",
|
||||||
|
IO.ANSI.reset()
|
||||||
|
]
|
||||||
|
|
||||||
|
IO.puts(warning)
|
||||||
|
with_defaults
|
||||||
|
end
|
||||||
|
|
||||||
|
exported_config_path =
|
||||||
|
config_path
|
||||||
|
|> Path.dirname()
|
||||||
|
|> Path.join("prod.exported_from_db.secret.exs")
|
||||||
|
|
||||||
|
with_exported =
|
||||||
|
if File.exists?(exported_config_path) do
|
||||||
|
exported_config = Config.Reader.read!(with_runtime_config)
|
||||||
|
Config.Reader.merge(with_runtime_config, exported_config)
|
||||||
|
else
|
||||||
|
with_runtime_config
|
||||||
|
end
|
||||||
|
|
||||||
|
with_exported
|
||||||
|
end
|
||||||
|
end
|
5
mix.exs
5
mix.exs
|
@ -37,7 +37,8 @@ defmodule Pleroma.Mixfile do
|
||||||
pleroma: [
|
pleroma: [
|
||||||
include_executables_for: [:unix],
|
include_executables_for: [:unix],
|
||||||
applications: [ex_syslogger: :load, syslog: :load, eldap: :transient],
|
applications: [ex_syslogger: :load, syslog: :load, eldap: :transient],
|
||||||
steps: [:assemble, &put_otp_version/1, ©_files/1, ©_nginx_config/1]
|
steps: [:assemble, &put_otp_version/1, ©_files/1, ©_nginx_config/1],
|
||||||
|
config_providers: [{Pleroma.Config.ReleaseRuntimeProvider, nil}]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -157,7 +158,7 @@ defmodule Pleroma.Mixfile do
|
||||||
{:floki, "~> 0.27"},
|
{:floki, "~> 0.27"},
|
||||||
{:timex, "~> 3.6"},
|
{:timex, "~> 3.6"},
|
||||||
{:ueberauth, "~> 0.4"},
|
{:ueberauth, "~> 0.4"},
|
||||||
{:linkify, "~> 0.2.0"},
|
{:linkify, "~> 0.3.0"},
|
||||||
{:http_signatures, "~> 0.1.0"},
|
{:http_signatures, "~> 0.1.0"},
|
||||||
{:telemetry, "~> 0.3"},
|
{:telemetry, "~> 0.3"},
|
||||||
{:poolboy, "~> 1.5"},
|
{:poolboy, "~> 1.5"},
|
||||||
|
|
2
mix.lock
2
mix.lock
|
@ -65,7 +65,7 @@
|
||||||
"jose": {:hex, :jose, "1.10.1", "16d8e460dae7203c6d1efa3f277e25b5af8b659febfc2f2eb4bacf87f128b80a", [:mix, :rebar3], [], "hexpm", "3c7ddc8a9394b92891db7c2771da94bf819834a1a4c92e30857b7d582e2f8257"},
|
"jose": {:hex, :jose, "1.10.1", "16d8e460dae7203c6d1efa3f277e25b5af8b659febfc2f2eb4bacf87f128b80a", [:mix, :rebar3], [], "hexpm", "3c7ddc8a9394b92891db7c2771da94bf819834a1a4c92e30857b7d582e2f8257"},
|
||||||
"jumper": {:hex, :jumper, "1.0.1", "3c00542ef1a83532b72269fab9f0f0c82bf23a35e27d278bfd9ed0865cecabff", [:mix], [], "hexpm", "318c59078ac220e966d27af3646026db9b5a5e6703cb2aa3e26bcfaba65b7433"},
|
"jumper": {:hex, :jumper, "1.0.1", "3c00542ef1a83532b72269fab9f0f0c82bf23a35e27d278bfd9ed0865cecabff", [:mix], [], "hexpm", "318c59078ac220e966d27af3646026db9b5a5e6703cb2aa3e26bcfaba65b7433"},
|
||||||
"libring": {:hex, :libring, "1.4.0", "41246ba2f3fbc76b3971f6bce83119dfec1eee17e977a48d8a9cfaaf58c2a8d6", [:mix], [], "hexpm"},
|
"libring": {:hex, :libring, "1.4.0", "41246ba2f3fbc76b3971f6bce83119dfec1eee17e977a48d8a9cfaaf58c2a8d6", [:mix], [], "hexpm"},
|
||||||
"linkify": {:hex, :linkify, "0.2.0", "2518bbbea21d2caa9d372424e1ad845b640c6630e2d016f1bd1f518f9ebcca28", [:mix], [], "hexpm", "b8ca8a68b79e30b7938d6c996085f3db14939f29538a59ca5101988bb7f917f6"},
|
"linkify": {:hex, :linkify, "0.3.0", "0786296f06c3cc5455c3cbc786e575e5c381f76f8c7cb79eba495eef66617aeb", [:mix], [], "hexpm", "47e6a6e2c98815b238017331c3fbcf04aaa0644e323e6c260ee0111ed43f696c"},
|
||||||
"majic": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/majic.git", "4c692e544b28d1f5e543fb8a44be090f8cd96f80", [branch: "develop"]},
|
"majic": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/majic.git", "4c692e544b28d1f5e543fb8a44be090f8cd96f80", [branch: "develop"]},
|
||||||
"makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"},
|
"makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"},
|
||||||
"makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
|
"makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
|
||||||
|
|
|
@ -3,14 +3,17 @@ msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-11-10 13:39+0000\n"
|
"POT-Creation-Date: 2020-11-10 13:39+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: 2020-11-21 04:42+0000\n"
|
||||||
"Last-Translator: Automatically generated\n"
|
"Last-Translator: Guy Sheffer <guysoft@gmail.com>\n"
|
||||||
"Language-Team: none\n"
|
"Language-Team: Hebrew <https://translate.pleroma.social/projects/pleroma/"
|
||||||
|
"pleroma/he/>\n"
|
||||||
"Language: he\n"
|
"Language: he\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Translate Toolkit 2.5.1\n"
|
"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && "
|
||||||
|
"n % 10 == 0) ? 2 : 3));\n"
|
||||||
|
"X-Generator: Weblate 4.0.4\n"
|
||||||
|
|
||||||
## This file is a PO Template file.
|
## This file is a PO Template file.
|
||||||
##
|
##
|
||||||
|
@ -23,264 +26,264 @@ msgstr ""
|
||||||
## effect: edit them in PO (`.po`) files instead.
|
## effect: edit them in PO (`.po`) files instead.
|
||||||
## From Ecto.Changeset.cast/4
|
## From Ecto.Changeset.cast/4
|
||||||
msgid "can't be blank"
|
msgid "can't be blank"
|
||||||
msgstr ""
|
msgstr "לא יכול להיות ריק"
|
||||||
|
|
||||||
## From Ecto.Changeset.unique_constraint/3
|
## From Ecto.Changeset.unique_constraint/3
|
||||||
msgid "has already been taken"
|
msgid "has already been taken"
|
||||||
msgstr ""
|
msgstr "כבר נלקח"
|
||||||
|
|
||||||
## From Ecto.Changeset.put_change/3
|
## From Ecto.Changeset.put_change/3
|
||||||
msgid "is invalid"
|
msgid "is invalid"
|
||||||
msgstr ""
|
msgstr "אינו תקני"
|
||||||
|
|
||||||
## From Ecto.Changeset.validate_format/3
|
## From Ecto.Changeset.validate_format/3
|
||||||
msgid "has invalid format"
|
msgid "has invalid format"
|
||||||
msgstr ""
|
msgstr "תבנית אינה תקנית"
|
||||||
|
|
||||||
## From Ecto.Changeset.validate_subset/3
|
## From Ecto.Changeset.validate_subset/3
|
||||||
msgid "has an invalid entry"
|
msgid "has an invalid entry"
|
||||||
msgstr ""
|
msgstr "בעל.ה רשומה לא חוקית"
|
||||||
|
|
||||||
## From Ecto.Changeset.validate_exclusion/3
|
## From Ecto.Changeset.validate_exclusion/3
|
||||||
msgid "is reserved"
|
msgid "is reserved"
|
||||||
msgstr ""
|
msgstr "הינו שמור"
|
||||||
|
|
||||||
## From Ecto.Changeset.validate_confirmation/3
|
## From Ecto.Changeset.validate_confirmation/3
|
||||||
msgid "does not match confirmation"
|
msgid "does not match confirmation"
|
||||||
msgstr ""
|
msgstr "אינו תורם את האימות"
|
||||||
|
|
||||||
## From Ecto.Changeset.no_assoc_constraint/3
|
## From Ecto.Changeset.no_assoc_constraint/3
|
||||||
msgid "is still associated with this entry"
|
msgid "is still associated with this entry"
|
||||||
msgstr ""
|
msgstr "עדיין משויך לרשומה זו"
|
||||||
|
|
||||||
msgid "are still associated with this entry"
|
msgid "are still associated with this entry"
|
||||||
msgstr ""
|
msgstr "עדיין משויכים לרשומה זו"
|
||||||
|
|
||||||
## From Ecto.Changeset.validate_length/3
|
## From Ecto.Changeset.validate_length/3
|
||||||
msgid "should be %{count} character(s)"
|
msgid "should be %{count} character(s)"
|
||||||
msgid_plural "should be %{count} character(s)"
|
msgid_plural "should be %{count} character(s)"
|
||||||
msgstr[0] ""
|
msgstr[0] "אחד"
|
||||||
msgstr[1] ""
|
msgstr[1] "שני"
|
||||||
msgstr[2] ""
|
msgstr[2] "בודדים"
|
||||||
msgstr[3] ""
|
msgstr[3] "אחר"
|
||||||
|
|
||||||
msgid "should have %{count} item(s)"
|
msgid "should have %{count} item(s)"
|
||||||
msgid_plural "should have %{count} item(s)"
|
msgid_plural "should have %{count} item(s)"
|
||||||
msgstr[0] ""
|
msgstr[0] "אחד"
|
||||||
msgstr[1] ""
|
msgstr[1] "שני"
|
||||||
msgstr[2] ""
|
msgstr[2] "בודדים"
|
||||||
msgstr[3] ""
|
msgstr[3] "אחר"
|
||||||
|
|
||||||
msgid "should be at least %{count} character(s)"
|
msgid "should be at least %{count} character(s)"
|
||||||
msgid_plural "should be at least %{count} character(s)"
|
msgid_plural "should be at least %{count} character(s)"
|
||||||
msgstr[0] ""
|
msgstr[0] "אחד"
|
||||||
msgstr[1] ""
|
msgstr[1] "שנים"
|
||||||
msgstr[2] ""
|
msgstr[2] "בודדים"
|
||||||
msgstr[3] ""
|
msgstr[3] "אחר"
|
||||||
|
|
||||||
msgid "should have at least %{count} item(s)"
|
msgid "should have at least %{count} item(s)"
|
||||||
msgid_plural "should have at least %{count} item(s)"
|
msgid_plural "should have at least %{count} item(s)"
|
||||||
msgstr[0] ""
|
msgstr[0] "אחד"
|
||||||
msgstr[1] ""
|
msgstr[1] "שניים"
|
||||||
msgstr[2] ""
|
msgstr[2] "בודדים"
|
||||||
msgstr[3] ""
|
msgstr[3] "אחר"
|
||||||
|
|
||||||
msgid "should be at most %{count} character(s)"
|
msgid "should be at most %{count} character(s)"
|
||||||
msgid_plural "should be at most %{count} character(s)"
|
msgid_plural "should be at most %{count} character(s)"
|
||||||
msgstr[0] ""
|
msgstr[0] "אחד"
|
||||||
msgstr[1] ""
|
msgstr[1] "שניים"
|
||||||
msgstr[2] ""
|
msgstr[2] "בודדים"
|
||||||
msgstr[3] ""
|
msgstr[3] "אחר"
|
||||||
|
|
||||||
msgid "should have at most %{count} item(s)"
|
msgid "should have at most %{count} item(s)"
|
||||||
msgid_plural "should have at most %{count} item(s)"
|
msgid_plural "should have at most %{count} item(s)"
|
||||||
msgstr[0] ""
|
msgstr[0] "אחד"
|
||||||
msgstr[1] ""
|
msgstr[1] "שניים"
|
||||||
msgstr[2] ""
|
msgstr[2] "בודדים"
|
||||||
msgstr[3] ""
|
msgstr[3] "אחר"
|
||||||
|
|
||||||
## From Ecto.Changeset.validate_number/3
|
## From Ecto.Changeset.validate_number/3
|
||||||
msgid "must be less than %{number}"
|
msgid "must be less than %{number}"
|
||||||
msgstr ""
|
msgstr "חייב להיות מתחת ל-%{number}"
|
||||||
|
|
||||||
msgid "must be greater than %{number}"
|
msgid "must be greater than %{number}"
|
||||||
msgstr ""
|
msgstr "חייב להיות מעל ל-%{number}"
|
||||||
|
|
||||||
msgid "must be less than or equal to %{number}"
|
msgid "must be less than or equal to %{number}"
|
||||||
msgstr ""
|
msgstr "חייב להיות שווה ל-%{number}"
|
||||||
|
|
||||||
msgid "must be greater than or equal to %{number}"
|
msgid "must be greater than or equal to %{number}"
|
||||||
msgstr ""
|
msgstr "חייב להיות גדול או שווה ל-%{number}"
|
||||||
|
|
||||||
msgid "must be equal to %{number}"
|
msgid "must be equal to %{number}"
|
||||||
msgstr ""
|
msgstr "חייב להיות שווה ל-%{number}"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:505
|
#: lib/pleroma/web/common_api/common_api.ex:505
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Account not found"
|
msgid "Account not found"
|
||||||
msgstr ""
|
msgstr "חשבון לא נמצא"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:339
|
#: lib/pleroma/web/common_api/common_api.ex:339
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Already voted"
|
msgid "Already voted"
|
||||||
msgstr ""
|
msgstr "הצבעה כבר התבצעה"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:359
|
#: lib/pleroma/web/oauth/oauth_controller.ex:359
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Bad request"
|
msgid "Bad request"
|
||||||
msgstr ""
|
msgstr "בקשה שגוייה"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:426
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:426
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Can't delete object"
|
msgid "Can't delete object"
|
||||||
msgstr ""
|
msgstr "לא ניתן למחוק אובייקט"
|
||||||
|
|
||||||
#: lib/pleroma/web/controller_helper.ex:105
|
#: lib/pleroma/web/controller_helper.ex:105
|
||||||
#: lib/pleroma/web/controller_helper.ex:111
|
#: lib/pleroma/web/controller_helper.ex:111
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Can't display this activity"
|
msgid "Can't display this activity"
|
||||||
msgstr ""
|
msgstr "לא ניתן להציג פעילות"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:285
|
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:285
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Can't find user"
|
msgid "Can't find user"
|
||||||
msgstr ""
|
msgstr "לא ניתן למצוא משתמש"
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:61
|
#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:61
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Can't get favorites"
|
msgid "Can't get favorites"
|
||||||
msgstr ""
|
msgstr "לא ניתן למצוא מועדפים"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:438
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:438
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Can't like object"
|
msgid "Can't like object"
|
||||||
msgstr ""
|
msgstr "לא ניתן לעשות לחבב אובייקט"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/utils.ex:563
|
#: lib/pleroma/web/common_api/utils.ex:563
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Cannot post an empty status without attachments"
|
msgid "Cannot post an empty status without attachments"
|
||||||
msgstr ""
|
msgstr "לא ניתן לשלוח סטטוס ריק ללא קבצים מצורפים"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/utils.ex:511
|
#: lib/pleroma/web/common_api/utils.ex:511
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Comment must be up to %{max_size} characters"
|
msgid "Comment must be up to %{max_size} characters"
|
||||||
msgstr ""
|
msgstr "תגובה חייבת להיות עד %{max_size} תווים"
|
||||||
|
|
||||||
#: lib/pleroma/config/config_db.ex:191
|
#: lib/pleroma/config/config_db.ex:191
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Config with params %{params} not found"
|
msgid "Config with params %{params} not found"
|
||||||
msgstr ""
|
msgstr "הגדרה עם פרמטר %{params} לא נמצאה"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:181
|
#: lib/pleroma/web/common_api/common_api.ex:181
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:185
|
#: lib/pleroma/web/common_api/common_api.ex:185
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not delete"
|
msgid "Could not delete"
|
||||||
msgstr ""
|
msgstr "לא ניתן למחוק"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:231
|
#: lib/pleroma/web/common_api/common_api.ex:231
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not favorite"
|
msgid "Could not favorite"
|
||||||
msgstr ""
|
msgstr "לא ניתן לחבב"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:453
|
#: lib/pleroma/web/common_api/common_api.ex:453
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not pin"
|
msgid "Could not pin"
|
||||||
msgstr ""
|
msgstr "לא ניתן לנעוץ"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:278
|
#: lib/pleroma/web/common_api/common_api.ex:278
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not unfavorite"
|
msgid "Could not unfavorite"
|
||||||
msgstr ""
|
msgstr "לא ניתן להסיר חיבוב"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:463
|
#: lib/pleroma/web/common_api/common_api.ex:463
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not unpin"
|
msgid "Could not unpin"
|
||||||
msgstr ""
|
msgstr "לא ניתן לבטל נעיצה"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:216
|
#: lib/pleroma/web/common_api/common_api.ex:216
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not unrepeat"
|
msgid "Could not unrepeat"
|
||||||
msgstr ""
|
msgstr "לא ניתן לבטל חזרה"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:512
|
#: lib/pleroma/web/common_api/common_api.ex:512
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:521
|
#: lib/pleroma/web/common_api/common_api.ex:521
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not update state"
|
msgid "Could not update state"
|
||||||
msgstr ""
|
msgstr "לא ניתן לעדכן מצב"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:207
|
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:207
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Error."
|
msgid "Error."
|
||||||
msgstr ""
|
msgstr "שגיאה."
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:106
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:106
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid CAPTCHA"
|
msgid "Invalid CAPTCHA"
|
||||||
msgstr ""
|
msgstr "CAPTCHA לא תקין"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:116
|
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:116
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:568
|
#: lib/pleroma/web/oauth/oauth_controller.ex:568
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid credentials"
|
msgid "Invalid credentials"
|
||||||
msgstr ""
|
msgstr "נתוני אימות לא נכונים"
|
||||||
|
|
||||||
#: lib/pleroma/plugs/ensure_authenticated_plug.ex:38
|
#: lib/pleroma/plugs/ensure_authenticated_plug.ex:38
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid credentials."
|
msgid "Invalid credentials."
|
||||||
msgstr ""
|
msgstr "נתוני אימות לא נכונים."
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:355
|
#: lib/pleroma/web/common_api/common_api.ex:355
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid indices"
|
msgid "Invalid indices"
|
||||||
msgstr ""
|
msgstr "אינדקס לא תקין"
|
||||||
|
|
||||||
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:29
|
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:29
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid parameters"
|
msgid "Invalid parameters"
|
||||||
msgstr ""
|
msgstr "פרמטרים לא תקינים"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/utils.ex:414
|
#: lib/pleroma/web/common_api/utils.ex:414
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid password."
|
msgid "Invalid password."
|
||||||
msgstr ""
|
msgstr "סיסמה לא תקינה."
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:220
|
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:220
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid request"
|
msgid "Invalid request"
|
||||||
msgstr ""
|
msgstr "בקשה לא תקינה"
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:109
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:109
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Kocaptcha service unavailable"
|
msgid "Kocaptcha service unavailable"
|
||||||
msgstr ""
|
msgstr "שירות Kocaptcha לא זמין"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:112
|
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:112
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Missing parameters"
|
msgid "Missing parameters"
|
||||||
msgstr ""
|
msgstr "פרמטרים חסרים"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/utils.ex:547
|
#: lib/pleroma/web/common_api/utils.ex:547
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "No such conversation"
|
msgid "No such conversation"
|
||||||
msgstr ""
|
msgstr "שיחה לא קיימת"
|
||||||
|
|
||||||
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:388
|
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:388
|
||||||
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:414 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:456
|
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:414 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:456
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "No such permission_group"
|
msgid "No such permission_group"
|
||||||
msgstr ""
|
msgstr "permission_group לא קיים"
|
||||||
|
|
||||||
#: lib/pleroma/plugs/uploaded_media.ex:84
|
#: lib/pleroma/plugs/uploaded_media.ex:84
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:486 lib/pleroma/web/admin_api/controllers/fallback_controller.ex:11
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:486 lib/pleroma/web/admin_api/controllers/fallback_controller.ex:11
|
||||||
#: lib/pleroma/web/feed/user_controller.ex:71 lib/pleroma/web/ostatus/ostatus_controller.ex:143
|
#: lib/pleroma/web/feed/user_controller.ex:71 lib/pleroma/web/ostatus/ostatus_controller.ex:143
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Not found"
|
msgid "Not found"
|
||||||
msgstr ""
|
msgstr "לא נמצא"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:331
|
#: lib/pleroma/web/common_api/common_api.ex:331
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Poll's author can't vote"
|
msgid "Poll's author can't vote"
|
||||||
msgstr ""
|
msgstr "מחבר הסקר לא יכול.ה להצביע"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20
|
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:37 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:49
|
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:37 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:49
|
||||||
|
@ -288,215 +291,215 @@ msgstr ""
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:71
|
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:71
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Record not found"
|
msgid "Record not found"
|
||||||
msgstr ""
|
msgstr "רשומה לא נמצאה"
|
||||||
|
|
||||||
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:35
|
#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:35
|
||||||
#: lib/pleroma/web/feed/user_controller.ex:77 lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:36
|
#: lib/pleroma/web/feed/user_controller.ex:77 lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:36
|
||||||
#: lib/pleroma/web/ostatus/ostatus_controller.ex:149
|
#: lib/pleroma/web/ostatus/ostatus_controller.ex:149
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Something went wrong"
|
msgid "Something went wrong"
|
||||||
msgstr ""
|
msgstr "משהו השתבש"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/activity_draft.ex:107
|
#: lib/pleroma/web/common_api/activity_draft.ex:107
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "The message visibility must be direct"
|
msgid "The message visibility must be direct"
|
||||||
msgstr ""
|
msgstr "הנראות של ההודעה חייבת להיות ישירה"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/utils.ex:573
|
#: lib/pleroma/web/common_api/utils.ex:573
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "The status is over the character limit"
|
msgid "The status is over the character limit"
|
||||||
msgstr ""
|
msgstr "הסטטוס מעל להגבלת התווים"
|
||||||
|
|
||||||
#: lib/pleroma/plugs/ensure_public_or_authenticated_plug.ex:31
|
#: lib/pleroma/plugs/ensure_public_or_authenticated_plug.ex:31
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "This resource requires authentication."
|
msgid "This resource requires authentication."
|
||||||
msgstr ""
|
msgstr "המשאב הזה דורש הרשאה."
|
||||||
|
|
||||||
#: lib/pleroma/plugs/rate_limiter/rate_limiter.ex:206
|
#: lib/pleroma/plugs/rate_limiter/rate_limiter.ex:206
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Throttled"
|
msgid "Throttled"
|
||||||
msgstr ""
|
msgstr "מושנק"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:356
|
#: lib/pleroma/web/common_api/common_api.ex:356
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Too many choices"
|
msgid "Too many choices"
|
||||||
msgstr ""
|
msgstr "יותר מדיי אפשרויות"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:443
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:443
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unhandled activity type"
|
msgid "Unhandled activity type"
|
||||||
msgstr ""
|
msgstr "אין התמודדות לסוג הפעילות"
|
||||||
|
|
||||||
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:485
|
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:485
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "You can't revoke your own admin status."
|
msgid "You can't revoke your own admin status."
|
||||||
msgstr ""
|
msgstr "לא ניתן לבטל את הרשאת המנהל של עצמך."
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:221
|
#: lib/pleroma/web/oauth/oauth_controller.ex:221
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:308
|
#: lib/pleroma/web/oauth/oauth_controller.ex:308
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Your account is currently disabled"
|
msgid "Your account is currently disabled"
|
||||||
msgstr ""
|
msgstr "החשבון שלך כרגע מבוטל"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:183
|
#: lib/pleroma/web/oauth/oauth_controller.ex:183
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:331
|
#: lib/pleroma/web/oauth/oauth_controller.ex:331
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Your login is missing a confirmed e-mail address"
|
msgid "Your login is missing a confirmed e-mail address"
|
||||||
msgstr ""
|
msgstr "חסר לחשבון שלך כתובת דואר אלקטרוני מאושר"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:390
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:390
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "can't read inbox of %{nickname} as %{as_nickname}"
|
msgid "can't read inbox of %{nickname} as %{as_nickname}"
|
||||||
msgstr ""
|
msgstr "לא ניתן לקרוא את הדואר הנכנס של %{nickname} בתור %{as_nickname}"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:473
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:473
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "can't update outbox of %{nickname} as %{as_nickname}"
|
msgid "can't update outbox of %{nickname} as %{as_nickname}"
|
||||||
msgstr ""
|
msgstr "לא ניתן לעדכן את חשבון הדואר היוצא של %{nickname} בתור %{as_nickname}"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:471
|
#: lib/pleroma/web/common_api/common_api.ex:471
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "conversation is already muted"
|
msgid "conversation is already muted"
|
||||||
msgstr ""
|
msgstr "שיחה כבר הושתקה"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:314
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:314
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:492
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:492
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "error"
|
msgid "error"
|
||||||
msgstr ""
|
msgstr "שגיאה"
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:32
|
#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:32
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "mascots can only be images"
|
msgid "mascots can only be images"
|
||||||
msgstr ""
|
msgstr "קמע יכול להיות רק תמונות"
|
||||||
|
|
||||||
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:62
|
#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:62
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "not found"
|
msgid "not found"
|
||||||
msgstr ""
|
msgstr "לא נמצא"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:394
|
#: lib/pleroma/web/oauth/oauth_controller.ex:394
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Bad OAuth request."
|
msgid "Bad OAuth request."
|
||||||
msgstr ""
|
msgstr "בקשת OAuth שגוייה."
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:115
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:115
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "CAPTCHA already used"
|
msgid "CAPTCHA already used"
|
||||||
msgstr ""
|
msgstr "כבר נעשה שימוש ב-CAPTCHA הזה"
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:112
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:112
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "CAPTCHA expired"
|
msgid "CAPTCHA expired"
|
||||||
msgstr ""
|
msgstr "פג תוקף CAPTCHA"
|
||||||
|
|
||||||
#: lib/pleroma/plugs/uploaded_media.ex:57
|
#: lib/pleroma/plugs/uploaded_media.ex:57
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Failed"
|
msgid "Failed"
|
||||||
msgstr ""
|
msgstr "נכשל"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:410
|
#: lib/pleroma/web/oauth/oauth_controller.ex:410
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Failed to authenticate: %{message}."
|
msgid "Failed to authenticate: %{message}."
|
||||||
msgstr ""
|
msgstr "נכשל האימות: %{message}."
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:441
|
#: lib/pleroma/web/oauth/oauth_controller.ex:441
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Failed to set up user account."
|
msgid "Failed to set up user account."
|
||||||
msgstr ""
|
msgstr "הגדרת חשבון משתמש נכשלה."
|
||||||
|
|
||||||
#: lib/pleroma/plugs/oauth_scopes_plug.ex:38
|
#: lib/pleroma/plugs/oauth_scopes_plug.ex:38
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Insufficient permissions: %{permissions}."
|
msgid "Insufficient permissions: %{permissions}."
|
||||||
msgstr ""
|
msgstr "אין מספיק הרשאות: %{permissions}."
|
||||||
|
|
||||||
#: lib/pleroma/plugs/uploaded_media.ex:104
|
#: lib/pleroma/plugs/uploaded_media.ex:104
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Internal Error"
|
msgid "Internal Error"
|
||||||
msgstr ""
|
msgstr "שגיאה פנימית"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/fallback_controller.ex:22
|
#: lib/pleroma/web/oauth/fallback_controller.ex:22
|
||||||
#: lib/pleroma/web/oauth/fallback_controller.ex:29
|
#: lib/pleroma/web/oauth/fallback_controller.ex:29
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid Username/Password"
|
msgid "Invalid Username/Password"
|
||||||
msgstr ""
|
msgstr "שם משתמש/סיסמה שגויים"
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:118
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:118
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid answer data"
|
msgid "Invalid answer data"
|
||||||
msgstr ""
|
msgstr "תשובה שגוייה למידע"
|
||||||
|
|
||||||
#: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:33
|
#: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:33
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Nodeinfo schema version not handled"
|
msgid "Nodeinfo schema version not handled"
|
||||||
msgstr ""
|
msgstr "Nodeinfo של של גרסת הסכמה לא ניתן לטיפול"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:172
|
#: lib/pleroma/web/oauth/oauth_controller.ex:172
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "This action is outside the authorized scopes"
|
msgid "This action is outside the authorized scopes"
|
||||||
msgstr ""
|
msgstr "הפעולה הזו מחוץ לתחומי ההרשאות"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/fallback_controller.ex:14
|
#: lib/pleroma/web/oauth/fallback_controller.ex:14
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unknown error, please check the details and try again."
|
msgid "Unknown error, please check the details and try again."
|
||||||
msgstr ""
|
msgstr "שגיאה לא ידועה, יש לבדוק את פרטים ולנסות שוב."
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:119
|
#: lib/pleroma/web/oauth/oauth_controller.ex:119
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:158
|
#: lib/pleroma/web/oauth/oauth_controller.ex:158
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unlisted redirect_uri."
|
msgid "Unlisted redirect_uri."
|
||||||
msgstr ""
|
msgstr "ניתב redirect_uri לא רשום."
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:390
|
#: lib/pleroma/web/oauth/oauth_controller.ex:390
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unsupported OAuth provider: %{provider}."
|
msgid "Unsupported OAuth provider: %{provider}."
|
||||||
msgstr ""
|
msgstr "ספק OAuth לא נתמך: %{provider}."
|
||||||
|
|
||||||
#: lib/pleroma/uploaders/uploader.ex:72
|
#: lib/pleroma/uploaders/uploader.ex:72
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Uploader callback timeout"
|
msgid "Uploader callback timeout"
|
||||||
msgstr ""
|
msgstr "קריאה חזרה של מעלה עברה את הזמן הקצוב"
|
||||||
|
|
||||||
#: lib/pleroma/web/uploader_controller.ex:23
|
#: lib/pleroma/web/uploader_controller.ex:23
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "bad request"
|
msgid "bad request"
|
||||||
msgstr ""
|
msgstr "בקשה שגוייה"
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:103
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:103
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "CAPTCHA Error"
|
msgid "CAPTCHA Error"
|
||||||
msgstr ""
|
msgstr "שגיאת CAPTCHA"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:290
|
#: lib/pleroma/web/common_api/common_api.ex:290
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not add reaction emoji"
|
msgid "Could not add reaction emoji"
|
||||||
msgstr ""
|
msgstr "לא ניתן להוסיף סמלון תגובה"
|
||||||
|
|
||||||
#: lib/pleroma/web/common_api/common_api.ex:301
|
#: lib/pleroma/web/common_api/common_api.ex:301
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Could not remove reaction emoji"
|
msgid "Could not remove reaction emoji"
|
||||||
msgstr ""
|
msgstr "לא ניתן להסיר סמלון תגובה"
|
||||||
|
|
||||||
#: lib/pleroma/web/twitter_api/twitter_api.ex:129
|
#: lib/pleroma/web/twitter_api/twitter_api.ex:129
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Invalid CAPTCHA (Missing parameter: %{name})"
|
msgid "Invalid CAPTCHA (Missing parameter: %{name})"
|
||||||
msgstr ""
|
msgstr "CAPTCHA לא תקני (חסר פרמטר: %{name})"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:92
|
#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:92
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "List not found"
|
msgid "List not found"
|
||||||
msgstr ""
|
msgstr "רשימה לא נמצאה"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:123
|
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:123
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Missing parameter: %{name}"
|
msgid "Missing parameter: %{name}"
|
||||||
msgstr ""
|
msgstr "חסר פרמטר: %{name}"
|
||||||
|
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:210
|
#: lib/pleroma/web/oauth/oauth_controller.ex:210
|
||||||
#: lib/pleroma/web/oauth/oauth_controller.ex:321
|
#: lib/pleroma/web/oauth/oauth_controller.ex:321
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Password reset is required"
|
msgid "Password reset is required"
|
||||||
msgstr ""
|
msgstr "נדרש איפוס סיסמה"
|
||||||
|
|
||||||
#: lib/pleroma/tests/auth_test_controller.ex:9
|
#: 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/activity_pub/activity_pub_controller.ex:6 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:6
|
||||||
|
@ -533,64 +536,64 @@ msgstr ""
|
||||||
#: lib/pleroma/web/uploader_controller.ex:6 lib/pleroma/web/web_finger/web_finger_controller.ex:6
|
#: lib/pleroma/web/uploader_controller.ex:6 lib/pleroma/web/web_finger/web_finger_controller.ex:6
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Security violation: OAuth scopes check was neither handled nor explicitly skipped."
|
msgid "Security violation: OAuth scopes check was neither handled nor explicitly skipped."
|
||||||
msgstr ""
|
msgstr "הפרת אבטחה: OAuth בבדיקת המתחם לא נבדקה או דולגה במכוון."
|
||||||
|
|
||||||
#: lib/pleroma/plugs/ensure_authenticated_plug.ex:28
|
#: lib/pleroma/plugs/ensure_authenticated_plug.ex:28
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Two-factor authentication enabled, you must use a access token."
|
msgid "Two-factor authentication enabled, you must use a access token."
|
||||||
msgstr ""
|
msgstr "אימות דו-שלבי הופעל, יש להזין אסימון כניסה."
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:210
|
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:210
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unexpected error occurred while adding file to pack."
|
msgid "Unexpected error occurred while adding file to pack."
|
||||||
msgstr ""
|
msgstr "אירעה שגיאה לא צפויה בזמן הוספת הקובץ לחבילה."
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:138
|
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:138
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unexpected error occurred while creating pack."
|
msgid "Unexpected error occurred while creating pack."
|
||||||
msgstr ""
|
msgstr "אירעה שגיאה לא צפויה בזמן יצירת חבילה."
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:278
|
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:278
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unexpected error occurred while removing file from pack."
|
msgid "Unexpected error occurred while removing file from pack."
|
||||||
msgstr ""
|
msgstr "אירעה שגיאה לא צפויה בזמן הסרת הקובץ מהחבילה."
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:250
|
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:250
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unexpected error occurred while updating file in pack."
|
msgid "Unexpected error occurred while updating file in pack."
|
||||||
msgstr ""
|
msgstr "אירעה שגיאה לא צפויה בזמן עדכון הקובץ מהחבילה."
|
||||||
|
|
||||||
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:179
|
#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:179
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Unexpected error occurred while updating pack metadata."
|
msgid "Unexpected error occurred while updating pack metadata."
|
||||||
msgstr ""
|
msgstr "אירעה שגיאה לא צפויה בזמן עדכון מטא-דאטה של החבילה."
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61
|
#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Web push subscription is disabled on this Pleroma instance"
|
msgid "Web push subscription is disabled on this Pleroma instance"
|
||||||
msgstr ""
|
msgstr "הרשמה לעדכון ווב בדחיפה מבוטלת בשרת פלרומה זה"
|
||||||
|
|
||||||
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:451
|
#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:451
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "You can't revoke your own admin/moderator status."
|
msgid "You can't revoke your own admin/moderator status."
|
||||||
msgstr ""
|
msgstr "לא ניתן לשלול את סטטוס האדמין/מנהל של עצמך."
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:126
|
#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:126
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "authorization required for timeline view"
|
msgid "authorization required for timeline view"
|
||||||
msgstr ""
|
msgstr "הרשאה דרושה על מנת לצפות בציר הזמן"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:24
|
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:24
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "Access denied"
|
msgid "Access denied"
|
||||||
msgstr ""
|
msgstr "גישה נדחית"
|
||||||
|
|
||||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:282
|
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:282
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "This API requires an authenticated user"
|
msgid "This API requires an authenticated user"
|
||||||
msgstr ""
|
msgstr "ה-API דורש הרשאת משתמש"
|
||||||
|
|
||||||
#: lib/pleroma/plugs/user_is_admin_plug.ex:21
|
#: lib/pleroma/plugs/user_is_admin_plug.ex:21
|
||||||
#, elixir-format
|
#, elixir-format
|
||||||
msgid "User is not an admin."
|
msgid "User is not an admin."
|
||||||
msgstr ""
|
msgstr "משתמש אינו מנהל."
|
||||||
|
|
|
@ -47,6 +47,11 @@ defmodule Pleroma.HTML.Scrubber.Default do
|
||||||
Meta.allow_tag_with_these_attributes(:strong, [])
|
Meta.allow_tag_with_these_attributes(:strong, [])
|
||||||
Meta.allow_tag_with_these_attributes(:sub, [])
|
Meta.allow_tag_with_these_attributes(:sub, [])
|
||||||
Meta.allow_tag_with_these_attributes(:sup, [])
|
Meta.allow_tag_with_these_attributes(:sup, [])
|
||||||
|
Meta.allow_tag_with_these_attributes(:ruby, [])
|
||||||
|
Meta.allow_tag_with_these_attributes(:rb, [])
|
||||||
|
Meta.allow_tag_with_these_attributes(:rp, [])
|
||||||
|
Meta.allow_tag_with_these_attributes(:rt, [])
|
||||||
|
Meta.allow_tag_with_these_attributes(:rtc, [])
|
||||||
Meta.allow_tag_with_these_attributes(:u, [])
|
Meta.allow_tag_with_these_attributes(:u, [])
|
||||||
Meta.allow_tag_with_these_attributes(:ul, [])
|
Meta.allow_tag_with_these_attributes(:ul, [])
|
||||||
|
|
||||||
|
|
9
test/fixtures/mastodon-delete.json
vendored
9
test/fixtures/mastodon-delete.json
vendored
|
@ -2,12 +2,9 @@
|
||||||
"type": "Delete",
|
"type": "Delete",
|
||||||
"signature": {
|
"signature": {
|
||||||
"type": "RsaSignature2017",
|
"type": "RsaSignature2017",
|
||||||
"signatureValue": "cw0RlfNREf+5VdsOYcCBDrv521eiLsDTAYNHKffjF0bozhCnOh+wHkFik7WamUk$
|
"signatureValue": "cw0RlfNREf+5VdsOYcCBDrv521eiLsDTAYNHKffjF0bozhCnOh+wHkFik7WamUk$uEiN4L2H6vPlGRprAZGRhEwgy+A7rIFQNmLrpW5qV5UNVI/2F7kngEHqZQgbQYj9hW+5GMYmPkHdv3D72ZefGw$4Xa2NBLGFpAjQllfzt7kzZLKKY2DM99FdUa64I2Wj3iD04Hs23SbrUdAeuGk/c1Cg6bwGNG4vxoiwn1jikgJLA$NAlSGjsRGdR7LfbC7GqWWsW3cSNsLFPoU6FyALjgTrrYoHiXe0QHggw+L3yMLfzB2S/L46/VRbyb+WDKMBIXUL$5owmzHSi6e/ZtCI3w==",
|
||||||
uEiN4L2H6vPlGRprAZGRhEwgy+A7rIFQNmLrpW5qV5UNVI/2F7kngEHqZQgbQYj9hW+5GMYmPkHdv3D72ZefGw$
|
"creator": "http://mastodon.example.org/users/gargron#main-key",
|
||||||
4Xa2NBLGFpAjQllfzt7kzZLKKY2DM99FdUa64I2Wj3iD04Hs23SbrUdAeuGk/c1Cg6bwGNG4vxoiwn1jikgJLA$
|
"created": "2018-03-03T16:24:11Z"
|
||||||
NAlSGjsRGdR7LfbC7GqWWsW3cSNsLFPoU6FyALjgTrrYoHiXe0QHggw+L3yMLfzB2S/L46/VRbyb+WDKMBIXUL$
|
|
||||||
5owmzHSi6e/ZtCI3w==",
|
|
||||||
"creator": "http://mastodon.example.org/users/gargron#main-key", "created": "2018-03-03T16:24:11Z"
|
|
||||||
},
|
},
|
||||||
"object": {
|
"object": {
|
||||||
"type": "Tombstone",
|
"type": "Tombstone",
|
||||||
|
|
76
test/fixtures/osada-follow-activity.json
vendored
76
test/fixtures/osada-follow-activity.json
vendored
|
@ -1,56 +1,52 @@
|
||||||
{
|
{
|
||||||
"@context":[
|
"@context": [
|
||||||
"https://www.w3.org/ns/activitystreams",
|
"https://www.w3.org/ns/activitystreams",
|
||||||
"https://w3id.org/security/v1",
|
"https://w3id.org/security/v1",
|
||||||
"https://apfed.club/apschema/v1.4"
|
"https://apfed.club/apschema/v1.4"
|
||||||
],
|
],
|
||||||
"id":"https://apfed.club/follow/9",
|
"id": "https://apfed.club/follow/9",
|
||||||
"type":"Follow",
|
"type": "Follow",
|
||||||
"actor":{
|
"actor": {
|
||||||
"type":"Person",
|
"type": "Person",
|
||||||
"id":"https://apfed.club/channel/indio",
|
"id": "https://apfed.club/channel/indio",
|
||||||
"preferredUsername":"indio",
|
"preferredUsername": "indio",
|
||||||
"name":"Indio",
|
"name": "Indio",
|
||||||
"updated":"2019-08-20T23:52:34Z",
|
"updated": "2019-08-20T23:52:34Z",
|
||||||
"icon":{
|
"icon": {
|
||||||
"type":"Image",
|
"type": "Image",
|
||||||
"mediaType":"image/jpeg",
|
"mediaType": "image/jpeg",
|
||||||
"updated":"2019-08-20T23:53:37Z",
|
"updated": "2019-08-20T23:53:37Z",
|
||||||
"url":"https://apfed.club/photo/profile/l/2",
|
"url": "https://apfed.club/photo/profile/l/2",
|
||||||
"height":300,
|
"height": 300,
|
||||||
"width":300
|
"width": 300
|
||||||
},
|
},
|
||||||
"url":"https://apfed.club/channel/indio",
|
"url": "https://apfed.club/channel/indio",
|
||||||
"inbox":"https://apfed.club/inbox/indio",
|
"inbox": "https://apfed.club/inbox/indio",
|
||||||
"outbox":"https://apfed.club/outbox/indio",
|
"outbox": "https://apfed.club/outbox/indio",
|
||||||
"followers":"https://apfed.club/followers/indio",
|
"followers": "https://apfed.club/followers/indio",
|
||||||
"following":"https://apfed.club/following/indio",
|
"following": "https://apfed.club/following/indio",
|
||||||
"endpoints":{
|
"endpoints": {
|
||||||
"sharedInbox":"https://apfed.club/inbox"
|
"sharedInbox": "https://apfed.club/inbox"
|
||||||
},
|
},
|
||||||
"publicKey":{
|
"publicKey": {
|
||||||
"id":"https://apfed.club/channel/indio",
|
"id": "https://apfed.club/channel/indio",
|
||||||
"owner":"https://apfed.club/channel/indio",
|
"owner": "https://apfed.club/channel/indio",
|
||||||
"publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA77TIR1VuSYFnmDRFGHHb\n4vaGdx9ranzRX4bfOKAqa++Ch5L4EqJpPy08RuM+NrYCYiYl4QQFDSSDXAEgb5g9\nC1TgWTfI7q/E0UBX2Vr0mU6X4i1ztv0tuQvegRjcSJ7l1AvoBs8Ip4MEJ3OPEQhB\ngJqAACB3Gnps4zi2I0yavkxUfGVKr6zKT3BxWh5hTpKC7Do+ChIrVZC2EwxND9K6
|
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA77TIR1VuSYFnmDRFGHHb\n4vaGdx9ranzRX4bfOKAqa++Ch5L4EqJpPy08RuM+NrYCYiYl4QQFDSSDXAEgb5g9\nC1TgWTfI7q/E0UBX2Vr0mU6X4i1ztv0tuQvegRjcSJ7l1AvoBs8Ip4MEJ3OPEQhB\ngJqAACB3Gnps4zi2I0yavkxUfGVKr6zKT3BxWh5hTpKC7Do+ChIrVZC2EwxND9K6\nsAnQHThcb5EQuvuzUQZKeS7IEOsd0JpZDmJjbfMGrAWE81pLIfEeeA2joCJiBBTO\nglDsW+juvZ+lWqJpMr2hMWpvfrFjJeUawNJCIzsLdVIZR+aKj5yy6yqoS8hkN9Ha\n1MljZpsXl+EmwcwAIqim1YeLwERCEAQ/JWbSt8pQTQbzZ6ibwQ4mchCxacrRbIVR\nnL59fWMBassJcbY0VwrTugm2SBsYbDjESd55UZV03Rwr8qseGTyi+hH8O7w2SIaY\nzjN6AdZiPmsh00YflzlCk8MSLOHMol1vqIUzXxU8CdXn9+KsuQdZGrTz0YKN/db4\naVwUGJatz2Tsvf7R1tJBjJfeQWOWbbn3pycLVH86LjZ83qngp9ZVnAveUnUqz0yS\nhe+buZ6UMsfGzbIYon2bKNlz6gYTH0YPcr+cLe+29drtt0GZiXha1agbpo4RB8zE\naNL2fucF5YT0yNpbd/5WoV0CAwEAAQ==\n-----END PUBLIC KEY-----\n"
|
||||||
\nsAnQHThcb5EQuvuzUQZKeS7IEOsd0JpZDmJjbfMGrAWE81pLIfEeeA2joCJiBBTO\nglDsW+juvZ+lWqJpMr2hMWpvfrFjJeUawNJCIzsLdVIZR+aKj5yy6yqoS8hkN9Ha\n1MljZpsXl+EmwcwAIqim1YeLwERCEAQ/JWbSt8pQTQbzZ6ibwQ4mchCxacrRbIVR
|
|
||||||
\nnL59fWMBassJcbY0VwrTugm2SBsYbDjESd55UZV03Rwr8qseGTyi+hH8O7w2SIaY\nzjN6AdZiPmsh00YflzlCk8MSLOHMol1vqIUzXxU8CdXn9+KsuQdZGrTz0YKN/db4\naVwUGJatz2Tsvf7R1tJBjJfeQWOWbbn3pycLVH86LjZ83qngp9ZVnAveUnUqz0yS
|
|
||||||
\nhe+buZ6UMsfGzbIYon2bKNlz6gYTH0YPcr+cLe+29drtt0GZiXha1agbpo4RB8zE
|
|
||||||
\naNL2fucF5YT0yNpbd/5WoV0CAwEAAQ==\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"object":"https://pleroma.site/users/kaniini",
|
"object": "https://pleroma.site/users/kaniini",
|
||||||
"to":[
|
"to": [
|
||||||
"https://pleroma.site/users/kaniini"
|
"https://pleroma.site/users/kaniini"
|
||||||
],
|
],
|
||||||
"signature":{
|
"signature": {
|
||||||
"@context":[
|
"@context": [
|
||||||
"https://www.w3.org/ns/activitystreams",
|
"https://www.w3.org/ns/activitystreams",
|
||||||
"https://w3id.org/security/v1"
|
"https://w3id.org/security/v1"
|
||||||
],
|
],
|
||||||
"type":"RsaSignature2017",
|
"type": "RsaSignature2017",
|
||||||
"nonce":"52c035e0a9e81dce8b486159204e97c22637e91f75cdfad5378de91de68e9117",
|
"nonce": "52c035e0a9e81dce8b486159204e97c22637e91f75cdfad5378de91de68e9117",
|
||||||
"creator":"https://apfed.club/channel/indio/public_key_pem",
|
"creator": "https://apfed.club/channel/indio/public_key_pem",
|
||||||
"created":"2019-08-22T03:38:02Z",
|
"created": "2019-08-22T03:38:02Z",
|
||||||
"signatureValue":"oVliRCIqNIh6yUp851dYrF0y21aHp3Rz6VkIpW1pFMWfXuzExyWSfcELpyLseeRmsw5bUu9zJkH44B4G2LiJQKA9UoEQDjrDMZBmbeUpiQqq3DVUzkrBOI8bHZ7xyJ/CjSZcNHHh0MHhSKxswyxWMGi4zIqzkAZG3vRRgoPVHdjPm00sR3B8jBLw1cjoffv+KKeM/zEUpe13gqX9qHAWHHqZepxgSWmq+EKOkRvHUPBXiEJZfXzc5uW+vZ09F3WBYmaRoy8Y0e1P29fnRLqSy7EEINdrHaGclRqoUZyiawpkgy3lWWlynesV/HiLBR7EXT79eKstxf4wfTDaPKBCfTCsOWuMWHr7Genu37ew2/t7eiBGqCwwW12ylhml/OLHgNK3LOhmRABhtfpaFZSxfDVnlXfaLpY1xekVOj2oC0FpBtnoxVKLpIcyLw6dkfSil5ANd+hl59W/bpPA8KT90ii1fSNCo3+FcwQVx0YsPznJNA60XfFuVsme7zNcOst6393e1WriZxBanFpfB63zVQc9u1fjyfktx/yiUNxIlre+sz9OCc0AACn94iRhBYh4bbzdleUOTnM7lnD4Dj2FP+xeDIP8CA8wXUeq5+9kopSp2kAmlUEyFUdg4no7naIeu1SZnopfUg56PsVCp9JHiUK1SYAyWbdC+FbUECu5CvI="
|
"signatureValue": "oVliRCIqNIh6yUp851dYrF0y21aHp3Rz6VkIpW1pFMWfXuzExyWSfcELpyLseeRmsw5bUu9zJkH44B4G2LiJQKA9UoEQDjrDMZBmbeUpiQqq3DVUzkrBOI8bHZ7xyJ/CjSZcNHHh0MHhSKxswyxWMGi4zIqzkAZG3vRRgoPVHdjPm00sR3B8jBLw1cjoffv+KKeM/zEUpe13gqX9qHAWHHqZepxgSWmq+EKOkRvHUPBXiEJZfXzc5uW+vZ09F3WBYmaRoy8Y0e1P29fnRLqSy7EEINdrHaGclRqoUZyiawpkgy3lWWlynesV/HiLBR7EXT79eKstxf4wfTDaPKBCfTCsOWuMWHr7Genu37ew2/t7eiBGqCwwW12ylhml/OLHgNK3LOhmRABhtfpaFZSxfDVnlXfaLpY1xekVOj2oC0FpBtnoxVKLpIcyLw6dkfSil5ANd+hl59W/bpPA8KT90ii1fSNCo3+FcwQVx0YsPznJNA60XfFuVsme7zNcOst6393e1WriZxBanFpfB63zVQc9u1fjyfktx/yiUNxIlre+sz9OCc0AACn94iRhBYh4bbzdleUOTnM7lnD4Dj2FP+xeDIP8CA8wXUeq5+9kopSp2kAmlUEyFUdg4no7naIeu1SZnopfUg56PsVCp9JHiUK1SYAyWbdC+FbUECu5CvI="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
46
test/pleroma/activity/search_test.exs
Normal file
46
test/pleroma/activity/search_test.exs
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.Activity.SearchTest do
|
||||||
|
alias Pleroma.Activity.Search
|
||||||
|
alias Pleroma.Web.CommonAPI
|
||||||
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
use Pleroma.DataCase
|
||||||
|
|
||||||
|
test "it finds something" do
|
||||||
|
user = insert(:user)
|
||||||
|
{:ok, post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
|
||||||
|
|
||||||
|
[result] = Search.search(nil, "wednesday")
|
||||||
|
|
||||||
|
assert result.id == post.id
|
||||||
|
end
|
||||||
|
|
||||||
|
test "using plainto_tsquery on postgres < 11" do
|
||||||
|
old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
|
||||||
|
:persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
|
||||||
|
|
||||||
|
user = insert(:user)
|
||||||
|
{:ok, post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
|
||||||
|
{:ok, _post2} = CommonAPI.post(user, %{status: "it's wednesday my bros"})
|
||||||
|
|
||||||
|
# plainto doesn't understand complex queries
|
||||||
|
assert [result] = Search.search(nil, "wednesday -dudes")
|
||||||
|
|
||||||
|
assert result.id == post.id
|
||||||
|
|
||||||
|
:persistent_term.put({Pleroma.Repo, :postgres_version}, old_version)
|
||||||
|
end
|
||||||
|
|
||||||
|
test "using websearch_to_tsquery" do
|
||||||
|
user = insert(:user)
|
||||||
|
{:ok, _post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
|
||||||
|
{:ok, other_post} = CommonAPI.post(user, %{status: "it's wednesday my bros"})
|
||||||
|
|
||||||
|
assert [result] = Search.search(nil, "wednesday -dudes")
|
||||||
|
|
||||||
|
assert result.id == other_post.id
|
||||||
|
end
|
||||||
|
end
|
|
@ -431,7 +431,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
||||||
|
|
||||||
describe "/inbox" do
|
describe "/inbox" do
|
||||||
test "it inserts an incoming activity into the database", %{conn: conn} do
|
test "it inserts an incoming activity into the database", %{conn: conn} do
|
||||||
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Jason.decode!()
|
||||||
|
|
||||||
conn =
|
conn =
|
||||||
conn
|
conn
|
||||||
|
@ -459,7 +459,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-post-activity.json")
|
File.read!("test/fixtures/mastodon-post-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", user.ap_id)
|
|> Map.put("actor", user.ap_id)
|
||||||
|> put_in(["object", "attridbutedTo"], user.ap_id)
|
|> put_in(["object", "attridbutedTo"], user.ap_id)
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it clears `unreachable` federation status of the sender", %{conn: conn} do
|
test "it clears `unreachable` federation status of the sender", %{conn: conn} do
|
||||||
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Jason.decode!()
|
||||||
|
|
||||||
sender_url = data["actor"]
|
sender_url = data["actor"]
|
||||||
Instances.set_consistently_unreachable(sender_url)
|
Instances.set_consistently_unreachable(sender_url)
|
||||||
|
@ -534,8 +534,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
||||||
test "without valid signature, " <>
|
test "without valid signature, " <>
|
||||||
"it only accepts Create activities and requires enabled federation",
|
"it only accepts Create activities and requires enabled federation",
|
||||||
%{conn: conn} do
|
%{conn: conn} do
|
||||||
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/mastodon-post-activity.json") |> Jason.decode!()
|
||||||
non_create_data = File.read!("test/fixtures/mastodon-announce.json") |> Poison.decode!()
|
non_create_data = File.read!("test/fixtures/mastodon-announce.json") |> Jason.decode!()
|
||||||
|
|
||||||
conn = put_req_header(conn, "content-type", "application/activity+json")
|
conn = put_req_header(conn, "content-type", "application/activity+json")
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
||||||
setup do
|
setup do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-post-activity.json")
|
File.read!("test/fixtures/mastodon-post-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
[data: data]
|
[data: data]
|
||||||
end
|
end
|
||||||
|
@ -747,7 +747,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/activitypub-client-post-activity.json")
|
File.read!("test/fixtures/activitypub-client-post-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
object = Map.put(data["object"], "attributedTo", actor.ap_id)
|
object = Map.put(data["object"], "attributedTo", actor.ap_id)
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicyTest do
|
||||||
|
|
||||||
defp get_old_message do
|
defp get_old_message do
|
||||||
File.read!("test/fixtures/mastodon-post-activity.json")
|
File.read!("test/fixtures/mastodon-post-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_new_message do
|
defp get_new_message do
|
||||||
|
|
|
@ -22,7 +22,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do
|
||||||
|
|
||||||
accept_data =
|
accept_data =
|
||||||
File.read!("test/fixtures/mastodon-accept-activity.json")
|
File.read!("test/fixtures/mastodon-accept-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", followed.ap_id)
|
|> Map.put("actor", followed.ap_id)
|
||||||
|
|
||||||
object =
|
object =
|
||||||
|
@ -52,7 +52,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do
|
||||||
|
|
||||||
accept_data =
|
accept_data =
|
||||||
File.read!("test/fixtures/mastodon-accept-activity.json")
|
File.read!("test/fixtures/mastodon-accept-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", followed.ap_id)
|
|> Map.put("actor", followed.ap_id)
|
||||||
|> Map.put("object", follow_activity.data["id"])
|
|> Map.put("object", follow_activity.data["id"])
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do
|
||||||
|
|
||||||
accept_data =
|
accept_data =
|
||||||
File.read!("test/fixtures/mastodon-accept-activity.json")
|
File.read!("test/fixtures/mastodon-accept-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", followed.ap_id)
|
|> Map.put("actor", followed.ap_id)
|
||||||
|
|
||||||
accept_data =
|
accept_data =
|
||||||
|
|
|
@ -36,7 +36,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnnounceHandlingTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it works for incoming announces with actor being inlined (kroeg)" do
|
test "it works for incoming announces with actor being inlined (kroeg)" do
|
||||||
data = File.read!("test/fixtures/kroeg-announce-with-inline-actor.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/kroeg-announce-with-inline-actor.json") |> Jason.decode!()
|
||||||
|
|
||||||
_user = insert(:user, local: false, ap_id: data["actor"]["id"])
|
_user = insert(:user, local: false, ap_id: data["actor"]["id"])
|
||||||
other_user = insert(:user)
|
other_user = insert(:user)
|
||||||
|
@ -55,7 +55,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnnounceHandlingTest do
|
||||||
test "it works for incoming announces, fetching the announced object" do
|
test "it works for incoming announces, fetching the announced object" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-announce.json")
|
File.read!("test/fixtures/mastodon-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", "http://mastodon.example.org/users/admin/statuses/99541947525187367")
|
|> Map.put("object", "http://mastodon.example.org/users/admin/statuses/99541947525187367")
|
||||||
|
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
|
@ -90,7 +90,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnnounceHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-announce.json")
|
File.read!("test/fixtures/mastodon-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
_user = insert(:user, local: false, ap_id: data["actor"])
|
_user = insert(:user, local: false, ap_id: data["actor"])
|
||||||
|
@ -113,7 +113,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnnounceHandlingTest do
|
||||||
test "it works for incoming announces with an inlined activity" do
|
test "it works for incoming announces with an inlined activity" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-announce-private.json")
|
File.read!("test/fixtures/mastodon-announce-private.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
_user =
|
_user =
|
||||||
insert(:user,
|
insert(:user,
|
||||||
|
@ -144,7 +144,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnnounceHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/bogus-mastodon-announce.json")
|
File.read!("test/fixtures/bogus-mastodon-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
_user = insert(:user, local: false, ap_id: data["actor"])
|
_user = insert(:user, local: false, ap_id: data["actor"])
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnnounceHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-announce.json")
|
File.read!("test/fixtures/mastodon-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", Object.normalize(activity).data["id"])
|
|> Map.put("object", Object.normalize(activity).data["id"])
|
||||||
|> Map.put("to", ["http://mastodon.example.org/users/admin/followers"])
|
|> Map.put("to", ["http://mastodon.example.org/users/admin/followers"])
|
||||||
|> Map.put("cc", [])
|
|> Map.put("cc", [])
|
||||||
|
|
|
@ -31,7 +31,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnswerHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-vote.json")
|
File.read!("test/fixtures/mastodon-vote.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Kernel.put_in(["to"], user.ap_id)
|
|> Kernel.put_in(["to"], user.ap_id)
|
||||||
|> Kernel.put_in(["object", "inReplyTo"], object.data["id"])
|
|> Kernel.put_in(["object", "inReplyTo"], object.data["id"])
|
||||||
|> Kernel.put_in(["object", "to"], user.ap_id)
|
|> Kernel.put_in(["object", "to"], user.ap_id)
|
||||||
|
@ -66,7 +66,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnswerHandlingTest do
|
||||||
# TODO: Replace with CommonAPI vote creation when implemented
|
# TODO: Replace with CommonAPI vote creation when implemented
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-vote.json")
|
File.read!("test/fixtures/mastodon-vote.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Kernel.put_in(["to"], user.ap_id)
|
|> Kernel.put_in(["to"], user.ap_id)
|
||||||
|> Kernel.put_in(["object", "inReplyTo"], poll_object.data["id"])
|
|> Kernel.put_in(["object", "inReplyTo"], poll_object.data["id"])
|
||||||
|> Kernel.put_in(["object", "to"], user.ap_id)
|
|> Kernel.put_in(["object", "to"], user.ap_id)
|
||||||
|
|
|
@ -53,7 +53,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AudioHandlingTest do
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
data = File.read!("test/fixtures/tesla_mock/funkwhale_create_audio.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/tesla_mock/funkwhale_create_audio.json") |> Jason.decode!()
|
||||||
|
|
||||||
{:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.BlockHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-block-activity.json")
|
File.read!("test/fixtures/mastodon-block-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
blocker = insert(:user, ap_id: data["actor"])
|
blocker = insert(:user, ap_id: data["actor"])
|
||||||
|
@ -36,7 +36,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.BlockHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-block-activity.json")
|
File.read!("test/fixtures/mastodon-block-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", blocked.ap_id)
|
|> Map.put("object", blocked.ap_id)
|
||||||
|> Map.put("actor", blocker.ap_id)
|
|> Map.put("actor", blocker.ap_id)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
|
||||||
test "it rejects messages that don't contain content" do
|
test "it rejects messages that don't contain content" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/create-chat-message.json")
|
File.read!("test/fixtures/create-chat-message.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
object =
|
object =
|
||||||
data["object"]
|
data["object"]
|
||||||
|
@ -79,7 +79,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
|
||||||
test "it rejects messages that don't concern local users" do
|
test "it rejects messages that don't concern local users" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/create-chat-message.json")
|
File.read!("test/fixtures/create-chat-message.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
_author =
|
_author =
|
||||||
insert(:user, ap_id: data["actor"], local: false, last_refreshed_at: DateTime.utc_now())
|
insert(:user, ap_id: data["actor"], local: false, last_refreshed_at: DateTime.utc_now())
|
||||||
|
@ -97,7 +97,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
|
||||||
test "it rejects messages where the `to` field of activity and object don't match" do
|
test "it rejects messages where the `to` field of activity and object don't match" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/create-chat-message.json")
|
File.read!("test/fixtures/create-chat-message.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
author = insert(:user, ap_id: data["actor"])
|
author = insert(:user, ap_id: data["actor"])
|
||||||
_recipient = insert(:user, ap_id: List.first(data["to"]))
|
_recipient = insert(:user, ap_id: List.first(data["to"]))
|
||||||
|
@ -115,7 +115,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/create-chat-message.json")
|
File.read!("test/fixtures/create-chat-message.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", "http://mastodon.example.org/users/admin")
|
|> Map.put("actor", "http://mastodon.example.org/users/admin")
|
||||||
|> put_in(["object", "actor"], "http://mastodon.example.org/users/admin")
|
|> put_in(["object", "actor"], "http://mastodon.example.org/users/admin")
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
|
||||||
test "it doesn't work for deactivated users" do
|
test "it doesn't work for deactivated users" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/create-chat-message.json")
|
File.read!("test/fixtures/create-chat-message.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
_author =
|
_author =
|
||||||
insert(:user,
|
insert(:user,
|
||||||
|
@ -145,7 +145,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
|
||||||
test "it inserts it and creates a chat" do
|
test "it inserts it and creates a chat" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/create-chat-message.json")
|
File.read!("test/fixtures/create-chat-message.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
author =
|
author =
|
||||||
insert(:user, ap_id: data["actor"], local: false, last_refreshed_at: DateTime.utc_now())
|
insert(:user, ap_id: data["actor"], local: false, last_refreshed_at: DateTime.utc_now())
|
||||||
|
|
|
@ -25,7 +25,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-delete.json")
|
File.read!("test/fixtures/mastodon-delete.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", deleting_user.ap_id)
|
|> Map.put("actor", deleting_user.ap_id)
|
||||||
|> put_in(["object", "id"], activity.data["object"])
|
|> put_in(["object", "id"], activity.data["object"])
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-delete.json")
|
File.read!("test/fixtures/mastodon-delete.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", deleting_user.ap_id)
|
|> Map.put("actor", deleting_user.ap_id)
|
||||||
|> put_in(["object", "id"], activity.data["object"])
|
|> put_in(["object", "id"], activity.data["object"])
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-delete.json")
|
File.read!("test/fixtures/mastodon-delete.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", ap_id)
|
|> Map.put("actor", ap_id)
|
||||||
|> put_in(["object", "id"], activity.data["object"])
|
|> put_in(["object", "id"], activity.data["object"])
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-delete-user.json")
|
File.read!("test/fixtures/mastodon-delete-user.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
{:ok, _} = Transmogrifier.handle_incoming(data)
|
{:ok, _} = Transmogrifier.handle_incoming(data)
|
||||||
ObanHelpers.perform_all()
|
ObanHelpers.perform_all()
|
||||||
|
@ -104,7 +104,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-delete-user.json")
|
File.read!("test/fixtures/mastodon-delete-user.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", ap_id)
|
|> Map.put("actor", ap_id)
|
||||||
|
|
||||||
assert match?({:error, _}, Transmogrifier.handle_incoming(data))
|
assert match?({:error, _}, Transmogrifier.handle_incoming(data))
|
||||||
|
|
|
@ -19,7 +19,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/emoji-reaction.json")
|
File.read!("test/fixtures/emoji-reaction.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|> Map.put("actor", other_user.ap_id)
|
|> Map.put("actor", other_user.ap_id)
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/emoji-reaction-too-long.json")
|
File.read!("test/fixtures/emoji-reaction-too-long.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|> Map.put("actor", other_user.ap_id)
|
|> Map.put("actor", other_user.ap_id)
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/emoji-reaction-no-emoji.json")
|
File.read!("test/fixtures/emoji-reaction-no-emoji.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|> Map.put("actor", other_user.ap_id)
|
|> Map.put("actor", other_user.ap_id)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/osada-follow-activity.json")
|
File.read!("test/fixtures/osada-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false} = activity} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -47,7 +47,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false} = activity} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -69,7 +69,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -100,7 +100,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -116,7 +116,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("id", String.replace(data["id"], "2", "3"))
|
|> Map.put("id", String.replace(data["id"], "2", "3"))
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{data: %{"id" => id}}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: %{"id" => id}}} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -157,7 +157,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
with_mock Pleroma.User, [:passthrough], follow: fn _, _, _ -> {:error, :testing} end do
|
with_mock Pleroma.User, [:passthrough], follow: fn _, _, _ -> {:error, :testing} end do
|
||||||
|
@ -174,7 +174,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/hubzilla-follow-activity.json")
|
File.read!("test/fixtures/hubzilla-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|> Utils.normalize_params()
|
|> Utils.normalize_params()
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.FollowHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.LikeHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-like.json")
|
File.read!("test/fixtures/mastodon-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
_actor = insert(:user, ap_id: data["actor"], local: false)
|
_actor = insert(:user, ap_id: data["actor"], local: false)
|
||||||
|
@ -40,7 +40,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.LikeHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/misskey-like.json")
|
File.read!("test/fixtures/misskey-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
_actor = insert(:user, ap_id: data["actor"], local: false)
|
_actor = insert(:user, ap_id: data["actor"], local: false)
|
||||||
|
@ -61,7 +61,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.LikeHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/misskey-like.json")
|
File.read!("test/fixtures/misskey-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|> Map.put("_misskey_reaction", "⭐")
|
|> Map.put("_misskey_reaction", "⭐")
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.QuestionHandlingTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Mastodon Question activity" do
|
test "Mastodon Question activity" do
|
||||||
data = File.read!("test/fixtures/mastodon-question-activity.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/mastodon-question-activity.json") |> Jason.decode!()
|
||||||
|
|
||||||
{:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.QuestionHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-question-activity.json")
|
File.read!("test/fixtures/mastodon-question-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Kernel.put_in(["object", "oneOf"], options)
|
|> Kernel.put_in(["object", "oneOf"], options)
|
||||||
|
|
||||||
{:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -142,7 +142,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.QuestionHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-question-activity.json")
|
File.read!("test/fixtures/mastodon-question-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Kernel.put_in(["object", "oneOf"], options)
|
|> Kernel.put_in(["object", "oneOf"], options)
|
||||||
|> Kernel.put_in(["object", "tag"], tag)
|
|> Kernel.put_in(["object", "tag"], tag)
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.QuestionHandlingTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "returns same activity if received a second time" do
|
test "returns same activity if received a second time" do
|
||||||
data = File.read!("test/fixtures/mastodon-question-activity.json") |> Poison.decode!()
|
data = File.read!("test/fixtures/mastodon-question-activity.json") |> Jason.decode!()
|
||||||
|
|
||||||
assert {:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
assert {:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.QuestionHandlingTest do
|
||||||
test "accepts a Question with no content" do
|
test "accepts a Question with no content" do
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-question-activity.json")
|
File.read!("test/fixtures/mastodon-question-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Kernel.put_in(["object", "content"], "")
|
|> Kernel.put_in(["object", "content"], "")
|
||||||
|
|
||||||
assert {:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data)
|
assert {:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.RejectHandlingTest do
|
||||||
|
|
||||||
accept_data =
|
accept_data =
|
||||||
File.read!("test/fixtures/mastodon-reject-activity.json")
|
File.read!("test/fixtures/mastodon-reject-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", followed.ap_id)
|
|> Map.put("actor", followed.ap_id)
|
||||||
|
|
||||||
accept_data =
|
accept_data =
|
||||||
|
@ -42,7 +42,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.RejectHandlingTest do
|
||||||
|
|
||||||
reject_data =
|
reject_data =
|
||||||
File.read!("test/fixtures/mastodon-reject-activity.json")
|
File.read!("test/fixtures/mastodon-reject-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", followed.ap_id)
|
|> Map.put("actor", followed.ap_id)
|
||||||
|> Map.put("object", follow_activity.data["id"])
|
|> Map.put("object", follow_activity.data["id"])
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.RejectHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|> Map.put("id", "")
|
|> Map.put("id", "")
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-undo-like.json")
|
File.read!("test/fixtures/mastodon-undo-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", reaction_activity.data["id"])
|
|> Map.put("object", reaction_activity.data["id"])
|
||||||
|> Map.put("actor", user.ap_id)
|
|> Map.put("actor", user.ap_id)
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-undo-like.json")
|
File.read!("test/fixtures/mastodon-undo-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
assert Transmogrifier.handle_incoming(data) == :error
|
assert Transmogrifier.handle_incoming(data) == :error
|
||||||
|
@ -50,7 +50,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
like_data =
|
like_data =
|
||||||
File.read!("test/fixtures/mastodon-like.json")
|
File.read!("test/fixtures/mastodon-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
_liker = insert(:user, ap_id: like_data["actor"], local: false)
|
_liker = insert(:user, ap_id: like_data["actor"], local: false)
|
||||||
|
@ -59,7 +59,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-undo-like.json")
|
File.read!("test/fixtures/mastodon-undo-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", like_data)
|
|> Map.put("object", like_data)
|
||||||
|> Map.put("actor", like_data["actor"])
|
|> Map.put("actor", like_data["actor"])
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
like_data =
|
like_data =
|
||||||
File.read!("test/fixtures/mastodon-like.json")
|
File.read!("test/fixtures/mastodon-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
_liker = insert(:user, ap_id: like_data["actor"], local: false)
|
_liker = insert(:user, ap_id: like_data["actor"], local: false)
|
||||||
|
@ -90,7 +90,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-undo-like.json")
|
File.read!("test/fixtures/mastodon-undo-like.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", like_data["id"])
|
|> Map.put("object", like_data["id"])
|
||||||
|> Map.put("actor", like_data["actor"])
|
|> Map.put("actor", like_data["actor"])
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
announce_data =
|
announce_data =
|
||||||
File.read!("test/fixtures/mastodon-announce.json")
|
File.read!("test/fixtures/mastodon-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|
|
||||||
_announcer = insert(:user, ap_id: announce_data["actor"], local: false)
|
_announcer = insert(:user, ap_id: announce_data["actor"], local: false)
|
||||||
|
@ -118,7 +118,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-undo-announce.json")
|
File.read!("test/fixtures/mastodon-undo-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", announce_data)
|
|> Map.put("object", announce_data)
|
||||||
|> Map.put("actor", announce_data["actor"])
|
|> Map.put("actor", announce_data["actor"])
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
follow_data =
|
follow_data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
_follower = insert(:user, ap_id: follow_data["actor"], local: false)
|
_follower = insert(:user, ap_id: follow_data["actor"], local: false)
|
||||||
|
@ -144,7 +144,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-unfollow-activity.json")
|
File.read!("test/fixtures/mastodon-unfollow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", follow_data)
|
|> Map.put("object", follow_data)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
@ -162,7 +162,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
block_data =
|
block_data =
|
||||||
File.read!("test/fixtures/mastodon-block-activity.json")
|
File.read!("test/fixtures/mastodon-block-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
_blocker = insert(:user, ap_id: block_data["actor"], local: false)
|
_blocker = insert(:user, ap_id: block_data["actor"], local: false)
|
||||||
|
@ -171,7 +171,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-unblock-activity.json")
|
File.read!("test/fixtures/mastodon-unblock-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", block_data)
|
|> Map.put("object", block_data)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
|
@ -14,7 +14,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
|
||||||
test "it works for incoming update activities" do
|
test "it works for incoming update activities" do
|
||||||
user = insert(:user, local: false)
|
user = insert(:user, local: false)
|
||||||
|
|
||||||
update_data = File.read!("test/fixtures/mastodon-update.json") |> Poison.decode!()
|
update_data = File.read!("test/fixtures/mastodon-update.json") |> Jason.decode!()
|
||||||
|
|
||||||
object =
|
object =
|
||||||
update_data["object"]
|
update_data["object"]
|
||||||
|
@ -58,7 +58,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
|
||||||
{:ok, _activity} =
|
{:ok, _activity} =
|
||||||
"test/fixtures/mastodon-update.json"
|
"test/fixtures/mastodon-update.json"
|
||||||
|> File.read!()
|
|> File.read!()
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("actor", actor)
|
|> Map.put("actor", actor)
|
||||||
|> Map.update!("object", fn object ->
|
|> Map.update!("object", fn object ->
|
||||||
object
|
object
|
||||||
|
@ -82,7 +82,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
|
||||||
|
|
||||||
assert user.fields == []
|
assert user.fields == []
|
||||||
|
|
||||||
update_data = File.read!("test/fixtures/mastodon-update.json") |> Poison.decode!()
|
update_data = File.read!("test/fixtures/mastodon-update.json") |> Jason.decode!()
|
||||||
|
|
||||||
object =
|
object =
|
||||||
update_data["object"]
|
update_data["object"]
|
||||||
|
@ -138,7 +138,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
|
||||||
test "it works for incoming update activities which lock the account" do
|
test "it works for incoming update activities which lock the account" do
|
||||||
user = insert(:user, local: false)
|
user = insert(:user, local: false)
|
||||||
|
|
||||||
update_data = File.read!("test/fixtures/mastodon-update.json") |> Poison.decode!()
|
update_data = File.read!("test/fixtures/mastodon-update.json") |> Jason.decode!()
|
||||||
|
|
||||||
object =
|
object =
|
||||||
update_data["object"]
|
update_data["object"]
|
||||||
|
|
|
@ -31,14 +31,14 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
||||||
|
|
||||||
follow_data =
|
follow_data =
|
||||||
File.read!("test/fixtures/mastodon-follow-activity.json")
|
File.read!("test/fixtures/mastodon-follow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", user.ap_id)
|
|> Map.put("object", user.ap_id)
|
||||||
|
|
||||||
{:ok, %Activity{data: _, local: false}} = Transmogrifier.handle_incoming(follow_data)
|
{:ok, %Activity{data: _, local: false}} = Transmogrifier.handle_incoming(follow_data)
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-unfollow-activity.json")
|
File.read!("test/fixtures/mastodon-unfollow-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", follow_data)
|
|> Map.put("object", follow_data)
|
||||||
|
|
||||||
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
|
||||||
|
|
|
@ -164,7 +164,7 @@ defmodule Pleroma.Web.FederatorTest do
|
||||||
|
|
||||||
params =
|
params =
|
||||||
File.read!("test/fixtures/mastodon-post-activity.json")
|
File.read!("test/fixtures/mastodon-post-activity.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|
|
||||||
assert {:ok, job} = Federator.incoming_ap_doc(params)
|
assert {:ok, job} = Federator.incoming_ap_doc(params)
|
||||||
assert {:error, _} = ObanHelpers.perform(job)
|
assert {:error, _} = ObanHelpers.perform(job)
|
||||||
|
|
|
@ -279,6 +279,9 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
|
test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
|
||||||
|
old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
|
||||||
|
:persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
|
||||||
|
|
||||||
capture_log(fn ->
|
capture_log(fn ->
|
||||||
{:ok, %{id: activity_id}} =
|
{:ok, %{id: activity_id}} =
|
||||||
CommonAPI.post(insert(:user), %{
|
CommonAPI.post(insert(:user), %{
|
||||||
|
@ -295,6 +298,8 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
|
||||||
%{"id" => ^activity_id}
|
%{"id" => ^activity_id}
|
||||||
] = results["statuses"]
|
] = results["statuses"]
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
:persistent_term.put({Pleroma.Repo, :postgres_version}, old_version)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "search doesn't show statuses that it shouldn't", %{conn: conn} do
|
test "search doesn't show statuses that it shouldn't", %{conn: conn} do
|
||||||
|
|
|
@ -83,7 +83,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
|
||||||
|
|
||||||
redirect_query = URI.parse(redirected_to(conn)).query
|
redirect_query = URI.parse(redirected_to(conn)).query
|
||||||
assert %{"state" => state_param} = URI.decode_query(redirect_query)
|
assert %{"state" => state_param} = URI.decode_query(redirect_query)
|
||||||
assert {:ok, state_components} = Poison.decode(state_param)
|
assert {:ok, state_components} = Jason.decode(state_param)
|
||||||
|
|
||||||
expected_client_id = app.client_id
|
expected_client_id = app.client_id
|
||||||
expected_redirect_uri = app.redirect_uris
|
expected_redirect_uri = app.redirect_uris
|
||||||
|
@ -117,7 +117,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
|
||||||
"oauth_token" => "G-5a3AAAAAAAwMH9AAABaektfSM",
|
"oauth_token" => "G-5a3AAAAAAAwMH9AAABaektfSM",
|
||||||
"oauth_verifier" => "QZl8vUqNvXMTKpdmUnGejJxuHG75WWWs",
|
"oauth_verifier" => "QZl8vUqNvXMTKpdmUnGejJxuHG75WWWs",
|
||||||
"provider" => "twitter",
|
"provider" => "twitter",
|
||||||
"state" => Poison.encode!(state_params)
|
"state" => Jason.encode!(state_params)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
|
||||||
"oauth_token" => "G-5a3AAAAAAAwMH9AAABaektfSM",
|
"oauth_token" => "G-5a3AAAAAAAwMH9AAABaektfSM",
|
||||||
"oauth_verifier" => "QZl8vUqNvXMTKpdmUnGejJxuHG75WWWs",
|
"oauth_verifier" => "QZl8vUqNvXMTKpdmUnGejJxuHG75WWWs",
|
||||||
"provider" => "twitter",
|
"provider" => "twitter",
|
||||||
"state" => Poison.encode!(state_params)
|
"state" => Jason.encode!(state_params)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
|
||||||
"oauth_token" => "G-5a3AAAAAAAwMH9AAABaektfSM",
|
"oauth_token" => "G-5a3AAAAAAAwMH9AAABaektfSM",
|
||||||
"oauth_verifier" => "QZl8vUqNvXMTKpdmUnGejJxuHG75WWWs",
|
"oauth_verifier" => "QZl8vUqNvXMTKpdmUnGejJxuHG75WWWs",
|
||||||
"provider" => "twitter",
|
"provider" => "twitter",
|
||||||
"state" => Poison.encode!(state_params)
|
"state" => Jason.encode!(state_params)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@ defmodule Pleroma.Web.StreamerTest do
|
||||||
|
|
||||||
data =
|
data =
|
||||||
File.read!("test/fixtures/mastodon-announce.json")
|
File.read!("test/fixtures/mastodon-announce.json")
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.put("object", activity.data["object"])
|
|> Map.put("object", activity.data["object"])
|
||||||
|> Map.put("actor", user.ap_id)
|
|> Map.put("actor", user.ap_id)
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,8 @@ defmodule Pleroma.Tests.Helpers do
|
||||||
assigns = Map.new(assigns)
|
assigns = Map.new(assigns)
|
||||||
|
|
||||||
view.render(template, assigns)
|
view.render(template, assigns)
|
||||||
|> Poison.encode!()
|
|> Jason.encode!()
|
||||||
|> Poison.decode!()
|
|> Jason.decode!()
|
||||||
end
|
end
|
||||||
|
|
||||||
def stringify_keys(nil), do: nil
|
def stringify_keys(nil), do: nil
|
||||||
|
|
Loading…
Reference in a new issue