| … | … | @@ -11,7 +11,7 @@ |
| 11 | 11 | // hpp and favela-peer WITHOUT sockets, because SELinux gives an Android app no `sock_file`. |
| 12 | 12 | |
| 13 | 13 | import test from 'brittle' |
| 14 | | import { deviceClient, pickNode } from '../lib/project.js' |
| 14 | import { deviceClient, pickNode, peerClient } from '../lib/project.js' |
| 15 | 15 | |
| 16 | 16 | function fakeHppNode (did = 'did:plc:example') { |
| 17 | 17 | const written = [] |
| … | … | @@ -96,3 +96,16 @@ test('pickNode honours the designated credential when byDid is a Map, as hpp ret |
| 96 | 96 | t.is(r.node, b, 'the designated identity, not a refusal') |
| 97 | 97 | t.ok(pickNode(hpp, null).error, 'still refuses with several and none designated') |
| 98 | 98 | }) |
| 99 | |
| 100 | // ⛔ The projection retracts from bsky only what the peer reports POSITIVELY deleted. Without this |
| 101 | // method on the adapter, a post deleted on the phone stays on bsky for ever — favela-bridge treats a |
| 102 | // peer with no ownDeleted as one that cannot say. |
| 103 | test('★★ the peer adapter reports my deleted posts and replies', async (t) => { |
| 104 | const node = { |
| 105 | peer: { |
| 106 | update: async () => {}, |
| 107 | feed: { tombstones: async (c) => (c === 'post' ? ['p1'] : ['r1']) } |
| 108 | } |
| 109 | } |
| 110 | t.alike(await peerClient(node).ownDeleted(), { post: ['p1'], reply: ['r1'] }) |
| 111 | }) |