Send the old doc to the realtime for swift migrations (#2196)
Send the old doc to the realtime for swift migrations (#2196)

When a cozy instance is migrating to Swift layout v3, its CouchDB
documents for io.cozy.files are updated to add the internal_id
attribute. The trigger for thumbnails add a job. But as we were giving
only the new document, and not the old one, the sameImg comparison in
the thumbnail worker would fail, and a new thumbnail may be recreated.
And, as we can have a race condition between getting the Swift container
for the thumbnails and locking the VFS, it could be put in the old data
container.
nono/cozy-stack,nono/cozy-stack,nono/cozy-stack,nono/cozy-stack,nono/cozy-stack