mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #50916 from nextcloud/enh/make-tag-event-webhook-compatible
enh(SystemTag): Make MapperEvent webhook compatible
This commit is contained in:
commit
74c2579078
1 changed files with 15 additions and 1 deletions
|
|
@ -9,13 +9,14 @@ declare(strict_types=1);
|
|||
namespace OCP\SystemTag;
|
||||
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IWebhookCompatibleEvent;
|
||||
|
||||
/**
|
||||
* Class MapperEvent
|
||||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
class MapperEvent extends Event {
|
||||
class MapperEvent extends Event implements IWebhookCompatibleEvent {
|
||||
/**
|
||||
* @since 9.0.0
|
||||
* @deprecated 22.0.0
|
||||
|
|
@ -84,4 +85,17 @@ class MapperEvent extends Event {
|
|||
public function getTags(): array {
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @since 32.0.0
|
||||
*/
|
||||
public function getWebhookSerializable(): array {
|
||||
return [
|
||||
'eventType' => $this->getEvent(),
|
||||
'objectType' => $this->getObjectType(),
|
||||
'objectId' => $this->getObjectId(),
|
||||
'tagIds' => $this->getTags(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue