Skip to content
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

Test onMsgAdded.value #396

Open
Powersource opened this issue Oct 12, 2022 · 1 comment
Open

Test onMsgAdded.value #396

Powersource opened this issue Oct 12, 2022 · 1 comment

Comments

@Powersource
Copy link
Collaborator

According to the docs https://github.com/ssbc/ssb-db2#onmsgaddedcb you can do like this instead of using the callback

onMsgAdded itself is an obz, so the latest message added to the database can also be read using ssb.db.onMsgAdded.value

but when I tried getting using .value I only got undefined. The callback worked though. When searching I saw that we only test the callback form and not .value, so could be worth doing that to see if it's actually broken/the docs are wrong or if i just used it wrong.

@staltz
Copy link
Member

staltz commented Oct 12, 2022

Ah, it might be that the hooks (from secret-stack) borked the obz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants