feat: add logic to sync drafts to server

Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
2026-08-18 21:57:38 -04:00
parent bd5965f600
commit 67024b5bfd
7 changed files with 600 additions and 9 deletions
+16 -2
View File
@@ -2,6 +2,8 @@
namespace KTXM\Mail;
use KTXF\Event\DeliveryMode;
use KTXF\Event\EventListenerRegistrarInterface;
use KTXF\Module\ModuleBrowserInterface;
use KTXF\Module\ModuleInstanceAbstract;
@@ -11,8 +13,20 @@ use KTXF\Module\ModuleInstanceAbstract;
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
{
public function __construct()
{ }
public function __construct(
private readonly EventListenerRegistrarInterface $events,
) {}
public function boot(): void
{
$this->events->listen(
$this->handle(),
CompositionSavedEvent::class,
CompositionSyncListener::class,
'onCompositionSaved',
DeliveryMode::Deferred,
);
}
public function handle(): string
{