fix: Bug - Sending files and attachment issues
Normalize attachment MIME types from filenames, hydrate playable media and gallery tiles from disk without redundant peer requests, reset stalled partial downloads, and improve gallery retry/hydration UX across chat and DMs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
import { shouldResetStalledAttachmentDownload } from './attachment-autodownload.rules';
|
||||
|
||||
describe('attachment autodownload rules', () => {
|
||||
it('resets stalled partial downloads that are no longer actively transferring', () => {
|
||||
expect(shouldResetStalledAttachmentDownload({
|
||||
available: false,
|
||||
receivedBytes: 128
|
||||
}, false)).toBe(true);
|
||||
|
||||
expect(shouldResetStalledAttachmentDownload({
|
||||
available: false,
|
||||
receivedBytes: 128
|
||||
}, true)).toBe(false);
|
||||
|
||||
expect(shouldResetStalledAttachmentDownload({
|
||||
available: true,
|
||||
receivedBytes: 128
|
||||
}, false)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user