| ... | ... | @@ -230,7 +230,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 230 | 230 | name: "example.png", |
| 231 | 231 | mimeType: "image/png", |
| 232 | 232 | sizeBytes: 5, |
| 233 | | dataUrl: "/attachments/thread-attachments/message-attachments/0.png", |
| 233 | dataUrl: "/attachments/thread-attachments/message-attachments-0.png", |
| 234 | 234 | }, |
| 235 | 235 | ]); |
| 236 | 236 | |
| ... | ... | @@ -238,8 +238,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 238 | 238 | stateDir, |
| 239 | 239 | "attachments", |
| 240 | 240 | "thread-attachments", |
| 241 | | "message-attachments", |
| 242 | | "0.png", |
| 241 | "message-attachments-0.png", |
| 243 | 242 | ); |
| 244 | 243 | assert.equal(fs.existsSync(attachmentPath), true); |
| 245 | 244 | assert.deepEqual(fs.readFileSync(attachmentPath), Buffer.from("SGVsbG8=", "base64")); |
| ... | ... | @@ -325,7 +324,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 325 | 324 | name: "untrusted.exe", |
| 326 | 325 | mimeType: "image/x-unknown", |
| 327 | 326 | sizeBytes: 5, |
| 328 | | dataUrl: "/attachments/thread-attachments-safe/message-attachments-safe/0.bin", |
| 327 | dataUrl: "/attachments/thread-attachments-safe/message-attachments-safe-0.bin", |
| 329 | 328 | }, |
| 330 | 329 | { |
| 331 | 330 | type: "image", |
| ... | ... | @@ -340,8 +339,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 340 | 339 | stateDir, |
| 341 | 340 | "attachments", |
| 342 | 341 | "thread-attachments-safe", |
| 343 | | "message-attachments-safe", |
| 344 | | "0.bin", |
| 342 | "message-attachments-safe-0.bin", |
| 345 | 343 | ); |
| 346 | 344 | assert.equal(fs.existsSync(firstAttachmentPath), true); |
| 347 | 345 | assert.deepEqual(fs.readFileSync(firstAttachmentPath), Buffer.from("SGVsbG8=", "base64")); |
| ... | ... | @@ -350,8 +348,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 350 | 348 | stateDir, |
| 351 | 349 | "attachments", |
| 352 | 350 | "thread-attachments-safe", |
| 353 | | "message-attachments-safe", |
| 354 | | "1.png", |
| 351 | "message-attachments-safe-1.png", |
| 355 | 352 | ); |
| 356 | 353 | assert.equal(fs.existsSync(secondAttachmentPath), false); |
| 357 | 354 | fs.rmSync(stateDir, { recursive: true, force: true }); |
| ... | ... | @@ -614,8 +611,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 614 | 611 | stateDir, |
| 615 | 612 | "attachments", |
| 616 | 613 | "thread-overwrite", |
| 617 | | "message-overwrite", |
| 618 | | "0.png", |
| 614 | "message-overwrite-0.png", |
| 619 | 615 | ); |
| 620 | 616 | assert.equal(fs.existsSync(attachmentPath), true); |
| 621 | 617 | assert.deepEqual(fs.readFileSync(attachmentPath), Buffer.from("V29ybGQ=", "base64")); |
| ... | ... | @@ -753,8 +749,7 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 753 | 749 | stateDir, |
| 754 | 750 | "attachments", |
| 755 | 751 | "thread-rollback", |
| 756 | | "message-rollback", |
| 757 | | "0.png", |
| 752 | "message-rollback-0.png", |
| 758 | 753 | ); |
| 759 | 754 | assert.equal(fs.existsSync(attachmentPath), false); |
| 760 | 755 | yield* sql`DROP TRIGGER IF EXISTS fail_thread_messages_projection_state_update`; |
| ... | ... | @@ -945,15 +940,13 @@ projectionLayer("OrchestrationProjectionPipeline", (it) => { |
| 945 | 940 | stateDir, |
| 946 | 941 | "attachments", |
| 947 | 942 | "thread-revert-files", |
| 948 | | "message-keep", |
| 949 | | "0.png", |
| 943 | "message-keep-0.png", |
| 950 | 944 | ); |
| 951 | 945 | const removePath = path.join( |
| 952 | 946 | stateDir, |
| 953 | 947 | "attachments", |
| 954 | 948 | "thread-revert-files", |
| 955 | | "message-remove", |
| 956 | | "0.png", |
| 949 | "message-remove-0.png", |
| 957 | 950 | ); |
| 958 | 951 | assert.equal(fs.existsSync(keepPath), true); |
| 959 | 952 | assert.equal(fs.existsSync(removePath), true); |