"text/markdown",
"text/bbcode"
],
+ mrf_transparency: true,
+ mrf_transparency_exclusions: [],
+ staff_transparency: [],
autofollowed_nicknames: [],
autofollowing_nicknames: [],
max_pinned_statuses: 1,
headers: [],
options: []
- config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil
+ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
+ script_path: nil,
+ url_format: nil
# Note: media preview proxy depends on media proxy to be enabled
config :pleroma, :media_preview_proxy,
queues: [
activity_expiration: 10,
token_expiration: 5,
+ filter_expiration: 1,
backup: 1,
federator_incoming: 50,
federator_outgoing: 50,
base_path: "/oauth",
providers: ueberauth_providers
- config :pleroma,
- :auth,
- enforce_oauth_admin_scope_usage: true,
- oauth_consumer_strategies: oauth_consumer_strategies
+ config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
"git" => "https://git.pleroma.social/pleroma/fedi-fe",
"build_url" =>
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
- "ref" => "master"
+ "ref" => "master",
+ "custom-http-headers" => [
+ {"service-worker-allowed", "/"}
+ ]
},
"admin-fe" => %{
"name" => "admin-fe",
end
end
- def run(["toggle_activated", nickname]) do
- start_pleroma()
-
- with %User{} = user <- User.get_cached_by_nickname(nickname) do
- {:ok, user} = User.deactivate(user, !user.deactivated)
-
- shell_info(
- "Activation status of #{nickname}: #{if(user.deactivated, do: "de", else: "")}activated"
- )
- else
- _ ->
- shell_error("No user #{nickname}")
- end
- end
-
def run(["reset_password", nickname]) do
start_pleroma()
end
end
+ def run(["activate", nickname]) do
+ start_pleroma()
+
+ with %User{} = user <- User.get_cached_by_nickname(nickname),
+ false <- user.is_active do
+ User.set_activation(user, true)
+ :timer.sleep(500)
+
+ shell_info("Successfully activated #{nickname}")
+ else
+ true ->
+ shell_info("User #{nickname} already activated")
+
+ _ ->
+ shell_error("No user #{nickname}")
+ end
+ end
+
def run(["deactivate", nickname]) do
start_pleroma()
- with %User{} = user <- User.get_cached_by_nickname(nickname) do
- shell_info("Deactivating #{user.nickname}")
- User.deactivate(user)
+ with %User{} = user <- User.get_cached_by_nickname(nickname),
+ true <- user.is_active do
+ User.set_activation(user, false)
:timer.sleep(500)
user = User.get_cached_by_id(user.id)
if Enum.empty?(Enum.filter(User.get_friends(user), & &1.local)) do
- shell_info("Successfully unsubscribed all local followers from #{user.nickname}")
+ shell_info("Successfully deactivated #{nickname} and unsubscribed all local followers")
end
else
+ false ->
+ shell_info("User #{nickname} already deactivated")
+
_ ->
shell_error("No user #{nickname}")
end
end
end
+ def run(["change_email", nickname, email]) do
+ start_pleroma()
+
+ with %User{} = user <- User.get_cached_by_nickname(nickname) do
+ user
+ |> User.update_changeset(%{"email" => email})
+ |> User.update_and_set_cache()
+
+ shell_info("#{nickname}'s email updated")
+ end
+ end
+
+ def run(["show", nickname]) do
+ start_pleroma()
+
+ nickname
+ |> User.get_cached_by_nickname()
+ |> IO.inspect()
+ end
+
+ def run(["send_confirmation", nickname]) do
+ start_pleroma()
+
+ with %User{} = user <- User.get_cached_by_nickname(nickname) do
+ user
+ |> Pleroma.Emails.UserEmail.account_confirmation_email()
+ |> IO.inspect()
+ |> Pleroma.Emails.Mailer.deliver!()
+
+ shell_info("#{nickname}'s email sent")
+ end
+ end
+
def run(["confirm", nickname]) do
start_pleroma()
Pleroma.User.Query.build(%{
local: true,
- deactivated: false,
+ is_active: true,
is_moderator: false,
is_admin: false,
invisible: false
Pleroma.User.Query.build(%{
local: true,
- deactivated: false,
+ is_active: true,
is_moderator: false,
is_admin: false,
invisible: false
shell_info(
"#{user.nickname} moderator: #{user.is_moderator}, admin: #{user.is_admin}, locked: #{
user.is_locked
- }, deactivated: #{user.deactivated}"
+ }, is_active: #{user.is_active}"
)
end)
end)
# InstanceStatic needs to be before Plug.Static to be able to override shipped-static files
# If you're adding new paths to `only:` you'll need to configure them in InstanceStatic as well
# Cache-control headers are duplicated in case we turn off etags in the future
+ plug(
+ Pleroma.Web.Plugs.InstanceStatic,
+ at: "/",
+ from: :pleroma,
+ only: ["emoji", "images"],
+ gzip: true,
+ cache_control_for_etags: "public, max-age=1209600",
+ headers: %{
+ "cache-control" => "public, max-age=1209600"
+ }
+ )
+
plug(Pleroma.Web.Plugs.InstanceStatic,
at: "/",
gzip: true,
}
)
+ plug(Plug.Static.IndexHtml, at: "/pleroma/fedife/")
+
+ plug(Pleroma.Web.Plugs.FrontendStatic,
+ at: "/pleroma/fedife",
+ frontend_type: :fedife,
+ gzip: true,
+ cache_control_for_etags: @static_cache_control,
+ headers: %{
+ "cache-control" => @static_cache_control
+ }
+ )
+
+
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest