mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
force comparison with NDT
This commit is contained in:
parent
3d66ff432a
commit
26d203f54c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue