| … | … | @@ -194,6 +194,17 @@ async function boot () { |
| 194 | 194 | process.env.FAVELA_HOST = '127.0.0.1' |
| 195 | 195 | process.env.FAVELA_STORE_ROOT = path.join(dirs.root, 'favela-web') |
| 196 | 196 | process.env.FAVELA_SOCK = path.join(dirs.root, 'favela-web', 'svc.sock') |
| 197 | // THE WRITE PATH. favela-web refuses writes unless it can NAME the hpp it writes to, and it was |
| 198 | // never told — so the embedded server logged "writes are DISABLED" and every compose/like/follow |
| 199 | // through it failed, while reads worked fine and hid it. The hpp is in THIS process with its control |
| 200 | // socket already open, so name that: local IPC, no DHT, and the DID key never leaves the handset |
| 201 | // (which is why FAVELA_CONTROL_KEY, the REMOTE-hpp transport, must stay unset here). |
| 202 | // |
| 203 | // The path comes from hpp itself (bootSwarmDevice's `uds`) rather than being rebuilt from its private |
| 204 | // <storage>/dids/<roomId>/ layout — see the note on that field in device-node.js. |
| 205 | const ctlSock = state.hpp && state.hpp.nodes && state.hpp.nodes[0] && state.hpp.nodes[0].uds |
| 206 | if (ctlSock) process.env.FAVELA_HPP_SOCK = ctlSock |
| 207 | else log('hpp exposed no control socket — favela-web will refuse writes (reads unaffected)') |
| 197 | 208 | fs.mkdirSync(process.env.FAVELA_STORE_ROOT, { recursive: true }) |
| 198 | 209 | await import('favela-web/bin/favela-web.js') |
| 199 | 210 | state.favelaUrl = 'http://127.0.0.1:' + FAVELA_PORT |