fix: reuse synced remote draft when sending a composition

Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
2026-08-25 22:39:33 -04:00
parent 03862ed0cf
commit a5eb104bd7
2 changed files with 80 additions and 1 deletions
+8 -1
View File
@@ -440,7 +440,14 @@ class CompositionManager {
];
}
$source = null;
// Reuse the synced remote draft (if any) so the provider can natively clean it up
$remoteEntity = $this->remoteEntityIdentifier($composed['remote']['entity'] ?? null);
$source = ($remoteEntity !== null
&& $remoteEntity->provider() === $service->provider()
&& (string)$remoteEntity->service() === (string)$service->identifier())
? $remoteEntity
: null;
$properties = $this->buildMessageProperties(
service: $service,
sender: $senderObject,