mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-05-17 01:02:38 +00:00
Use all the available fields in the user export
This commit is contained in:
parent
53b1b1a529
commit
4ceb92ec09
|
@ -15,9 +15,22 @@ defmodule Pleroma.Web.PleromaAPI.UserExportController do
|
|||
@following_accounts_header "Account address,Show boosts,Notify on new posts,Languages\n"
|
||||
|
||||
def following(%{assigns: %{user: follower}} = conn, _) do
|
||||
friends = User.get_friends_nicknames(follower) |> Enum.join(",true,false,\n")
|
||||
data =
|
||||
follower
|
||||
|> User.get_friends_nicknames()
|
||||
|> Enum.map(fn follow ->
|
||||
[
|
||||
follow,
|
||||
!User.muting_reblogs?(follower, follow),
|
||||
!User.subscribed_to?(follower, follow),
|
||||
nil
|
||||
]
|
||||
|> Enum.map(&Kernel.to_string(&1))
|
||||
|> Enum.join(",")
|
||||
end)
|
||||
|> Enum.join("\n")
|
||||
|
||||
csv_data = @following_accounts_header <> friends <> ",true,false,"
|
||||
csv_data = @following_accounts_header <> data
|
||||
|
||||
conn
|
||||
|> put_resp_content_type("text/csv")
|
||||
|
|
Loading…
Reference in a new issue