diff options
Diffstat (limited to 'lib/Events/DraftSavedEvent.php')
-rw-r--r-- | lib/Events/DraftSavedEvent.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Events/DraftSavedEvent.php b/lib/Events/DraftSavedEvent.php index f8b6368da..677b4556c 100644 --- a/lib/Events/DraftSavedEvent.php +++ b/lib/Events/DraftSavedEvent.php @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\Mail\Events; use OCA\Mail\Account; +use OCA\Mail\Db\Message; use OCA\Mail\Model\NewMessageData; use OCP\EventDispatcher\Event; @@ -37,16 +38,16 @@ class DraftSavedEvent extends Event { /** @var NewMessageData */ private $newMessageData; - /** @var int|null */ - private $draftUid; + /** @var Message|null */ + private $draft; public function __construct(Account $account, NewMessageData $newMessageData, - ?int $draftUid) { + ?Message $draft) { parent::__construct(); $this->account = $account; $this->newMessageData = $newMessageData; - $this->draftUid = $draftUid; + $this->draft = $draft; } public function getAccount(): Account { @@ -57,7 +58,7 @@ class DraftSavedEvent extends Event { return $this->newMessageData; } - public function getDraftUid(): ?int { - return $this->draftUid; + public function getDraft(): ?Message { + return $this->draft; } } |