mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 07:22:15 +08:00
fix: post mentions with deleted author not rendering (#3432)
This commit is contained in:
parent
df1bdd2ad8
commit
0a3f449f9e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user