- Timestamp:
- 07/20/2026 10:52:58 PM (7 weeks ago)
- Branches:
- main
- Children:
- 7922694
- Parents:
- e6c6e6f
- git-author:
- Robin <roboburr@…> (07/20/2026 10:52:57 PM)
- git-committer:
- Robin <roboburr@…> (07/20/2026 10:52:58 PM)
- File:
-
- 1 edited
-
test/c2s-direct.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/c2s-direct.test.js
re6c6e6f r155c24e 38 38 }); 39 39 40 test('a help request emits shaer:helpRequest (FEP-633c 5.2.1)', () => { 41 db.prepare(`INSERT INTO ap_outbox (id, site_slug, post_id, post_slug, in_reply_to, to_actor, to_handle, content, visibility, to_actors, help_request, created_at) 42 VALUES ('d3','me','',NULL,NULL,'https://r.test/u/g','@g@r.test','<p>help</p>','direct','["https://r.test/u/g"]',1,CURRENT_TIMESTAMP)`).run(); 43 const row = db.prepare('SELECT * FROM ap_outbox WHERE id = ?').get('d3'); 44 const note = AP.buildReplyNote('https://test.example', site, row); 45 assert.equal(note['shaer:helpRequest'], true); 46 assert.deepEqual(note.cc, []); // still strictly direct 47 // and the namespace is declared, so the term is valid JSON-LD 48 const ctx = AP.AP_CONTEXT.find((p) => p && typeof p === 'object'); 49 assert.equal(ctx.shaer, 'https://ns.klonkt.com/shaer#'); 50 // a plain direct note (no flag) does NOT carry the term 51 const plainRow = db.prepare('SELECT * FROM ap_outbox WHERE id = ?').get('d1'); 52 assert.equal(AP.buildReplyNote('https://test.example', site, plainRow)['shaer:helpRequest'], undefined); 53 }); 54 40 55 test('direct without any real recipient is refused (400 no_recipients)', async () => { 41 56 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)