Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion lib/public/SystemTag/MapperEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
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
Expand Down Expand Up @@ -84,4 +85,17 @@ public function getObjectId(): string {
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(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You trust the Php serialization because it's a list of ints?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mh, yes? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description of IWebhookCompatibleEvent says it will be serialized using json_encode

];
}
}
Loading