From: rinpatch Date: Wed, 18 Sep 2019 15:52:33 +0000 (+0300) Subject: Fix wrong argument order when calling NaiveDateTime.diff X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a9c700ff1594bbd3c280dd6ac3a8dffa6ea7060b;p=akkoma Fix wrong argument order when calling NaiveDateTime.diff --- diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index 640e068e5..3fa407931 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -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