-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Docs: instance.publish(packet) expects an aedes-packet object #70
Conversation
… an mqtt-packet Updated the docs to match the new parameter expectation.
@@ -143,7 +143,7 @@ It supports backpressure. | |||
### instance.publish(packet, done) | |||
|
|||
Publish the given packet to subscribed clients and functions. A packet | |||
must be valid for [mqtt-packet](http://npm.im/mqtt-packet). | |||
must be valid for [aedes-packet](http://npm.im/aedes-packet). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In aedes-packet, everything is defaulted:
https://github.com/mcollina/aedes-packet/blob/master/packet.js#L4-L11.
I think a much better definition can be: a packet must have the following properties...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcollina I think you have outlined it well here:
https://www.npmjs.com/package/mqtt-packet#publish
Should I just copy over that explanation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcollina Updated the PR 😄 Let me know if anything is missing.
Uses modified description from https://www.npmjs.com/package/mqtt-packet#publish according to properties expected and extracted in aedes-packet: https://github.com/mcollina/aedes-packet/blob/master/packet.js#L4-L11
Perfect, thanks! |
Updated the docs to match the new parameter expectation.