summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2023-12-07 08:08:27 +0000
committerlain <lain@soykaf.club>2023-12-07 08:08:27 +0000
commit5f74aadaaf6f8cbd31ce251a03729c8d5276409a (patch)
treef7c3c4da1962df8187ee4a438fc7581bc0596ddd /lib
parent2656199dc73c3febe595f8d55e34e30c6a94e1f6 (diff)
parentef8a2134bc9e2e9f3aa08172b982c347332e14c1 (diff)
downloadpleroma-5f74aadaaf6f8cbd31ce251a03729c8d5276409a.tar.gz
pleroma-5f74aadaaf6f8cbd31ce251a03729c8d5276409a.zip
Merge branch 'last_status_at' into 'develop'
MastoAPI AccountView: Change last_status_at to be a date See merge request pleroma/pleroma!3978
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index cc3e3582f..237de3055 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AccountView do
@@ -249,6 +249,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
nil
end
+ last_status_at =
+ user.last_status_at &&
+ user.last_status_at |> NaiveDateTime.to_date() |> Date.to_iso8601()
+
%{
id: to_string(user.id),
username: username_from_nickname(user.nickname),
@@ -277,7 +281,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
actor_type: user.actor_type
}
},
- last_status_at: user.last_status_at,
+ last_status_at: last_status_at,
# Pleroma extensions
# Note: it's insecure to output :email but fully-qualified nickname may serve as safe stub