Local attachments have no created_at
value assigned
#5901
Labels
1. to develop
bug
good first issue
Small tasks with clear documentation about how and in which place you need to fix things in.
Expected behavior
Attachments added to new messages are stored in
mail_attachments
. At\OCA\Mail\Service\Attachment\AttachmentService::addFile
we don't assign a value tocreatedAt
, thus the timestamp is of default0
.Actual behavior
The timestamp is set to a real value. We need this to clean up old data.
Mail app
Mail app version: v1.11
Implementation detail
\OCP\AppFramework\Utility\ITimeFactory
into\OCA\Mail\Service\Attachment\AttachmentService::__construct
getTime()
to fetch the current time stampLocalAttachment::setCreatedAt
mail_attachments.created_at
column and make it NOT NULL. That enforces that a value has to be specified for an insert and would have prevented this bug.The text was updated successfully, but these errors were encountered: