diff options
author | Lain Soykaf <lain@lain.com> | 2023-12-07 11:25:18 +0400 |
---|---|---|
committer | Lain Soykaf <lain@lain.com> | 2023-12-07 11:25:18 +0400 |
commit | ef8a2134bc9e2e9f3aa08172b982c347332e14c1 (patch) | |
tree | f7c3c4da1962df8187ee4a438fc7581bc0596ddd /lib | |
parent | 6a191a91abc4d86ab564d06c9fcdbb43116fd333 (diff) | |
download | pleroma-ef8a2134bc9e2e9f3aa08172b982c347332e14c1.tar.gz pleroma-ef8a2134bc9e2e9f3aa08172b982c347332e14c1.zip |
AccountView: Add test, refactor
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/account_view.ex | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 34478cec8..237de3055 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -250,11 +250,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do end last_status_at = - if not is_nil(user.last_status_at) do + user.last_status_at && user.last_status_at |> NaiveDateTime.to_date() |> Date.to_iso8601() - else - nil - end %{ id: to_string(user.id), |