summaryrefslogtreecommitdiffstats
path: root/lib/Service/AvatarService.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/AvatarService.php')
-rw-r--r--lib/Service/AvatarService.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php
index 1e8e5247b..c05d27a0c 100644
--- a/lib/Service/AvatarService.php
+++ b/lib/Service/AvatarService.php
@@ -69,7 +69,7 @@ class AvatarService {
}
public function setAvatarFromRequest(Room $room, ?array $file): void {
- if ($room->getType() === Room::TYPE_ONE_TO_ONE) {
+ if ($room->getType() === Room::TYPE_ONE_TO_ONE || $room->getType() === Room::TYPE_ONE_TO_ONE_FORMER) {
throw new InvalidArgumentException($this->l->t('One to one rooms always need to show the other users avatar'));
}
@@ -97,7 +97,7 @@ class AvatarService {
}
public function setAvatar(Room $room, \OC_Image $image): void {
- if ($room->getType() === Room::TYPE_ONE_TO_ONE) {
+ if ($room->getType() === Room::TYPE_ONE_TO_ONE || $room->getType() === Room::TYPE_ONE_TO_ONE_FORMER) {
throw new InvalidArgumentException($this->l->t('One to one rooms always need to show the other users avatar'));
}
$image->fixOrientation();
@@ -166,7 +166,7 @@ class AvatarService {
}
// Fallback
if (!isset($file)) {
- if ($room->getType() === Room::TYPE_ONE_TO_ONE) {
+ if ($room->getType() === Room::TYPE_ONE_TO_ONE || $room->getType() === Room::TYPE_ONE_TO_ONE_FORMER) {
$users = json_decode($room->getName(), true);
foreach ($users as $participantId) {
if ($user instanceof IUser && $participantId !== $user->getUID()) {