From 26d203f54c56806c4c811f78cbadafc388309c0b Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Fri, 6 Dec 2019 17:37:45 -0500 Subject: [PATCH] force comparison with NDT --- lib/philomena/users/ability.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena/users/ability.ex b/lib/philomena/users/ability.ex index e75f6a89..9e75118a 100644 --- a/lib/philomena/users/ability.ex +++ b/lib/philomena/users/ability.ex @@ -88,7 +88,7 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do # Edit comments on images def can?(%User{id: id}, :edit, %Comment{hidden_from_users: false, user_id: id} = comment) do # comment must have been made no later than 15 minutes ago - time_ago = DateTime.utc_now() |> DateTime.add(-15 * 60) + time_ago = NaiveDateTime.utc_now() |> NaiveDateTime.add(-15 * 60) DateTime.diff(comment.created_at, time_ago) > 0 end