OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
/**
* GetLatestGrowl Controller - returns the latest pending growl notification.
*/
namespace Leantime\Domain\Notifications\Controllers;
use Leantime\Core\Controller\Controller;
use Leantime\Domain\Notifications\Services\Notifications as NotificationService;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
class GetLatestGrowl extends Controller
{
private NotificationService $notificationService;
/**
* init - inject dependencies
*/
public function init(NotificationService $notificationService): void
{
$this->notificationService = $notificationService;
}
/**
* get - returns the latest pending growl notification as JSON, or false when none.
*/
public function get(array $params = []): Response
{
$payload = $this->notificationService->consumeFlashNotification();
return new JsonResponse($payload !== null ? json_encode($payload) : false);
}
}