diff options
author | eal <eal@waifu.club> | 2017-12-12 21:03:28 +0200 |
---|---|---|
committer | eal <eal@waifu.club> | 2017-12-12 21:03:28 +0200 |
commit | d89193a8d77f67ad5f6ccc7897889c1ef2d030fa (patch) | |
tree | 069aea37dea13221412b92eaa31b9f53131e6ea1 /lib | |
parent | 39ccfdc08439401a01c84a4d45488d0145afa937 (diff) | |
download | pleroma-d89193a8d77f67ad5f6ccc7897889c1ef2d030fa.tar.gz |
Allow uploading a file for follow import.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/twitter_api/controllers/util_controller.ex | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index c76486392..8eeaa0064 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -74,6 +74,9 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do json conn, Enum.into(Formatter.get_custom_emoji(), %{}) end + def follow_import(conn, %{"list" => %Plug.Upload{} = listfile}) do + follow_import(conn, %{"list" => File.read!(listfile.path)}) + end def follow_import(%{assigns: %{user: user}} = conn, %{"list" => list}) do errors = list |> String.split() |