-
Notifications
You must be signed in to change notification settings - Fork 0
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
findById can't find root, add failing test #116
base: master
Are you sure you want to change the base?
Conversation
both new tests are failing. the iterating one only fails in the last step, where it gets the root. it doesn't error though, it just returns null |
what's praxis here, do we merge this now or later once we have a fix in this branch? |
Lines 279 to 284 in 08ef0ed
so does this only accept feeds that have been announced by other feeds? a bit confused by the db2 query. and does it have to return |
cc @mixmix although i think i might not need this fixed for my tribes2 pr atm so maybe no rush |
the docs for findById say
does that mean this is intended behaviour? would maybe be nice with an error instead in that case. |
Correct @Powersource it only finds subfeeds. This is because of how the query is written. (currently this draws on function findById(feedId, cb) {
// ...
sbot.db.query(
where(subfeed(feedId)), // <<<<<<<<<<<<<<<<
toCallback((err, msgs) => {
if (err) return cb(err)
// blah blah blah
})
)
} we can change the behaviour here but would like to understand the use case first , e.g. are you only wanting to find foreign root feeds? |
cc @Powersource |
Later when we have a fix in this branch, because |
@mixmix i needed to find someone's root feed id from a message they posted (group init msg) so i think i ended up not needing this fixed in the end. Maybe it's enough to clarify the readme and/or return an err when i'm using it wrong. |
I've written an |
that PR #120 |
for #115