diff options
author | Marcel Klehr <mklehr@gmx.net> | 2025-02-20 11:38:30 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2025-02-20 12:46:52 +0100 |
commit | a70071541eb60c57fbdd7a26d14ab75a7c5a0213 (patch) | |
tree | 45479dc0d35e4994f22ec483db81f899fd07975f | |
parent | aa4a92451973edaa4ff53cb28ba471afb3ce5a39 (diff) | |
download | nextcloud-server-a70071541eb60c57fbdd7a26d14ab75a7c5a0213.tar.gz nextcloud-server-a70071541eb60c57fbdd7a26d14ab75a7c5a0213.zip |
feat(SystemTag): Make MapperEvent webhook compatibleenh/make-tag-event-webhook-compatible
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r-- | lib/public/SystemTag/MapperEvent.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php index f8f130d6473..821d1b5dc5e 100644 --- a/lib/public/SystemTag/MapperEvent.php +++ b/lib/public/SystemTag/MapperEvent.php @@ -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(), + ]; + } } |