summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-02-18 14:52:11 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-02-18 14:52:11 +0400
commit2ef70b55f528d0e18e52b99c36400109f52b8262 (patch)
tree6381acfc4421e0021e4f40e91f37cf79d23711e5
parent962eb8d4ac1aafeed6e3ae9b17847b9afaec7712 (diff)
Fix `status.expires_at` type
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex6
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? =