summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2023-05-02 13:12:13 -0300
committerVitor Mattos <vitor@php.rio>2023-05-03 05:00:09 -0300
commitbd40421b1ce0be33e16a8644906445dcf25a3d28 (patch)
tree1d384015baffbb08556e7aa306970443bbffb212 /lib
parent28348080453aac27cb57df7bd4015054178f034d (diff)
Prevent future problems with empty return
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/AvatarService.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php
index b10b4ceb7..dbbaa9c6d 100644
--- a/lib/Service/AvatarService.php
+++ b/lib/Service/AvatarService.php
@@ -232,9 +232,6 @@ class AvatarService {
private function getAvatarPath(Room $room, bool $darkTheme = false): string {
$colorTone = $darkTheme ? 'dark' : 'bright';
- if ($room->getType() === Room::TYPE_ONE_TO_ONE) {
- return '';
- }
if ($room->getType() === Room::TYPE_CHANGELOG) {
return __DIR__ . '/../../img/changelog.svg';
}
@@ -250,7 +247,9 @@ class AvatarService {
if ($room->getType() === Room::TYPE_PUBLIC) {
return __DIR__ . '/../../img/icon-conversation-public-' . $colorTone . '.svg';
}
- if ($room->getType() === Room::TYPE_ONE_TO_ONE_FORMER) {
+ if ($room->getType() === Room::TYPE_ONE_TO_ONE_FORMER
+ || $room->getType() === Room::TYPE_ONE_TO_ONE
+ ) {
return __DIR__ . '/../../img/icon-conversation-user-' . $colorTone . '.svg';
}
return __DIR__ . '/../../img/icon-conversation-group-' . $colorTone . '.svg';