Fix wrong argument order when calling NaiveDateTime.diff
authorrinpatch <rinpatch@sdf.org>
Wed, 18 Sep 2019 15:52:33 +0000 (18:52 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 18 Sep 2019 15:52:33 +0000 (18:52 +0300)
lib/pleroma/object.ex

index 640e068e56ce8cd7da2c43fcc0b9bd78508af55a..3fa407931e3bd43d8fba928852232f75f2d09192 100644 (file)
@@ -42,7 +42,7 @@ defmodule Pleroma.Object do
     %{updated_at: updated_at} = object = get_by_id(id)
 
     if opts[:interval] &&
-         NaiveDateTime.diff(updated_at, NaiveDateTime.utc_now()) > opts[:interval] do
+         NaiveDateTime.diff(NaiveDateTime.utc_now(), updated_at) > opts[:interval] do
       case Fetcher.refetch_object(object) do
         {:ok, %Object{} = object} ->
           object