mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: shift targets to realtime
This commit is contained in:
@@ -62,7 +62,6 @@ class Event
|
||||
protected array $params = [];
|
||||
protected array $sensitive = [];
|
||||
protected array $payload = [];
|
||||
protected array $targets = [];
|
||||
protected array $context = [];
|
||||
protected ?Document $project = null;
|
||||
protected ?Document $user = null;
|
||||
@@ -233,28 +232,6 @@ class Event
|
||||
return $this->payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set targets for this event.
|
||||
*
|
||||
* @param array $targets
|
||||
* @return array
|
||||
*/
|
||||
public function setTargets(array $targets): self
|
||||
{
|
||||
$this->targets = $targets;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get targets for this event.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTargets(): array
|
||||
{
|
||||
return $this->targets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set context for this event.
|
||||
*
|
||||
|
||||
@@ -7,10 +7,17 @@ use Utopia\Database\Document;
|
||||
|
||||
class Realtime extends Event
|
||||
{
|
||||
protected array $targets = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Realtime payload for this event.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRealtimePayload(): array
|
||||
{
|
||||
$payload = [];
|
||||
@@ -24,6 +31,28 @@ class Realtime extends Event
|
||||
return $payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set targets for this realtime event.
|
||||
*
|
||||
* @param array $targets
|
||||
* @return array
|
||||
*/
|
||||
public function setTargets(array $targets): self
|
||||
{
|
||||
$this->targets = $targets;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get targets for this realtime event.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTargets(): array
|
||||
{
|
||||
return $this->targets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute Event.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user