feat: Add emoji and alot of other fixes

This commit is contained in:
2026-06-05 05:40:18 +02:00
parent ca069e2f61
commit 6865147e8f
72 changed files with 3885 additions and 413 deletions
@@ -1,4 +1,8 @@
import { getWatchedAttachmentRoomIdFromUrl, isDirectMessageAttachmentRoomId } from './attachment.logic';
import {
getWatchedAttachmentRoomIdFromUrl,
isDirectMessageAttachmentRoomId,
shouldCopyUploaderMediaToAppData
} from './attachment.logic';
describe('attachment logic', () => {
it('extracts watched server room ids from room URLs', () => {
@@ -21,4 +25,23 @@ describe('attachment logic', () => {
expect(isDirectMessageAttachmentRoomId('room-1')).toBe(false);
expect(isDirectMessageAttachmentRoomId(null)).toBe(false);
});
it('copies large uploader media into app data when a source path exists', () => {
expect(shouldCopyUploaderMediaToAppData({
size: 64 * 1024 * 1024,
mime: 'video/mp4'
}, '/home/ludde/video.mp4', true)).toBe(true);
});
it('skips app-data copy for small uploads and missing source paths', () => {
expect(shouldCopyUploaderMediaToAppData({
size: 1024,
mime: 'video/mp4'
}, '/home/ludde/video.mp4', true)).toBe(false);
expect(shouldCopyUploaderMediaToAppData({
size: 64 * 1024 * 1024,
mime: 'video/mp4'
}, undefined, true)).toBe(false);
});
});