fix: reuse synced remote draft when sending a composition
Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user