<p></p>
<p><b>@AntonKhorev</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5511#discussion_r1926338935">app/models/note.rb</a>:</p>
<pre style='color:#555'>>    def description
-    comments.first.body
+    if !author.nil? && author.status == "deleted"
+      RichText.new("text", I18n.t("notes.show.description_when_author_is_deleted"))
+    elsif user_ip.nil? && user_id.nil?
+      comments.first.body
+    else
+      RichText.new("text", self[:description])
+    end
   end
 
-  # Return the note's author object, derived from the first comment
+  # Return the note's author object, unless record is unavailable and
+  # it will be derived from the first comment
   def author
-    comments.first.author
-  end
-
-  # Return the note's author ID, derived from the first comment
-  def author_id
-    comments.first.author_id
-  end
-
-  # Return the note's author IP address, derived from the first comment
-  def author_ip
-    comments.first.author_ip
+    if user_ip.nil? && user_id.nil?
+      all_comments.first.author
+    else
+      self[:author]
+    end
   end
</pre>
<p dir="auto">If <code class="notranslate">author</code> returns the true author, <code class="notranslate">description</code> should also return the true description. There's <code class="notranslate">note_author</code> helper which hides the author when necessary. Similarly you can make a helper that hides the description, and you won't need <code class="notranslate">I18n.t("notes.show.description_when_author_is_deleted")</code> inside the model. And you'll use the helper in these places: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/2c19c2143ec51e507d19b41fb6c89454b3d83dfc/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/2c19c2143ec51e507d19b41fb6c89454b3d83dfc"><tt>2c19c21</tt></a>.</p>
<p dir="auto">In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1311014553" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3607" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/3607/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/3607">#3607</a> I also <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3607/files#diff-9b8b3e6d46a2a808a27e4c2f8d88c5470d39ee77146f8bb530124c0cacc35dbeR16">removed the deleted author</a> from rss.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5511#pullrequestreview-2568828414">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLV5OPMTFY27ZMGK232MBU53AVCNFSM6AAAAABVLY5R6GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKNRYHAZDQNBRGQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLM2AMFXLESPUFA4ZIL2MBU53A5CNFSM6AAAAABVLY5R6GWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTUZDU274.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5511/review/2568828414</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5511#pullrequestreview-2568828414",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5511#pullrequestreview-2568828414",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>