Compare commits

...

3 Commits

Author SHA1 Message Date
Joas Schilling
f003ca890b Morelocks
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-04 06:28:10 +02:00
Joas Schilling
9ec64ff578 More logs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-04 06:14:44 +02:00
Joas Schilling
ea58ce9d4a debug failing integration tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-03 17:44:20 +02:00
2 changed files with 10 additions and 0 deletions

View File

@@ -528,6 +528,7 @@ class RegistrationContext {
}
public function registerNotifierService(string $appId, string $class): void {
$this->logger->warning('RegistrationContext::registerNotifierService(' . $appId . ', ' . $class . ')');
$this->notifierServices[] = new ServiceRegistration($appId, $class);
}
@@ -885,6 +886,7 @@ class RegistrationContext {
* @return ServiceRegistration<INotifier>[]
*/
public function getNotifierServices(): array {
$this->logger->warning('✅ RegistrationContext::getNotifierServices(): ' . count($this->notifierServices));
return $this->notifierServices;
}

View File

@@ -74,6 +74,7 @@ class Manager implements IManager {
* @since 17.0.0
*/
public function registerApp(string $appClass): void {
$this->logger->warning('Manager::registerApp(' . $appClass . ')');
// other apps may want to rely on the 'main' notification app so make it deterministic that
// the 'main' notification app adds it's notifications first and removes it's notifications last
if ($appClass === \OCA\Notifications\App::class) {
@@ -107,6 +108,7 @@ class Manager implements IManager {
* @since 17.0.0
*/
public function registerNotifierService(string $notifierService): void {
$this->logger->warning('Manager::registerNotifierService(' . $notifierService . ')');
$this->notifierClasses[] = $notifierService;
}
@@ -148,6 +150,7 @@ class Manager implements IManager {
* @return INotifier[]
*/
public function getNotifiers(): array {
$this->logger->warning('✅ Manager::getNotifiers(): ' . json_encode($this->parsedRegistrationContext));
if (!$this->parsedRegistrationContext) {
$notifierServices = $this->coordinator->getRegistrationContext()->getNotifierServices();
foreach ($notifierServices as $notifierService) {
@@ -169,6 +172,7 @@ class Manager implements IManager {
}
$this->notifiers[] = $notifier;
$this->logger->warning('✅ Manager::getNotifiers(): count()===' . count($this->notifiers));
}
$this->parsedRegistrationContext = true;
@@ -298,6 +302,8 @@ class Manager implements IManager {
* {@inheritDoc}
*/
public function notify(INotification $notification): void {
$this->logger->warning('✅ notify(' . $notification->getApp() . ')');
$this->logger->warning('✅ notify::hasNotifiers' . json_encode($this->hasNotifiers()));
if (!$notification->isValid()) {
throw new IncompleteNotificationException('The given notification is invalid');
}
@@ -340,7 +346,9 @@ class Manager implements IManager {
* {@inheritDoc}
*/
public function prepare(INotification $notification, string $languageCode): INotification {
$this->logger->warning('prepare::hasNotifiers' . json_encode($this->hasNotifiers()));
$notifiers = $this->getNotifiers();
$this->logger->warning('prepare::getNotifiers' . count($notifiers));
foreach ($notifiers as $notifier) {
try {