Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
allow the notifications app to be absent
Signed-off-by: Artur Neumann <[email protected]>
  • Loading branch information
individual-it committed Nov 8, 2022
commit 92ff24e1a22d5f6012170999e79545b5cf41d6f2
6 changes: 5 additions & 1 deletion lib/Service/OpenProjectAPIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function __construct(
IRootFolder $storage,
IURLGenerator $urlGenerator,
ICacheFactory $cacheFactory,
Handler $handler) {
Handler $handler = null) {
$this->appName = $appName;
$this->userManager = $userManager;
$this->avatarManager = $avatarManager;
Expand Down Expand Up @@ -143,6 +143,10 @@ public function checkNotifications(): void {
* @return void
*/
private function checkNotificationsForUser(string $userId): void {
if ($this->handler === null) {
// notifications app seems not to exist
return;
}
$accessToken = $this->config->getUserValue($userId, Application::APP_ID, 'token');
$notificationEnabled = ($this->config->getUserValue(
$userId,
Expand Down