Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/OCP/TalkBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

namespace OCA\Talk\OCP;

use OCA\Talk\Config;
use OCA\Talk\Manager;
use OCA\Talk\Model\Attendee;
use OCA\Talk\Participant;
use OCA\Talk\Room;
use OCA\Talk\Service\ParticipantService;
use OCA\Talk\Service\RoomService;
use OCP\IURLGenerator;
use OCP\IUserSession;
use OCP\Talk\IConversation;
use OCP\Talk\IConversationOptions;
use OCP\Talk\ITalkBackend;
Expand All @@ -27,6 +29,8 @@
protected ParticipantService $participantService,
protected RoomService $roomService,
protected IURLGenerator $url,
protected IUserSession $userSession,
protected Config $config,
) {
}

Expand Down Expand Up @@ -68,4 +72,23 @@
$room = $this->manager->getRoomByToken($id);
$this->roomService->deleteRoom($room);
}

#[\Override]

Check failure on line 76 in lib/OCP/TalkBackend.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

InvalidOverride

lib/OCP/TalkBackend.php:76:2: InvalidOverride: Method isAllowedToCreateConversations does not match any parent method (see https://psalm.dev/357)
public function isAllowedToCreateConversations(): bool {
$user = $this->userSession->getUser();
if ($user === null) {
return false;
}

return !$this->config->isNotAllowedToCreateConversations($user);
}

#[\Override]

Check failure on line 86 in lib/OCP/TalkBackend.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

InvalidOverride

lib/OCP/TalkBackend.php:86:2: InvalidOverride: Method isEnabledForUser does not match any parent method (see https://psalm.dev/357)
public function isEnabledForUser(): bool {
$user = $this->userSession->getUser();
if ($user === null) {
return false;
}
return !$this->config->isDisabledForUser($user);
}
}
Loading