mirror of
https://github.com/nextcloud/server.git
synced 2026-06-29 12:24:50 +02:00
2beb626995
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>
36 lines
704 B
PHP
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;
|
|
}
|
|
}
|