chore: optimise webhooks payload

This commit is contained in:
Christy Jacob 2024-12-19 16:52:10 +05:30
parent 53d8e2b0c3
commit d03d3c05b4

View file

@ -3,6 +3,7 @@
namespace Appwrite\Event;
use Utopia\Queue\Connection;
use Utopia\Database\Document;
class Webhook extends Event
{
@ -19,10 +20,10 @@ class Webhook extends Event
{
/** Filter out context and trim project to keep the payload small */
$this->context = [];
$this->project = [
$this->project = new Document([
'$id' => $this->project->getId(),
'$internalId' => $this->project->getAttribute('internalId'),
];
]);
return parent::trigger();
}