1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 07:41:22 +02:00

fix: post mentions with deleted author not rendering (#3432)

This commit is contained in:
Sami Mazouz
2022-06-02 13:38:24 +01:00
committed by GitHub
parent df1bdd2ad8
commit 0a3f449f9e

View File

@@ -125,10 +125,13 @@ class ConfigureMentions
{
$post = CommentPost::find($tag->getAttribute('id'));
if ($post && $post->user) {
if ($post) {
$tag->setAttribute('discussionid', (int) $post->discussion_id);
$tag->setAttribute('number', (int) $post->number);
$tag->setAttribute('displayname', $post->user->display_name);
if ($post->user) {
$tag->setAttribute('displayname', $post->user->display_name);
}
return true;
}