diff options
Diffstat (limited to 'apps/comments/lib')
-rw-r--r-- | apps/comments/lib/Notification/Notifier.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php index 7c6a40133ee..4ddb7295bfe 100644 --- a/apps/comments/lib/Notification/Notifier.php +++ b/apps/comments/lib/Notification/Notifier.php @@ -100,9 +100,9 @@ class Notifier implements INotifier { $displayName = $comment->getActorId(); $isDeletedActor = $comment->getActorType() === ICommentsManager::DELETED_USER; if ($comment->getActorType() === 'users') { - $commenter = $this->userManager->get($comment->getActorId()); - if ($commenter instanceof IUser) { - $displayName = $commenter->getDisplayName(); + $commenter = $this->userManager->getDisplayName($comment->getActorId()); + if ($commenter !== null) { + $displayName = $commenter; } } @@ -171,8 +171,8 @@ class Notifier implements INotifier { $mentions = $comment->getMentions(); foreach ($mentions as $mention) { if ($mention['type'] === 'user') { - $user = $this->userManager->get($mention['id']); - if (!$user instanceof IUser) { + $userDisplayName = $this->userManager->getDisplayName($mention['id']); + if ($userDisplayName === null) { continue; } } |