Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-02-15 16:08:08 +0300
committerJoas Schilling <coding@schilljs.com>2021-02-15 16:08:08 +0300
commit97f0320190292f1bfb0b1f116740eced78601f88 (patch)
tree36da4d8e262270c1c53e6ab65ffb08c842b072d3 /lib
parent56cb82af34246280811c8beffbe3ee4b4610ab73 (diff)
Show "Guest" for guests without a name
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Chat/Parser/UserMention.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Chat/Parser/UserMention.php b/lib/Chat/Parser/UserMention.php
index 1a85f9df9..a17441ea0 100644
--- a/lib/Chat/Parser/UserMention.php
+++ b/lib/Chat/Parser/UserMention.php
@@ -133,7 +133,7 @@ class UserMention {
} elseif ($mention['type'] === 'guest') {
try {
$participant = $chatMessage->getRoom()->getParticipantByActor(Attendee::ACTOR_GUESTS, substr($mention['id'], strlen('guest/')));
- $displayName = $participant->getAttendee()->getDisplayName();
+ $displayName = $participant->getAttendee()->getDisplayName() ?: $this->l->t('Guest');
} catch (ParticipantNotFoundException $e) {
$displayName = $this->l->t('Guest');
}