Fix `status.expires_at` type
authorEgor Kislitsyn <egor@kislitsyn.com>
Tue, 18 Feb 2020 10:52:11 +0000 (14:52 +0400)
committerEgor Kislitsyn <egor@kislitsyn.com>
Tue, 18 Feb 2020 10:52:11 +0000 (14:52 +0400)
lib/pleroma/web/mastodon_api/views/status_view.ex

index d4695c1c6cff04c207aca524446554b5a6ed7971..6b0fe921531621224926af185bde5740e7b714f1 100644 (file)
@@ -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? =