OverviewFilesCommitsIssuesDocsReleasesPeers

favela-host commits / 5a237c3

0.1.17: carry favela-peer 0.0.67 + favela-bridge 0.0.14 — deleted posts leave bsky
peerClient gains ownDeleted() → the peer's deleted-own, so the on-device projection retracts a deleted post or reply from bsky on its next pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5a237c33ab232150dff0fe2a56d985c05ee65ec7
by plankatron <fleeky@gmail.com> · 2026-10-15T00:52:00.000Z

Changed files (3) +18 -3

lib/project.js +3 -1
……@@ -99,7 +99,9 @@ export function peerClient (node) {
9999 const me = await call('whoami')
100100 const rows = await call('posts-by', { feed: me.feed })
101101 return { feed: me.feed, rows: Array.isArray(rows) ? rows : [] }
102 }
102 },
103 // My positively-deleted posts and replies — what the projection retracts from bsky.
104 ownDeleted: async () => call('deleted-own')
103105 }
104106}
105107
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-host",
3 "version": "0.1.16",
3 "version": "0.1.17",
44 "description": "THE favela app on a desktop, home node or server: a favela-peer node, favela-surface rendering it, the atproto signer and the bsky projection, in one process.",
55 "type": "module",
66 "main": "index.js",
test/project.test.js +14 -1
……@@ -11,7 +11,7 @@
1111// hpp and favela-peer WITHOUT sockets, because SELinux gives an Android app no `sock_file`.
1212
1313import test from 'brittle'
14import { deviceClient, pickNode } from '../lib/project.js'
14import { deviceClient, pickNode, peerClient } from '../lib/project.js'
1515
1616function fakeHppNode (did = 'did:plc:example') {
1717 const written = []
……@@ -96,3 +96,16 @@ test('pickNode honours the designated credential when byDid is a Map, as hpp ret
9696 t.is(r.node, b, 'the designated identity, not a refusal')
9797 t.ok(pickNode(hpp, null).error, 'still refuses with several and none designated')
9898})
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.
103test('★★ 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})