feat: Deduplicate blob files in chat.rs, config.rs, and integration.rs

These were the last places in the `deltachat` crate where files were
stored without deduplication. The CFFI python bindings are the last
thing that's still missing.
This commit is contained in:
Hocuri
2025-01-24 20:08:20 +01:00
parent 1fd6d80e6d
commit e6ea09641a
5 changed files with 19 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ import { EventId2EventName, C } from '../dist/constants.js'
import { join } from 'path'
import { statSync } from 'fs'
import { Context } from '../dist/context.js'
import {fileURLToPath} from 'url';
import { fileURLToPath } from 'url';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
@@ -444,7 +444,7 @@ describe('Offline Tests with unconfigured account', function () {
context.setChatProfileImage(chatId, imagePath)
const blobPath = context.getChat(chatId).getProfileImage()
expect(blobPath.startsWith(blobs)).to.be.true
expect(blobPath.includes('image')).to.be.true
expect(blobPath.includes('image')).to.be.false
expect(blobPath.endsWith('.jpeg')).to.be.true
context.setChatProfileImage(chatId, null)