forked from AkkomaGang/akkoma
Merge branch 'develop' of https://akkoma.dev/AkkomaGang/akkoma into akko.wtf
This commit is contained in:
commit
d6ac8cb457
42 changed files with 31440 additions and 20612 deletions
|
@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
## Added
|
||||
- Implement [FEP-67ff](https://codeberg.org/fediverse/fep/src/branch/main/fep/67ff/fep-67ff.md) (federation documentation)
|
||||
- Meilisearch: it is now possible to use separate keys for search and admin actions
|
||||
- New standalone `prune_orphaned_activities` mix task with configurable batch limit
|
||||
- The `prune_objects` mix task now accepts a `--limit` parameter for initial object pruning
|
||||
|
||||
## Fixed
|
||||
- Meilisearch: order of results returned from our REST API now actually matches how Meilisearch ranks results
|
||||
|
@ -112,8 +114,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Akkoma API is now documented
|
||||
- ability to auto-approve follow requests from users you are already following
|
||||
- The SimplePolicy MRF can now strip user backgrounds from selected remote hosts
|
||||
- New standalone `prune_orphaned_activities` mix task with configurable batch limit
|
||||
- The `prune_objects` mix task now accepts a `--limit` parameter for initial object pruning
|
||||
|
||||
## Changed
|
||||
- OTP builds are now built on erlang OTP26
|
||||
|
|
|
@ -12,26 +12,22 @@ example.tld {
|
|||
output file /var/log/caddy/akkoma.log
|
||||
}
|
||||
|
||||
encode gzip
|
||||
|
||||
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
|
||||
# and `localhost.` resolves to [::0] on some systems: see issue #930
|
||||
reverse_proxy 127.0.0.1:4000
|
||||
|
||||
# Uncomment if using a separate media subdomain
|
||||
#@mediaproxy path /media/* /proxy/*
|
||||
#handle @mediaproxy {
|
||||
# redir https://media.example.tld{uri} permanent
|
||||
#}
|
||||
@mediaproxy path /media/* /proxy/*
|
||||
handle @mediaproxy {
|
||||
redir https://media.example.tld{uri} permanent
|
||||
}
|
||||
}
|
||||
|
||||
# Uncomment if using a separate media subdomain
|
||||
#media.example.tld {
|
||||
# @mediaproxy path /media/* /proxy/*
|
||||
# reverse_proxy @mediaproxy 127.0.0.1:4000 {
|
||||
# transport http {
|
||||
# response_header_timeout 10s
|
||||
# read_timeout 15s
|
||||
# }
|
||||
# }
|
||||
#}
|
||||
media.example.tld {
|
||||
@mediaproxy path /media/* /proxy/*
|
||||
reverse_proxy @mediaproxy 127.0.0.1:4000 {
|
||||
transport http {
|
||||
response_header_timeout 10s
|
||||
read_timeout 15s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do
|
|||
if function_exported?(policy, :config_description, 0) do
|
||||
description =
|
||||
@default_description
|
||||
|> Map.merge(policy.config_description)
|
||||
|> Map.merge(policy.config_description())
|
||||
|> Map.put(:group, :pleroma)
|
||||
|> Map.put(:tab, :mrf)
|
||||
|> Map.put(:type, :group)
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
||||
xmlns:statusnet="http://status.net/schema/api/1/">
|
||||
|
||||
<id><%= '#{url(~p"/tags/#{@tag}")}.rss' %></id>
|
||||
<id><%= "#{url(~p"/tags/#{@tag}")}.rss" %></id>
|
||||
<title>#<%= @tag %></title>
|
||||
|
||||
<subtitle><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></subtitle>
|
||||
<logo><%= feed_logo() %></logo>
|
||||
<updated><%= most_recent_update(@activities) %></updated>
|
||||
<link rel="self" href="<%= '#{url(~p"/tags/#{@tag}")}.atom' %>" type="application/atom+xml"/>
|
||||
<link rel="self" href="<%= "#{url(~p"/tags/#{@tag}")}.atom" %>" type="application/atom+xml"/>
|
||||
<%= for activity <- @activities do %>
|
||||
<%= render @view_module, "_tag_activity.atom", Map.merge(assigns, prepare_activity(activity, actor: true)) %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<title>#<%= @tag %></title>
|
||||
<description><%= Gettext.dpgettext("static_pages", "tag feed description", "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse.", tag: @tag) %></description>
|
||||
<link><%= '#{url(~p"/tags/#{@tag}")}.rss' %></link>
|
||||
<link><%= "#{url(~p"/tags/#{@tag}")}.rss" %></link>
|
||||
<webfeeds:logo><%= feed_logo() %></webfeeds:logo>
|
||||
<webfeeds:accentColor>2b90d9</webfeeds:accentColor>
|
||||
<%= for activity <- @activities do %>
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
<title><%= @user.nickname <> "'s timeline" %></title>
|
||||
<updated><%= most_recent_update(@activities, @user) %></updated>
|
||||
<logo><%= logo(@user) %></logo>
|
||||
<link rel="self" href="<%= '#{url(~p"/users/#{@user.nickname}/feed")}.atom' %>" type="application/atom+xml"/>
|
||||
<link rel="self" href="<%= "#{url(~p"/users/#{@user.nickname}/feed")}.atom" %>" type="application/atom+xml"/>
|
||||
|
||||
<%= render @view_module, "_author.atom", assigns %>
|
||||
|
||||
<%= if last_activity(@activities) do %>
|
||||
<link rel="next" href="<%= '#{url(~p"/users/#{@user.nickname}/feed")}.atom?max_id=#{last_activity(@activities).id}' %>" type="application/atom+xml"/>
|
||||
<link rel="next" href="<%= "#{url(~p"/users/#{@user.nickname}/feed")}.atom?max_id=#{last_activity(@activities).id}" %>" type="application/atom+xml"/>
|
||||
<% end %>
|
||||
|
||||
<%= for activity <- @activities do %>
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
<title><%= @user.nickname <> "'s timeline" %></title>
|
||||
<updated><%= most_recent_update(@activities, @user) %></updated>
|
||||
<image><%= logo(@user) %></image>
|
||||
<link><%= '#{url(~p"/users/#{@user.nickname}/feed")}.rss' %></link>
|
||||
<link><%= "#{url(~p"/users/#{@user.nickname}/feed")}.rss" %></link>
|
||||
|
||||
<%= render @view_module, "_author.rss", assigns %>
|
||||
|
||||
<%= if last_activity(@activities) do %>
|
||||
<link rel="next"><%= '#{url(~p"/users/#{@user.nickname}/feed")}.rss?max_id=#{last_activity(@activities).id}' %></link>
|
||||
<link rel="next"><%= "#{url(~p"/users/#{@user.nickname}/feed")}.rss?max_id=#{last_activity(@activities).id}" %></link>
|
||||
<% end %>
|
||||
|
||||
<%= for activity <- @activities do %>
|
||||
|
|
|
@ -5,8 +5,8 @@ msgstr ""
|
|||
"POT-Creation-Date: 2022-07-28 09:35+0000\n"
|
||||
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||
"Language-Team: Catalan <http://translate.akkoma.dev/projects/akkoma/"
|
||||
"akkoma-backend-config-descriptions/ca/>\n"
|
||||
"Language-Team: Catalan <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||
"backend-config-descriptions/ca/>\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,8 @@ msgstr ""
|
|||
"POT-Creation-Date: 2022-08-06 22:23+0000\n"
|
||||
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||
"Language-Team: Spanish <http://translate.akkoma.dev/projects/akkoma/"
|
||||
"akkoma-backend-config-descriptions/es/>\n"
|
||||
"Language-Team: Spanish <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||
"backend-config-descriptions/es/>\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,8 @@ msgstr ""
|
|||
"POT-Creation-Date: 2022-08-06 21:54+0000\n"
|
||||
"PO-Revision-Date: 2023-08-04 14:26+0000\n"
|
||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||
"Language-Team: Dutch <http://translate.akkoma.dev/projects/akkoma/"
|
||||
"akkoma-backend-config-descriptions/nl/>\n"
|
||||
"Language-Team: Dutch <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||
"backend-config-descriptions/nl/>\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,8 @@ msgstr ""
|
|||
"POT-Creation-Date: 2023-07-07 18:47+0000\n"
|
||||
"PO-Revision-Date: 2023-08-04 14:19+0000\n"
|
||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||
"Language-Team: Thai <http://translate.akkoma.dev/projects/akkoma/"
|
||||
"akkoma-backend-config-descriptions/th/>\n"
|
||||
"Language-Team: Thai <http://translate.akkoma.dev/projects/akkoma/akkoma-"
|
||||
"backend-config-descriptions/th/>\n"
|
||||
"Language: th\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,12 +1,10 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddContextIndex do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:activities, ["(data->>'type')", "(data->>'context')"],
|
||||
name: :activities_context_index,
|
||||
concurrently: true
|
||||
name: :activities_context_index
|
||||
)
|
||||
)
|
||||
end
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddFTSIndexToActivities do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"],
|
||||
concurrently: true,
|
||||
using: :gin,
|
||||
name: :activities_fts
|
||||
)
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddTagIndex do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:activities, ["(data #> '{\"object\",\"tag\"}')"],
|
||||
concurrently: true,
|
||||
using: :gin,
|
||||
name: :activities_tags
|
||||
)
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddSecondObjectIndexToActivty do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
drop_if_exists(
|
||||
index(:activities, ["(data->'object'->>'id')", "(data->>'type')"],
|
||||
|
@ -12,8 +10,7 @@ defmodule Pleroma.Repo.Migrations.AddSecondObjectIndexToActivty do
|
|||
|
||||
create(
|
||||
index(:activities, ["(coalesce(data->'object'->>'id', data->>'object'))"],
|
||||
name: :activities_create_objects_index,
|
||||
concurrently: true
|
||||
name: :activities_create_objects_index
|
||||
)
|
||||
)
|
||||
end
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddObjectActorIndex do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:objects, ["(data->>'actor')", "(data->>'type')"],
|
||||
concurrently: true,
|
||||
name: :objects_actor_type
|
||||
)
|
||||
)
|
||||
create(index(:objects, ["(data->>'actor')", "(data->>'type')"], name: :objects_actor_type))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddActorToActivity do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def up do
|
||||
alter table(:activities) do
|
||||
add(:actor, :string)
|
||||
end
|
||||
|
||||
create(index(:activities, [:actor, "id DESC NULLS LAST"], concurrently: true))
|
||||
create(index(:activities, [:actor, "id DESC NULLS LAST"]))
|
||||
end
|
||||
|
||||
def down do
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddSortIndexToActivities do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(index(:activities, ["id desc nulls last"], concurrently: true))
|
||||
create(index(:activities, ["id desc nulls last"]))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddFollowerAddressIndexToUsers do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
def change do
|
||||
create(index(:users, [:follower_address], concurrently: true))
|
||||
create(index(:users, [:following], concurrently: true, using: :gin))
|
||||
create(index(:users, [:follower_address]))
|
||||
create(index(:users, [:following], using: :gin))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
defmodule Pleroma.Repo.Migrations.ModifyActivityIndex do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(index(:activities, ["id desc nulls last", "local"], concurrently: true))
|
||||
create(index(:activities, ["id desc nulls last", "local"]))
|
||||
drop_if_exists(index(:activities, ["id desc nulls last"]))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.CreateApidHostExtractionIndex do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:activities, ["(split_part(actor, '/', 3))"],
|
||||
concurrently: true,
|
||||
name: :activities_hosts
|
||||
)
|
||||
)
|
||||
create(index(:activities, ["(split_part(actor, '/', 3))"], name: :activities_hosts))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.CreateActivitiesInReplyToIndex do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:activities, ["(data->'object'->>'inReplyTo')"],
|
||||
concurrently: true,
|
||||
name: :activities_in_reply_to
|
||||
)
|
||||
)
|
||||
create(index(:activities, ["(data->'object'->>'inReplyTo')"], name: :activities_in_reply_to))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def up do
|
||||
definition = """
|
||||
|
@ -30,8 +29,7 @@ defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
|
|||
|
||||
create(
|
||||
index(:activities, ["activity_visibility(actor, recipients, data)"],
|
||||
name: :activities_visibility_index,
|
||||
concurrently: true
|
||||
name: :activities_visibility_index
|
||||
)
|
||||
)
|
||||
end
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddActivitiesLikesIndex do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def change do
|
||||
create(
|
||||
index(:activities, ["((data #> '{\"object\",\"likes\"}'))"],
|
||||
concurrently: true,
|
||||
name: :activities_likes,
|
||||
using: :gin
|
||||
)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddCorrectDMIndex do
|
||||
use Ecto.Migration
|
||||
@disable_ddl_transaction true
|
||||
|
||||
def up do
|
||||
drop_if_exists(
|
||||
|
@ -12,7 +11,6 @@ defmodule Pleroma.Repo.Migrations.AddCorrectDMIndex do
|
|||
create(
|
||||
index(:activities, ["activity_visibility(actor, recipients, data)", "id DESC NULLS LAST"],
|
||||
name: :activities_visibility_index,
|
||||
concurrently: true,
|
||||
where: "data->>'type' = 'Create'"
|
||||
)
|
||||
)
|
||||
|
@ -22,7 +20,6 @@ defmodule Pleroma.Repo.Migrations.AddCorrectDMIndex do
|
|||
drop_if_exists(
|
||||
index(:activities, ["activity_visibility(actor, recipients, data)", "id DESC"],
|
||||
name: :activities_visibility_index,
|
||||
concurrently: true,
|
||||
where: "data->>'type' = 'Create'"
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddIndexOnSubscribers do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
def change do
|
||||
create(
|
||||
index(:users, ["(info->'subscribers')"],
|
||||
name: :users_subscribers_index,
|
||||
using: :gin,
|
||||
concurrently: true
|
||||
using: :gin
|
||||
)
|
||||
)
|
||||
end
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddFollowingAddressIndexToUser do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
def change do
|
||||
create(index(:users, [:following_address], concurrently: true))
|
||||
create(index(:users, [:following_address]))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -100,7 +100,7 @@ defmodule Pleroma.Repo.Migrations.FixBlockedFollows do
|
|||
|
||||
"users"
|
||||
|> where(id: ^user_id)
|
||||
|> join(:inner, [u], s in subquery(follower_count_query))
|
||||
|> join(:inner, [u], s in subquery(follower_count_query), on: true)
|
||||
|> update([u, s],
|
||||
set: [follower_count: s.count]
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue