diff --git a/index.js b/index.js index fd9b03f..cf3a41f 100644 --- a/index.js +++ b/index.js @@ -62,6 +62,7 @@ module.exports = { const [input, cb] = args if ( + input.encryptionFormat !== undefined || isEncrypted(input.content) || (hasRecps(input.content) && !isAllowPublic2(input)) || allowedTypes.has(input.content.type) diff --git a/package.json b/package.json index 5ca7aef..d9e5a23 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,11 @@ "homepage": "https://github.com/ssbc/ssb-recps-guard#readme", "devDependencies": { "scuttle-testbot": "^2.2.0", + "ssb-box": "^1.0.1", + "ssb-box2": "^7.4.0", + "ssb-classic": "^1.1.0", "ssb-config": "^3.4.6", + "ssb-db2": "github:cooldracula/ssb-db2#add-hook", "ssb-private1": "^1.0.1", "ssb-tribes": "github:ssbc/ssb-tribes#pass-along-publish-opts", "tap-spec": "^5.0.0", diff --git a/test/db2.test.js b/test/db2.test.js index 1208941..f559b9c 100644 --- a/test/db2.test.js +++ b/test/db2.test.js @@ -81,7 +81,8 @@ test('db2', async t => { test('can create a group', async t => { const server = Server({db1: false}) - await p(server.tribes.create)({}) + const group = await p(server.tribes.create)({}) + t.equal(typeof group.groupId, 'string', 'created group with groupId') await p(server.close)() }) diff --git a/test/test-bot.js b/test/test-bot.js index 68c958c..3694d7a 100644 --- a/test/test-bot.js +++ b/test/test-bot.js @@ -17,12 +17,19 @@ module.exports = function (opts = {}) { }) } return Server // eslint-disable-line + .use(require('ssb-db2/core')) + .use(require('ssb-classic')) + .use(require('ssb-box')) + .use(require('ssb-box2')) + .use(require('ssb-db2/compat')) + .use(require('ssb-db2/compat/feedstate')) .use(require('ssb-tribes')) .use(require('../')) // ssb-recps-guard .call(null, { box2: { legacyMode: true }, - ...opts + ...opts, + noDefaultUse: true }) }