orbitdb-archive / orbit-db-pubsub

Message propagation module for orbit-db
MIT License
19 stars 14 forks source link

add options parameter to publish and subscribe #18

Closed msterle closed 4 years ago

msterle commented 4 years ago

This is useful for use with ipfs-http-client, where the options parameter allows additional control (https://github.com/ipfs/js-ipfs-http-client#additional-options)

Our specific use-case is catching errors by being able to pass in an onError handler as well as using the AbortSignal to cancel requests. Using these we can try reopening the subscribe request if the connection between orbit-db and the ipfs host is lost.

haadcode commented 4 years ago

Looks good to me 👍 Thanks @msterle for the contribution ❤️

haadcode commented 4 years ago

Published to npm as v0.5.7.