update sbot to use() phoenix-api
This commit is contained in:
parent
f988d7fbe8
commit
026de532c8
@ -16,7 +16,10 @@ app.on('ready', function ready () {
|
||||
|
||||
// start sbot
|
||||
require('scuttlebot').init(config, function (err, sbot) {
|
||||
// register protocols
|
||||
// register sbot plugins
|
||||
sbot.use(require('phoenix-api'))
|
||||
|
||||
// register electron protocols
|
||||
require('protocol').registerProtocol('blob', blobs.protocol)
|
||||
|
||||
// open the web app
|
||||
@ -26,7 +29,7 @@ app.on('ready', function ready () {
|
||||
blobs,
|
||||
{ width: 1000, height: 720 }
|
||||
)
|
||||
mainWindow.openDevTools()
|
||||
// mainWindow.openDevTools()
|
||||
|
||||
// setup menu
|
||||
// Menu.setApplicationMenu(Menu.buildFromTemplate([{
|
||||
|
@ -25,9 +25,10 @@ module.exports = function (window, sbot, params) {
|
||||
if (e.sender == window.webContents)
|
||||
ipcPush.push(msg)
|
||||
})
|
||||
pull(ipcPush, rpcStream, pull.drain(function (msg) {
|
||||
window.webContents.send('muxrpc-ssb', msg)
|
||||
}))
|
||||
pull(ipcPush, rpcStream, pull.drain(
|
||||
function (msg) { window.webContents.send('muxrpc-ssb', msg) },
|
||||
function (err) { if (err) { console.error(err) } }
|
||||
))
|
||||
|
||||
// setup helper messages
|
||||
ipc.on('fetch-config', function(e) {
|
||||
|
@ -28,6 +28,7 @@
|
||||
"multiblob": "^1.4.3",
|
||||
"multicb": "^1.1.0",
|
||||
"muxrpc": "^5.0.1",
|
||||
"phoenix-api": "~8.0.0",
|
||||
"pull-pushable": "^1.1.4",
|
||||
"pull-stream": "^2.27.0",
|
||||
"scuttlebot": "^4.2.3",
|
||||
|
Loading…
Reference in New Issue
Block a user