Changeset 55eca8b in Klonkt for test/sent-notes.test.js
- Timestamp:
- 07/30/2026 12:49:18 PM (6 weeks ago)
- Branches:
- main
- Children:
- 1a2f206
- Parents:
- 6a99668
- File:
-
- 1 edited
-
test/sent-notes.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/sent-notes.test.js
r6a99668 r55eca8b 44 44 }); 45 45 46 test("an inbound reply on your post reaches the app's message stream", () => { 47 // The other half of "komt niet binnen bij de ander": inbound replies live 48 // in ap_interactions (web comments), never in ap_mentions, so the C2S read 49 // never served them. getReplyMessages is the leg that does. 50 db.prepare(`INSERT INTO posts (id, site_id, author_id, slug, title, content, status, published_at, created_at, updated_at) 51 VALUES ('p9','s1','u1','n-p9','', '<p>x</p>','published',datetime('now'),datetime('now'),datetime('now'))`).run(); 52 db.prepare(`INSERT INTO ap_interactions (kind, post_id, object_uri, actor_uri, actor_name, actor_handle, content, published, parent_uri, visibility, media_json, created_at) 53 VALUES ('reply','p9','https://unresolvable.invalid/notes/77','https://unresolvable.invalid/u/ness','Ness','@ness@unresolvable.invalid','<p>hoi terug</p>','2026-07-30T12:00:00Z','https://klonkt.test/ap/notes/p9','followers','[{"url":"https://unresolvable.invalid/m/f.jpg","type":"image/jpeg"}]',CURRENT_TIMESTAMP)`).run(); 54 const rows = AP.getReplyMessages('me', 60); 55 const r = rows.find((x) => x.object_uri === 'https://unresolvable.invalid/notes/77'); 56 assert.ok(r, 'the reply is served for the post owner'); 57 assert.equal(r.parent_uri, 'https://klonkt.test/ap/notes/p9', 'threads under the post'); 58 assert.equal(r.actor_handle, '@ness@unresolvable.invalid'); 59 assert.ok(r.media_json.includes('f.jpg'), 'its media rides along'); 60 assert.equal(AP.getReplyMessages('bestaat-niet', 60).length, 0, 'and only for the post owner'); 61 }); 62 46 63 test('a duplicate reply is idempotent success with the SAME id, not a 502', async () => { 47 64 const first = await AP.deliverReply(site, { postId: '', postSlug: null, parent, text: 'nogmaals', visibility: 'friends' });
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)