X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/30415443e95494fd9c217c7d83c9aa2d13d203fd..d8fb371d54ff464bbd45186b5848f6a9f9d87d5e:/app/models/note.rb?ds=sidebyside diff --git a/app/models/note.rb b/app/models/note.rb index 2ec72a03a..068efa59a 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -92,22 +92,9 @@ class Note < ApplicationRecord closed_at + DEFAULT_FRESHLY_CLOSED_LIMIT end - # Return the note's description, derived from the first comment + # Return the note's description def description - if user_ip.nil? && user_id.nil? - all_comments.first.body if all_comments.first&.event == "opened" - else - RichText.new("text", super) - end - end - - # Return the note's author object, derived from the first comment - def author - if user_ip.nil? && user_id.nil? - all_comments.first.author if all_comments.first&.event == "opened" - else - super - end + RichText.new("text", super) end private