Changeset e6c6e6f in Klonkt for test/c2s-direct.test.js
- Timestamp:
- 07/20/2026 10:27:19 PM (7 weeks ago)
- Branches:
- main
- Children:
- 155c24e
- Parents:
- 024f4f8
- git-author:
- Robin <roboburr@…> (07/20/2026 10:27:18 PM)
- git-committer:
- Robin <roboburr@…> (07/20/2026 10:27:19 PM)
- File:
-
- 1 edited
-
test/c2s-direct.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/c2s-direct.test.js
r024f4f8 re6c6e6f 27 27 }); 28 28 29 test('a direct note carries its attachments (help-buoy capture)', () => { 30 db.prepare(`INSERT INTO ap_outbox (id, site_slug, post_id, post_slug, in_reply_to, to_actor, to_handle, content, visibility, to_actors, attachments, created_at) 31 VALUES ('d2','me','',NULL,NULL,'https://r.test/u/g','@g@r.test','<p>kijk</p>','direct','["https://r.test/u/g"]','[{"url":"/media/reply-media/x.png","mediaType":"image/png","name":"capture"}]',CURRENT_TIMESTAMP)`).run(); 32 const row = db.prepare('SELECT * FROM ap_outbox WHERE id = ?').get('d2'); 33 const note = AP.buildReplyNote('https://test.example', site, row); 34 assert.equal(note.attachment.length, 1); 35 assert.equal(note.attachment[0].type, 'Image'); 36 assert.ok(note.attachment[0].url.endsWith('/media/reply-media/x.png')); 37 assert.deepEqual(note.cc, []); // still direct 38 }); 39 29 40 test('direct without any real recipient is refused (400 no_recipients)', async () => { 30 41 const r = await AP.ingestOutboxActivity(site, user, {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)