diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Chat/Parser/SystemMessage.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index e8165712a..68a794406 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -716,6 +716,21 @@ class SystemMessage { ]; } + if ($room->getType() !== Room::TYPE_ONE_TO_ONE) { + // Can happen if a user was remove from a one-to-one room. + return [ + $this->l->t('You tried to call {user}'), + [ + 'user' => [ + 'type' => 'highlight', + 'id' => 'deleted_user', + 'name' => $room->getName(), + ], + ], + 'call_tried', + ]; + } + $participants = json_decode($room->getName(), true); $other = ''; foreach ($participants as $participant) { @@ -723,6 +738,7 @@ class SystemMessage { $other = $participant; } } + return [ $this->l->t('You tried to call {user}'), [ |