diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-05-18 14:55:21 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-05-18 14:55:21 +0300 |
commit | c8f455cefcf0fa5aeb20240c82632a438b98bda4 (patch) | |
tree | bd12a7ede986aa9a1f23c0e96e353d1cd27dbe9d /lib/Db | |
parent | 19d4a12c7e814999e82a91d289cdc2cdee880741 (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.php | 1 |
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, |