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:
@@ -125,10 +125,13 @@ class ConfigureMentions
|
|||||||
{
|
{
|
||||||
$post = CommentPost::find($tag->getAttribute('id'));
|
$post = CommentPost::find($tag->getAttribute('id'));
|
||||||
|
|
||||||
if ($post && $post->user) {
|
if ($post) {
|
||||||
$tag->setAttribute('discussionid', (int) $post->discussion_id);
|
$tag->setAttribute('discussionid', (int) $post->discussion_id);
|
||||||
$tag->setAttribute('number', (int) $post->number);
|
$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;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user