Return last_status_at as date, not datetime #681

Merged
floatingghost merged 1 commit from katafrakt/akkoma:fix-last-status-at into develop 2024-02-17 11:37:20 +00:00
Contributor

As a followup to #637, Mastodon API docs say that last_status_at should be a date, not a datetime. See: https://docs.joinmastodon.org/entities/Account/#last_status_at It seems like a right thing to do to adhere to the API, especially given that Akkoma uses NaiveDateTime everywhere for some reason, which gets serialized to technically proper ISO 8601 string, but which might be a bit surprising to some clients, because of missing timezone.

I wonder if conversion to string should be done manually in the view, or rather we should let Phoenix do that. For now it's the latter.

As a followup to https://akkoma.dev/AkkomaGang/akkoma/issues/637, Mastodon API docs say that `last_status_at` should be a date, not a datetime. See: https://docs.joinmastodon.org/entities/Account/#last_status_at It seems like a right thing to do to adhere to the API, especially given that Akkoma uses `NaiveDateTime` everywhere for some reason, which gets serialized to technically proper ISO 8601 string, but which might be a bit surprising to some clients, because of missing timezone. I wonder if conversion to string should be done manually in the view, or rather we should let Phoenix do that. For now it's the latter.
katafrakt added 1 commit 2024-02-05 20:48:01 +00:00
Return last_status_at as date, not datetime
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
df21b61829

I'll have to check that frontends are ok with this, but it looks ok, thanks!

I'll have to check that frontends are ok with this, but it looks ok, thanks!
Member
  • akkoma-fe does never use last_status_at
  • greping for last_status_at in admin-fe didn’t yield any hits, so it too probably never uses it
  • masto-fe and fedibird have many matches, but I’m unfortunately not sure which of those are actual frontend code.
    However, them being derived from Mastodon forks, it seems reasonable to assume they already correctly deal with proper, date-only last_status_at
- akkoma-fe does never use `last_status_at` - `grep`ing for `last_status_at` in admin-fe didn’t yield any hits, so it too probably never uses it - masto-fe and fedibird have many matches, but I’m unfortunately not sure which of those are actual frontend code. However, them being derived from Mastodon forks, it seems reasonable to assume they already correctly deal with proper, date-only `last_status_at`

yep, all seems good! thanks a lot!

yep, all seems good! thanks a lot!
floatingghost merged commit 289f93f5a2 into develop 2024-02-17 11:37:20 +00:00
floatingghost deleted branch fix-last-status-at 2024-02-17 11:37:20 +00:00
Sign in to join this conversation.
No description provided.