Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmix committed Oct 25, 2022
1 parent aa5afa1 commit aac943f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ssb-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const DB_PATH = join(__dirname, '../db')
module.exports = function SSB (opts = {}) {
const stack = SecretStack({ caps })
.use([

require('ssb-db2/core'),
require('ssb-db2/compat/publish'),
require('ssb-classic'),
Expand All @@ -20,6 +21,7 @@ module.exports = function SSB (opts = {}) {
require('ssb-db2/compat/ebt'),
// require('ssb-db2/compat/post'),
require('ssb-db2/compat/db')

// require('ssb-db2/migrate'),
])
.use(require('ssb-about-self'))
Expand All @@ -40,7 +42,6 @@ module.exports = function SSB (opts = {}) {
// 2. live query to discover 'pub' messages with hosts
// 3. cycle through a series of different connections to discover more messages
// outstanding question: getStatus progress stuck?

.use(require('ssb-replication-scheduler'))
.use(require('ssb-blobs'))
.use(require('ssb-serve-blobs'))
Expand All @@ -56,6 +57,7 @@ module.exports = function SSB (opts = {}) {
ssb.lan.start()
pull(
ssb.conn.peers(),
pull.through(() => console.log('>')),
flatMap(evs => evs),
pull.asyncMap((ev, cb) => {
const feedId = ev[1].key
Expand All @@ -80,7 +82,7 @@ module.exports = function SSB (opts = {}) {
[
(cb) => ssb.friends.isFollowing({ source: ssb.id, dest: id }, cb),
(isFollowing, cb) => {
if (isFollowing) cb(null, true)
if (isFollowing) cb(null, null)
else ssb.friends.follow(id, { state: true }, cb)
},
(data, cb) => {
Expand Down

0 comments on commit aac943f

Please sign in to comment.