Files
nextcloud-server-mirror/lib/public/OCM/Events/OCMNotificationReceivedEvent.php
Micke Nordin 2beb626995 feat(OCM): Add event for received notifications
OCM is standardizing and expanding the use of notifications and having
an event for acting on in apps will be very useful.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-06-16 11:30:00 +02:00

36 lines
704 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\OCM\Events;
use OCP\AppFramework\Attribute\Listenable;
use OCP\EventDispatcher\Event;
use OCP\Federation\ICloudFederationNotification;
/**
* @since 35.0.0
*/
#[Listenable(since: '35.0.0')]
class OCMNotificationReceivedEvent extends Event {
/**
* @since 35.0.0
*/
public function __construct(
private readonly ICloudFederationNotification $notification,
) {
parent::__construct();
}
/**
* @since 35.0.0
*/
public function getNotification(): ICloudFederationNotification {
return $this->notification;
}
}