--- /dev/null
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Mix.Tasks.Pleroma.Activity do
+ alias Pleroma.Activity
+ require Logger
+ import Mix.Pleroma
+ use Mix.Task
+
+ @shortdoc "A collection of activity debug tasks"
+ @moduledoc """
+ A collection of activity related tasks
+
+ mix pleroma.activity get <id>
+ """
+ def run(["get", id | _rest]) do
+ start_pleroma()
++
+ id
+ |> Activity.get_by_id()
+ |> IO.inspect()
+ end
+end
end
end
- user
- |> User.update_changeset(%{"email" => email})
- |> User.update_and_set_cache()
- shell_info("#{nickname}'s email updated")
+ def run(["change_email", nickname, email]) do
+ start_pleroma()
++
+ with %User{} = user <- User.get_cached_by_nickname(nickname) do
- |> IO.inspect
++ 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()
- user
- |> Pleroma.Emails.UserEmail.account_confirmation_email()
- |> IO.inspect
- |> Pleroma.Emails.Mailer.deliver!()
- shell_info("#{nickname}'s email sent")
++ |> 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(["toggle_confirmed", nickname]) do
start_pleroma()
staff_accounts =
User.all_superusers()
|> Enum.map(fn u -> u.ap_id end)
+ |> Enum.filter(fn u -> not Enum.member?(Config.get([:instance, :staff_transparency]), u) end)
- federation_response =
- if Config.get([:instance, :mrf_transparency]) do
- {:ok, data} = MRF.describe()
-
- data
- |> Map.merge(%{quarantined_instances: quarantined})
- else
- %{}
- end
- |> Map.put(:enabled, Config.get([:instance, :federating]))
-
- features =
- [
- "pleroma_api",
- "mastodon_api",
- "mastodon_api_streaming",
- "polls",
- "pleroma_explicit_addressing",
- "shareable_emoji_packs",
- "multifetch",
- "pleroma:api/v1/notifications:include_types_filter",
- if Config.get([:media_proxy, :enabled]) do
- "media_proxy"
- end,
- if Config.get([:gopher, :enabled]) do
- "gopher"
- end,
- if Config.get([:chat, :enabled]) do
- "chat"
- end,
- if Config.get([:instance, :allow_relay]) do
- "relay"
- end,
- if Config.get([:instance, :safe_dm_mentions]) do
- "safe_dm_mentions"
- end,
- "pleroma_emoji_reactions"
- ]
- |> Enum.filter(& &1)
+ features = InstanceView.features()
+ federation = InstanceView.federation()
%{
version: "2.0",
- <!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link rel=stylesheet href=/static/font/css/lato.css><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link rel=stylesheet href=/static/font/css/lato.css><link href=/static/css/vendors~app.b2603a50868c68a1c192.css rel=stylesheet><link href=/static/css/app.1055039ce3f2fe4dd110.css rel=stylesheet><link href=/static/fontello.1588196596336.css rel=stylesheet></head><body class=hidden><noscript>To use Pleroma, please enable JavaScript.</noscript><div id=app></div><script type=text/javascript src=/static/js/vendors~app.de343579e844e698d456.js></script><script type=text/javascript src=/static/js/app.e689136d879ca1c869c6.js></script></body></html>
-<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link href=/static/css/vendors~app.18fea621d430000acc27.css rel=stylesheet><link href=/static/css/app.613cef07981cd95ccceb.css rel=stylesheet><link href=/static/fontello.1588419330867.css rel=stylesheet></head><body class=hidden><noscript>To use Pleroma, please enable JavaScript.</noscript><div id=app></div><script type=text/javascript src=/static/js/vendors~app.8aa781e6dd81307f544b.js></script><script type=text/javascript src=/static/js/app.fa89b90e606f4facd209.js></script></body></html>
++<<<<<<< HEAD
++<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link rel=stylesheet href=/static/font/css/lato.css><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link rel=stylesheet href=/static/font/css/lato.css><link href=/static/css/vendors~app.b2603a50868c68a1c192.css rel=stylesheet><link href=/static/css/app.1055039ce3f2fe4dd110.css rel=stylesheet><link href=/static/fontello.1588196596336.css rel=stylesheet></head><body class=hidden><noscript>To use Pleroma, please enable JavaScript.</noscript><div id=app></div><script type=text/javascript src=/static/js/vendors~app.de343579e844e698d456.js></script><script type=text/javascript src=/static/js/app.e689136d879ca1c869c6.js></script></body></html>
++=======
++<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link href=/static/css/vendors~app.18fea621d430000acc27.css rel=stylesheet><link href=/static/css/app.613cef07981cd95ccceb.css rel=stylesheet><link href=/static/fontello.1588419330867.css rel=stylesheet></head><body class=hidden><noscript>To use Pleroma, please enable JavaScript.</noscript><div id=app></div><script type=text/javascript src=/static/js/vendors~app.8aa781e6dd81307f544b.js></script><script type=text/javascript src=/static/js/app.fa89b90e606f4facd209.js></script></body></html>
++>>>>>>> fbcc53760e6fcd393513c05a5bd7a4a6a6f3b731
++<<<<<<< HEAD
+var serviceWorkerOption = {"assets":["/static/fontello.1588196596336.css","/static/font/fontello.1588196596336.eot","/static/font/fontello.1588196596336.svg","/static/font/fontello.1588196596336.ttf","/static/font/fontello.1588196596336.woff","/static/font/fontello.1588196596336.woff2","/static/img/nsfw.ca95de9.png","/static/css/app.1055039ce3f2fe4dd110.css","/static/js/app.e689136d879ca1c869c6.js","/static/css/vendors~app.b2603a50868c68a1c192.css","/static/js/vendors~app.de343579e844e698d456.js","/static/js/2.f158cbd2b8770e467dfe.js"]};
++=======
+ var serviceWorkerOption = {"assets":["/static/fontello.1588419330867.css","/static/font/fontello.1588419330867.eot","/static/font/fontello.1588419330867.svg","/static/font/fontello.1588419330867.ttf","/static/font/fontello.1588419330867.woff","/static/font/fontello.1588419330867.woff2","/static/img/nsfw.74818f9.png","/static/css/app.613cef07981cd95ccceb.css","/static/js/app.fa89b90e606f4facd209.js","/static/css/vendors~app.18fea621d430000acc27.css","/static/js/vendors~app.8aa781e6dd81307f544b.js","/static/js/2.1c407059cd79fca99e19.js"]};
++>>>>>>> fbcc53760e6fcd393513c05a5bd7a4a6a6f3b731
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/",t(t.s=1)}([function(e,n){
/*!