forked from YokaiRick/akkoma
Merge branch 'fix/2189-unpin-activity' into 'develop'
#2189 More robust expires_at timestamp processing See merge request pleroma/pleroma!3046
This commit is contained in:
commit
7f83b35a9d
1 changed files with 3 additions and 1 deletions
|
@ -2291,7 +2291,9 @@ def remove_pinnned_activity(user, %Pleroma.Activity{id: id, data: data}) do
|
||||||
|
|
||||||
# if pinned activity was scheduled for deletion, we reschedule it for deletion
|
# if pinned activity was scheduled for deletion, we reschedule it for deletion
|
||||||
if data["expires_at"] do
|
if data["expires_at"] do
|
||||||
{:ok, expires_at, _} = DateTime.from_iso8601(data["expires_at"])
|
# MRF.ActivityExpirationPolicy used UTC timestamps for expires_at in original implementation
|
||||||
|
{:ok, expires_at} =
|
||||||
|
data["expires_at"] |> Pleroma.EctoType.ActivityPub.ObjectValidators.DateTime.cast()
|
||||||
|
|
||||||
Pleroma.Workers.PurgeExpiredActivity.enqueue(%{
|
Pleroma.Workers.PurgeExpiredActivity.enqueue(%{
|
||||||
activity_id: id,
|
activity_id: id,
|
||||||
|
|
Loading…
Reference in a new issue