-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get({ meta: true }) not working for a message #9
Comments
I can confirm that ssb-db's |
@dominictarr @mixmix @staltz @arj03 Any chance any of you have seen this? I have to throw out a handful of messages because of this bug and I'm having a really hard time pinning down where it's losing |
REPRODUCED! It looks like ssb-ooo replaces SSB-DB: Message not foundInputconst secretStack = require('secret-stack')
const ssbCaps = require('ssb-caps')
const ssbDb = require('ssb-db')
const initialConfig = {
caps: ssbCaps,
path: '/home/christianbundy/.ssb/'
}
const stack = secretStack(initialConfig).use(ssbDb)
const messageKey = '%I/vlF/w18anHGRox3SgxrTiG9zrSdjHAImz6vwIhyZE=.sha256'
const app = stack({})
app.get({ id: messageKey, meta: true }, (err, value) => {
if (err) throw err
console.log(value)
app.close()
}) Output
SSB-DB + SSB-OOO: Message without keyInputconst secretStack = require('secret-stack')
const ssbCaps = require('ssb-caps')
const ssbDb = require('ssb-db')
const initialConfig = {
caps: ssbCaps,
path: '/home/christianbundy/.ssb/'
}
const stack = secretStack(initialConfig)
.use(ssbDb)
.use(require('ssb-ooo'))
const messageKey = '%I/vlF/w18anHGRox3SgxrTiG9zrSdjHAImz6vwIhyZE=.sha256'
const app = stack({})
app.get({ id: messageKey, meta: true }, (err, value) => {
if (err) throw err
console.log(value)
app.close()
}) Output{ previous: '%vB7cU50Xlu6lZ9TwHvUBlJqJrSbH1+UVkZ7sqv50wxU=.sha256',
sequence: 10,
author: '@4nh94nAjLIV42+6RcNhEecVU0mXmGDOSFq49tZUYGVg=.ed25519',
timestamp: 1576151631387,
hash: 'sha256',
content:
{ type: 'post',
root: '%50uBB9Bh17wZK2vpNqGbokBqP5RDDD1/FATUxCb3eW0=.sha256',
branch: '%50uBB9Bh17wZK2vpNqGbokBqP5RDDD1/FATUxCb3eW0=.sha256',
reply:
{ '%50uBB9Bh17wZK2vpNqGbokBqP5RDDD1/FATUxCb3eW0=.sha256': '@A+NcCwRM0oFkZncytGDjD6dpX/KcxHAehvaq2vwy66c=.ed25519' },
channel: 'scuttlebutt',
recps: null,
text:
'Being security minded I was thinking about this as well: How can this system be secured against illegal or unintended use? Is it up to the "public" server moderators to prevent this, and are there any tools to assist with the moderation of such content? If so, does this mean that SB will eventually move to purely private servers? Any p2p system very quickly can fall into disarray and be used for both illegal content and spam. How do you moderate? I haven\'t yet seen a p2p system that hasn\'t eventually fallen into that... but I\'d be interested to hear ideas on how to prevent this from happening here.\n\nThe internet as a whole is a terrible place full of terrible people, and as soon as you hit the critical mass of popularity, you have to have security and controls, otherwise you quickly fall prey to first the spammers, and then later much worse things.',
mentions: [] },
signature:
'mwZNq0eXRosIUOHGliR/WJwN1IgPE0aIcfPfPtXn+HA5Mybc/NUlMrT/zEWMKs0WchdMjBXXAYVYXjlvV5J4Aw==.sig.ed25519' } |
I must be doing something wrong, but I'm getting the same behavior in both JS and the CLI:
On most messages the
meta
option ensures that I receive the object as{ key, value }
, but for some reason this message seems to be getting passed as if themeta
option was disabled. Anyone have ideas why this might be?The text was updated successfully, but these errors were encountered: