Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
disable DHT invites (until they work in sbot@13)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckegg committed Nov 28, 2018
1 parent 5deaf14 commit b473ba3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
19 changes: 11 additions & 8 deletions modules/page/html/render/public.js
Expand Up @@ -109,14 +109,17 @@ exports.create = function (api) {
h('button -pub -full', {
'ev-click': api.invite.sheet
}, i18n('+ Join Pub')),
h('SplitButton', [
h('button -createInvite', {
'ev-click': api.dhtInvite.create.sheet
}, i18n('Create Invite')),
h('button -acceptInvite', {
'ev-click': api.dhtInvite.accept.sheet
}, i18n('Accept Invite'))
]),

// disabling DHT invites until they work in sbot@13
//
// h('SplitButton', [
// h('button -createInvite', {
// 'ev-click': api.dhtInvite.create.sheet
// }, i18n('Create Invite')),
// h('button -acceptInvite', {
// 'ev-click': api.dhtInvite.accept.sheet
// }, i18n('Accept Invite'))
// ]),

when(loading, [ h('Loading') ], [
when(computed(channels, x => x.length), h('h2', i18n('Active Channels'))),
Expand Down
30 changes: 16 additions & 14 deletions server-process.js
Expand Up @@ -3,19 +3,21 @@ var Path = require('path')
var electron = require('electron')
var spawn = require('child_process').spawn
var fixPath = require('fix-path')
var DHT = require('multiserver-dht')
// var DHT = require('multiserver-dht')

function dhtTransport (sbot) {
sbot.multiserver.transport({
name: 'dht',
create: dhtConfig => {
return DHT({
keys: sbot.dhtInvite.channels(),
port: dhtConfig.port
})
}
})
}
// removing DHT invites until they work in sbot@13
//
// function dhtTransport (sbot) {
// sbot.multiserver.transport({
// name: 'dht',
// create: dhtConfig => {
// return DHT({
// keys: sbot.dhtInvite.channels(),
// port: dhtConfig.port
// })
// }
// })
// }

var createSbot = require('scuttlebot')
.use(require('scuttlebot/plugins/master'))
Expand All @@ -27,8 +29,8 @@ var createSbot = require('scuttlebot')
.use(require('ssb-blobs'))
.use(require('ssb-backlinks'))
.use(require('ssb-private'))
.use(require('ssb-dht-invite')) // this one must come before dhtTransport
.use(dhtTransport)
// .use(require('ssb-dht-invite')) // this one must come before dhtTransport
// .use(dhtTransport)
.use(require('scuttlebot/plugins/invite'))
.use(require('scuttlebot/plugins/local'))
.use(require('scuttlebot/plugins/logging'))
Expand Down

0 comments on commit b473ba3

Please sign in to comment.