diff options
Diffstat (limited to 'lib/pleroma/web/mastodon_api/views/account_view.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/account_view.ex | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 6c7b4f7c5..e0137a112 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -298,8 +298,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do background_image: image_url(user.background) |> MediaProxy.url(), accepts_chat_messages: user.accepts_chat_messages, favicon: favicon, - birth_date: user.birth_date, - hide_birth_date: user.hide_birth_date + birthday: user.birthday, + hide_birthday: user.hide_birthday } } |> maybe_put_role(user, opts[:for]) @@ -313,7 +313,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do |> maybe_put_unread_conversation_count(user, opts[:for]) |> maybe_put_unread_notification_count(user, opts[:for]) |> maybe_put_email_address(user, opts[:for]) - |> maybe_hide_birth_date(user, opts[:for]) + |> maybe_hide_birthday(user, opts[:for]) end defp username_from_nickname(string) when is_binary(string) do @@ -435,21 +435,21 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do defp maybe_put_email_address(data, _, _), do: data - defp maybe_hide_birth_date(data, %User{id: user_id}, %User{id: user_id}) do + defp maybe_hide_birthday(data, %User{id: user_id}, %User{id: user_id}) do data end - defp maybe_hide_birth_date(data, %User{hide_birth_date: true}, _) do + defp maybe_hide_birthday(data, %User{hide_birthday: true}, _) do data - |> Kernel.pop_in([:pleroma, :birth_date]) + |> Kernel.pop_in([:pleroma, :birthday]) |> elem(1) - |> Kernel.pop_in([:pleroma, :hide_birth_date]) + |> Kernel.pop_in([:pleroma, :hide_birthday]) |> elem(1) end - defp maybe_hide_birth_date(data, _, _) do + defp maybe_hide_birthday(data, _, _) do data - |> Kernel.pop_in([:pleroma, :hide_birth_date]) + |> Kernel.pop_in([:pleroma, :hide_birthday]) |> elem(1) end |