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