Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Db
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-05-18 14:55:21 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-05-18 14:55:21 +0300
commitc8f455cefcf0fa5aeb20240c82632a438b98bda4 (patch)
treebd12a7ede986aa9a1f23c0e96e353d1cd27dbe9d /lib/Db
parent19d4a12c7e814999e82a91d289cdc2cdee880741 (diff)
Fix attachment loss during outbox message updatefix/lost-outbox-attachments
Local messages had no `type` and AttachmentService::handleAttachments silently ignored them. Afterwards OutboxService::updateMessage saw an empty array of attachments and deleted the previous attachment(s). Now local attachments have a type, the outbox update no longer discards them and if we see an attachment without a type the process fails hard. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Db')
-rw-r--r--lib/Db/LocalAttachment.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Db/LocalAttachment.php b/lib/Db/LocalAttachment.php
index f938a0369..9b64bf855 100644
--- a/lib/Db/LocalAttachment.php
+++ b/lib/Db/LocalAttachment.php
@@ -59,6 +59,7 @@ class LocalAttachment extends Entity implements JsonSerializable {
public function jsonSerialize() {
return [
'id' => $this->id,
+ 'type' => 'local',
'fileName' => $this->fileName,
'mimeType' => $this->mimeType,
'createdAt' => $this->createdAt,