diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-02-18 14:52:11 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-02-18 14:52:11 +0400 |
commit | 2ef70b55f528d0e18e52b99c36400109f52b8262 (patch) | |
tree | 6381acfc4421e0021e4f40e91f37cf79d23711e5 | |
parent | 962eb8d4ac1aafeed6e3ae9b17847b9afaec7712 (diff) | |
download | pleroma-2ef70b55f528d0e18e52b99c36400109f52b8262.tar.gz pleroma-2ef70b55f528d0e18e52b99c36400109f52b8262.zip |
Fix `status.expires_at` type
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index d4695c1c6..6b0fe9215 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -175,9 +175,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do expires_at = with true <- client_posted_this_activity, - expiration when not is_nil(expiration) <- + %ActivityExpiration{scheduled_at: scheduled_at} <- ActivityExpiration.get_by_activity_id(activity.id) do - expiration.scheduled_at + scheduled_at + else + _ -> nil end thread_muted? = |