forked from GNUsocial/gnu-social
[Posting] Re-add original file to attachment on upload, if it was previously removed
This commit is contained in:
@@ -129,7 +129,9 @@ END;
|
||||
DB::flush();
|
||||
if ($processed_attachments != []) {
|
||||
foreach ($processed_attachments as $a) {
|
||||
DB::persist(GSActorToAttachment::create(['attachment_id' => $a->getId(), 'gsactor_id' => $actor_id]));
|
||||
if (is_null(DB::findBy('gsactor_to_attachment', ['attachment_id' => $a->getId(), 'gsactor_id' => $actor_id]))) {
|
||||
DB::persist(GSActorToAttachment::create(['attachment_id' => $a->getId(), 'gsactor_id' => $actor_id]));
|
||||
}
|
||||
DB::persist(AttachmentToNote::create(['attachment_id' => $a->getId(), 'note_id' => $note->getId()]));
|
||||
}
|
||||
DB::flush();
|
||||
|
Reference in New Issue
Block a user