Closed wemeetagain closed 4 months ago
Could these options be consolidated?
It would avoid the situation where a user sets both runOnSelfUpdate
and disableIdentifyPush
to true
and expects something to happen.
Also, can you add some tests to ensure there are no regressions?
IMO they are two separate features. One stops the outbound messages that automatically happen (but still allows manual outbound messages and allows handling inbound messages). One stops the handling of inbound messages.
could we split the identify module into two? Then we wouldn't need the disable feature. like:
createLibp2p({
services: {
identify: identify({...}),
identifyPush: identifyPush({...}),
}
})
could we split the identify module into two?
This sounds like a good solution since it's a separate protocol, it could be exported from @libp2p/identify
for convenience though since most people would want both most of the time.
Description
Add two options to the identify module to disable various parts of identify-push
runOnSelfUpdate
- set to false to stop sending identify-push messages automatically onself:peer:update
eventsdisableIdentifyPush
- set to true to disable identify-push entirely, this protocol isn't registered and identify-push messages can't be sentChange checklist