update sbot to use() phoenix-api

Этот коммит содержится в:
Paul Frazee 2015-07-01 13:02:59 -05:00
родитель f988d7fbe8
Коммит 026de532c8
3 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -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",