Files
Patrick Niebeling 7612344726
Build package / xml-lint (push) Successful in 33s
Build package / php-lint (8.5) (push) Successful in 1m48s
Build package / php-lint (8.4) (push) Successful in 1m50s
Build package / unit-tests (push) Successful in 1m52s
Build package / package (push) Successful in 1m38s
Send moved-card notices as Nextcloud notifications too
Each workflow now has a notify channel (mail, notification or both) next
to its recipient mode. Notifications go out per card through
OCP\Notification\IManager, so they show up in the bell and as push on the
mobile and desktop clients. Without the notifications app nothing is sent.
The one-off "workflow disabled" notice is sent as a notification as well.

Existing workflows keep mail (migration Version1004). Bumps to 35.3.0 so
the migration runs.
2026-09-30 12:31:01 +02:00

43 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\WorkflowDeckAutomation\Settings;
use OCA\WorkflowDeckAutomation\AppInfo\Application;
use OCA\WorkflowDeckAutomation\Service\NotificationPusher;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IUserSession;
use OCP\Settings\ISettings;
use OCP\Util;
class Personal implements ISettings {
public function __construct(
private NotificationPusher $pusher,
private IUserSession $userSession,
) {
}
public function getForm(): TemplateResponse {
// The bundle names carry the app-id prefix that @nextcloud/vite-config adds.
Util::addScript(Application::APP_ID, Application::APP_ID . '-personal-settings');
Util::addStyle(Application::APP_ID, Application::APP_ID . '-personal-settings');
// Only used for a hint in the form: without the notifications app the
// job silently sends no Nextcloud notifications.
$user = $this->userSession->getUser();
return new TemplateResponse(Application::APP_ID, 'settings/personal', [
'notificationsAvailable' => $user !== null && $this->pusher->isAvailableFor($user),
], '');
}
public function getSection(): string {
return Application::APP_ID;
}
public function getPriority(): int {
return 10;
}
}