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

Add Hook to compat functions #424

Closed
wants to merge 1 commit into from
Closed

Conversation

cooldracula
Copy link

No description provided.

i
Add Hook to compat functions

Co-Authored-By: Mix Irving<[email protected]>
@Powersource
Copy link
Collaborator

heey cool :) could we get a test though

@Powersource
Copy link
Collaborator

or maybe if we do this same pattern in other files it'd maybe not be needed

@mixmix
Copy link
Member

mixmix commented Nov 6, 2023

@Powersource this was Zach and I pairing in this area. Assume he's not coming back to this PR, then decide how you'd like to proceed. If this PR is still needed (I think this mainly exists to make testing some things easier), then can you take it over and pull me if any help needed ?

@Powersource
Copy link
Collaborator

yeah i think stuff like ssb-recps-guard needs this (if it detects ssb.publish it tries to hook it)

sbot.whoami = () => ({ id: sbot.id })
sbot.ready = () => true
})
sbot.publish = Hookable(sbot.db.publish)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbot.db.publish is created by the publish compat plugin. i wonder if this throws if we don't load that first?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a new PR with some changes, didn't want to juggle the branches around #427

@Powersource
Copy link
Collaborator

gonna merge that other PR

@Powersource
Copy link
Collaborator

v8.1.0

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

Successfully merging this pull request may close these issues.

4 participants