aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2025-02-20 17:29:24 +0100
committerGitHub <noreply@github.com>2025-02-20 17:29:24 +0100
commit74c2579078ef0414a5b0db465edbb21e585eae67 (patch)
tree454d4dead6fedefbb34f16a2fa511d61ae120f2f
parent4f50b5f337fb5721ff484af877ee1f2d5bf4af4a (diff)
parenta70071541eb60c57fbdd7a26d14ab75a7c5a0213 (diff)
downloadnextcloud-server-74c2579078ef0414a5b0db465edbb21e585eae67.tar.gz
nextcloud-server-74c2579078ef0414a5b0db465edbb21e585eae67.zip
Merge pull request #50916 from nextcloud/enh/make-tag-event-webhook-compatible
enh(SystemTag): Make MapperEvent webhook compatible
-rw-r--r--lib/public/SystemTag/MapperEvent.php16
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(),
+ ];
+ }
}