Revert "squash! Expose expires_at datetime in mastoAPI only for the activity actor"

This reverts commit 2981821db8.
This commit is contained in:
Mike Verdone 2019-07-24 17:09:59 +02:00
commit 2c83eb0b15
4 changed files with 6 additions and 10 deletions

View file

@ -168,15 +168,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
client_posted_this_activity = opts[:for] && user.id == opts[:for].id
expires_in =
expires_at =
with true <- client_posted_this_activity,
expiration when not is_nil(expiration) <-
ActivityExpiration.get_by_activity_id(activity.id) do
expires_in_seconds =
expiration.scheduled_at
|> NaiveDateTime.diff(NaiveDateTime.utc_now(), :second)
round(expires_in_seconds / 60)
expiration.scheduled_at
end
thread_muted? =
@ -277,7 +273,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
in_reply_to_account_acct: reply_to_user && reply_to_user.nickname,
content: %{"text/plain" => content_plaintext},
spoiler_text: %{"text/plain" => summary_plaintext},
expires_in: expires_in
expires_at: expires_at
}
}
end